- Unmount all eMMC partitions:
root@cl-ramdisk:~# umount -l /dev/mmcblk2p*
- Clean up the on the eMMC flash:
root@cl-ramdisk:~# dd if=/dev/zero of=/dev/mmcblk2 bs=1M count=1
root@cl-ramdisk:~# hdparm -z /dev/mmcblk2
- Create two partitions for the Linux kernel (EXT2 100M) and root file system (EXT4 the rest of the disk) on the eMMC flash:
root@cl-ramdisk:~# echo -e "n\np\n1\n\n+100M\nn\np\n2\n\n\nw\neof\n" | fdisk /dev/mmcblk2
- Format the first partition with EXT2 file system:
root@cl-ramdisk:~# mkfs.ext2 -L boot /dev/mmcblk2p1
- Format the second partition with EXT4 file system:
root@cl-ramdisk:~# mkfs.ext4 -L rootfs /dev/mmcblk2p2
root@cl-ramdisk:~# mkdir -p /media/rootfs && mount /dev/mmcblk2p2 /media/rootfs
root@cl-ramdisk:~# mkdir -p /media/rootfs/boot && mount /dev/mmcblk2p1 /media/rootfs/boot
- Extract the content of rootfs.tar.bz2:
root@cl-ramdisk:~# tar --numeric-owner -xpf /media/install/rootfs.tar.bz2 -C /media/rootfs && sync
- Copy zImage and imx7d-*imx7.dtb to the first (EXT2) partition:
root@cl-ramdisk:~# cp /media/install/zImage /media/install/imx7d-*.dtb /media/rootfs/boot && sync
root@cl-ramdisk:~# umount /dev/mmcblk2p1
root@cl-ramdisk:~# umount /dev/mmcblk2p2