mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-29 23:05:00 +02:00
qi-kernel-source-skip-if-ui-key-down.patch
Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
parent
f23a39d80d
commit
842a4ad19b
@ -143,6 +143,12 @@ int nand_read_ll(unsigned char *buf, unsigned long start_block512,
|
|||||||
start_block512 += j;
|
start_block512 += j;
|
||||||
buf += j << 9;
|
buf += j << 9;
|
||||||
blocks512 -= j;
|
blocks512 -= j;
|
||||||
|
|
||||||
|
if (this_board->get_ui_keys)
|
||||||
|
if ((this_board->get_ui_keys)() & UI_ACTION_SKIPKERNEL) {
|
||||||
|
puts(" ** skipping \n");
|
||||||
|
return -3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* chip Disable */
|
/* chip Disable */
|
||||||
|
@ -52,6 +52,12 @@ int ext2fs_devread(int sector, int filesystem_block_log2, int byte_offset, int b
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this_board->get_ui_keys)
|
||||||
|
if ((this_board->get_ui_keys)() & UI_ACTION_SKIPKERNEL) {
|
||||||
|
puts(" ** skipping \n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the read to the beginning of a partition.
|
* Get the read to the beginning of a partition.
|
||||||
*/
|
*/
|
||||||
|
@ -45,6 +45,7 @@ int raise(int n)
|
|||||||
int read_file(const char * filepath, u8 * destination, int size)
|
int read_file(const char * filepath, u8 * destination, int size)
|
||||||
{
|
{
|
||||||
int len = size;
|
int len = size;
|
||||||
|
int ret;
|
||||||
|
|
||||||
switch (this_kernel->filesystem) {
|
switch (this_kernel->filesystem) {
|
||||||
case FS_EXT2:
|
case FS_EXT2:
|
||||||
@ -60,7 +61,11 @@ int read_file(const char * filepath, u8 * destination, int size)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
puts(" OK\n");
|
puts(" OK\n");
|
||||||
ext2fs_read((char *)destination, size);
|
ret = ext2fs_read((char *)destination, size);
|
||||||
|
if (ret < 0) {
|
||||||
|
puts(" Read failed\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FS_FAT:
|
case FS_FAT:
|
||||||
@ -282,26 +287,24 @@ void bootloader_second_phase(void)
|
|||||||
|
|
||||||
/* kernel commandline */
|
/* kernel commandline */
|
||||||
|
|
||||||
if (*p) {
|
cmdline = params->u.cmdline.cmdline;
|
||||||
cmdline = params->u.cmdline.cmdline;
|
cmdline += strlen(strcpy(cmdline, p));
|
||||||
cmdline += strlen(strcpy(cmdline, p));
|
if (this_kernel->commandline_append)
|
||||||
if (this_kernel->commandline_append)
|
cmdline += strlen(strcpy(cmdline,
|
||||||
cmdline += strlen(strcpy(cmdline,
|
|
||||||
this_kernel->commandline_append));
|
this_kernel->commandline_append));
|
||||||
if (commandline_rootfs_append[0])
|
if (commandline_rootfs_append[0])
|
||||||
cmdline += strlen(strcpy(cmdline,
|
cmdline += strlen(strcpy(cmdline,
|
||||||
commandline_rootfs_append));
|
commandline_rootfs_append));
|
||||||
|
|
||||||
params->hdr.tag = ATAG_CMDLINE;
|
params->hdr.tag = ATAG_CMDLINE;
|
||||||
params->hdr.size = (sizeof (struct tag_header) +
|
params->hdr.size = (sizeof (struct tag_header) +
|
||||||
strlen(params->u.cmdline.cmdline) + 1 + 4) >> 2;
|
strlen(params->u.cmdline.cmdline) + 1 + 4) >> 2;
|
||||||
|
|
||||||
puts(" Cmdline: ");
|
puts(" Cmdline: ");
|
||||||
puts(params->u.cmdline.cmdline);
|
puts(params->u.cmdline.cmdline);
|
||||||
puts("\n");
|
puts("\n");
|
||||||
|
|
||||||
params = tag_next (params);
|
params = tag_next (params);
|
||||||
}
|
|
||||||
|
|
||||||
/* needs to always be the last tag */
|
/* needs to always be the last tag */
|
||||||
params->hdr.tag = ATAG_NONE;
|
params->hdr.tag = ATAG_NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user