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.

booting problem in OMAP 3530

hi
am working Devkit8000 board, has OMAP 3530. NAND flash memory of 256 MB is availabe.

am loading Angstrom OS in NAND flash and every thing is working fine.

0x00000000-0x00080000 : "X-Loader"
0x00080000-0x00260000 : "U-Boot"
0x00260000-0x00280000 : "U-Boot Env"
0x00280000-0x00680000 : "Kernel"
0x00680000-0x10000000 : "File System"

here i am u‎tilizing only few MB of memry for Anstrom OS.
 
Problem is i have created one more extra partition see below

0x00000000-0x00080000 : "X-Loader"
0x00080000-0x00260000 : "U-Boot"
0x00260000-0x00280000 : "U-Boot Env"
0x00280000-0x00680000 : "Kernel"
0x00680000-0x01940000 : "File System"
0x01940000-0x10000000 : "EXTENDED PARTITION"

when booting i am getting an error

UBIFS error (pid 1): ubifs_get_sb: cannot open "ubi0:rootfs", error -19         
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          131072 mtdblock0 (driver?)                                        
1f01             512 mtdblock1 (driver?)                                        
1f02            1920 mtdblock2 (driver?)                                        
1f03             128 mtdblock3 (driver?)                                        
1f04            4096 mtdblock4 (driver?)                                        
1f05           19200 mtdblock5 (driver?)                                        
1f06          236288 mtdblock6 (driver?)                                        
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

FOR COMPLETE REFERENCE PLEASE REFER THE FILE minicom_output.txt

please suggest me how rectify this problem


thanks and regards
N REDDY0044.minicom_output.txt

  • I am not sure about your board layout but the log which you had shared says something very different -

    Creating 1 MTD partitions on "NAND 128MiB 1,8V 8-bit":                          
    0x00000000-0x08000000 : "NAND simulator partition 0"                            
    omap2-nand driver initializing                                                  
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xba (Micron NAND 256MiB 1,8V 16-b)
    Creating 6 MTD partitions on "omap2-nand":                                      
    0x00000000-0x00080000 : "X-Loader"                                              
    0x00080000-0x00260000 : "U-Boot"                                                
    0x00260000-0x00280000 : "U-Boot Env"                                            
    0x00280000-0x00680000 : "Kernel"                                                
    0x00680000-0x01940000 : "File System"                                           
    0x01940000-0x10000000 : "EXTENDED_PARTITION"   

    Are you sure that the filesystem in present in mtd4 only?

    Thanks,
    Vaibhav
  • hi vaibhav

    yes.

    please refer the output text file, i have attached below.

    8308.output.txt

    thanks and regards

    N reddy

  • The ubi_io_read errors (with error -74, EBADMSG) indicate that the MTD subsystem saw ECC problems throughout that partition.  Have you programmed the UBIFS partition with a valid image yet (for example, using "ubiformat" within Linux or using "nand write.trimffs" within Das U-Boot)?

  • Also can you share the steps you are following to flash the images into NAND flash?

    Thanks,

    Vaibhav

  • hi viaibhav

    thanks for the response..

    1) the above things are working fine if boot it from SD card and not working for  NAND flash booting, giving the above error.

    booting arguments for NAND flash

    setenv bootargs console=ttyS2,115200n8 ubi.mtd=4 root=ubi0:rootfs rootfstype=ubifs video=omapfb:mode:4.3inch_LCD
    setenv bootcmd 'nand ecc sw;nand read.i 80300000 280000 300000;bootm 80300000'

    booting arguments for SD card

    setenv bootargs console=ttyS2,115200n8 root=/dev/ram initrd=0x81600000,40M video=omapfb:mode:4.3inch_LCD
    setenv bootcmd 'mmcinit;fatload mmc 0 80300000 uImage;fatload mmc 0 81600000 ramdisk.gz;bootm 80300000'

    ............................................................................................................................

    partition in the kernel code

    created EXTENDED partion in  the kernel C code file (/media/SAS_Staff/Reddy/div8000/source/linux-2.6.28-omap/arch/arm/mach-omap2/board-omap3devkit8000.c)


    static struct mtd_partition omap3_devkit8000_nand_partitions[] = {
        /* All the partition sizes are listed in terms of NAND block size */
        {
            .name        = "X-Loader",
            .offset        = 0,
            .size        = 4 * NAND_BLOCK_SIZE,
            .mask_flags    = MTD_WRITEABLE,    /* force read-only */
        },
        {
            .name        = "U-Boot",
            .offset        = MTDPART_OFS_APPEND,    /* Offset = 0x80000 */
            .size        = 15 * NAND_BLOCK_SIZE,
            .mask_flags    = MTD_WRITEABLE,    /* force read-only */
        },
        {
            .name        = "U-Boot Env",
            .offset        = MTDPART_OFS_APPEND,    /* Offset = 0x260000 */
            .size        = 1 * NAND_BLOCK_SIZE,
        },
        {
            .name        = "Kernel",
            .offset        = MTDPART_OFS_APPEND,    /* Offset = 0x280000 */
            .size        = 32 * NAND_BLOCK_SIZE,
        },
            {
                .name        = "File System",
                .offset        = MTDPART_OFS_APPEND,    /* Offset = 0x680000 */
                .size        = 150 * NAND_BLOCK_SIZE,
            },    
    // newly created one more partion
        {
            .name        = "BABU",
            .offset        = MTDPART_OFS_APPEND,    /* Offset = 0x680000 */
            .size        = MTDPART_SIZ_FULL,
        },
    };

     

    2) compiled and build the image according to user manual.

    3) updating image for NAND falsh

    OMAP3 DevKit8000 # mmcinit
    OMAP3 DevKit8000 # fatload mmc 0:1 80000000 uImage
    reading uImage
    1991900 bytes read
    OMAP3 DevKit8000 # nand unlock
    device 0 whole chip
    nand_unlock: start: 00000000, length: 268435456!
    NAND flash successfully unlocked
    OMAP3 DevKit8000 # nand ecc sw
    OMAP3 DevKit8000 # nand erase 280000 300000
    NAND erase: device 0 offset 0x280000, size 0x200000
    Erasing at 0x460000 -- 100% complete.
    OK
    OMAP3 DevKit8000 # nand write.i 80000000 280000 $(filesize)
    NAND write: device 0 offset 0x280000, size 0x200000
    Writing data at 0x47f800 -- 100% complete.
     2097152 bytes written: OK

    for ubi.img

    OMAP3 DevKit8000 # fatload mmc 0:1 81000000 ubi.img
    reading ubi.img
    12845056 bytes read
    OMAP3 DevKit8000 # nand unlock
    device 0 whole chip
    nand_unlock: start: 00000000, length: 268435456!
    NAND flash successfully unlocked
    OMAP3 DevKit8000 # nand ecc sw
    OMAP3 DevKit8000 # nand erase 680000 1940000
    NAND erase: device 0 offset 0x680000, size 0x7980000
    Erasing at 0x7fe0000 -- 100% complete.
    OK
    OMAP3 DevKit8000 # nand write.i 81000000 680000 $(filesize)
    NAND write: device 0 offset 0x680000, size 0xc40000
    Writing data at 0x12bf800 -- 100% complete.
     12845056 bytes written: OK
    OMAP3 DevKit8000 #boot

    it is giving an above error (please check the attached file).3225.output.txt

    .............................................................................

    my questions are..

    1)does it required to do some changes in x-loader or u-boot code.. please guide me?

    2)working if i boot from SD card, but not working if i boot from NAND flash, what might be the problem?




  • hi all

    please help me regarding above post..

    thanks and regards

    N reddy

  • Reddy,

    I couldn't find any obvious mistake with your steps and log. As mentioned by Michael, I suspect either ECC related issue OR may be ubi filesystem image itself has some issue.

    Let me try to find if somebody from team has already tested ubi fs.

    Thanks,

    Vaibhav

  • Hello,

    According to u-boot's README.nand and http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo, normal "nand write" (which is the same as "nand write.i", "nand write.jffs2" and "nand write.e") will not work with UBI images.  You must #define CONFIG_CMD_NAND_TRIMFFS in the active include/configs/omap3_*.h file, and use "nand write.trimffs" to write the UBIFS image into NAND.  Those are the steps I use with UBIFS images, and Linux can mount the ubifs filesystem afterwards.

    Michael