====== Create Flash Card ======
===== Introduction =====
Linux users can follow this guide to create a special TF card for "flashing" an OS into the eMMC. Windows users may use the following guides: [[products:sbc:common:install-os:install-os-into-external-storage|Install OS into External Storage]].
The process for VIM1, VIM2, VIM3 and VIM4 is similar, so we will use VIM1 as an example.
OS Installation TF Cards must use the FAT32 filesystem. Therefore, because the Ubuntu desktop image is larger then 4GB, it cannot be burned to the eMMC using this method.
===== Preparation =====
* Download the latest U-Boot file for TF card: ([[dl>products/vim1/firmware/u-boot|VIM1]]/[[dl>products/vim2/firmware/u-boot|VIM2]]/[[dl>products/vim3/firmware/u-boot|VIM3]]/[[dl>products/vim3l/firmware/u-boot|VIM3L]]/[[dl>products/vim4/firmware/u-boot|VIM4]]).
* If your TF card contains >1 partition, format it using Fdisk [[products:sbc:common:development:create-bootable-tf-card|Create Bootable TF Card]].
===== Prepare Your TF Card =====
**Backup all important data**, then remove all partitions on your TF card.
```sh
$ sudo fdisk /dev/sdX
```
Then create just 1 partition:
```sh
$ sudo fdisk /dev/sdX
```
Set the first sector to **4096**.
The single partition should look like this:
```sh
Command (m for help): p
Disk /dev/sdc: 14.86 GiB, 15931539456 bytes, 31116288 sectors
Disk model: SD Card Reader
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x2914f327
Device Boot Start End Sectors Size Id Type
/dev/sdc1 4096 31116287 31112192 14.9G 83 Linux
```
The partition must start from **4096**.
===== Create the Flash TF Card =====
Insert the TF card into your PC, make sure it is unmounted:
```sh
$ sudo umount /dev/sdX1
```
Format the TF card to FAT32:
```sh
$ sudo mkfs.vfat /dev/sdX1
```
Replace ''sdX'' with the correct device node on your PC.
Use ''dd'' to write the Bootloader/U-boot to the first sector of the TF card:
```sh
$ 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
```
The U-Boot file ''u-boot.bin.sd.bin'' is built for TF card.
The U-Boot file ''u-boot.bin'' is built for the eMMC.
Copy the OS image to your TF card.
Build the image yourself or download from our [[dl>|server]].
Insert the TF card again, then run the following command:
```sh
$ cp -a aml_sdc_burn.ini update.img /media/XXX/9CE9-3938/
```
The file ''aml_sdc_burn.ini'' is a configuration file for U-Boot, it's purpose is to burn images into the eMMC. You can find it [[kg>images_upgrade/blob/master/Amlogic/aml_sdc_burn.ini|here]].
The package in ''aml_sdc_burn.ini'' should match your OS image!
For example, the name of the OS image is ''update.img''. So the ''package'' variable in ''aml_sdc_burn.ini'' should be specified as ''package = update.img''.
Eject the TF card:
```sh
$ sudo eject /dev/sdX
```
===== Upgrade Using Your Flash TF Card =====
- Insert your OS installation TF card into your SBC, and power-on.
- Boot into upgrade mode.
- Wait till the flashing process completes.
- Eject the TF card, and reboot your SBC.