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/07/17 21:51] nick |
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 | + | - Connect your PC to the SBC using a [[products: |
- | * CLI Mode | + | - As the SBC is booting-up, press '' |
+ | - Type '' | ||
+ | - After erasure is completed, type '' | ||
+ | |||
+ | Use the following serial Terminal print-out as a reference: | ||
+ | |||
+ | ```shell | ||
+ | kvim1s# store boot_erase bootloader | ||
+ | GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 | ||
+ | GUID Partition Table Header signature is wrong: 0x0 != 0x5452415020494645 | ||
+ | gpt is invalid | ||
+ | |||
+ | |||
+ | Caution! Your devices Erase group is 0x400 | ||
+ | The erase range would be change to 0x0~0x23ff | ||
+ | |||
+ | 8191 blocks erased: OK | ||
+ | |||
+ | |||
+ | Caution! Your devices Erase group is 0x400 | ||
+ | The erase range would be change to 0x0~0x23ff | ||
+ | |||
+ | 8191 blocks erased: OK | ||
+ | |||
+ | |||
+ | Caution! Your devices Erase group is 0x400 | ||
+ | The erase range would be change to 0x0~0x23ff | ||
+ | |||
+ | 8191 blocks erased: OK | ||
+ | kvim1s# reboot | ||
+ | ``` | ||
+ | |||
+ | If the eMMC has been erased, the serial Terminal should show this print-out when your SBC powers-on: | ||
+ | |||
+ | ```txt | ||
+ | S4: | ||
+ | ``` | ||
+ | |||
+ | ===== Interrupt | ||
+ | |||
+ | This erasure method is suitable for all products that use the Amlogic SoC: | ||
+ | |||
+ | - Carry out eMMC flashing via a [[products: | ||
+ | - Manually interrupt the upgrading process | ||
+ | | ||
+ | |||
+ | ===== 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: | ||
+ | |||
+ | - Power on and boot up. | ||
+ | - Open a Terminal, and run '' | ||
+ | |||
+ | |||
+ | ```shell | ||
+ | khadas@Khadas: | ||
+ | dd: writing to '/ | ||
+ | 8193+0 records in | ||
+ | 8192+0 records out | ||
+ | 4194304 bytes (4.2 MB, 4.0 MiB) copied, 1.1226 s, 3.7 MB/s | ||
+ | root@Khadas: | ||
+ | ``` | ||
+ | */ |