Skip to main content.

7.5. Networked Operation with Root Filesystem over NFS

This section will show how to boot the target into Linux with no more than U-Boot residing on it. For this we will use the tftp command of U-Boot to transfer a Linux kernel and boot it with the NFS rootfilesystem provided by the ELDK.

For this to work, we rely on some U-Boot environment variables to be set up correctly, i.e. the network parameters, the names of files to transfer via tftp and last but not least some scripts easing the assembly of the Linux command line. The whole process is packaged up into one script shown before we actually execute it.

Note that the Linux kernel will also output the command line used, so you can easily check if everything worked like expected. The command line in this example passes at least the following information to the:

See Documentation/nfsroot.txt in you Linux kernel source directory for more information about these parameters and other options.

7.5.1. Bootlog of tftp'd Linux kernel with Root Filesystem over NFS

=> setenv fdt_file /tftpboot/duts/canyonlands/canyonlands.dtb
=> setenv bootfile /tftpboot/duts/canyonlands/uImage
=> setenv rootpath /opt/eldk-4.2/ppc_4xxFP/
=> printenv net_nfs
net_nfs=tftp ${kernel_addr_r} ${bootfile}; tftp ${fdt_addr_r} ${fdt_file}; run nfsargs addip addtty addmisc;bootm ${kernel_addr_r} - ${fdt_addr_r}
=> run net_nfs
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.1; our IP address is 192.168.100.6
Filename '/tftpboot/duts/canyonlands/uImage'.
Load address: 0x400000
Loading: #################################################################
    #################################################################
    ####
done
Bytes transferred = 1958609 (1de2d1 hex)
Using ppc_4xx_eth0 device
TFTP from server 192.168.1.1; our IP address is 192.168.100.6
Filename '/tftpboot/duts/canyonlands/canyonlands.dtb'.
Load address: 0xb00000
Loading: #
done
Bytes transferred = 10190 (27ce hex)
## Booting kernel from Legacy Image at 00400000 ...
   Image Name:    Linux-2.6.32.7-00007-g08eba26
   Created:    2010-02-04  17:54:22 UTC
   Image Type:    PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1958545 Bytes =  1.9 MB
   Load Address: 00000000
   Entry Point:    00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 00b00000
   Booting using the fdt blob at 0xb00000
   Uncompressing Kernel Image ... OK
Using PowerPC 44x Platform machine description
Linux version 2.6.32.7-00007-g08eba26 (stefan@stefan-desktop) (gcc version 4.2.2) #1 Thu Feb 4 18:54:16 CET 2010
Zone PFN ranges:
  DMA      0x00000000 -> 0x00020000
  Normal   0x00020000 -> 0x00020000
  HighMem  0x00020000 -> 0x00020000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00020000
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on.   Total pages: 130048
Kernel command line: root=/dev/nfs rw nfsroot=192.168.1.1:/opt/eldk-4.2/ppc_4xxFP/ ip=192.168.100.6:192.168.1.1:192.168.1.254:255.255.0.0:canyonlands:eth0:off panic=1 console=ttyS0,115200
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 515328k/524288k available (3880k kernel code, 8740k reserved, 172k data, 134k bss, 168k init)
Kernel virtual memory layout:
  * 0xfffef000..0xfffff000  : fixmap
  * 0xffc00000..0xffe00000  : highmem PTEs
  * 0xffa00000..0xffc00000  : consistent mem
  * 0xffa00000..0xffa00000  : early ioremap
  * 0xe1000000..0xffa00000  : vmalloc & ioremap
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
UIC2 (32 IRQ sources) at DCR 0xe0
UIC3 (32 IRQ sources) at DCR 0xf0
clocksource: timebase mult[3c0000] shift[22] registered
Mount-cache hash table entries: 512
NET: Registered protocol family 16
256k L2-cache enabled
PCIE0: Port disabled via device-tree
PCIE1: Checking link...
PCIE1: No device detected.
PCI host bridge /plb/pciex@d20000000 (primary) ranges:
 MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000
 MEM 0x0000000f00100000..0x0000000f001fffff -> 0x0000000000000000
  IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000
 Removing ISA hole at 0x0000000f00100000
4xx PCI DMA offset set to 0x00000000
/plb/pciex@d20000000: Legacy ISA memory support enabled
PCIE1: successfully set as root-complex
PCI host bridge /plb/pci@c0ec00000 (primary) ranges:
 MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000
 MEM 0x0000000c0ee00000..0x0000000c0eefffff -> 0x0000000000000000
  IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000
 Removing ISA hole at 0x0000000c0ee00000
4xx PCI DMA offset set to 0x00000000
/plb/pci@c0ec00000: Legacy ISA memory support enabled
PCI: Probing PCI hardware
PCI: Hiding 4xx host bridge resources 0000:80:00.0
pci 0000:80:00.0: PCI bridge, secondary bus 0000:81
pci 0000:80:00.0:   IO window: disabled
pci 0000:80:00.0:   MEM window: disabled
pci 0000:80:00.0:   PREFETCH window: disabled
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource timebase
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1006
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550A
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550A
serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A
serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550A
4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 19) is a 16550
4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 20) is a 16550
4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550
4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 21) is a 16550
brd: module loaded
sata-dwc sata-dwc.0: id 0, controller version 1.82
sata-dwc sata-dwc.0: DMA initialized
sata-dwc sata-dwc.0: **** No neg speed (nothing attached?)
scsi0 : sata-dwc
ata1: SATA max UDMA/133 irq 23
4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
4cc000000.nor_flash: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
Creating 7 MTD partitions on "4cc000000.nor_flash":
0x000000000000-0x0000001e0000 : "kernel"
0x0000001e0000-0x000000200000 : "dtb"
0x000000200000-0x000001600000 : "ramdisk"
0x000001600000-0x000001a00000 : "jffs2"
0x000001a00000-0x000003f60000 : "user"
0x000003f60000-0x000003fa0000 : "env"
0x000003fa0000-0x000004000000 : "u-boot"
NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 2 MTD partitions on "4e0000000.ndfc.nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000000000-0x000003f00000 : "user"
e1000e: Intel(R) PRO/1000 Network Driver - 1.0.2-k2
e1000e: Copyright (c) 1999-2008 Intel Corporation.
PPC 4xx OCP EMAC driver, version 3.54
MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels
ZMII /plb/opb/emac-zmii@ef600d00 initialized
RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support
TAH /plb/opb/emac-tah@ef601350 initialized
TAH /plb/opb/emac-tah@ef601450 initialized
/plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode
eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:10:ec:01:08:84
eth0: found Generic MII PHY (0x00)
/plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode
eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:10:ec:81:08:84
eth1: found Generic MII PHY (0x01)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ppc-of-ehci 4bffd0400.ehci: OF EHCI
ppc-of-ehci 4bffd0400.ehci: new USB bus registered, assigned bus number 1
ppc-of-ehci 4bffd0400.ehci: irq 38, io mem 0x4bffd0400
ppc-of-ehci 4bffd0400.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OF EHCI
usb usb1: Manufacturer: Linux 2.6.32.7-00007-g08eba26 ehci_hcd
usb usb1: SerialNumber: PPC-OF USB
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ppc-of-ohci 4bffd0000.usb: OF OHCI
ppc-of-ohci 4bffd0000.usb: new USB bus registered, assigned bus number 2
ppc-of-ohci 4bffd0000.usb: irq 39, io mem 0x4bffd0000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: OF OHCI
usb usb2: Manufacturer: Linux 2.6.32.7-00007-g08eba26 ohci_hcd
usb usb2: SerialNumber: PPC-OF USB
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver libusual
dwc_otg: version 2.60a 22-NOV-2006
dwc_otg: Shared Tx FIFO mode
dwc_otg: Using DMA mode
dwc_otg dwc_otg.0: DWC OTG Controller
dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 3
dwc_otg dwc_otg.0: irq 28, io mem 0x00000000
dwc_otg: Init: Port Power? op_state=4
usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: DWC OTG Controller
usb usb3: Manufacturer: Linux 2.6.32.7-00007-g08eba26 dwc_otg_hcd
usb usb3: SerialNumber: dwc_otg.0
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
i2c /dev entries driver
ibm-iic 4ef600700.i2c: using standard (100 kHz) mode
rtc-m41t80 0-0068: chip found, driver version 0.05
rtc-m41t80 0-0068: rtc core: registered m41t80 as rtc0
ibm-iic 4ef600800.i2c: using standard (100 kHz) mode
ad7414 0-0048: chip found
TCP cubic registered
NET: Registered protocol family 17
rtc-m41t80 0-0068: setting system clock to 2010-02-08 16:33:33 UTC (1265646813)
usb 1-1: new high speed USB device using ppc-of-ehci and address 2
usb 1-1: New USB device found, idVendor=1370, idProduct=2168
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Memorybird P
usb 1-1: Manufacturer: FSC
usb 1-1: SerialNumber: 10005383BB000032
usb 1-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
eth0: link is down
IP-Config: Complete:
     device=eth0, addr=192.168.100.6, mask=255.255.0.0, gw=192.168.1.254,
     host=canyonlands, domain=, nis-domain=(none),
     bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.1
eth0: link is up, 1000 FDX, pause enabled
Looking up port of RPC 100005/1 on 192.168.1.1
VFS: Mounted root (nfs filesystem) on device 0:14.
Freeing unused kernel memory: 168k init
modprobe: FATAL: Could not load /lib/modules/2.6.32.7-00007-g08eba26/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.32.7-00007-g08eba26/modules.dep: No such file or directory

INIT: version 2.86 booting
      Welcome to DENX Embedded Linux Environment
      Press 'I' to enter interactive startup.
Setting clock : Mon Feb    8 16:33:38 CET 2010 [   OK  ]
Building the cache scsi 1:0:0:0: Direct-Access      FSC       Memorybird P     2.00 PQ: 0 ANSI: 2
[  OK  ]
Setting hostname canyonlands:  [  OK  ]
Mounting local filesystems:  [   OK  ]
Enabling /etc/fstab swaps:  [  OK  ]
INIT: Entering runlevel: 3
Entering non-interactive startup
FATAL: Could not load /lib/modules/2.6.32.7-00007-g08eba26/modules.dep: No such file or directory
Bringing up loopback interface:    [  OK   ]
FATAL: Could not load /lib/modules/2.6.32.7-00007-g08eba26/modules.dep: No such file or directory
Starting system logger: [  OK  ]
Starting kernel logger: [  OK  ]
Starting rpcbind: [  OK    ]
Mounting NFS filesystems:  [  OK  ]
Mounting other filesystems:  [   OK  ]
Starting xinetd: [  OK   ]

DENX ELDK version 4.2 build 2008-04-01
Linux 2.6.32.7-00007-g08eba26 on a ppc

canyonlands login: root
Last login: Sat Jan  3 19:28:07 from pollux
-bash-3.2#
7.4. Boot Arguments Unleashed 1. Abstract 7.6. Boot from Flash Memory
Prev Home Next