This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
products:sbc:common:development:erase-emmc [2022/07/05 04:19] nick created |
products:sbc:common:development:erase-emmc [2024/04/24 03:23] (current) ivan [Serial Mode (For developers)] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Erase eMMC ====== | ====== Erase eMMC ====== | ||
+ | ===== Introduction ===== | ||
+ | |||
+ | This document mainly introduces the method of clearing eMMC. You will learn about 3 methods to clear eMMC. | ||
+ | |||
+ | <WRAP important > | ||
+ | The operation of VIM1, VIM2 and VIM3 is almost the same, so this document will take VIM3L as an example. | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Erase Method ===== | ||
+ | |||
+ | |||
+ | <tabbox Serial Mode (For developers)> | ||
+ | |||
+ | * Refer to this [[products: | ||
+ | * Once again, ensure you’ve done the correct connections and setup. | ||
+ | * Hit any keys at the moment of bootup to stop autoboot. This step will make your VIM enter into u-boot mode. | ||
+ | * Type '' | ||
+ | * Type reboot or press the '' | ||
+ | * Use the following as a reference: | ||
+ | |||
+ | ```shell | ||
+ | kvim3#store init 3 | ||
+ | XXXXXXX======enter EMMC boot======XXXXXX | ||
+ | co-phase 0x1, tx-dly 0, clock 40000000 | ||
+ | co-phase 0x1, tx-dly 0, clock 40000000 | ||
+ | co-phase 0x3, tx-dly 0, clock 400000 | ||
+ | emmc/sd response timeout, cmd8, cmd-> | ||
+ | emmc/sd response timeout, cmd55, cmd-> | ||
+ | co-phase 0x3, tx-dly 0, clock 400000 | ||
+ | co-phase 0x1, tx-dly 0, clock 40000000 | ||
+ | [set_emmc_calc_fixed_adj][860]find fixed adj_delay=20 | ||
+ | init_part() 297: PART_TYPE_AML | ||
+ | [mmc_init] mmc init success | ||
+ | switch to partitions #0, OK | ||
+ | mmc1(part 0) is current device | ||
+ | Device: SDIO Port C | ||
+ | Manufacturer ID: 15 | ||
+ | OEM: 100 | ||
+ | Name: AJTD4 | ||
+ | Tran Speed: 52000000 | ||
+ | Rd Block Len: 512 | ||
+ | MMC version 5.1 | ||
+ | High Capacity: Yes | ||
+ | Capacity: (0x3a3e00000 Bytes) 14.6 GiB | ||
+ | mmc clock: 40000000 | ||
+ | Bus Width: 8-bit | ||
+ | [store]amlmmc erase 1emmckey_is_protected(): | ||
+ | bootloader partition is erased: start = 0x0,end = 0x1fff | ||
+ | reserved | ||
+ | env partition is erased: start = 0x36000,end = 0x39fff | ||
+ | rootfs | ||
+ | Erasing blocks 0 to 8192 @ boot0 | ||
+ | start = 0x0,end = 0x1fff | ||
+ | Erasing blocks 0 to 8192 @ boot1 | ||
+ | start = 0x0,end = 0x1fff | ||
+ | ``` | ||
+ | <tabbox Interrupt Mode> | ||
+ | |||
+ | This approach is suitable for all products that use the Amlogic SoC: | ||
+ | |||
+ | * Carry out normal upgrading via [[start|USB-C Cable]] or [[/ | ||
+ | * Manually interrupt the upgrading process (forcefully disconnect after 15% is recommended). For example, unplug the USB-C cable or the TF card. | ||
+ | * Power on your VIM again, and you’ll find that all the data on the eMMC has been erased. | ||
+ | |||
+ | <tabbox CLI Mode> | ||
+ | |||
+ | This approach is suitable for a VIM that has Linux installed: | ||
+ | |||
+ | Power on and boot up. | ||
+ | Open a terminal, and run '' | ||
+ | ```shell | ||
+ | root@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: | ||
+ | ``` | ||
+ | </ |