
Dear U-boot team I'm currently working on an embedded system that uses U-boot as a second step bootloader. I'm testing the booting time of the kernel with binary formats. Before I was able to flash the first level bootloader, the u-boot and the kernel (uImage) into the nand flash of the embedded system with the following command on u-boot: bootcmd=nand read.jffs2 0x22000000 0x200000 0xB00000; bootm 0x22000000
- I would like to know if the bootm command is actually loading the complete kernel to RAM or if it is loading only the required pages from flash.
- Also, please correct me if I'm wrong but from the description of the bootm command, it seemed to me as if the bootm command should be enough to actually start the kernel, nevertheless I encountered myself with needing to previously read the kernel from the flash, to later be able to boot it, why is that so?
- I have also tried an xipImage for the kernel, nevertheless once I use this binary format, uboot promts an error: can't get kernel image! I checked the tutorial available at your website http://www.denx.de/wiki/bin/view/DULG/ConfigureLinuxForXIP, and I confirmed that my linux configuration creates an xipImage (not a uImage as stated in the tutorial). Does u-boot supports kernel execution in place? and if so, does it only loads the necesary pages or does it fully loads the kernel from the nand flash.
Thanks for your attention Kind regards _________________________________________ Camilo Andres Roca Duarte Communication and Media Engineering Student Hochschule Offenburg

Dear Camilo Andres Roca Duarte,
In message CAMdPjjUHad-UuJjkM8MR6bb6Vic64zzW7WopmZMnbE_qXczSUQ@mail.gmail.com you wrote:
- I would like to know if the bootm command is actually loading the
complete kernel to RAM or if it is loading only the required pages from flash.
"bootm" has no knowledge about things like what a kernel is or what required pages might be, From the image header it gets only information about start address and size of a memory range, and this is what it will process. I guess this matches what you call "complete kernel".
But please be careful: when talking about the "loading" that takes place, then keep in mind that this is a copy to system memory, or a decompress and store to system memory, but in both cases the origin of the data is also somewhwere in the memory address range, i. e. in RAM, NOR flash or similar.
Actually the 'm' in "bootm" means "boot an image that is located somewhere in *M*emory".
- Also, please correct me if I'm wrong but from the description of the
bootm command, it seemed to me as if the bootm command should be enough to actually start the kernel, nevertheless I encountered myself with needing to previously read the kernel from the flash, to later be able to boot it, why is that so?
With "flash", you mean NAND flash. NAND flash is not memory, but a storage device. So you need other means to read the data from the storage device into memory. Only then you can use "bootm".
- I have also tried an xipImage for the kernel, nevertheless once I use
this binary format, uboot promts an error: can't get kernel image!
Using XIP requires a really detailed understand of all the steps of the boot process, both in U-Boot and in the kernel.
I checked the tutorial available at your website http://www.denx.de/wiki/bin/view/DULG/ConfigureLinuxForXIP, and I
Please have a look at the age of this page - the information there cannot be used directly on recent code; you will need to adjust it carefully. [And if you do and get it working, it would be magnificent if you could also update the wiki page so it is up to date again.]
confirmed that my linux configuration creates an xipImage (not a uImage as stated in the tutorial). Does u-boot supports kernel execution in place?
In principle it does, but you really have to kow exactly what you are doing.
and if so, does it only loads the necesary pages or does it fully loads the kernel from the nand flash.
You asked the same before - see above.
Best regards,
Wolfgang Denk
participants (2)
-
Camilo Andres Roca Duarte
-
Wolfgang Denk