Copy yocto image to emmc

Discussion in 'SECOSBC-A62' started by modjo, Oct 7, 2016.

  1. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    @graugans @prakash.m @SECO_FAE
    I just tried to copy an image of my working sd card on secoA62 emmc. Before to do it i read this post and follow the guide on seco wiki.
    on the card, if i enter fdisk -l i saw that my emmc is based in mmcblk3
    Code:
    root@secosbca62:~# fdisk -l
    Disk /dev/mtdblock0: 1 MiB, 1048576 bytes, 2048 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mmcblk0: 29.7 GiB, 31914983424 bytes, 62333952 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x8893b96c
    
    Device         Boot Start      End  Sectors  Size Id Type
    /dev/mmcblk0p1       8192    24575    16384    8M  c W95 FAT32 (LBA)
    /dev/mmcblk0p2      24576 62333951 62309376 29.7G 83 Linux
    
    
    Disk /dev/mmcblk3: 3.7 GiB, 3959422976 bytes, 7733248 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x8893b96c
    
    Device         Boot Start     End Sectors  Size Id Type
    /dev/mmcblk3p1       8192   24575   16384    8M  c W95 FAT32 (LBA)
    /dev/mmcblk3p2      24576 1802239 1777664  868M 83 Linux
    
    
    Disk /dev/mmcblk3rpmb: 512 KiB, 524288 bytes, 1024 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mmcblk3boot1: 2 MiB, 2097152 bytes, 4096 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mmcblk3boot0: 2 MiB, 2097152 bytes, 4096 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    I decided to install the yocto image on it (i test to do that on mmcblk0, but in this case i erase the sdcard ...)

    i did this

    Code:
    root@secosbca62:~# dd if=/dev/zero of=/dev/mmcblk3 bs=512 count=2000
    2000+0 records in
    2000+0 records out
    1024000 bytes (1.0 MB, 1000 KiB) copied, 0.242504 s, 4.2 MB/s
    root@secosbca62:~# sync
    root@secosbca62:~# zcat yoctoSA62_Qt5_6_sdCard.gz | sudo dd of=/dev/mmcblk3 bs=32M
    0+18894 records in
    0+18894 records out
    926941184 bytes (927 MB, 884 MiB) copied, 97.0979 s, 9.5 MB/s
    root@secosbca62:~# sync
    root@secosbca62:~# fdisk -l
    Disk /dev/mtdblock0: 1 MiB, 1048576 bytes, 2048 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mmcblk0: 29.7 GiB, 31914983424 bytes, 62333952 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x8893b96c
    
    Device         Boot Start      End  Sectors  Size Id Type
    /dev/mmcblk0p1       8192    24575    16384    8M  c W95 FAT32 (LBA)
    /dev/mmcblk0p2      24576 62333951 62309376 29.7G 83 Linux
    
    
    Disk /dev/mmcblk3: 3.7 GiB, 3959422976 bytes, 7733248 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x8893b96c
    
    Device         Boot Start     End Sectors  Size Id Type
    /dev/mmcblk3p1       8192   24575   16384    8M  c W95 FAT32 (LBA)
    /dev/mmcblk3p2      24576 1802239 1777664  868M 83 Linux
    
    
    Disk /dev/mmcblk3rpmb: 512 KiB, 524288 bytes, 1024 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mmcblk3boot1: 2 MiB, 2097152 bytes, 4096 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    
    Disk /dev/mmcblk3boot0: 2 MiB, 2097152 bytes, 4096 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    
    as you can see, the yocto image seems to be correctly installed on emmc !

    But now, if i reboot the card (remove j27 jumper) i have this error (in debug) :

    U-Boot SPL 2016.01-seco-a62-v2016.01+g654be7a (Oct 06 2016 - 10:43:35)
    Trying to boot from MMC
    Card did not respond to voltage select!
    spl: mmc init failed with error: -17
    SPL: failed to boot from all boot devices
    ### ERROR ### Please RESET the board ###


    Did i make a mistake ? Do you have an idea how to resolve this ?
     
  2. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    I have an idea. Due to the fact I used UDOO as reference emmc might be not supported by my u-boot branch. Since there is support for A62 with SPL in official udoo u-boot we can compare stuff.

    Gesendet von meinem FP2 mit Tapatalk
     
    modjo likes this.
  3. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Let me know how i can help on this graugans !
     
  4. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    There are multiple options as far as I remember there is also a spi nor with one or two mega bytes an option could be to install u-boot there. Or we have to check the SPL code if if checks both mmc options emmc and sd card

    Gesendet von meinem FP2 mit Tapatalk
     
  5. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    From the wiki it is a S25FL208K this means 1MB. Enough for u-boot

    Gesendet von meinem FP2 mit Tapatalk
     
  6. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Graugan, you talk about this 2 files :
    quad
    seco A62
    I suppose in yocto you use quad for A62 at moment ?
     
  7. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
  8. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
  9. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Ok, i would like to help more on it but i didn't know anything on uboot and SPL for the moment :oops:... need to read more doc about this !
     
    graugans likes this.
  10. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    Can you said me where is defined on your layer the source of uboot, i found this but i didn't understand where you define the source of code (git seco or udoo) ?
     
  11. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    modjo likes this.
  12. graugans

    graugans Administrator Staff Member

    Joined:
    Sep 17, 2015
    Messages:
    328
    Likes Received:
    141
    modjo likes this.
  13. modjo

    modjo Active Member

    Joined:
    Sep 29, 2014
    Messages:
    417
    Likes Received:
    127
    I just make a try this morning with udoo uboot copy directly on seco emmc with dd. I have this error (just for information) :

    Code:
    U-Boot 2014.04-g8373ccd (Nov 05 2015 - 18:48:41)
    
    CPU:   Freescale i.MX6Q rev1.2 at 792 MHz
    CPU:   Temperature 30 C, calibration data: 0x5714db69
    Reset cause: POR
    Board: Seco SBC-i.MX6 (SBC) - A62
    I2C:   ready
    DRAM:  1 GiB
    Boot: eMMC
    MMC:   FSL_SDHC: 0, FSL_SDHC: 1
    *** Warning - bad CRC, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    Net:   using phy at 6
    FEC [PRIME]
    Normal Boot
    Hit any key to stop autoboot:  0
    Running in Remote...
    ## Error: "set_ip" not defined
    MMC: no card present
    mmc1(part 0) is current device
    MMC: no card present
    ** Bad device mmc 1 **
    MMC: no card present
    mmc1(part 0) is current device
    MMC: no card present
    ** Bad device mmc 1 **
    Bad Linux ARM zImage magic!
     

Share This Page