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.

rootfs flashed to K9F1G08 doesn't work

Other Parts Discussed in Thread: AM3359

Hi,

I have a AM3359 board which the NandFlash on the board is K9F1G08.I flash kernel and ubi rootfs to the NandFlash using u-boot,as the following content shows,

U-Boot# tftp 0x82000000 uImage

U-Boot# nand erase 0x280000 0x500000

U-Boot# nandecc hw 0

U-Boot# nand write 0x82000000 0x280000 0x500000

U-Boot# tftp 0x82000000 ubi.img  

U-Boot# nand erase 0x780000 0x7880000

U-Boot# nandecc hw 0

U-Boot# nand write 0x82000000 0x780000 ${filesize}

then the kernel can't boot file system sucessfully and end up with error:

VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00 128 mtdblock0 (driver?)
1f01 128 mtdblock1 (driver?)
1f02 128 mtdblock2 (driver?)
1f03 128 mtdblock3 (driver?)
1f04 1920 mtdblock4 (driver?)
1f05 128 mtdblock5 (driver?)
1f06 5120 mtdblock6 (driver?)
1f07 123392 mtdblock7 (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Backtrace:
[<c00178f8>] (dump_backtrace+0x0/0x110) from [<c03dfb84>] (dump_stack+0x18/0x1c)
r6:cf98b000 r5:c0564d04 r4:c05caf48 r3:c0594ec8
[<c03dfb6c>] (dump_stack+0x0/0x1c) from [<c03dfbf4>] (panic+0x6c/0x1a0)
[<c03dfb88>] (panic+0x0/0x1a0) from [<c0538cb4>] (mount_block_root+0x184/0x228)
r3:c0594ec8 r2:00000000 r1:cf81df78 r0:c04a9000
r7:00008000
[<c0538b30>] (mount_block_root+0x0/0x228) from [<c0538fd0>] (prepare_namespace+0xac/0x1d4)
[<c0538f24>] (prepare_namespace+0x0/0x1d4) from [<c053890c>] (kernel_init+0x124/0x130)
r5:c0572cd4 r4:c0572cd4
[<c05387e8>] (kernel_init+0x0/0x130) from [<c003f0e4>] (do_exit+0x0/0x67c)
r5:c05387e8 r4:00000000

In addition,the kernel can boot the file system  from NandFlash named M29F2G08ABAEA.

I don't know why it happens and how to fix the problem now?

Please help me!

Thanks and Regards?

  • John,

    You have to verify couple of things here. You've to see whether the ECC algorithm chosen in kernel is same as u-boot. nand hwecc 0 selects 1-bit hamming code. hwecc 2 selects BCH-8. What I recommend is to first verify the kernel NAND driver by creating and writing the UBIFS from kernel itself using mtd-utils.

    If you are unsure on how to figure out the NAND ECC algorithm used in kernel, could you please send me the following files to the email renjith.thomas@pathpartnertech.com?

    1. arch/arm/mach-omap2/board-335xevm.c 
    2. arch/arm/mach-omap2/board-flash.c
    3. arch/arm/mach-omap2/gpmc.c
    4. drivers/mtd/nand/nand_base.c
    5. drivers/mtd/nand/omap2.c
    Also send me the complete kernel logs.
  • I choose nand hwecc 0 when I flash both u-boot and kernl to flash,

    And I Modify the ecc_opt passed through platform data in board-335xevm.c

    static void __init evm_nand_init(void)

    {
    struct omap_nand_platform_data *pdata;
    struct gpmc_devices_info gpmc_device[2] = {
    { NULL, 0 },
    { NULL, 0 },
    };

    setup_pin_mux(nand_pin_mux);
    pdata = omap_nand_init(am335x_nand_partitions,
    ARRAY_SIZE(am335x_nand_partitions), 0, 0,
    &am335x_nand_timings);
    if (!pdata)
    return;
    //pdata->ecc_opt =OMAP_ECC_BCH8_CODE_HW;
    pdata->ecc_opt = OMAP_ECC_HAMMING_CODE_HW;  // select haming code
    pdata->elm_used = true;
    gpmc_device[0].pdata = pdata;
    gpmc_device[0].flag = GPMC_DEVICE_NAND;

    omap_init_gpmc(gpmc_device, sizeof(gpmc_device));
    omap_init_elm();
    }


  • hi, Amir Lee,

         Have you got the K9F1G08 running?