答复: How to load a linux kernel under vxworks bootloader (PPC860 board)

FCG WANG Baohua Baohua.WANG at alcatel-sbell.com.cn
Fri Jul 29 18:27:06 EST 2005


Dear linville:
  I found that the vxWorks bootrom is load to RAM 0x2800100 address, but different address with the different kernel file downloading to the RAM.
   For example: the ppcboot ELF file is downloaded to the 0x2800000 and only 150256 bytes is downloaded (total file size is 989064 bytes)
                           the zImage kernel file  is downloaded to the 0x380000 and only 533004 bytes is downloaded (total file size is 591899 bytes)
  What's the reason for explain it? Does the vxWorks bootloader uncompressed the file with its own algorithm? 
  How to download the U-Boot ELF file correctly? Thanks! 
  The right way is to find the right entry points of U-Boot, but whatever I change the configure of U-Boot, it doesn't work at all. That is, the entry point is 
  forever 0x2800000 for U-Boot and 0x380000  for zImage. 
  

-----原始邮件-----
发件人: John W. Linville [mailto:linville at tuxdriver.com]
发送时间: 2005年7月29日 0:58
收件人: FCG WANG Baohua
主题: Re: How to load a linux kernel under vxworks bootloader (PPC860
board)


On Thu, Jul 28, 2005 at 01:02:04PM +0800, FCG WANG Baohua wrote:
>  Dear linville:
>    I want to boot a linux 2.4.25 kernel under vxworks
>  bootloader. When I using flat mode(0x200000 -->  0x10000)
>  kernel  uncompressed ELF format ( vmlinux ),
>   and download it using TFTP of vxworks, it print the "starting
>  at 0x1000 ...." and  freeze.  No input or output on serial port.
>   The version of vxworks is 5.3.1. 
>   can you give me some detail advice or give me a tool to slove
>  it? thanks !

It looks like Guy Streeter gave you as good advice as I could give.
Be sure to read his post on linuxppc-embedded.

In the past there was an issue in that the VxWorks boot loader only
loaded .text and .data sections from ELF images.  At that time,
zImage files packed the "real" kernel image into an extra section
in the ELF file, and the VxWorks loader would not load it.  The fix
then was to hack the ELF header to make the extra section appear to
be part of the .data section.

Thankfully, I recall that later kernel versions did not have that
problem.  I think using a zImage (or zImage.initrd) file that has
been properly modified to support your board should be all that
is necessary.  Using a zImage is necessary because it includes a
"shim" that knows how to communicate critical information to the
actual Linux kernel.  The VxWorks boot loader does not provide this
information to Linux.

As someone else suggested, your best bet would be to use U-Boot or some
other loader that understands Linux.  U-Boot ports are fairly simple.
If you don't want to do one, you probably could convince me to do
a U-Boot port if you wanted to send me a board (and possibly some
reasonably compensation)... :-)

Good luck!

John
-- 
John W. Linville
linville at tuxdriver.com



More information about the Linuxppc-embedded mailing list