ubifs in slc nand in imx6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ubifs in slc nand in imx6

2,364 Views
kiruthikavarada
Contributor III

Hi All,

I have imx6 solo h/w with SLC nand of size 256 MB.I made ubifs filesystem and flashed it in SLC nand.

Now kernel should take filesystem from SLC nand.

I have configured the kernel for required settings and UBIFS is found but could not boot completely from that.. 

Logs:

nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xaa

nand: Micron MT29F2G08ABBEAH4

nand: 256MiB, SLC, page size: 2048, OOB size: 64

gpmi-nand 112000.gpmi-nand: enable the asynchronous EDO mode 4

Scanning device for bad blocks

Bad eraseblock 100 at 0x000000c80000

Bad eraseblock 101 at 0x000000ca0000

1 ofpart partitions found on MTD device gpmi-nand

Creating 1 MTD partitions on "gpmi-nand":

0x000000020000-0x000000820000 : "root"

UBI: attaching mtd0 to ubi0

UBI: scanning is finished

UBI: attached mtd0 (name "gpmi-nand", size 256 MiB) to ubi0

UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes

UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 2048

UBI: VID header offset: 2048 (aligned 2048), data offset: 4096

UBI: good PEBs: 2046, bad PEBs: 2, corrupted PEBs: 0

UBI: user volume: 1, internal volumes: 1, max. volumes count: 128

UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1743731081

UBI: available PEBs: 0, total reserved PEBs: 2046, PEBs reserved for bad PEB handling: 38

UBI: background thread "ubi_bgt0d" started, PID 65

snvs_rtc 20cc034.snvs-rtc-lp: setting system clock to 1970-01-01 00:00:01 UTC (1)

ALSA device list:

  No soundcards found.

VFS: Cannot open root device "ubi0:root" or unknown-block(0,0): error -2

Please append a correct "root=" boot option; here are the available partitions:

b300         7684096 mmcblk0  driver: mmcblk

  b301             504 mmcblk0p1 1a000003-01

  b302             512 mmcblk0p2 1a000003-02

  b303           10240 mmcblk0p3 1a000003-03

  b304               1 mmcblk0p4

  b305            1016 mmcblk0p5 1a000003-05

  b306           24568 mmcblk0p6 1a000003-06

  b307         2058232 mmcblk0p7 1a000003-07

  b308         5588984 mmcblk0p8 1a000003-08

b330             128 mmcblk0rpmb  (driver?)

b320            2048 mmcblk0boot1  (driver?)

b310            2048 mmcblk0boot0  (driver?)

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.17 #975

[<80013b70>] (unwind_backtrace+0x0/0x104) from [<80011e60>] (show_stack+0x20/0x24)

[<80011e60>] (show_stack+0x20/0x24) from [<8051deb4>] (dump_stack+0x20/0x28)

[<8051deb4>] (dump_stack+0x20/0x28) from [<8051b978>] (panic+0x8c/0x1dc)

[<8051b978>] (panic+0x8c/0x1dc) from [<80754fb0>] (mount_block_root+0x214/0x2d4)

[<80754fb0>] (mount_block_root+0x214/0x2d4) from [<8075525c>] (prepare_namespace+0x94/0x1c0)

[<8075525c>] (prepare_namespace+0x94/0x1c0) from [<80754be8>] (kernel_init_freeable+0x174/0x1b8)

[<80754be8>] (kernel_init_freeable+0x174/0x1b8) from [<80519960>] (kernel_init+0x1

cat /proc/partition is not listing the mtdblock. Is this the problem??

root@imx6solosabreauto:~# cat /proc/partitions

major minor  #blocks  name

179        0    7684096 mmcblk0

179        1        504 mmcblk0p1

179        2        512 mmcblk0p2

179        3      10240 mmcblk0p3

179        4          1 mmcblk0p4

179        5       1016 mmcblk0p5

179        6      24568 mmcblk0p6

179        7    2058232 mmcblk0p7

179        8    5588984 mmcblk0p8

179       48        128 mmcblk0rpmb

179       32       2048 mmcblk0boot1

179       16       2048 mmcblk0boot0

cat /proc/mtd is listing the mtd device.

root@imx6solosabreauto:~# cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00800000 00020000 "root"

root@imx6solosabreauto:~#

I created this partition in dtsi file under gpmi node.

       partition@4 {

                        label = "root";

                        reg = <0x00020000 0x00800000>;

                            };

                };

Let me know what i am missing for making the kernel to take UBIFS from SLC Nand.

0 Kudos
5 Replies

1,229 Views
igorpadykov
NXP Employee
NXP Employee

Hi kiruthika

for NAND boot please look at attached Linux Guide

sect.8.3 Run the Image from NAND. NAND si supported in

Sabre AI boards, examples : imx6qdl-sabreauto.dtsi,imx6dl-sabreauto.dts.

For NAND programming it is recommended to use MFG Tool on below link

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREBRD&fpsp=1&tab=Design_Tool...

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,229 Views
kiruthikavarada
Contributor III

Hi igor,

I went through the attached document and for information, we have customized uboot and my uboot is not aware of SLC nand at all.

So mtdparts is unknown. Only kernel is aware of this SLC NAND and I have UBIFS In SLC NAND and kernel to take UBIFS from SLC NAND.

Any clues on how to add partition in kernel and cat /proc/partition to show /dev/mtdblock0??

0 Kudos

1,229 Views
kiruthikavarada
Contributor III

Hi igor,

May i know how can i partition the SLC NAND (ubi volumes) in DTS

0 Kudos

1,229 Views
kiruthikavarada
Contributor III

Hi igor,

Thanks for your reference.

I have partitioned SLC nand

                gpmi: gpmi-nand@00112000 {

                        compatible = "fsl,imx6q-gpmi-nand";

                        #address-cells = <1>;

                        #size-cells = <1>;

                        reg = <0x00112000 0x2000>, <0x00114000 0x2000>;

                        reg-names = "gpmi-nand", "bch";

                        interrupts = <0 15 0x04>;

                        interrupt-names = "bch";

                        clocks = <&clks 152>, <&clks 153>, <&clks 151>,

                                 <&clks 150>, <&clks 149>;

                        clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch",

                                      "gpmi_bch_apb", "per1_bch";

                        dmas = <&dma_apbh 0>;

                        dma-names = "rx-tx";

                        status = "okay";

                         partition@0 {

                        label = "rootfs";

                        reg = <0x000010 0x00800000>;

                            };

                         partition@1 {

                        label = "persistent";

                        reg = <0x00800000 0x00900000>;

                            };

                };

Kernel command line options for MTD includes

CONFIG_MTD=y

CONFIG_MTD_CMDLINE_PARTS=y

CONFIG_MTD_OF_PARTS=y

CONFIG_MTD_BLKDEVS=y

CONFIG_MTD_BLOCK=y

root@imx6solosabreauto:~# cat /proc/partitions

major minor  #blocks  name

  31        0     262144 mtdblock0

mtdblock0 and mtdblock1 is expected but its not shown.

May i know what else i need to do for making the partitions in DTS file to be visible in cat /proc/partitions

0 Kudos