linux powerpc and device trees

- Reyneke reynekejunk at
Sat May 24 00:53:44 EST 2008

Hi All,

I am busy with a platform move from the arch/ppc to arch/powerpc tree of the linux kernel. Being relatively new to device trees, I'm trying to ensure I have all the steps covered. The platform is very similar to the AMCC Sequioa (440EPx) and that board has been used as reference for the code changes required. Kernel version is 2.6.25, using u-boot 1.2.0 (CONFIG_OF_xxx enabled, debug output on).

My understanding of the whole powerpc branch boot process is as follows:

1. Add platform to arch/powerpc/platforms/4xx
2. Create a .dts in arch/powerpc/boot/dts
3. Setup .config and compile uImage
4. Compile device tree blob using dtc
5. As test, tftp uImage, RootFS, and deviceblob to system memory
6. Use u-boot's bootm command to boot kernel

Every seems OK, until you get to the boot part. The boot hangs:

Verifying Checksum ... OK
Booting using flat device tree at 0x3000000
## initrd at 0x02000040 ... 0x027FEDF7 (len=8383928=0x7FEDB8)
Loading Ramdisk to 0f332000, end 0fb30db8 ... OK
## Transferring control to Linux (at address 00000000) ...

Using various diagnostics like BDI, ft_dump_blob etc I can see that u-boot does what I expect it to do, and the device tree blob looks valid. Tracing into the kernel init all looks fine until you hit MMU_init - at this point it looks like the total memory is calculated as 0. Evaluating the .dts file the following lines are immediately suspect:

memory {
device_type = "memory";
reg = ; /* Filled in by zImage */

This is where I am unclear as to how to prepare the device tree. Is step (4) correct since I'm using uImage? Where is the memory information suppose to come from? Previously U-boot passes this kind of data to the kernel via bd_t - how does it work now using device trees?



More information about the Linuxppc-embedded mailing list