All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Van Baren <gvb.uboot@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] the question about the Flat Device Tree on MPC8360?
Date: Tue, 04 Mar 2008 21:32:42 -0500	[thread overview]
Message-ID: <47CE064A.9000203@gmail.com> (raw)
In-Reply-To: <404550970.22832@tsinghua.org.cn>

?? wrote:
> HI, friends.
> 
>   I want to update my linux version from 2.6.11 to 2.6.22 on MPC8360 board, I
> always fail when the linux version is about 2.6.11. Someone told me that I need to
> build the Flat Device Tree. I see that the U-boot-1.2.0 has one FDT command, but I
> did not know how to use this command and how to use the Flat Device Tree.
>   I once see a document from freescale that the FDT file need tftp download to DDR
> memory first then bootm the linux. What's that FDT file? how can i get it? which
> DDR address that I need to tftp download? 
>   What is the FDT? Could someone teach me? Thanks.

Hi ??,

u-boot 1.2.0's support of FDT is crude.  Upgrade to the tip o' the tree 
(1.3.2rc3), or at least to 1.3.1.

The flattened device tree (FDT) is a method of passing hardware 
configuration information to the kernel.  It is described in the kernel 
documentation directory/file:
   ./Documentation/powerpc/booting-without-of.txt

You need a recent kernel, 2.6.22 probably is OK.  I'm running 2.6.25rc3 
(tip 'o the tree as of a week or so ago).

I have a mpc8360emds eval board, so I configure the kernel:
   $ make mpc836x_mds_defconfig
and build it
   $ make

You can find example device tree source (.dts) files for the device 
trees in the kernel directory:
   ./arch/powerpc/boot/dts

You need to compile your .dts (source) file into a .dtb (binary) using 
the dtc (device tree compiler).  After building the kernel, you will 
find dtc in:
   ./arch/powerpc/boot/dtc

Copy your kernel, *.dtb, and ramdisk (as appropriate).  I'm using the 
ramdisk from ELDK
   eldk/ppc_6xx/images/uRamdisk
...and boot away.  Addresses are fairly arbitrary, just have to make 
sure you don't overwrite things.

Boot log:
---------
=> set serverip 192.168.47.8 ; set ipaddr 192.168.47.214

=> setenv fdtaddr 400000 ; setenv fdtfile mpc8360emds/mpc836x_mds.dtb ; 
setenv loadaddr 200000 ; setenv uboot mpc8360emds/u-boot.bin ; setenv 
bootfile mpc8360emds/uImage ; setenv ramdiskaddr 1000000 ; setenv 
ramdiskfile mpc8360emds/uRamdisk

=> tftp $ramdiskaddr $ramdiskfile ; tftp $fdtaddr $fdtfile ; tftp 
$loadaddr $bootfile

UEC: PHY is Marvell 88E11x1 (1410cc2)
FSL UEC0: Full Duplex
switching to rgmii 100
FSL UEC0: Speed 100BT
FSL UEC0: Link is up
Using FSL UEC0 device
TFTP from server 192.168.47.8; our IP address is 192.168.47.214
Filename 'mpc8360emds/uRamdisk'.
Load address: 0x1000000
Loading: T #################################################################
          #####################################################
done
Bytes transferred = 1731966 (1a6d7e hex)
Using FSL UEC0 device
TFTP from server 192.168.47.8; our IP address is 192.168.47.214
Filename 'mpc8360emds/mpc836x_mds.dtb'.
Load address: 0x400000
Loading: #
done
Bytes transferred = 12288 (3000 hex)
Using FSL UEC0 device
TFTP from server 192.168.47.8; our IP address is 192.168.47.214
Filename 'mpc8360emds/uImage'.
Load address: 0x200000
Loading: #################################################################
          ##########################
done
Bytes transferred = 1329289 (144889 hex)
=> bootm $loadaddr $ramdiskaddr $fdtaddr
## Booting image at 00200000 ...
    Image Name:   Linux-2.6.25-rc3-00001-g5fb74e4-
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    1329225 Bytes =  1.3 MB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK
    Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at 01000000 ...
    Image Name:   Simple Embedded Linux Framework
    Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
    Data Size:    1731902 Bytes =  1.7 MB
    Load Address: 00000000
    Entry Point:  00000000
    Verifying Checksum ... OK
    Booting using the fdt at 0x400000
    Loading Ramdisk to 0fdfa000, end 0ffa0d3e ... OK
Using MPC836x MDS machine description
Linux version 2.6.25-rc3-00001-g5fb74e4-dirty (vanbaren at dellserver) (gcc 
version
  4.0.0 (DENX ELDK 4.1 4.0.0)) #1 Mon Feb 25 20:38:46 EST 2008
Found initrd at 0xcfdfa000:0xcffa0d3e
console [udbg0] enabled
setup_arch: bootmem
mpc836x_mds_setup_arch()
Found MPC83xx PCI host bridge at 0x00000000e0008500. Firmware bus 
number: 0->0
PCI host bridge /pci at e0008500 (primary) ranges:
  MEM 0x00000000a0000000..0x00000000afffffff -> 0x00000000a0000000
  MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
   IO 0x00000000e2000000..0x00000000e20fffff -> 0x0000000000000000
arch: exit
Zone PFN ranges:
   DMA             0 ->    65536
   Normal      65536 ->    65536
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
     0:        0 ->    65536
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line:
IPIC (128 IRQ sources) at fddf3700
PID hash table entries: 1024 (order: 10, 4096 bytes)
clocksource: timebase mult[3c9b26d] shift[22] registered
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 254968k/262144k available (2628k kernel code, 6832k reserved, 
116k data,
  92k bss, 148k init)
SLUB: Genslabs=12, HWalign=32, Order=0-1, MinObjects=4, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
net_namespace: 156 bytes
NET: Registered protocol family 16

PCI: Probing PCI hardware
SCSI subsystem initialized
NET: Registered protocol family 2
Time: timebase clocksource has been installed.
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an 
initrd
Freeing initrd memory: 1691k freed
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 18) is a 16550A
                                                              console 
handover: b
oot [udbg0] -> real [ttyS0]
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 19) is a 16550A
brd: module loaded
loop: module loaded
UCC Ethernet Controller MII Bus: probed
ucc_geth: QE UCC Gigabit Ethernet Controller
ucc_geth: UCC1 at 0xe0102000 (irq = 22)
ucc_geth: UCC2 at 0xe0103000 (irq = 23)
i2c /dev entries driver
proc_dir_entry 'rtc' already registered
Call Trace:
[snip a traceback]
rtc-ds1374 0-0068: rtc core: registered rtc-ds1374 as rtc0
WDT driver for MPC83xx initialized. mode:reset timeout=65535 (16 seconds)
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-ds1374 0-0068: setting system clock to 1971-09-14 13:42:23 UTC 
(53703743)
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 148k init
init started: BusyBox v1.7.1 (2008-02-21 07:55:43 CET)
starting pid 732, tty '': '/etc/rc.sh'
/etc/rc.sh: line 5: cannot create /etc/mtab: Read-only file system
starting pid 737, tty '': '/bin/application'
### Application running ...
starting pid 739, tty '': '/bin/sh'
~ #

HTH,
gvb

  reply	other threads:[~2008-03-05  2:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 13:29 [U-Boot-Users] the question about the Flat Device Tree on MPC8360? 郭劲
2008-03-05  2:32 ` Jerry Van Baren [this message]
2008-03-05  2:38   ` Jerry Van Baren
2008-03-05  8:20     ` André Schwarz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47CE064A.9000203@gmail.com \
    --to=gvb.uboot@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.