Fix bootm to work on powerpc again (compressed uImage)
PATCH 1/1 Fix bootm to work on powerpc again (compressed uImage)
Patch 35fc84fa1 [Refactor the bootm command to reduce code duplication] breaks booting Linux (compressed uImage with fdt) on powerpc.
boot_jump_linux() mustn't be called before boot_prep_linux() and boot_body_linux() have been called. So remove the superfluous call to boot_jump_linux() in arch/powerpc/lib/bootm.c as its called later on in this function.
---
Simon, I'm not 100% sure why this is triggered by your patch.
As you see, my patch only fixes powerpc. ARM might have the same problem as it has the same code duplication in bootm.c.
Thanks,
Stefan
arch/powerpc/lib/bootm.c | 5 ----- 1 file changed, 5 deletions(-)
arch/powerpc/lib/bootm.c +0 -5
@@ -256,11 +256,6 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *imareturn 0 ; } -if (flag &BOOTM_STATE_OS_GO ) { -boot_jump_linux (images); -return 0 ; - } -boot_prep_linux (images); ret =boot_body_linux (images);if (ret)
Signature · 1 line
1.8.3.1
PATCH 1/1 Fix bootm to work on powerpc again (compressed uImage)
Quoted 8 lines · Stefan Roese
Patch
35fc84fa1[Refactor the bootm command to reduce code duplication] breaks booting Linux (compressed uImage with fdt) on powerpc.
boot_jump_linux()mustn't be called beforeboot_prep_linux()andboot_body_linux()have been called. So remove the superfluous call toboot_jump_linux()inarch/powerpc/lib/bootm.cas its called later on in this function.
Quoted 8 lines
Signed-off-by Stefan Roese <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>---
Simon, I'm not 100% sure why this is triggered by your patch.As you see, my patch only fixes powerpc. ARM might have the same problem as it has the same code duplication in
bootm.c.
Progress! On PowerPC, does bootm work like before? I still have to issue a separate 'bootm go', but that now boots, rather than hangs.
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/20130628/6f81433d/attachment.pgp>
PATCH 1/1 Fix bootm to work on powerpc again (compressed uImage)
Quoted 14 lines · Tom Rini
Quoted 14 lines
Patch
35fc84fa1[Refactor the bootm command to reduce code duplication] breaks booting Linux (compressed uImage with fdt) on powerpc.
boot_jump_linux()mustn't be called beforeboot_prep_linux()andboot_body_linux()have been called. So remove the superfluous call toboot_jump_linux()inarch/powerpc/lib/bootm.cas its called later on in this function.Signed-off-by Stefan Roese <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>---
Simon, I'm not 100% sure why this is triggered by your patch.
Quoted 4 lines
Quoted 2 lines
As you see, my patch only fixes powerpc. ARM might have the same problem as it has the same code duplication in
bootm.c.Progress! On PowerPC, does bootm work like before?
Yes. I'm using the same environment (boot_cmd) as before. And without this patch "bootm kernel_addr - fdt_addr' hangs. I might only affect DT booting, as without this patch boot_jump_linux() is called without calling boot_prep_linux() and boot_body_linux() before. One of those (I didn't check which one) is responsible for this line:
Loading Device Tree to 007f8000, end 007ffdd4 ... OK
And this is missing when this patch is not applied.
Thanks,
Stefan
PATCH 1/1 Fix bootm to work on powerpc again (compressed uImage)
In reply to Stefan RoeseHi Stefan,
Quoted 12 lines · Stefan Roese
Patch
35fc84fa1[Refactor the bootm command to reduce code duplication] breaks booting Linux (compressed uImage with fdt) on powerpc.
boot_jump_linux()mustn't be called beforeboot_prep_linux()andboot_body_linux()have been called. So remove the superfluous call toboot_jump_linux()inarch/powerpc/lib/bootm.cas its called later on in this function.Signed-off-by Stefan Roese <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>
Quoted 3 lines
---
Simon, I'm not 100% sure why this is triggered by your patch.
I'm very grateful for your time spent looking at this and getting to the bottom of it!
Maybe because do_bootm_linux() is a funny function - you can call it with a mask in which case it will do that step, but if you call it with 0 it will do all steps. Seems like something that should be tidied up.
Quoted 28 lines
As you see, my patch only fixes powerpc. ARM might have the same problem as it has the same code duplication in
bootm.c.Thanks,
Stefanarch/powerpc/lib/bootm.c | 5 ----- 1 file changed, 5 deletions(-)arch/powerpc/lib/bootm.c +0
-0@@ -256,11 +256,6 @@ int do_bootm_linux(int flag, int argc, char * constargv[],
bootm_headers_t*imareturn 0; }arch/powerpc/lib/bootm.c +0
-6-if (flag &BOOTM_STATE_OS_GO ) { -boot_jump_linux (images); -return 0 ; - } -boot_prep_linux (images); ret =boot_body_linux (images);if (ret) --
Quoted 3 lines
1.8.3.1
Regards,
Simon
PATCH 1/1 Fix bootm to work on powerpc again (compressed uImage)
In reply to Stefan RoeseQuoted 11 lines · Stefan Roese
Patch
35fc84fa1[Refactor the bootm command to reduce code duplication] breaks booting Linux (compressed uImage with fdt) on powerpc.
boot_jump_linux()mustn't be called beforeboot_prep_linux()andboot_body_linux()have been called. So remove the superfluous call toboot_jump_linux()inarch/powerpc/lib/bootm.cas its called later on in this function.Signed-off-by Stefan Roese <[email protected]>Cc Simon Glass <[email protected]>Cc Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
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/20130628/ed02a9b2/attachment.pgp>