答复: How to load a linux kernel under vxworks bootloader (PPC860 board)
FCG WANG Baohua
Baohua.WANG at alcatel-sbell.com.cn
Fri Jul 29 12:13:23 EST 2005
Dear Linville:
I use the zImage to download to RAM from the vmlinux TFTP. The strange thins happened :
The serial console print the following message and halted :
"Starting at 0x380000... "
I want to ask:
I. I saw the System.map is starting at the address 0x00000, but why the zImage is starting at 0x380000 ?
2. "Thankfully, I recall that later kernel versions did not have that problem."
I use the ELDK3.1.1, kernel 2.4.25.tar.bz2, Which version had you revised the kernel ? 2.6.x ?
If I need the 2.4.25 (for its config file fits the PPC860 ADS), What can I do ?
3. In the vxworks BSP Makefile :
ROM_TEXT_ADRS = 02800100 # ROM entry address
ROM_SIZE = 00200000 # number of bytes of ROM space
RAM_LOW_ADRS = 00010000 # RAM text/data address
RAM_HIGH_ADRS = 00200000 # RAM text/data address
How can I relocate to the right address if I download the linux kernel and excute it in RAM?
Thanks a lot !
-----原始邮件-----
发件人: 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