Creating a Bootable SD Card¶
Re-creating a Development Kit SD Card¶
Windows Host OS¶
iMX6 CPU | Download Link | MD5SUM of .img |
Quad or Dual | MitySOM-iMX6_Quad-Dual_40-000130-1_RevA.zip | 77b3d077743feaf314975b95b1b9a1f2 |
DualLite | MitySOM-iMX6_DualLite_40-000128-1_RevA.zip | a3d475c0e4358b7b03e4cc50259bbc99 |
Solo | MitySOM-iMX6_Solo_40-000129-1_RevA.zip | 8cfc326ad31751bc6b08c54f668b7e02 |
- Download the desired SD card version from the table above based on the CPU type of your module.
- Unzip the file so that you have a *.img file
- Download and use the Win32 Disk Imager application to write the image to your SD card
- Using an SD card reader in your PC insert the card to be written
- Open the Win32 Disk Imager application and be sure you select the drive letter for the SD card as this will erase the drive contents
- Image the drive and safely remove it
Creating a "custom" SD card¶
The following instructions are based on creating the SD card partitions and copy the files to the SD card using a Linux OS.
The recommended SD card structure is:- No Partition (Beginning of SD Card after 1024Bytes)
- UBoot Image
- FAT32 Partition (BOOT)
- Kernel (zImage)
- Device Tree Blob (dtb)
- EXT4 Partition (rootfs)
- Root Filesystem
- Prepare the SD card partitions
- Set the disks label useing parted. In this case msdos
sudo parted -s /dev/<YOUR_SD_CARD> mklabel msdos
- Create the FAT32 and EXT4 partitions
sudo sfdisk /dev/<YOUR_SD-CARD> <<EOF label: dos 16065,128520,0x0C,* 144585,,,- EOF
- Create the FAT32 filesystem
sudo mkfs.fat -F32 -v -n "BOOT" /dev/<YOUR_SD_CARD>1
- Create the EXT4 filesystem
sudo mkfs.ext4 -F -L "rootfs" /dev/<YOUR_SD_CARD>2
- Set the disks label useing parted. In this case msdos
- Copy your files to the SD card
- UBoot is stored at the beginning of the drive but skips 1024bytes to ensure the MBR remains intact
sudo dd if=<YOUR_u-boot.imx> of=/dev/<YOUR_SD_CARD> bs=512 seek=2
- Kernel and DTB
sudo cp <YOUR_zImage> <YOUR_MOUNTED_BOOT_PARTITION> sudo cp <YOUR_dtb> <YOUR_MOUNTED_BOOT_PARTITION>
- Filesystem
sudo tar -xvjf <YOUR_ROOTFS.tar.bz2> -C <YOUR_MOUNTED_ROOTFS_PARTITION>
- UBoot is stored at the beginning of the drive but skips 1024bytes to ensure the MBR remains intact
- Sync the drive to ensure all data has been completely written before removing the SD card from the PC
sync
Example Custom SD card commands¶
sudo parted -s /dev/sdd mklabel msdos sudo sfdisk /dev/sdd<<EOF label: dos 16065,128520,0x0C,* 144585,,,- EOF sudo mkfs.fat -F32 -v -n "BOOT" /dev/sdd1 sudo mkfs.ext4 -F -L "rootfs" /dev/sdd2 sudo dd if=/home/user/u-boot-imx/u-boot.imx of=/dev/sdd bs=512 seek=2 sudo cp /home/user/kernel-imx/zImage /media/user/BOOT sudo cp /home/user/kernel-imx/igep-0046.dtb /media/user/BOOT sudo tar -xvjf /home/user/rootfs/ubuntu_0046.tar.bz2 -C /media/user/rootfs sync
Go to top