AnsweredAssumed Answered

Generate eMMC partitions prior to first boot in Yocto

Question asked by brendanta on Feb 27, 2017
Latest reply on Feb 28, 2017 by Artur Petukhov

I am using Yocto to generate the required files to get my iMX6 VAR SOM Solo up and running.  I have no issues with generating these files or anything but I am wondering what I need to do to format and partition the eMMC prior to loading the files onto my board.  


I have a bash script which does this by sfdisk and mkfs.ext4 commands however this script is run after the system has initialised.


mkdir -p /tmp/emmc_ro
mkdir -p /tmp/emmc_rw

if [ ! -e /dev/mmcblk0p1 ]; then
    sfdisk /dev/mmcblk0 << EOF
    , 1G
    , +
        mkfs.ext4 /dev/mmcblk0p1
        mkfs.ext4 /dev/mmcblk0p2


Any help would be greatly appreciated.