What is a Bootable SD-Card
?
- A
Bootable SD-Card
is an SD-Card that has a bootloader installed on it. - A
Bootable SD-Card
is also known as aBoot-Disk
, and your target device will be able to boot from the SD-Card, as though it were the onboard eMMC storage.
Why do we need a Bootable SD-Card
?
- A
Bootable SD-Card
can be used to speed up the development process. - If you want to release ROM for an SD-Card, the
Bootable SD-Card
can be used during your development process. - In some extreme cases, when your target-device is unable to boot from the eMMC (e.g. damaged bootloader), you can use a
Bootable SD-Card
to do your system/file recovery.
The operation of VIM1, VIM2 and VIM3 is almost the same, so this document will take VIM1 as an example.
Getting Started
Download U-Boot (VIM1/VIM2/VIM3) or build U-Boot to get the bootloader blob for your SD-Card.
No matter which method you choose, you need to keep in mind that there are different bootloader blobs for different boot disks/media:
- U-Boot blob
u-boot.bin.sd.bin
is built for SD-Cards - U-Boot blob
u-boot.bin
is built for eMMC Storage
Insert the SD-Card into your PC, and make sure the disk is unmounted:
1 | $ sudo umount /dev/sdX1 |
Format the SD-Card as Fat32:
1 | $ sudo mkfs.vfat /dev/sdX1 |
Run dd
to write the U-Boot blob into the first sector of SD-Card:
1 | $ sudo dd if=u-boot.bin.sd.bin of=/dev/sdX conv=fsync,notrunc bs=1 count=444 |
Eject the SD-Card from your PC:
1 | $ sudo eject /dev/sdX |
NotePlease replace
sdX
with the correct one on your PC.
Check Your Bootable SD-Card
Ensure that you have done the correct setup of your Serial to USB Module(VIM1/VIM2/VIM3).
In order to check the Bootable SD-Card, you may also need to make sure that all data stored in the onboard eMMC has been completely erased(VIM1/VIM2/VIM3).
Open a terminal and type the sudo minicom
command or other serial tool you like.
Insert the Bootable SD-Card you created previously, into your target device and power-on. The terminal should print this out which means the board is booted from SD card:
1 | GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0; |