diff options
Diffstat (limited to 'arch/openrisc/lib/bootm.c')
| -rw-r--r-- | arch/openrisc/lib/bootm.c | 10 | 
1 files changed, 8 insertions, 2 deletions
| diff --git a/arch/openrisc/lib/bootm.c b/arch/openrisc/lib/bootm.c index 2c5d9aea9..24ca0a724 100644 --- a/arch/openrisc/lib/bootm.c +++ b/arch/openrisc/lib/bootm.c @@ -41,6 +41,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[],  	void	(*kernel) (unsigned int);  	ulong	rd_data_start, rd_data_end; +	/* +	 * allow the PREP bootm subcommand, it is required for bootm to work +	 */ +	if (flag & BOOTM_STATE_OS_PREP) +		return 0; +  	if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))  		return 1; @@ -63,8 +69,8 @@ int do_bootm_linux(int flag, int argc, char * const argv[],  	show_boot_progress(15); -	if (!of_flat_tree && argc > 3) -		of_flat_tree = (char *)simple_strtoul(argv[3], NULL, 16); +	if (!of_flat_tree && argc > 1) +		of_flat_tree = (char *)simple_strtoul(argv[1], NULL, 16);  #ifdef DEBUG  	printf("## Transferring control to Linux (at address 0x%08lx) " \  				"ramdisk 0x%08lx, FDT 0x%08lx...\n", |