Quantcast
Viewing all articles
Browse latest Browse all 262198

Linux/AM3358: Boot error due to bad blocks when hardcoding the UBIFS NAND addresses in going from SDK6 to ProcessorSDK 1.03?

Part Number:AM3358

Tool/software: Linux

In going from SDK6 to ProcessorSDK 1.03 on AM335x, a customer hardcoded the NAND MTD partition table for UBIFS (e.g. filesystem) from the old board file into a device tree .dtsi file:
 partition@8 {
   label = "NAND.File-System";
   reg = <0x00C80000 0x06000000>;
  };

When the first two physical blocks of the rootfs partition are bad blocks, U-boot recognizes this when flashing the rootfs and skips them. But when the kernel is just starting and tries to mount rootfs for the first time, it does not even see a valid ubi filesystem there and gives an error:
>>[    1.077744] UBI error: scan_peb: bad image sequence number 529790210 in PEB 766, expected 1116986266

Is there a way to skip bad blocks with this method and boot the kernel successfully? What is wrong here?

Here’s the console log (The bootargs we use for the rootfs are:  root=ubi0:rootfs ro ubi,mtd=8,2048 noinitrd rootfstype=ubifs rootwait=1):

Starting kernel ...

[    0.305420] pinctrl-single: ioremap base is f9e10800 phys 44e10800
[    1.077744] UBI error: scan_peb: bad image sequence number 529790210 in PEB 766, expected 1116986266
[    1.087337] Erase counter header dump:
[    1.091261]  magic          0x55424923
[    1.095182]  version        1
[    1.098295]  ec             1
[    1.101398]  vid_hdr_offset 2048
[    1.104773]  data_offset    4096
[    1.108160]  image_seq      529790210
[    1.111990]  hdr_crc        0xb1cc42f3
[    1.115910] erase counter header hexdump:
[    1.120406] UBI error: ubi_attach_mtd_dev: failed to attach mtd8, error -22
[    1.127762] UBI error: ubi_init: cannot attach mtd8
[    1.137777] UBIFS error (pid 1): ubifs_mount: cannot open "ubi0:rootfs", error -19
[    1.145961] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.154625] CPU: 0 PID: 1 Comm: swapper Not tainted 3.14.43+ #136
[    1.161004] Backtrace:
[    1.163593] [<c0016eb0>] (dump_backtrace) from [<c001704c>] (show_stack+0x18/0x1c)
[    1.171518]  r6:c5b51000 r5:c051e804 r4:c061bfa8 r3:00000000
[    1.177471] [<c0017034>] (show_stack) from [<c0439ec4>] (dump_stack+0x20/0x28)
[    1.185052] [<c0439ea4>] (dump_stack) from [<c04382bc>] (panic+0x84/0x1d4)
[    1.192271] [<c043823c>] (panic) from [<c05a8040>] (mount_block_root+0x194/0x240)
[    1.200108]  r3:00000004 r2:00000000 r1:c5879ee0 r0:c051e804
[    1.206048]  r7:c05d3a04
[    1.208708] [<c05a7eac>] (mount_block_root) from [<c05a8388>] (prepare_namespace+0x94/0x1cc)
[    1.217543]  r10:c05d39d8 r9:c05d39d0 r8:c05a74d0 r7:00000092 r6:c061b200 r5:c05d3a04
[    1.225761]  r4:c05d39f8
[    1.228420] [<c05a82f4>] (prepare_namespace) from [<c05a7c68>] (kernel_init_freeable+0x174/0x1b8)
[    1.237711]  r5:00000007 r4:c05db7dc
[    1.241465] [<c05a7af4>] (kernel_init_freeable) from [<c043706c>] (kernel_init+0x14/0xf4)
[    1.250028]  r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0437058
[    1.258245]  r4:c061b200
[    1.260916] [<c0437058>] (kernel_init) from [<c0014258>] (ret_from_fork+0x14/0x3c)
[    1.268840]  r4:00000000 r3:c5878000


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>