Tried the 20220616 ubuntu focal img - got Android

I just downloaded radxa-zero-ubuntu-focal-server-arm64-20220616-0254-mbr.img.xz and when it booted I got Android? Is this the expected result?

## Booting Android Image at 0x01080000 ...
Kernel command line: androidboot.dtbo_idx=0 --cmdline root=/dev/mmcblk0p18 buildvariant=userdebug
...

No. You should erase android in eMMC completely first.

https://wiki.radxa.com/Zero/dev/maskrom#Enable_maskrom

basically you need to install pyamlboot first and then download

https://dl.radxa.com/zero/images/loader/radxa-zero-erase-emmc.bin

then run the erase-emmc.bin

boot-g12.py radxa-zero-erase-emmc.bin

Ok I get it, Android is flashed on the emmc and even if there is a SD card in the slot, booting from the emmc is the default.

I have a serial console connected to gpio GPIOAO_0 and GPIOAO_1 and can interrupt u-boot. Rather than erase the emmc, I would like to tell uboot to load what is on the SD card. “ls mmc 0” lists the SD card boot partition, and after looking at the boot.cmd file thought these commands would work … but they don’t:

radxa_zero#setenv devtype mmc
radxa_zero#setenv devnum 0
radxa_zero#setenv load_addr "0x1600000"
radxa_zero#load mmc 0 ${load_addr} uEnv.txt
card in
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 400000
co-phase 0x2, tx-dly 0, clock 40000000
aml_sd_retry_refix[983]:delay = 0x0,gadjust =0x2000
[mmc_startup] mmc refix success
init_part() 282: PART_TYPE_DOS
[mmc_init] mmc init success
reading uEnv.txt
383 bytes read in 4 ms (92.8 KiB/s)
radxa_zero#env import -t ${load_addr} ${filesize}
radxa_zero#echo ${verbosity}
7
radxa_zero#load mmc 0 ${load_addr} boot.scr
reading boot.scr
3260 bytes read in 4 ms (795.9 KiB/s)
radxa_zero#source ${load_addr}
## Executing script at 01600000
radxa_zero#

I just get a prompt back … what am I missing?
Or, is there a simpler way to boot the Ubuntu Focal image from the uboot command line?

[EDIT] Oh, just saw this … Trying to figure out whats wrong with my radxa zero
It’s annoying that there are different u-boots …

Which one at https://dl.radxa.com/zero/images/loader can boot linux from an SD card?

Please follow the reply above and erase Android from eMMC. You can then boot the flashed microSD card without any additional steps.

No Windows, no Ubuntu, no Mac OS, only Arch Linux …

Summary: browse to https://pypi.org/project/pyamlboot/#files download pyamlboot-1.0.0.tar.gz, also wget https://dl.radxa.com/zero/images/loader/radxa-zero-erase-emmc.bin

$ tar xzf pyamlboot-1.0.0.tar.gz

Press and hold boot button while plugging usbc-to-usba cable in.

Bus 001 Device 008: ID 1b8e:c003 Amlogic, Inc. GX-CHIP

(must be root to access usb devices)

# cd pyamlboot-1.0.0
# python boot-g12.py radxa-zero-erase-emmc.bin
Firmware Version :
ROM: 3.2 Stage: 0.0
Need Password: 0 Password OK: 1
Writing ../radxa-zero-erase-emmc.bin at 0xfffa0000...
[DONE]
Running at 0xfffa0000...
...
AMLC dataSize=1324400, offset=81920, seq=6...
[DONE]
[BL2 END]

and yes the eMMC is now blank and the SD boots. Thanks.

BTW you can install pypi packages with pip command: pip install pyamlboot.

I understand. However installing opaque binaries that must be run with root privileges is not a healthy thing to do (and pip doesn’t let us review the source before installing unless I do what I mentioned above - at which point there is no need to install pyamlboot in my standard /usr/lib/*/site-packages as I will only use it on occasion). pip is for libraries, this is an application.