1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2025-04-21 12:27:27 +03: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;
buf += j << 9;
blocks512 -= j;
if (this_board->get_ui_keys)
if ((this_board->get_ui_keys)() & UI_ACTION_SKIPKERNEL) {
puts(" ** skipping \n");
return -3;
}
}
/* chip Disable */

View File

@@ -52,6 +52,12 @@ int ext2fs_devread(int sector, int filesystem_block_log2, int byte_offset, int b
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.
*/

View File

@@ -45,6 +45,7 @@ int raise(int n)
int read_file(const char * filepath, u8 * destination, int size)
{
int len = size;
int ret;
switch (this_kernel->filesystem) {
case FS_EXT2:
@@ -60,7 +61,11 @@ int read_file(const char * filepath, u8 * destination, int size)
return -1;
}
puts(" OK\n");
ext2fs_read((char *)destination, size);
ret = ext2fs_read((char *)destination, size);
if (ret < 0) {
puts(" Read failed\n");
return -1;
}
break;
case FS_FAT:
@@ -282,7 +287,6 @@ void bootloader_second_phase(void)
/* kernel commandline */
if (*p) {
cmdline = params->u.cmdline.cmdline;
cmdline += strlen(strcpy(cmdline, p));
if (this_kernel->commandline_append)
@@ -301,7 +305,6 @@ void bootloader_second_phase(void)
puts("\n");
params = tag_next (params);
}
/* needs to always be the last tag */
params->hdr.tag = ATAG_NONE;