This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
products:sbc:vim1s:development:erase-emmc [2022/07/17 21:31] 127.0.0.1 external edit |
products:sbc:vim1s:development:erase-emmc [2022/08/23 03:38] hyphop [Cleanup eMMC boot loaders] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | 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)> | + | |
- | + | - As the SBC is booting-up, | |
- | | + | |
- | - Just as your SBC is booting-up, | + | |
- Type '' | - Type '' | ||
- | - After erasure is complete, type '' | + | - After erasure is completed, type '' |
Use the following serial Terminal print-out as a reference: | Use the following serial Terminal print-out as a reference: | ||
- | ``` | + | ```shell |
- | kvim4# 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 | ||
GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 | GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 | ||
Line 39: | Line 35: | ||
8191 blocks erased: OK | 8191 blocks erased: OK | ||
- | kvim4# reboot | + | kvim1s# reboot |
``` | ``` | ||
Line 45: | Line 41: | ||
```txt | ```txt | ||
- | T7:BL:055c20;ID:7CFDCF5E6052BDEC; | + | S4:BL:25dcde;ID:00D9C31D04901F08; |
``` | ``` | ||
- | < | + | ===== 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: | ||
- | - Carry out eMMC flashing via a [[products: | + | - Carry out eMMC flashing via a [[products: |
- Manually interrupt the upgrading process (forcefully disconnect after 15% is recommended). For example, unplug the USB-C cable or eject the TF card. | - Manually interrupt the upgrading process (forcefully disconnect after 15% is recommended). For example, unplug the USB-C cable or eject the TF card. | ||
- 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 ===== |
- | This erasure method is suitable for an SBC with Linux installed: | + | 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: | ||
- Power on and boot up. | - Power on and boot up. | ||
- 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> | + | */ |