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 a “Boot-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.

Note: 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:

$ umount /dev/sdX1

Format the SD-Card as Fat32:

$ sudo mkfs.vfat /dev/sdX1

Run dd to write the U-Boot blob into the first sector of SD-Card:

$ sudo dd if=u-boot.bin.sd.bin of=/dev/sdX conv=fsync,notrunc bs=1 count=444
$ sudo dd if=u-boot.bin.sd.bin of=/dev/sdX conv=fsync,notrunc bs=512 skip=1 seek=1

Eject the SD-Card from your PC:

$ sudo eject /dev/sdX

Note: Please 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 kermit command:

$ kermit
Connecting to /dev/ttyUSB0, speed 115200
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.

Insert the Bootable SD-Card you created previously, into your target device and power-on. The terminal should print this out:

no sdio debug board detected 
TE: 194208

BL2 Built : 13:48:56, Sep 23 2016. 
gxl g7459bd4 - jianxin.pan@droid06

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 792MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from SD, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from SD, src: 0x00020200, des: 0x10100000, size: 0x00015400
Load bl33 from SD, src: 0x00038200, des: 0x01000000, size: 0x000a3400
NOTICE:  BL3-1: v1.0(debug):2e39a99