avr32: fix do_bootm_linux
Subsystems (6)
PATCH v2 1/1 avr32: fix do_bootm_linux
From: Andreas Bie?mann <[email protected]>
Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before calling it again with flag set to BOOTM_STATE_OS_GO.
Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will require a complete refactoring later on.
--- arch/avr32/lib/bootm.c | 9 +++++++++ arch/m68k/lib/bootm.c | 6 ++++++ arch/microblaze/lib/bootm.c | 6 ++++++ arch/nds32/lib/bootm.c | 6 ++++++ arch/nios2/lib/bootm.c | 6 ++++++ arch/openrisc/lib/bootm.c | 6 ++++++ arch/sh/lib/bootm.c | 6 ++++++ arch/sparc/lib/bootm.c | 6 ++++++ 8 files changed, 51 insertions(+)
arch/avr32/lib/bootm.c +9 -0
@@ -187,6 +187,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *imastruct tag *params, *params_start;char *commandline =getenv ("bootargs" ); +/* +* allow the PREP bootm subcommand, it is required for bootm to work +* +* TODO: Andreas Bie?mann <[email protected]> refactor the +* do_bootm_linux() for avr32 +*/ +if (flag &BOOTM_STATE_OS_PREP ) +return 0 ; +if ((flag !=0 ) && (flag !=BOOTM_STATE_OS_GO ))return 1 ;
arch/m68k/lib/bootm.c +6 -0
@@ -75,6 +75,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *imavoid (*kernel) (bd_t *,ulong ,ulong ,ulong ,ulong );struct lmb *lmb = &images->lmb; +/* +* 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 ;
arch/microblaze/lib/bootm.c +6 -0
@@ -40,6 +40,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[],char *commandline =getenv ("bootargs" );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 ;
arch/nds32/lib/bootm.c +6 -0
@@ -58,6 +58,12 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)char *commandline =getenv ("bootargs" );#endif +/* +* 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 ;
arch/nios2/lib/bootm.c +6 -0
@@ -45,6 +45,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *imaif (of_flat_tree) initrd_end = (ulong )of_flat_tree; +/* +* 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 ;
arch/openrisc/lib/bootm.c +6 -0
@@ -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 ;
arch/sh/lib/bootm.c +6 -0
@@ -79,6 +79,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *imaunsigned long size = images->ep - (unsigned long )param;char *bootargs =getenv ("bootargs" ); +/* +* 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 ;
arch/sparc/lib/bootm.c +6 -0
@@ -99,6 +99,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t * imvoid (*kernel) (struct linux_romvec *,void *);int ret; +/* +* 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 ;
Signature · 1 line
1.7.9.5
PATCH v2 1/1 avr32: fix do_bootm_linux
Quoted 1 line · Tom Rini
From: Andreas Bie??mann <[email protected]>
OK, forgot to update the topline commit message to:
avr32/m68k/microblaze/nds32/nios2/openrisc/sh/sparc: fix do_bootm_linux
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130702/f66bb725/attachment.pgp>
PATCH v2 1/1 avr32: fix do_bootm_linux
Quoted 6 lines · Tom Rini
Quoted 1 line · Tom Rini
From: Andreas Bie??mann <[email protected]>
OK, forgot to update the topline commit message to:
avr32/m68k/microblaze/nds32/nios2/openrisc/sh/sparc: fixdo_bootm_linux
Applied to u-boot/master.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130703/2723f4cb/attachment.pgp>