[ELDK] Unable to boot Linux Kernel 2.6.24 into MPC5200 (lite5200b)
Wolfgang Grandegger
wg at grandegger.com
Sat Jul 10 11:46:48 CEST 2010
Hi Peter,
please do not drop the CC to the ELDK mailing list.
On 07/10/2010 09:32 AM, Peter Kunnemann ITB wrote:
> Wolfgang,
>
> thank you very much for your quick response. Unfortunately, I have not made
> any progress in load the linux Kernel.
>
>> -----Original Message-----
>
> ...
>> On 07/08/2010 09:06 PM, Peter Kuennemann wrote:
>>> Hi Folks, I am seeking for some advise to get my lite5200b board up
>> and
>>> running with a linux kernel.
>>> I installed the most recent eldk version from iso image ppc-2008-04-
>> 01,
>>> run a kernel config with
>>>
>>> $ make 52xx/lite5200b_defconfig
>>> $ make uImage
>>> (Environment has been set to: CROSS_COMPILE="ppc_6xx-" and
>> ARCH="powerpc")
>>
>> You need to build a flat device tree blob as well. With recent kernel
>> version just type:
>>
>> $ make lite5200b.dtb
> This did not work at all but there seem to an make option CONFIG_DEVICE_TREE
> that accepts the file name you mentioned.
I wrote "with a recent kernel version". It will not work with 2.6.24. As
recommended, please use recent 2.6.34.x kernel from kernel.org.
> CONFIG_DEVICE_TREE
> -----
> This specifies the device tree source (.dts) file to be
> compiled and included when building the bootwrapper. If a
> relative filename is given, then it will be relative to
> arch/powerpc/boot/dts. If you are not using the bootwrapper,
> or do not need to build a dts into the bootwrapper, this
> field is ignored.
> For example, this is required when building a cuImage target
> for an older U-Boot, which cannot pass a device tree itself.
> Such a kernel will not work with a newer U-Boot that tries to
> pass a device tree (unless you tell it not to). If your U-Boot
> does not mention a device tree in "help bootm", then use the
> cuImage target and specify a device tree here. Otherwise, use
> the uImage target and leave this field blank.
> -----
>
> I wonder however how one should build the cuImage as make complains
> About
>
> $ make cuImage
> $ make: *** No rule to make target `cuImage'. Stop
>
> dtc compiler was apparently not installed:
>
> Hence:
> $ sudo apt-get install device-tree-compiler
> And
> $ dtc -I dts -O dtb -o lite5200b.dtb lite5200b.dts
>
> Which gave me a lot of warnings like:
>
> Warning (reg_format): "reg" property in /soc5200 at f0000000/cdm at 200 -
> has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
> ...
> etc.
Don't waste your time with that old kernel version.
>> and copy this file to the boot location.
>
> OK, but the board has a uboot installed that may not support the dtb
> (1.1.4) and I might need a cuImage boot file?
Yes, but I'm not sure if cuImage is building and working properly for
that board. The better solution is to update u-boot.
>>> I followed the eldk documentation and advices and got compile and
>> link run
>>> without any problem but the image does not boot at all with uboot.
>>
>> See also http://www.denx.de/wiki/view/DULG/BootingEmbeddedLinux
>
> I tried to follow this but had no success.
>
>>
>>> An existing 2.4 Kernel does boot (I do not have a change to rebuild
>> it),
>
> ....
>
>>
>> Loading of the FDT blob seems to be missing?
>>
>
> I changed the bootm command to:
> fdtaddr=600000
> imagefile=/tftpboot/lite5200b.dtb
> ...
> net_nfs=tftp $(fdtaddr) $(imagefile);tftp $(kernel_ram_addr) $(bootfile); \
> run nfsargs addip;printenv bootargs; \
> bootm $(kernel_ram_addr) $(fdtaddr)
>
>
> which resulted in:
>
> run net_nfs
> Using FEC ETHERNET device
> TFTP from server 192.168.1.171; our IP address is 192.168.1.244
> Filename '/tftpboot/lite5200b.dtb'.
> Load address: 0x600000
> Loading: ##
> done
> Bytes transferred = 5666 (1622 hex)
> Using FEC ETHERNET device
> TFTP from server 192.168.1.171; our IP address is 192.168.1.244
> Filename '/tftpboot/uImage'.
> Load address: 0x400000
> Loading: #################### .... etc
> done
> Bytes transferred = 1431824 (15d910 hex)
> bootargs=console=tty0 console=ttyS0,115200 root=/dev/nfs rw
> nfsroot=192.168.1.17
> 1:/opt/eldk/ppc_6xxx
> ip=192.168.1.244:192.168.1.171:192.168.1.2:255.255.255.0::e
> th0:off panic=1
> ## Booting image at 00400000 ...
> Image Name: Linux-2.6.24.2
> Created: 2010-07-10 6:35:40 UTC
> Image Type: PowerPC Linux Kernel Image (gzip compressed)
> Data Size: 1431760 Bytes = 1.4 MB
> Load Address: 00000000
> Entry Point: 00000000
> Verifying Checksum ... OK
> Uncompressing Kernel Image ... OK
> ## Loading RAMDisk Image at 00600000 ...
> Bad Magic Number
> --------------------
>
>> ...
>> How does your net_nfs command look like? It seems not to support
>> booting
>> Linux with a FDT blob? Also, your boot loader needs support for FDT.
>
> See net_nfs above..
Your version of u-boot does *not* yet support the flat device tree. You
need to update your boot loader.
>> And the lite5200b is supported by a recent mainline kernel. No reason
>> to
>> waste time with very old kernel versions.
>
> I am quite lost at the Moment
It will work with a recent version of U-Boot and Linux as documented. If
you are lucky, the cuImage is building and working. I can't tell.
Wolfgang.
More information about the eldk
mailing list