SOLVED: Can't get eMMC erased to install Linux

So I’m trying to clear the eMMC so I can install Linux to the eMMC. I think I’ve gotten it into booted into USB mode. I’ve pressed the button while plugging into the OTG port (USB closes to the end of the board), nothing comes up via HDMI on the screen. Continuing forward based on, I see

[ 1450.447454] usb 3-2: USB disconnect, device number 9
[ 1450.763842] usb 3-2: new high-speed USB device number 10 using xhci_hcd
[ 1450.915045] usb 3-2: New USB device found, idVendor=1b8e, idProduct=c003, bcdDevice= 0.20
[ 1450.915065] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1450.915068] usb 3-2: Product: GX-CHIP
[ 1450.915071] usb 3-2: Manufacturer: Amlogic

in dmesg and lsusb shows

Bus 003 Device 013: ID 1b8e:c003 Amlogic, Inc. GX-CHIP

So far so good. Get the installed, and run it with radxa-zero-erase-emmc.bin from that same page. Runs and exits cleanly. When I unplug and plug back in, it boots up and I see the Amlogic logo, and then MBOX and Android boots the rest of the way up. Don’t see any kind of USB storage pop up, nothing.

Am I doing something wrong? Tips? Things to try?

EDIT: I do see, after applying the radxa-zero-erase-emmc.bin, on the monitor a “staring USB”, scanning bus, and then Hit any key to stop autoboot: 0, and I have nothing else on the screen. I don’t have any keyboard or anything hooked up.

EDIT2: Apparently hooking up Serial console did something, because now both in serial and on the monitor, I see it doing MMC erase, and it’s going through that process.

I do see a lot of these in my dmesg

[ 4325.493695] usb 3-2: reset high-speed USB device number 24 using xhci_hcd

And this is the output in the Serial console, with a spinner at the bottom and it’s stuck here at this, with the spinner spinning. Going to leave it running this way for a while on power, hopefully it finishes successfully and doesn’t just keep running forever.

U-Boot 2021.07-24133-gf21fc0a44c-dirty (Jan 23 2022 - 09:51:56 +0800) radxa-zero

Model: Radxa Zero
SoC:   Amlogic Meson G12A (S905Y2) Revision 28:b (30:2)
DRAM:  2 GiB
MMC:   sd@ffe03000: 0, sd@ffe05000: 1, mmc@ffe07000: 2
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Net:   Net Initialization Skipped
No ethernet found.
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
scanning bus usb@ff500000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc2(part 0) is current device

MMC erase: dev # 2, block # 0, count 65536 ... 65536 blocks erased: OK
switch to partitions #1, OK
mmc2(part 1) is current device

MMC erase: dev # 2, block # 0, count 8192 ... 8192 blocks erased: OK
switch to partitions #2, OK
mmc2(part 2) is current device

MMC erase: dev # 2, block # 0, count 8192 ... 8192 blocks erased: OK
UMS: LUN 0, dev mmc 2, hwpart 0, sector 0x0, count 0xe40000

So there wasn’t actually a problem, at least not once I attached a serial console. The KDE auto-mount for new device didn’t pop-up saying there was something after I ran the radxa-zero-erase-emmc.bin, and the spinner was going. It did attach as USB Mass Storage, and saw that in dmesg/syslog, but I wasn’t looking there. Once I realized that, the dd to flash the OS image was just fine.

However, from there, turns out needed to do a bit extra for uboot, as Trying to figure out whats wrong with my radxa zero describes. Hopefully that fix will be pushed into the main boot .bin and such soon, but for now it’s needed on the Zero.

1 Like

Did you have issue getting eMMC to boot after flashing an image to it? If not you do not need that workaround and can just use the board normally.

No, I couldn’t boot normally after installing. Got some help on discord in the #zero channel, got linked to that posting.

I have the same problem with my Radxa Zero. I use my Mac to flash radxa-zero-erase-emmc.bin.

lsusb in normal mode before operation:

Bus 002 Device 001: ID 18d1:4e40 Google Inc. faraday  Serial: 1234567890
Bus 000 Device 000: ID 18d1:4e40 Google Inc. USB 3.1 Bus 
Bus 000 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

lsusb in maskrom mode:

Bus 002 Device 001: ID 1b8e:c003 Amlogic, Inc. GX-CHIP 
Bus 000 Device 000: ID 1b8e:c003 Amlogic, Inc. USB 3.1 Bus 
Bus 000 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub radxa-zero-erase-emmc.bin results:

Firmware Version :
ROM: 3.2 Stage: 0.0
Need Password: 0 Password OK: 1
Writing radxa-zero-erase-emmc.bin at 0xfffa0000...
Running at 0xfffa0000...
AMLC dataSize=16384, offset=65536, seq=0...
AMLC dataSize=49152, offset=393216, seq=1...
AMLC dataSize=16384, offset=229376, seq=2...
AMLC dataSize=49152, offset=245760, seq=3...
AMLC dataSize=49152, offset=294912, seq=4...
AMLC dataSize=16384, offset=65536, seq=5...
AMLC dataSize=1324400, offset=81920, seq=6...

But then Android is loading again while my Mac Disk Utility doesn’t see the Radxa Zero as a USB Drive both in normal and maskrom modes.

Once you run radxa-zero-erase-emmc.bin you need to wait for a while for the script to run. If you still cannot get it to work can you try attaching serial console so we can take a look at the output.

1 Like

I have waited a lot after the flash procedure, but nothing happened. I have two Radxa Zero, and one was flashed without any problems while this one doesn’t want to work.

Do not have a serial adaptor yet :frowning:

1 Like