Flashing of eMMC on Radxa Zero 3W fails

I am trying to flash the eMMC on my brand new Radxa Zero 3W, but have failed so far.
I have installed and compiled rkdeveloptool following instructions from Radxa [1].

And I am able to see the device:

$ sudo rkdeveloptool ld
DevNo=1    Vid=0x2207,Pid=0x350a,LocationID=104    Maskrom

Unfortunately, every other command seems to fail:

$ sudo rkdeveloptool rci
Read Chip Info failed!

$ sudo rkdeveloptool wl 0 ~/Download
Write LBA failed!

I have also tried upgrade_tool, but receive the same error messages.
Has anyone had more success? What am I missing?

Any advice appreciated!

Cheers,
Bernd

–

[1] https://docs.radxa.com/en/zero/zero3/low-level-dev/rkdeveloptool?host-os=debian

I still have not found a way to flash the Radxa Zero 3W via USB. The Radxa support team has not been able to fix the issue either.

However, I have found a workaround that allows me to flash the eMMC via an alternative route with reasonable effort:

  1. Flash linux image onto SD card
  2. Boot Radxa Zero 3W from SD card
  3. Configure network
  4. Copy image to Radxa Zero 3W via SSH
  5. Flash image to eMMC using dd command:
$ sudo dd if=<image> of=/dev/mmcblk0

Afterwards you can remove the SD card and the Radxa Zero 3 should boot from eMMC.

1 Like

Hey @langweiler I’m trying to follow your instructions with my Radxa Zero 3E, but I get " No space left on device" what image are you writing to the EMMC?

Are you sure the Radxa Zero 3E is equipped with eMMC? I believe I read somewhere that it does not come with eMMC. I am using a Zero 3W with 2 GB of eMMC. The eMMC needs to be explicitly selected as option when buying the device.

Can confirm above method works to get Debian image to emmc

You mean 2GB ram and 16GB emmc?

4GB ram 32GB Emma.

any idea how to erase the emmc and bring back to factory setting? doing this more to learn about the device, but haven’t been able to figure out how to erase the Emma on this.

As I read conflicting things about the Zero3W, I get the “inference” that in order to boot onto eMMC, you need a minimum device of 2GB Ram and 16 GM of eMMC. Is that correct? I don’t remember that being mentioned anywhere in the sales documentation when I made my purchase of (2) Zero 3W: 1GB ram & 8GB of eMMC.

Excellent, This is working. Can you tell me how to configure network from SD boot and change eMMC Network configuration.

I connected RS232 and configured

Very nice thanks for the tip.

Additional advice: If you use the Radxa Zero 3W together with Armbian, you can use the armbian-config tool to transfer your image from an SD card to the onboard eMMC. The tool does all the required magic for you. Very convenient.

I always write the boot loader before flashing the image to the eMMC

These are the steps that I follow:

Remember to hold the MASKROM button on the back before connecting the cable!

The green led light should not blink but always remain on

check if the device is found

> sudo rkdeveloptool ld
DevNo=1	Vid=0x2207,Pid=0x350a,LocationID=104	Maskrom

then write the boot loader and the image to the device

sudo rkdeveloptool db rk356x_spl_loader_ddr1056_v1.12.109_no_check_todly.bin 
Downloading bootloader succeeded.

sudo rkdeveloptool wl 0 radxa-zero3_debian_bullseye_xfce_b6.img
Write LBA from file (xx%)

works every time using usb-c to usb-c cable on multiple machines running Arch or OpenSuSE

Extra tip for headless install of image to eMMC where you first edit the WiFi and other parameters.

Using DietPI image in this example

download image -> extract so you get the native .img file

check partitions that exist in the image using fdisk

sudo fdisk -l DietPi_RadxaZERO3-ARMv8-Bookworm.img 
Disk DietPi_RadxaZERO3-ARMv8-Bookworm.img: 1.13 GiB, 1207976448 bytes, 2359329 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 77E56261-4023-4345-91AC-EE144546C393

Device                                  Start     End Sectors  Size Type
DietPi_RadxaZERO3-ARMv8-Bookworm.img1   32768 2357247 2324480  1.1G Linux filesystem
DietPi_RadxaZERO3-ARMv8-Bookworm.img2 2357248 2359295    2048    1M Microsoft basic data

in this case, 2 partitions exist and the DietPI filesystem resides in the first partition.
We can mount this partition and make changes because there is “free space” in the partition.

to mount we need to calculate the offset of partition by multiplying the start sector (32768) with the sector size (512) = 16777216

use that to mount in Read-Write mode to a mountpoint of your choice (make sure that folder exists first, in this case /mnt/img)

sudo mount -o loop,rw,sync,offset=16777216 DietPi_RadxaZERO3-ARMv8-Bookworm.img /mnt/img

now you can change
/mnt/img/boot/dietpi-wifi.txt for the wireless SSID and password
/mnt/img/boot/dietpi.txt for root password, locale, keyboard, WiFi country code, Timezone
more settings in the DietPi manual but these basic ones are enough

umount /mnt/img

done

now just write this image as normal…