Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:development:create-bootable-tf-card

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:development:create-bootable-tf-card [2022/07/05 04:14]
nick
products:sbc:common:development:create-bootable-tf-card [2024/01/11 05:52] (current)
nick
Line 1: Line 1:
 ====== Create Bootable TF Card ====== ====== Create Bootable TF Card ======
- 
-===== Introduction ===== 
- 
  
 What is a bootable TF card? What is a bootable TF card?
  
-* A bootable TF card is an TF card that has a bootloader installed on it. +  * A bootable TF card is an TF card that has a bootloader installed on it. 
-* A bootable TF card is also known as a boot disk, which your SBC can boot-up from.+  * A bootable TF card is also known as a boot disk, which your SBC can boot-up from.
  
 Why do we need a bootable TF card? Why do we need a bootable TF card?
Line 15: Line 12:
  
 <WRAP important > <WRAP important >
-The process for VIM1, VIM2, VIM3, VIM3L and VIM4 is similar, so we will use VIM1 as an example.+The process for VIM1, VIM2, VIM3, VIM3L, VIM1S and VIM4 is similar, so we will use VIM1 as an example.
 </WRAP> </WRAP>
  
  
-===== Getting Started =====+===== Download boot images =====
  
-Download U-Boot for ([[dl>products/vim1/firmware/|VIM1]]/[[dl>products/vim2/firmware/|VIM2]]/[[dl>products/vim2/firmware/|VIM3]]/[[dl>products/vim3l/firmware/|VIM3L]]/[[dl>products/vim4/firmware/|VIM4]]), or get the correct bootloader blob for your TF card and manually build U-Boot. Regardless of which method you choose, you need to remember that there are different bootloader blobs for different boot disks/media:+Download U-Boot for ([[dl>products/vim1/firmware/|VIM1]]/[[dl>products/vim2/firmware/|VIM2]]/[[dl>products/vim3/firmware/|VIM3]]/[[dl>products/vim3l/firmware/|VIM3L]]/[[dl>products/vim1s/firmware/|VIM1S]]/[[dl>products/vim4/firmware/|VIM4]]), or get the correct bootloader blob for your TF card and manually build U-Boot. Regardless of which method you choose, you need to remember that there are different bootloader blobs for different boot disks/media.
  
 <tabbox VIM1/2/3/3L> <tabbox VIM1/2/3/3L>
Line 28: Line 25:
   * ''u-boot.bin'' is for eMMC storage   * ''u-boot.bin'' is for eMMC storage
  
-<tabbox VIM4>+<tabbox VIM1S/VIM4>
  
   * ''u-boot.bin.sd.bin.signed'' is for TF cards   * ''u-boot.bin.sd.bin.signed'' is for TF cards
   * ''u-boot.bin.signed'' is for eMMC storage   * ''u-boot.bin.signed'' is for eMMC storage
-  * ''u-boot.bin.spi.bin.signed'' is for SPI flash 
  
 </tabbox> </tabbox>
 +
 +===== Linux command line usage examples =====
  
 Insert the TF card into your PC, and unmount it: Insert the TF card into your PC, and unmount it:
  
-```sh+```shell
 $ sudo umount /dev/sdX1 $ sudo umount /dev/sdX1
 ``` ```
Line 44: Line 42:
 Format the TF card as FAT32: Format the TF card as FAT32:
  
-```sh+```shell
 $ sudo mkfs.vfat /dev/sdX1 $ sudo mkfs.vfat /dev/sdX1
 ``` ```
Line 50: Line 48:
 Run ''dd'' to write the U-Boot blob into the first sector of TF card: Run ''dd'' to write the U-Boot blob into the first sector of TF card:
  
-```sh+<tabbox VIM1/2/3/3L/4> 
 + 
 +```shell
 $ 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=1 count=444
 $ sudo dd if=u-boot.bin.sd.bin of=/dev/sdX conv=fsync,notrunc bs=512 skip=1 seek=1 $ sudo dd if=u-boot.bin.sd.bin of=/dev/sdX conv=fsync,notrunc bs=512 skip=1 seek=1
 ``` ```
 +
 +<tabbox VIM1S/VIM4>
 +
 +```shell
 +$ sudo dd if=u-boot.bin.sd.bin.signed of=/dev/sdX conv=fsync,notrunc bs=1 count=444
 +$ sudo dd if=u-boot.bin.sd.bin.signed of=/dev/sdX conv=fsync,notrunc bs=512 skip=1 seek=1
 +```
 +
 +</tabbox>
  
 Eject the TF card from your PC: Eject the TF card from your PC:
  
-```sh+```shell
 $ sudo eject /dev/sdX $ sudo eject /dev/sdX
 ``` ```
  
 <WRAP important > <WRAP important >
-Replace `sdXwith the correct device node on your PC.+Replace ''sdX'' with the correct device node on your PC.
 </WRAP> </WRAP>
  
  
-===== Check your Bootable TF Card ===== +===== Bootable TF Card logs =====
- +
-[[products:sbc:common:development:setup_serial_tool|Setup Serial Debug Tool]].\\+
  
-Insert the Bootable TF card into your SBC and power on. +You need to [[products:sbc:common:development:setup-serial-tool|Setup Serial Debug Tool]] fisrt, then insert the Bootable TF card into your SBC and power on. \\
  
 If your SBC has successfully booted from the TF card, you should get this Terminal print-out: If your SBC has successfully booted from the TF card, you should get this Terminal print-out:
Line 105: Line 112:
  
 <WRAP tip > <WRAP tip >
-In rare cases, you may need to  in order to boot from an SD card.+In rare cases, you may need to erase eMMC in order to boot from an TF card.
 </WRAP> </WRAP>
  
  
Last modified: 2022/07/05 04:14 by nick