[U-Boot-Users] Automatic boot of Linux from flash (Big ppcboot image the sequel)
Wolfgang Denk
wd at denx.de
Mon Dec 16 12:12:30 CET 2002
Hi,
in message <81A66F72DCACD511B0600002A551BFCB4E9CE6 at 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
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de
Any sufficiently advanced technology is indistinguishable from magic.
Clarke's Third Law - _Profiles of the Future_ (1962; rev. 1973)
``Hazards of Prophecy: The Failure of Imagination''
More information about the U-Boot
mailing list