1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-30 01:51:52 +02:00

qi-kernel-source-skip-if-ui-key-down.patch

Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
Andy Green 2008-12-01 01:26:05 +00:00 committed by Andy Green
parent f23a39d80d
commit 842a4ad19b
3 changed files with 29 additions and 14 deletions

View File

@ -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 */

View File

@ -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.
*/ */

View File

@ -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,7 +287,6 @@ 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)
@ -301,7 +305,6 @@ void bootloader_second_phase(void)
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;