Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools



VIM3/3L Erase eMMC


This document mainly introduces the method of clearing eMMC. You will learn about 3 methods to clear eMMC.

The operation of VIM1, VIM2 and VIM3 is almost the same, so this document will take VIM3L as an example.

Erase Method

Serial Mode (For developers)

  • Refer to this guide to setup the Serial Tool for your VIM.
  • 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 store erase boot on the terminal of u-boot, and wait for the erasure process to complete.
  • Type reboot or press the Reset button.
  • Use the following as a reference:
kvim3l# store erase boot
emmckey_is_protected(): protect
start = 0,end = 8191
do_store_erase() 989
do_store_erase() 992, i = 0
mmc switch to boot0 success
emmckey_is_protected(): protect
blkcnt = 8192
start = 0,end = 8191
start = 0,end = 8191
do_store_erase() 992, i = 1
mmc switch to boot1 success
emmckey_is_protected(): protect
blkcnt = 8192
start = 0,end = 8191
start = 0,end = 8191
mmc switch to user success

Interrupt Mode

This approach is suitable for all products that use the Amlogic SoC:

  • Carry out normal upgrading via USB-C Cable or 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.

CLI Mode

This approach is suitable for a VIM that has Linux installed:

Power on and boot up. Open a terminal, and run dd to fill your bootloader partition with zeros:

root@Khadas:~# dd if=/dev/zero of=/dev/bootloader
dd: writing to '/dev/bootloader': No space left on device
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:~# reboot
2022/07/05 04:19 · nick
Last modified: 2022/07/13 06:16 by nick