[U-Boot] Booting zImage from UBOOT

I've been framing this mail for quite some time trying to sort all issues myself by googling for info. I learnt a lot in the process by doing it and verify it myself, using my openocd jtag and Samsung based mini2440 board.
I read that uImage is nothing more than (64byte header + zImage). I've been studying decompression code so it suited me to tweak UBOOT code to boot zImage rather than writing my own bootcode. Just a small modification in do_bootm_linux function did the job: -- theKernel = (void (*)(int, int, uint))ep; ++ theKernel = (void (*)(int, int, uint))0x32000040; Here I load uImage at 0x32000000(through tftp), so zImage starts at 0x32000040. Kernel booted fine(bootm 0x32000000) but, I was bit sceptical whether my understanding that in effect I booted a zImage is correct or not.
Reason for my scepticism is that I let UBOOT to decompress the kernel at required entry point, and same thing is done if I directly jump to offset 0x40 in uImage.
Best Regards Ritu

On 03/20/2013 01:27 PM, Ritu Sharma wrote: ...
I read that uImage is nothing more than (64byte header + zImage). I've been studying decompression code so it suited me to tweak UBOOT code to boot zImage rather than writing my own bootcode. Just a small modification in do_bootm_linux function did the job:
In recent versions of U-Boot, you can simply enable the bootz command, which boots a raw zImage.

On Wed, Mar 20, 2013 at 6:02 PM, Stephen Warren swarren@wwwdotorg.org wrote:
On 03/20/2013 01:27 PM, Ritu Sharma wrote: ...
I read that uImage is nothing more than (64byte header + zImage). I've been studying decompression code so it suited me to tweak UBOOT code to boot zImage rather than writing my own bootcode. Just a small modification in do_bootm_linux function did the job:
In recent versions of U-Boot, you can simply enable the bootz command, which boots a raw zImage.
And in order to enable the bootz command, you need to add: #define CONFIG_CMD_BOOTZ
,in your board config file (include/configs/)

Thanks for the info. But I checked the version supported by the vendor of board does not have bootz command implemented. And I am just a user for UBOOT.
Thus could anyone just let me know that the hack I am using is correct and if I jump at offset 0x40 in uImage then it is equilant of using zImage directly? I use bootm command since it already satisfies all the kernel requirements mentioned at here: http://www.arm.linux.org.uk/developer/booting.php
Best Regards Ritu
On Thu, Mar 21, 2013 at 3:10 AM, Fabio Estevam festevam@gmail.com wrote:
On Wed, Mar 20, 2013 at 6:02 PM, Stephen Warren swarren@wwwdotorg.org wrote:
On 03/20/2013 01:27 PM, Ritu Sharma wrote: ...
I read that uImage is nothing more than (64byte header + zImage). I've
been
studying decompression code so it suited me to tweak UBOOT code to boot zImage rather than writing my own bootcode. Just a small modification in do_bootm_linux function did the job:
In recent versions of U-Boot, you can simply enable the bootz command, which boots a raw zImage.
And in order to enable the bootz command, you need to add: #define CONFIG_CMD_BOOTZ
,in your board config file (include/configs/)
participants (3)
-
Fabio Estevam
-
Ritu Sharma
-
Stephen Warren