[U-Boot-Users] Automatic boot of Linux from flash (Big ppcboot image the sequel)

Hi, I tried another approach to boot directly Linux ,from flash from an image loaded in flash in one block. Instead of compiling ppcboot with an image of the linux kernel in a big array ( makes linking problem) I placed the kernel image direcltly after the ppcboot image with the (linux) command cat image >> ppcboot.bin. With the offset of the kernel and its length hardcoded no problem everything start. But when I use the function get_endaddr() (before relocation of course) It give me back an address approximatively 30 kBytes after the real end of ppcboot. Second problem, How can I find back or make ppcboot find the end of the Kernel image without anything hardcoded ? ---------------------------------------------------------------------------- ------ Benoit Callebaut Software Development Engineer Barco | Control Rooms Noordlaan 5, 8520 Kuurne, Belgium
Tel +32(0)56 36 84 28 Fax +32(0)56 36 86 05
mailto:benoit.callebaut@barco.com http://www.barcocontrolrooms.com

Hi,
in message 81A66F72DCACD511B0600002A551BFCB4E9CE6@kuumex05.barco.com you wrote:
I tried another approach to boot directly Linux ,from flash from an image loaded in flash in one block.
What do you mean with "in one block"? One erase unit? One image file? Or what?
Instead of compiling ppcboot with an image of the linux kernel in a big array ( makes linking problem)
It makes only linking problems if you fail to adjust the linker script; if you check for example how the Linux bootstrap loader embeds theLinux kernel and the ramdisk image as separate sections into a binary image you should get an idea how this can be done. But that does not mean that I recommend such a method - it seems to me to be a very strange thing to do.
I placed the kernel image direcltly after the ppcboot image with the (linux) command cat image >> ppcboot.bin.
Again, I don't think this is a good idea. It makes it impossible to ever update the Linux kernel image without replacing U-Boot, too. The risk to hang the whole system during this procedure makes this prohibitive.
Maybe you should explain why you think you must include the kernel image within the PPCBoot image, without proper alignment on flash erase unit boundaries. I am pretty sure there must be better ways to acchieve whtever you are trying to do.
With the offset of the kernel and its length hardcoded no problem everything start.
I really wonder what you are doing.
But when I use the function get_endaddr() (before relocation of course) It give me back an address approximatively 30 kBytes after the real end of ppcboot.
???
Second problem, How can I find back or make ppcboot find the end of the Kernel image without anything hardcoded ?
Why would you do such a thing? PPCboot does not need to know the end of the kernel image. For booting you just have to pass the start address. And I strongly recommend to align this stard address with an erase unit of your flash.
Best regards,
Wolfgang Denk
participants (2)
-
"Callebaut, Benoît"
-
Wolfgang Denk