This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:vim1s:development:erase-emmc [2022/08/22 02:25] frank |
products:sbc:vim1s:development:erase-emmc [2022/08/24 02:00] (current) hyphop old revision restored (2022/08/23 15:37) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== VIM1S Erase eMMC ====== | + | ====== VIM1S Erase eMMC bootloader |
| - | There are 3 ways to erase the eMMC: | + | We have several different |
| + | =====U-Boot console====== | ||
| - | * Serial Mode (Developers) | ||
| - | * Interrupt Mode | ||
| - | * CLI Mode | ||
| - | |||
| - | <tabbox Serial Mode (Developers)> | ||
| - Connect your PC to the SBC using a [[products: | - Connect your PC to the SBC using a [[products: | ||
| Line 16: | Line 12: | ||
| Use the following serial Terminal print-out as a reference: | Use the following serial Terminal print-out as a reference: | ||
| - | ``` | + | ```shell |
| kvim1s# store boot_erase bootloader | kvim1s# store boot_erase bootloader | ||
| GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 | GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 | ||
| Line 48: | Line 44: | ||
| ``` | ``` | ||
| - | < | + | ===== Interrupt Mode ===== |
| This erasure method is suitable for all products that use the Amlogic SoC: | This erasure method is suitable for all products that use the Amlogic SoC: | ||
| Line 56: | Line 52: | ||
| - Power on your SBC again, and you'll find that all the data on the eMMC has been erased. | - Power on your SBC again, and you'll find that all the data on the eMMC has been erased. | ||
| - | <tabbox CLI Mode> | + | ===== Linux command-line ===== |
| + | eMMC boot-loader can be stored on ''/ | ||
| + | |||
| + | ==== Cleanup eMMC boot loaders ==== | ||
| + | |||
| + | Cleanup special eMMC boot areas. | ||
| + | |||
| + | ```sh | ||
| + | dd if=/ | ||
| + | ``` | ||
| + | |||
| + | Also need cleanup eMMC common boot area. | ||
| + | |||
| + | ```sh | ||
| + | sudo dd if=/ | ||
| + | ``` | ||
| + | |||
| + | <WRAP important > | ||
| + | ''/ | ||
| + | </ | ||
| + | |||
| + | ==== Universal method for cleanup all eMMC boot-areas ==== | ||
| + | |||
| + | ```sh | ||
| + | sudo dd if=/ | ||
| + | sudo dd if=/ | ||
| + | |||
| + | ``` | ||
| + | |||
| + | ==== Get block-device names for boot loaders ==== | ||
| + | |||
| + | Get block-device names for special boot areas. | ||
| + | |||
| + | ```shell | ||
| + | ~$ ls -1 / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | ``` | ||
| + | <WRAP important > | ||
| + | ''/ | ||
| + | </ | ||
| + | |||
| + | Get eMMC block-device name. | ||
| + | |||
| + | ```shell | ||
| + | ~$ ls -1 $(ls / | ||
| + | / | ||
| + | ``` | ||
| + | |||
| + | ==== How-to check boot loaders content ==== | ||
| + | |||
| + | This example display empty content for special boot-loaders areas. | ||
| + | |||
| + | ```shell | ||
| + | ~$ for m in / | ||
| + | |||
| + | / | ||
| + | 00000000 | ||
| + | * | ||
| + | 00000200 | ||
| + | / | ||
| + | 00000000 | ||
| + | * | ||
| + | 00000200 | ||
| + | |||
| + | ``` | ||
| + | |||
| + | Display same but for other boot areas names. | ||
| + | |||
| + | ```shell | ||
| + | ~$ for m in / | ||
| + | |||
| + | / | ||
| + | 00000000 | ||
| + | * | ||
| + | 00000200 | ||
| + | / | ||
| + | 00000000 | ||
| + | * | ||
| + | 00000200 | ||
| + | ``` | ||
| + | |||
| + | Next example display valid boot loader header '' | ||
| + | |||
| + | ```shell | ||
| + | ~$ dd if=/ | ||
| + | 00000000 | ||
| + | ``` | ||
| + | |||
| + | /* | ||
| This erasure method is suitable for the SBC with Linux installed: | This erasure method is suitable for the SBC with Linux installed: | ||
| Line 63: | Line 150: | ||
| - Open a Terminal, and run '' | - Open a Terminal, and run '' | ||
| - | ```sh | + | |
| + | ```shell | ||
| khadas@Khadas: | khadas@Khadas: | ||
| dd: writing to '/ | dd: writing to '/ | ||
| Line 71: | Line 159: | ||
| root@Khadas: | root@Khadas: | ||
| ``` | ``` | ||
| - | </tabbox> | + | */ |