AnsweredAssumed Answered

Imx28 don't boot from nand with UBIFS

Question asked by guilherme mazzela on Feb 13, 2014

Hi, I have a custom board based on imx28evk that I'm tring to boot using ubifs for the filesystem

but It doesn't work, I'm using linux with yocto, I have tried this steps


flash_erase /dev/mtd2 0 0

ubiformat /dev/mtd2 -f /core-image-my.ubi

ubiattach /dev/ubi_ctrl -m 2


mount -t ubifs /dev/ubi0_0 /mnt/ubifs

ls -l /mnt/ubifs


Until this point all the things works but when a try to boot the board I get this


Boot area protection is enabled.

Creating 5 MTD partitions on "gpmi-nfc-main":

0x000000000000-0x000001000000 : "nand.bootloader"

0x000001000000-0x000002000000 : "nand.kernel.0"

0x000002000000-0x000010600000 : "nand.rootfs.0"

0x000010600000-0x000011600000 : "nand.kernel.1"

0x000011600000-0x00001fc00000 : "nand.rootfs.1"

UBI: attaching mtd2 to ubi0

UBI: physical eraseblock size:   131072 bytes (128 KiB)

UBI: logical eraseblock size:    126976 bytes

UBI: smallest flash I/O unit:    2048

UBI: VID header offset:          2048 (aligned 2048)

UBI: data offset:                4096

UBI: attached mtd2 to ubi0

UBI: MTD device name:            "nand.rootfs.0"

UBI: MTD device size:            230 MiB

UBI: number of good PEBs:        1840

UBI: number of bad PEBs:         0

UBI: max. allowed volumes:       128

UBI: wear-leveling threshold:    4096

UBI: number of internal volumes: 1

UBI: number of user volumes:     1

UBI: available PEBs:             0

UBI: total number of reserved PEBs: 1840

UBI: number of PEBs reserved for bad PEB handling: 18

UBI: max/mean erase counter: 1/0

UBI: image sequence number: 965744890

UBI: background thread "ubi_bgt0d" started, PID 34

UBI error: ubi_init: cannot attach mtd2

ubiblka: unknown partition table

FEC Ethernet Driver

fec_enet_mii_bus: probed

ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

fsl-ehci fsl-ehci: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci: new USB bus registered, assigned bus number 1

fsl-ehci fsl-ehci: irq 93, io base 0x80080000

fsl-ehci fsl-ehci: USB 2.0 started, EHCI 1.00

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller

fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 2

fsl-ehci fsl-ehci.0: irq 92, io base 0x80090000

fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00

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.

ARC USBOTG Device Controller driver (1 August 2005)

mice: PS/2 mouse device common for all mice

input: matrix-keypad as /devices/platform/matrix-keypad.0/input/input0

input: MXS touchscreen as /devices/virtual/input/input1

MXS RTC driver v1.0 hardware v2.3.0

mxs-rtc mxs-rtc.0: rtc core: registered mxs-rtc as rtc0

i2c /dev entries driver

IR NEC protocol handler initialized

IR RC5(x) protocol handler initialized

IR RC6 protocol handler initialized

IR JVC protocol handler initialized

IR Sony protocol handler initialized

Linux video capture interface: v2.00

mxs-pxp mxs-pxp.0: initialized

WARNING : No battery connected !

Aborting power driver initialization

mxs-battery: probe of mxs-battery.0 failed with error 1

mxs watchdog: initialized, heartbeat 19 sec

mxs-mmc: MXS SSP Controller MMC Interface driver

mxs-mmc mxs-mmc.0: mmc0: MXS SSP MMC DMAIRQ 82 ERRIRQ 96

dcp dcp.0: DCP crypto enabled.!

usbcore: registered new interface driver hiddev

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

sgtl5000_hw_read: read reg error : Reg 0x00

Device with ID register 0 is not a SGTL5000

mxs-spdif mxs-spdif.0: MXS SPDIF Audio Transmitter

No device for codec mxs spdif

No device for DAI mxs spdif

No device for DAI mxs-saif

No device for DAI mxs-spdif

asoc: mxs spdif <-> mxs-spdif mapping ok

ALSA device list:

  #0: mxs-evk (mxs spdif)

TCP cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

can: raw protocol (rev 20090105)

802.1Q VLAN Support v1.8 Ben Greear <>

All bugs added by David S. Miller <>

mxs-rtc mxs-rtc.0: setting system clock to 2014-02-13 03:54:32 UTC (1392263672)

eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1)

IP-Config: Complete:

     device=eth0, addr=, mask=, gw=,

     host=, domain=, nis-domain=(none),

     bootserver=, rootserver=, rootpath=

UBIFS: mounted UBI device 0, volume 0, name "imx28_asga_analit-rootfs"

UBIFS: file system size:   229445632 bytes (224068 KiB, 218 MiB, 1807 LEBs)

UBIFS: journal size:       9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)

UBIFS: media format:       w4/r0 (latest is w4/r0)

UBIFS: default compressor: lzo

UBIFS: reserved for root:  0 bytes (0 KiB)

VFS: Mounted root (ubifs filesystem) on device 0:15.

devtmpfs: mounted

Freeing init memory: 160K

INIT: version 2.88 booting

PHY: 0:00 - Link is Up - 100/Full

Starting udev

<30>udevd[135]: starting version 182

Unable to handle kernel paging request at virtual address fffffff0

pgd = c0004000

[fffffff0] *pgd=407b5031, *pte=00000000, *ppte=00000000

Internal error: Oops: 17 [#1] PREEMPT

last sysfs file: /sys/devices/virtual/tty/ptydf/uevent

Modules linked in:

CPU: 0    Not tainted  ( #4)

PC is at ubi_leb_read+0x10/0x124

LR is at ubiblock_readsect+0xbc/0xec

pc : [<c0298f44>]    lr : [<c029f998>]    psr: 60000013

sp : cf46ff18  ip : cf46ff50  fp : cf46ff4c

r10: 0001f000  r9 : 00000000  r8 : cf21d400

r7 : 00000400  r6 : 00000200  r5 : 00000200  r4 : cff9cea0

r3 : 00000400  r2 : cf21d400  r1 : 00000000  r0 : fffffff0

Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

Control: 0005317f  Table: 4f5e4000  DAC: 00000017

Process ubiblk2 (pid: 35, stack limit = 0xcf46e270)

Stack: (0xcf46ff18 to 0xcf470000)

ff00:                                                       c03f1304 cff9cea0

ff20: c029f8dc cf21d400 cf46ff4c cff9cea0 00000200 00000200 00000400 cf21d400

ff40: cf46ff84 cf46ff50 c029f998 c0298f44 00000200 00000000 00000000 00000000

ff60: c029f8dc cf21d400 c0551700 cfdcf410 cff9cf00 cf46e000 cf46ffc4 cf46ff88

ff80: c02747d0 c029f8ec cff953f0 cff9cf10 00000002 00000002 00000000 cfc29df0

ffa0: c02745e4 cff9cf00 00000013 00000000 00000000 00000000 cf46fff4 cf46ffc8

ffc0: c0063704 c02745f4 00000000 00000000 cf46ffd0 cf46ffd0 00000000 cfc29df0

ffe0: c006367c c004f490 00000000 cf46fff8 c004f490 c006368c 00000000 00000000


[<c0298f34>] (ubi_leb_read+0x0/0x124) from [<c029f998>] (ubiblock_readsect+0xbc/0xec)

r8:cf21d400 r7:00000400 r6:00000200 r5:00000200 r4:cff9cea0

[<c029f8dc>] (ubiblock_readsect+0x0/0xec) from [<c02747d0>] (mtd_blktrans_thread+0x1ec/0x308)

[<c02745e4>] (mtd_blktrans_thread+0x0/0x308) from [<c0063704>] (kthread+0x88/0x94)

[<c006367c>] (kthread+0x0/0x94) from [<c004f490>] (do_exit+0x0/0x6c0)

r6:c004f490 r5:c006367c r4:cfc29df0

Code: e1a0c00d e92dd9f0 e24cb004 e24dd014 (e5905000)

---[ end trace 764c279107f929b4 ]---

udevd[135]: worker [162] timeout, kill it



udevd[135]: seq 1299 '/devices/virtual/mtd/mtd2/ubiblka' killed



udevd[135]: worker [162] terminated by signal 9 (Killed)



Starting Bootlog daemon:



I'm calling the kernel with this parameters

bootargs_mtd 'setenv bootargs ${bootargs} ubi.mtd=2 root=ubi0_0 rootfstype=ubifs rw init=/sbin/init console=${tty},${baudrate} gpmi'


I'm sending my kernel .config attached

Original Attachment has been moved to: