This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/PROCESSOR-SDK-OMAPL138: omap-l138 nand ubifs

Part Number: PROCESSOR-SDK-OMAPL138
Other Parts Discussed in Thread: OMAP-L138, AM5728

Tool/software: Linux

 

softwareprocessor-sdk-04.01.00.06; 

Hardwareomap-l138 ;  custom board;

Hi,

I want to use nand ubifs  as rootfs, and the MTD driver was built in linux kernel, but can't mount the ubifs when booting,  and MTD was not loaded at that time.

There's  an error printed by kernal when booting:

    UBI error: cannot open mtd rootfs, error -2console [netcon0] enabled

uboot cmdline:

    nandboot=setenv bootargs console=ttyS1,115200n8 rootwait=1 rw ubi.mtd=1,2048 rootfstype=ubifs root=ubi0:rootfs

How to load MTD before the ubifs is loaded? 

Other Info:

    dmesg(with emmc  boot, you can see mtd was loaded at filesystem-stage after kernel-stage):  

4401.log.txt
OF: fdt:Machine model: DA850/AM1808/OMAP-L138 EVM
Reserved memory: created CMA memory pool at 0xc3000000, size 16 MiB
OF: reserved mem: initialized node dsp_cma@c3000000, compatible id shared-dma-pool
cma: Reserved 16 MiB at 0xc6c00000
Memory policy: Data cache writethrough
DaVinci da850/omap-l138/am18x variant 0x1
On node 0 totalpages: 32768
free_area_init_node: node 0, pgdat c06dbc50, node_mem_map c7ec9000
  DMA zone: 288 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 32768 pages, LIFO batch:7
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32480
Kernel command line: console=ttyS1,115200n8 root=/dev/mmcblk0p1 rw rootfstype=ext4 rootwait
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: 89688K/131072K available (4915K kernel code, 317K rwdata, 1524K rodata, 232K init, 165K bss, 8616K reserved, 32768K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc04d5060   (4917 kB)
      .init : 0xc0654000 - 0xc068e000   ( 232 kB)
      .data : 0xc068e000 - 0xc06dd570   ( 318 kB)
       .bss : 0xc06dd570 - 0xc0706d68   ( 166 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
	Build-time adjustment of leaf fanout to 32.
NR_IRQS:245
clocksource: timer0_1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Console: colour dummy device 80x30
Calibrating delay loop... 148.88 BogoMIPS (lpj=744448)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0008400 - 0xc0008458
devtmpfs: initialized
VFP support v0.3: not present
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
gpio gpiochip0: (Davinci): added GPIO chardev (254:0)
gpiochip_setup_dev: registered GPIOs 0 to 143 on device: gpiochip0 (Davinci)
mux: initialized RTC_ALARM
mux: Setting register RTC_ALARM
mux:    PINMUX0 (0x00000000) = 0x00480008 -> 0x20480008
No ATAGs?
edma 1c00000.edma: memcpy is disabled
edma 1c00000.edma: TI EDMA DMA engine driver
edma 1e30000.edma: memcpy is disabled
edma 1e30000.edma: TI EDMA DMA engine driver
of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator0[0]'
i2c_davinci i2c_davinci.1: could not find pctldev for node /soc@1c00000/pinmux@14120/pinmux_i2c0_pins, deferring probe
clocksource: Switched to clocksource timer0_1
NET: Registered protocol family 2
TCP established hash table entries: 1024 (order: 0, 4096 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
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 named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
workingset: timestamp_bits=14 max_order=15 bucket_order=1
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
io scheduler noop registered (default)
pinctrl-single 1c14120.pinmux: 160 pins at pa fec14120 size 80
Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25, base_baud = 9375000) is a TI DA8xx/66AK2x
serial8250.1: ttyS1 at MMIO 0x1d0c000 (irq = 53, base_baud = 8250000) is a TI DA8xx/66AK2x
console [ttyS1] enabled
serial8250.2: ttyS2 at MMIO 0x1d0d000 (irq = 61, base_baud = 8250000) is a TI DA8xx/66AK2x
brd: module loaded
libphy: Fixed MDIO Bus: probed
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: detected phy mask fffffffe
libphy: davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio.0:00, driver SMSC LAN8710/LAN8720
i2c /dev entries driver
davinci_mmc da830-mmc.0: GPIO lookup for consumer cd
davinci_mmc da830-mmc.0: using device tree for GPIO lookup
of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/soc@1c00000/mmc@40000[0]'
of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/soc@1c00000/mmc@40000[0]'
davinci_mmc da830-mmc.0: using lookup tables for GPIO lookup
davinci_mmc da830-mmc.0: lookup for GPIO cd failed
davinci_mmc da830-mmc.0: GPIO lookup for consumer wp
davinci_mmc da830-mmc.0: using device tree for GPIO lookup
of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/soc@1c00000/mmc@40000[0]'
of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/soc@1c00000/mmc@40000[0]'
davinci_mmc da830-mmc.0: using lookup tables for GPIO lookup
davinci_mmc da830-mmc.0: lookup for GPIO wp failed
davinci_mmc da830-mmc.0: Using DMA, 4-bit mode
NET: Registered protocol family 10
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
0-0020 supply vcc not found, using dummy regulator
pca953x 0-0020: failed reading register
pca953x: probe of 0-0020 failed with error -121
console [netcon0] enabled
netconsole: network logging started
davinci_emac davinci_emac.1: incompatible machine/device type for reading mac address
davinci_emac davinci_emac.1: using random MAC addr: aa:b3:41:7b:e1:22
hctosys: unable to open rtc device (rtc0)
vbat: disabling
Waiting for root device /dev/mmcblk0p1...
mmc0: new high speed MMC card at address 0001
mmcblk0: mmc0:0001 MMC16G 14.6 GiB 
mmcblk0boot0: mmc0:0001 MMC16G partition 1 16.0 MiB
mmcblk0boot1: mmc0:0001 MMC16G partition 2 16.0 MiB
 mmcblk0: p1
random: fast init done
EXT4-fs (mmcblk0p1): recovery complete
EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:1.
devtmpfs: mounted
Freeing unused kernel memory: 232K (c0654000 - c068e000)
This architecture does not have kernel memory protection.
systemd[1]: System time before build time, advancing clock.
systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
systemd[1]: Detected architecture arm.
systemd[1]: Set hostname to <omapl138-lcdk>.
systemd[1]: Listening on Journal Socket (/dev/log).
systemd[1]: Listening on udev Kernel Socket.
systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
systemd[1]: Listening on Network Service Netlink Socket.
systemd[1]: Created slice System Slice.
systemd[1]: Listening on udev Control Socket.
systemd[1]: Reached target Swap.
EXT4-fs (mmcblk0p1): re-mounted. Opts: (null)
cryptodev: loading out-of-tree module taints kernel.
cryptodev: driver 1.8 loaded.
systemd-journald[74]: Received request to flush runtime journal from PID 1
davinci-rproc davinci-rproc.0: assigned reserved memory node dsp_cma@c3000000
remoteproc remoteproc0: dsp is available
remoteproc remoteproc0: powering up dsp
remoteproc remoteproc0: Booting fw image rproc-dsp-fw, size 4536272
rtc rtc0: 1c23000.rtc: dev (253:0)
omap_rtc 1c23000.rtc: rtc core: registered 1c23000.rtc as rtc0
remoteproc remoteproc0: registered virtio0 (type 7)
remoteproc remoteproc0: remote processor dsp is now up
SCSI subsystem initialized
davinci-wdt davinci-wdt: heartbeat 60 sec
libata version 3.00 loaded.
ahci_da850 ahci_da850: forcing PORTS_IMPL to 0x1
ahci_da850 ahci_da850: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
ahci_da850 ahci_da850: flags: ncq sntf pm led clo only pmp pio slum part ccc 
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
scsi host0: ahci_da850
ata1: SATA max UDMA/133 mmio [mem 0x01e18000-0x01e19fff] port 0x100 irq 67
ohci-da8xx: DA8XX
ohci-da8xx ohci-da8xx: USB Host Controller
ohci-da8xx ohci-da8xx: new USB bus registered, assigned bus number 1
ohci-da8xx ohci-da8xx: irq 59, io mem 0x01e25000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
usb_phy_generic.0.auto supply vcc not found, using dummy regulator
nand: device found, Manufacturer ID: 0xec, Chip ID: 0xdc
nand: Samsung NAND 512MiB 3,3V 8-bit
nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
Bad block table found at page 262080, version 0x01
Bad block table found at page 262016, version 0x01
nand_read_bbt: bad block at 0x00000f4e0000
nand_read_bbt: bad block at 0x000013960000
2 ofpart partitions found on MTD device 64000000.nand
Creating 2 MTD partitions on "64000000.nand":
0x000000000000-0x0000000a0000 : "u-boot"
0x0000000a0000-0x000020000000 : "fs"
ata1: SATA link down (SStatus 0 SControl 300)
davinci_nand 64000000.nand: controller rev. 2.5
davinci_mdio davinci_mdio.0: resetting idled controller
SMSC LAN8710/LAN8720 davinci_mdio.0:00: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio.0:00, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
davinci_emac davinci_emac.1 eth0: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
random: crng init done
virtio_rpmsg_bus virtio0: rpmsg host is online
virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x3d
musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
mtd: exports duplicate symbol mtd_concat_create (owned by kernel)
mtd: exports duplicate symbol mtd_concat_create (owned by kernel)
NET: Registered protocol family 43

Thank you,

Andi