[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Boot time support for SD card?



hi there,
I just built a 2.6.39 kernel with built-in SD card support. I wanna use this kernel to boot my MPC8313E-RDB board and mount the root filesystem from SD card. Unfortunately, it seems like the mmc card cannot be identified at boot-time:
U-Boot 1.3.0 (Dec 22 2008 - 11:19:29) MPC83XX

Reset Status: Software Hard, External/Internal Soft, External/Internal Hard

CPU:   e300c3, MPC8313E, Rev: 21 at 333.333 MHz, CSB:  166 MHz
Board: Freescale MPC8313ERDB
I2C:   ready
DRAM:  128 MB
FLASH:  8 MB
NAND:  32 MiB
In:    serial
Out:   serial
Err:   serial
Net:   TSEC0, TSEC1 [PRIME]
Hit any key to stop autoboot:  0
=> setenv serverip 192.168.0.102
=> setenv loadaddr 0x01000000
=> dhcp
Speed: 100, full duplex
BOOTP broadcast 1
DHCP client bound to address 192.168.0.104
Using TSEC1 device
TFTP from server 192.168.0.102; our IP address is 192.168.0.104
Filename 'uImage'.
Load address: 0x1000000
Loading: #################################################################
         #################################################################
         ########
done
Bytes transferred = 2015426 (1ec0c2 hex)
=> tftp 0x02000000 mpc8313erdb.dtb
Speed: 100, full duplex
Using TSEC1 device
TFTP from server 192.168.0.102; our IP address is 192.168.0.104
Filename 'mpc8313erdb.dtb'.
Load address: 0x2000000
Loading: #
done
Bytes transferred = 7721 (1e29 hex)
=> bootm 0x01000000 - 0x02000000
## Booting image at 01000000 ...
   Image Name:   Linux-2.6.39.1
   Created:      2011-06-05   4:37:47 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    2015362 Bytes =  1.9 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
   Booting using the fdt at 0x2000000
   Loading Device Tree to 007fd000, end 007fee28 ... OK
Using MPC831x RDB machine description
Linux version 2.6.39.1 (bear@debian) (gcc version 4.4.5 (Debian 4.4.5-8) ) #4 Sun Jun 5 12:37:46 CST 2011
bootconsole [udbg0] enabled
setup_arch: bootmem
mpc831x_rdb_setup_arch()
Found FSL PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0
PCI host bridge /sleep-nexus/pci@e0008500 (primary) ranges:
 MEM 0x0000000090000000..0x000000009fffffff -> 0x0000000090000000
 MEM 0x0000000080000000..0x000000008fffffff -> 0x0000000080000000 Prefetch
  IO 0x00000000e2000000..0x00000000e20fffff -> 0x0000000000000000
arch: exit
Zone PFN ranges:
  DMA      0x00000000 -> 0x00008000
  Normal   empty
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00008000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: root=/dev/ram console=ttyS0,115200
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 124524k/131072k available (4076k kernel code, 6548k reserved, 144k data, 1112k bss, 180k init)
Kernel virtual memory layout:
  * 0xfffdf000..0xfffff000  : fixmap
  * 0xfdefb000..0xfe000000  : early ioremap
  * 0xc9000000..0xfdefb000  : vmalloc & ioremap
SLUB: Genslabs=15, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:512 nr_irqs:512 16
IPIC (128 IRQ sources) at c9000700
clocksource: timebase mult[6000002] shift[22] registered
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
NET: Registered protocol family 16

PCI: Probing PCI hardware
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
Switched to NOHz mode on CPU #0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
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 245
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xe0004500 (irq = 16) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 17) is a 16550A
brd: module loaded
loop: module loaded
fe000000.flash: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x001001
Amd/Fujitsu Extended Query Table at 0x0040
  Amd/Fujitsu Extended Query version 1.3.
fe000000.flash: Swapping erase regions for top-boot CFI table.
number of CFI chips: 1
cmdlinepart partition parsing not available
RedBoot partition parsing not available
fsl-lbc e0005000.localbus: read_byte beyond end of buffer
fsl-lbc e0005000.localbus: read_byte beyond end of buffer
fsl-lbc e0005000.localbus: read_byte beyond end of buffer
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
cmdlinepart partition parsing not available
RedBoot partition parsing not available
Creating 3 MTD partitions on "e2800000.flash":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000400000 : "kernel"
0x000000400000-0x000002000000 : "fs"
eLBC NAND device at 0xe2800000, bank 1
fsl_spi e0007000.spi: at 0xc9074000 (irq = 21), CPU mode
Fixed MDIO Bus: probed
fsl-gianfar e0024000.ethernet: enabled errata workarounds, flags: 0x7
eth0: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0a
eth0: Running with NAPI enabled
eth0: RX BD ring size for Q[0]: 256
eth0: TX BD ring size for Q[0]: 256
fsl-gianfar e0025000.ethernet: enabled errata workarounds, flags: 0x7
eth1: Gianfar Ethernet Controller Version 1.2, 04:00:00:00:00:0b
eth1: Running with NAPI enabled
eth1: RX BD ring size for Q[0]: 256
eth1: TX BD ring size for Q[0]: 256
Freescale PowerQUICC MII Bus: probed
Freescale PowerQUICC MII Bus: probed
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
usbmon: debugfs is not available
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
/soc8313@e0000000/usb@23000: Invalid 'dr_mode' property, fallback to host mode
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 38, io mem 0xe0023000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
i2c /dev entries driver
mpc-i2c e0003000.i2c: timeout 1000000 us
rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
mpc-i2c e0003100.i2c: timeout 1000000 us
TCP cubic registered
NET: Registered protocol family 17
Registering the dns_resolver key type
rtc-ds1307 0-0068: setting system clock to 2000-01-04 19:09:52 UTC (947012992)
List of all partitions:
1f00            8192 mtdblock0  (driver?)
1f01            1024 mtdblock1  (driver?)
1f02            3072 mtdblock2  (driver?)
1f03           28672 mtdblock3  (driver?)
No filesystem could mount root, tried:  ext3 ext2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)
Rebooting in 180 seconds..

According to its factory default 2.6.23 Linux kernel, I think MMC driver is loaded after root filesystem mounted:
U-Boot 1.3.0 (Dec 22 2008 - 11:19:29) MPC83XX

Reset Status:

CPU:   e300c3, MPC8313E, Rev: 21 at 333.333 MHz, CSB:  166 MHz
Board: Freescale MPC8313ERDB
I2C:   ready
DRAM:  128 MB
FLASH:  8 MB
NAND:  32 MiB
In:    serial
Out:   serial
Err:   serial
Net:   TSEC0, TSEC1 [PRIME]
Hit any key to stop autoboot:  0
## Booting image at fe100000 ...
   Image Name:   Linux-2.6.23
   Created:      2008-12-22   3:22:49 UTC
   Image Type:   PowerPC Linux Kernel Image (gzip compressed)
   Data Size:    1617307 Bytes =  1.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at fe300000 ...
   Image Name:   uboot ext2 ramdisk rootfs
   Created:      2008-12-22   3:24:29 UTC
   Image Type:   PowerPC Linux RAMDisk Image (gzip compressed)
   Data Size:    3534292 Bytes =  3.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Booting using the fdt at 0xfe700000
   Loading Ramdisk to 07bda000, end 07f38dd4 ... OK
   Loading Device Tree to 007fc000, end 007fefff ... OK
Using MPC8313 RDB machine description
Linux version 2.6.23 (yhh@rock) (gcc version 4.1.2) #1 Mon Dec 22 11:22:46 CST 2008
Found initrd at 0xc7bda000:0xc7f38dd4
console [udbg0] enabled
setup_arch: bootmem
mpc8313_rdb_setup_arch()
Found MPC83xx PCI host bridge at 0x00000000e0008500. Firmware bus number: 0->0
arch: exit
Zone PFN ranges:
  DMA             0 ->    32768
  Normal      32768 ->    32768
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:        0 ->    32768
Built 1 zonelists in Zone order.  Total pages: 32512
Kernel command line: root=/dev/ram console=ttyS0,115200
IPIC (128 IRQ sources) at fdef9700
PID hash table entries: 512 (order: 9, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 122876k/131072k available (3188k kernel code, 8056k reserved, 148k data, 94k bss, 152k init)
Mount-cache hash table entries: 512
NET: Registered protocol family 16

PCI: Probing PCI hardware
Generic PHY: Registered new driver
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 3451k freed
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
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: boot [udbg0] -> real [ttyS0]
serial8250.0: ttyS1 at MMIO 0xe0004600 (irq = 19) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 blocksize
loop: module loaded
Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
Copyright (c) 1999-2006 Intel Corporation.
Gianfar MII Bus: probed
fsl-gianfar fsl-gianfar.0: enabling Lossless Flow Control
eth0: Gianfar Ethernet Controller Version 1.3-skbr, 04:00:00:00:00:0a
GFAR: SKB Handler initialized at CPU#0(max=32)
eth0: MTU = 1500 (frame size=1526, truesize=1800)
eth0: Running with NAPI enabled
eth0: 64/64 RX/TX BD ring size
fsl-gianfar fsl-gianfar.1: enabling Lossless Flow Control
eth1: Gianfar Ethernet Controller Version 1.3-skbr, 04:00:00:00:00:0b
GFAR: SKB Handler initialized at CPU#0(max=32)
eth1: MTU = 1500 (frame size=1526, truesize=1800)
eth1: Running with NAPI enabled
eth1: 64/64 RX/TX BD ring size
e100: Intel(R) PRO/100 Network Driver, 3.5.23-k4-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
Marvell 88E1101: Registered new driver
Marvell 88E1112: Registered new driver
Marvell 88E1111: Registered new driver
Marvell 88E1145: Registered new driver
Fixed MDIO Bus: probed
nor: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
nor: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
RedBoot partition parsing not available
physmap-flash nor: Using OF partition information
Creating 5 MTD partitions on "nor":
0x00000000-0x00100000 : "U-Boot"
0x00100000-0x00300000 : "Kernel"
0x00300000-0x00700000 : "rootfs"
0x00700000-0x00710000 : "DTB"
0x00710000-0x00800000 : "vsc-util"
Freescale eLBC NAND Driver (C) 2006-2007 Freescale
NAND device: Manufacturer ID: 0xec, Chip ID: 0x75 (Samsung NAND 32MiB 3,3V 8-bit)
Scanning device for bad blocks
fsl-elbc fsl-elbc.0: Using OF partition information
Creating 6 MTD partitions on "nand":
0x00000000-0x00100000 : "U-Boot-NAND"
0x00100000-0x00900000 : "JFFS2-NAND"
0x00900000-0x00d00000 : "Ramdisk-NAND"
0x00d00000-0x01d00000 : "Reserve-NAND"
0x01d00000-0x01f00000 : "Kernel-NAND"
0x01f00000-0x02000000 : "DTB-NAND"
mpc83xx_spi.0: MPC83xx SPI Controller driver at 0xc9066000 (irq = 21)
usbmon: debugfs is not available
fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 1
fsl-ehci fsl-ehci.0: irq 38, io base 0xe0023000
fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
i2c /dev entries driver
rtc-ds1307 0-0068: rtc core: registered ds1339 as rtc0
WDT driver for MPC83xx initialized. mode:reset timeout=65535 (25 seconds)
mmc_spi spi28672.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-ds1307 0-0068: setting the system clock to 2000-01-04 19:11:32 (947013092)
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 152k init
mmc0: new SD card on SPI
mmcblk0: mmc0:0000 SD02G 1921024KiB
 mmcblk0: p1 p2
Setting the hostname to mpc8313erdb
Mounting filesystems
Running sysctl
Setting up networking on loopback device:
Setting up networking on eth0:
Adding static route for default gateway to 192.168.1.1:
Setting nameserver to 192.168.1.1 in /etc/resolv.conf:
Setting up networking on eth1:
Adding static route for default gateway to 192.168.1.1:
Setting nameserver to 192.168.1.1 in /etc/resolv.conf:
Starting inetd:


        Welcome to Freescale Semiconductor Embedded Linux Environment

Is there anyone who can tell me how to mount a root filesystem in SD card? Have I patch my kernel to enable this? Thanks.


Reply to: