[U-Boot-Users] A simple howto boot sequoia (ARCH=powerpc) using flattened device tree (FDT)

Niklaus Giger niklaus.giger at member.fsf.org
Wed May 14 22:54:16 CEST 2008


Hi

It took me a evening to put everything together. Therefore I send this mail
hoping it may help somebody else. Hopefully some of the content will find
its way into the DULG/FAQ, may as point 14.3.30. "Booting using flattened device tree (FDT)"

First one needs a recent U-boot with FDT support compiled into, e.g 
1.3.2-rc3-g772003e4-dirty (Apr 11 2008 - 15:56:0 for the sequoia board.

Secone one needs a recent Linux kernel made using "ARCH=powerpc", e.g. from 
2.6.25-00002-ga9bf9f0 from  git://www.denx.de/git/linux-2.6-denx.git.

Third one needs a recent dtc (Device Tree Compiler). The following commands
$ git clone http://www.jdl.com/software/dtc.git
$ cd dtc && make && sudo cp dtc /usr/local/bin
should do the job.

Now you are ready to compile the device tree blob. I used the commands given in
http://www.denx.de/wiki/view/DULG/LinuxFDTBlob
dtc -b 0 -V 17 -R 4 -S 0x3000 -I dts -O dtb -f arch/powerpc/boot/dts/sequoia.dts \
> /tftpboot/sequoia/sequoia.dtb

Now power up your sequoia board and execute the following commands to start a
Linux kernel on a NFS root device. The following commands did the job for me:

> Hit any key to stop autoboot:  0
> => tftp  200000 /tftpboot/sequoia/uImage
> Waiting for PHY auto negotiation to complete.. done
> ENET Speed is 100 Mbps - FULL duplex connection (EMAC0)
> Using ppc_4xx_eth0 device
> TFTP from server 172.25.1.3; our IP address is 172.25.1.88
> Filename '/tftpboot/sequoia/uImage'.
> Load address: 0x200000
> Loading: #################################################################
>          ######################
> done
> Bytes transferred = 1277067 (137c8b hex)
> => tftp 1000000 /tftpboot/sequoia/sequoia.dtb
> ENET Speed is 100 Mbps - FULL duplex connection (EMAC0)
> Using ppc_4xx_eth0 device
> TFTP from server 172.25.1.3; our IP address is 172.25.1.88
> Filename '/tftpboot/sequoia/sequoia.dtb'.
> Load address: 0x1000000
> Loading: #
> done
> Bytes transferred = 12288 (3000 hex)
> => run nfsargs addip addtty
> => printenv bootargs
> bootargs=root=/dev/nfs rw nfsroot=172.25.1.3:/opt/eldk/ppc_4xxFP
> ip=172.25.1.88:172.25.1.3:::sequoia:eth0:off panic=1 console=ttyS0,115200
> => fdt addr 1000000
> => fdt chosen
> => fdt list
<...>
> => fdt print
<...>
> => bootm 200000 - 1000000
> ## Booting image at 00200000 ...
>    Image Name:   Linux-2.6.25-00002-ga9bf9f0
>    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
>    Data Size:    1277003 Bytes =  1.2 MB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Uncompressing Kernel Image ... OK
>    Booting using the fdt at 0x1000000
>    Loading Device Tree to 007fc000, end 007fefff ... OK
> Using Sequoia machine description
<...>

Thats it. Now you should boot into your shiny new Linux kernel. Attached is
a gzipped output of my startup (for the curious).

Once my kernel started I used the following commands to update my u-boot
environment:
> setenv ftd_get 'tftp 200000 ${bootfile};tftp 1000000 sequoia/sequoia.dtb;fdt addr 1000000;' 
> setenv net_nfs 'run ftd_get nfsargs addip addtty; fdt chosen;bootm 200000 - 1000000' 
> saveenv 

Best regards

Niklaus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sequoia.log.gz
Type: application/x-gzip
Size: 5179 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20080514/da0b3b47/attachment.bin 


More information about the U-Boot mailing list