Transclusion: CL-SOM-iMX7: Linux: Manual Installation: Install Images on SD

From Compulab Mediawiki
Jump to: navigation, search
  • Unmount all SD card partitions:
umount -l /dev/sdc*
  • Clean up the on the SD card:
dd if=/dev/zero of=/dev/sdc bs=1M count=1
hdparm -z /dev/sdc
  • Create two partitions for the Linux kernel (EXT2 100M) and root file system (EXT4 the rest of the disk) on the SD card:
echo -e "n\np\n1\n\n+100M\nn\np\n2\n\n\nw\neof\n" | fdisk /dev/sdc
  • Format the first partition with EXT2 file system:
mkfs.ext2 -L boot /dev/sdc1
  • Format the second partition with EXT4 file system:
mkfs.ext4 -L rootfs /dev/sdc2
  • Mount both partitions:
mkdir -p /media/boot && mount /dev/sdc1 /media/boot
mkdir -p /media/rootfs && mount /dev/sdc2 /media/rootfs
  • Copy zImage and imx7d-*imx7.dtb to the first (EXT2) partition:
cp /path/to/cl-som-imx7-linux/images/zImage /path/to/cl-som-imx7-linux/images/imx7d-*.dtb /media/boot && sync
  • Extract the content of rootfs.tar.bz2 onto the second partition:
tar --numeric-owner -xpf /path/to/cl-som-imx7-linux/images/rootfs.tar.bz2 -C /media/rootfs && sync
  • Unmount both partitions:
umount /media/boot
umount /media/rootfs
  • Eject the SD card
eject /dev/sdc
  • Remove the SD card from the SD card reader