Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:development:erase-emmc

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:erase-emmc [2022/07/05 08:12]
frank Add erase eMMC
products:sbc:common:development:erase-emmc [2024/04/24 03:23] (current)
ivan [Serial Mode (For developers)]
Line 4: Line 4:
  
 This document mainly introduces the method of clearing eMMC. You will learn about 3 methods to clear eMMC. 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.
 +
 +</WRAP>
  
 ===== Erase Method ===== ===== Erase Method =====
Line 10: Line 15:
 <tabbox Serial Mode (For developers)> <tabbox Serial Mode (For developers)>
  
-  * Refer to this [[/products/sbc/common/development/setup_serial_tool|guide]] to setup the Serial Tool for your VIM.+  * Refer to this [[products:sbc:common:development:setup-serial-tool|guide]] to setup the Serial Tool for your VIM.
   * Once again, ensure you’ve done the correct connections and setup.   * 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.   * Hit any keys at the moment of bootup to stop autoboot. This step will make your VIM enter into u-boot mode.
-  * Type ''store init 3'' on the terminal of u-boot, and wait for the erasure process to complete.+  * Type ''store erase boot'' on the terminal of u-boot, and wait for the erasure process to complete.
   * Type reboot or press the ''Reset'' button.   * Type reboot or press the ''Reset'' button.
   * Use the following as a reference:   * Use the following as a reference:
  
-```sh +```shell 
-kvim# store init 3 +kvim3#store init 3 
-emmc/sd response timeout, cmd8, status=0x1ff2800 +XXXXXXX======enter EMMC boot======XXXXXX 
-emmc/sd response timeout, cmd55, status=0x1ff2800 +co-phase 0x1, tx-dly 0, clock 40000000 
-[mmc_startupmmc refix success+co-phase 0x1, tx-dly 0, clock 40000000 
 +co-phase 0x3, tx-dly 0, clock 400000 
 +emmc/sd response timeout, cmd8, cmd->cmdarg=0x1aa, status=0x3ff2800 
 +emmc/sd response timeout, cmd55, cmd->cmdarg=0x0, status=0x3ff2800 
 +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 [mmc_init] mmc init success
 switch to partitions #0, OK switch to partitions #0, OK
Line 28: Line 40:
 Manufacturer ID: 15 Manufacturer ID: 15
 OEM: 100 OEM: 100
-Name: 8WPD3 +Name: AJTD4 
 Tran Speed: 52000000 Tran Speed: 52000000
 Rd Block Len: 512 Rd Block Len: 512
-MMC version 5.0+MMC version 5.1
 High Capacity: Yes High Capacity: Yes
-Capacity: 7.GiB+Capacity: (0x3a3e00000 Bytes) 14.GiB
 mmc clock: 40000000 mmc clock: 40000000
-Bus Width: 8-bit DDR +Bus Width: 8-bit 
-[store]amlmmc erase 1emmckey_is_protected : protect +[store]amlmmc erase 1emmckey_is_protected(): protect 
-start = 0,end = 57343 +bootloader partition is erased: start = 0x0,end = 0x1fff 
- +reserved   partition is protected 
- +env        partition is erased: start = 0x36000,end = 0x39fff 
-Caution! Your devices Erase group is 0x400 +rootfs     partition is erased: start = 0x3e000,end = 0x1d1efff 
-The erase range would be change to 0x36000~0xe8ffff +Erasing blocks 0 to 8192 @ boot0 
- +start = 0x0,end = 0x1fff 
-start = 221184,end = 15269886 +Erasing blocks 0 to 8192 @ boot1 
-kvim# reboot+start = 0x0,end = 0x1fff
 ``` ```
 <tabbox Interrupt Mode> <tabbox Interrupt Mode>
Line 50: Line 62:
 This approach is suitable for all products that use the Amlogic SoC: This approach is suitable for all products that use the Amlogic SoC:
  
-  * Carry out normal upgrading via [[|USB-C Cable]] or [[/products/sbc/common/install-os/install-os-into-external-storage|TF Card]].+  * Carry out normal upgrading via [[start|USB-C Cable]] or [[/products/sbc/common/install-os/install-os-into-external-storage|TF Card]].
   * Manually interrupt the upgrading process (forcefully disconnect after 15% is recommended). For example, unplug the USB-C cable or the TF card.   * 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.   * Power on your VIM again, and you’ll find that all the data on the eMMC has been erased.
Line 60: Line 72:
 Power on and boot up. Power on and boot up.
 Open a terminal, and run ''dd'' to fill your bootloader partition with zeros: Open a terminal, and run ''dd'' to fill your bootloader partition with zeros:
-```sh+```shell
 root@Khadas:~# dd if=/dev/zero of=/dev/bootloader root@Khadas:~# dd if=/dev/zero of=/dev/bootloader
 dd: writing to '/dev/bootloader': No space left on device dd: writing to '/dev/bootloader': No space left on device
Last modified: 2022/07/05 08:12 by frank