Flash OS on the board

Hello,

I want to install Nitrux OS. This OS is based on debian, so it should work on the Radxa Zero.
But I didn’t came to install the OS on the board. The Wiki says, that I have to enable maskrom mode by pressing the USB Boot button when connecting the board with my Macbook.
I connected the board, and executed the commands:
brew install python lsusb libusb
pip3 install pyamlboot

But I don’t understand what I have to do now.
The Command “boot-g12.py rz-fastboot-loader.bin” don’t works and when I understand it right the Macbook recognizes the Radxa as a usb device. But it doesn’t.

What am I doing wrong?

at first you have to download the rz-fastboot-loader.bin:

https://dl.radxa.com/zero/images/loader/rz-fastboot-loader.bin

then you have put the directory of the file in the command

for Example:
boot-g12.py /home/desktop/rz-fastboot-loader.bin

the command depends on where your file is located.

1 Like

@Stigi where do I get the Python Script from?
The terminal can not find it: zsh: command not found: boot-g12.py

brew install python lsusb libusb
pip3 install pyamlboot

if you could succesfully execute these two command lines you should have python

are you sure they finished complete without errors?

1 Like

You can follow this guide to install necessary tools for maskrom, along with some prebuilt helper binaries.

@Stigi ok the command finally works. I tried it with another USB Cable.
The command is outputting:
bin at 0xfffa0000…
[DONE]
Running at 0xfffa0000…
[DONE]
AMLC dataSize=16384, offset=65536, seq=0…
[DONE]
AMLC dataSize=49152, offset=393216, seq=1…
[DONE]
AMLC dataSize=16384, offset=229376, seq=2…
[DONE]
AMLC dataSize=49152, offset=245760, seq=3…
[DONE]
AMLC dataSize=49152, offset=294912, seq=4…
[DONE]
AMLC dataSize=16384, offset=65536, seq=5…
[DONE]
AMLC dataSize=1406320, offset=81920, seq=6…
[DONE]
[BL2 END]

But the Macbook doesn’t recognize it.

The Device is shown as it should in the System Preferences, but not in there finder or in BelenaEtcher.

the rz-fastboot-loader.bin is only for activating the fastboot-mode
The fastbootmode is used for example to erase or flash the bootloader
If you want to flash an OS on your emmc you have to use the rz-udisk-loader.bin instead of the fastboot-loader.bin

because then etcher is able to recognize the board

just follow this manual
https://wiki.radxa.com/Zero/install/eMMC

Gruß
Stigi

@Stigi now I tried it with Windows and it works. Its better with the RZ USB Boot Helper.
I flashed my OS. But now the Boot Helper shows that the device is still in Maskrom mode.
Even when I don’t press the USB Boot button.
The documentation says to only reconnect the Radxa Zero. But this don’t works.

How do I change the mode now?

Liebe Grüße

i had the same problem
if the board goes in maskrom mode it means it couldnt recognize a valid bootfile

you have to flash an u-boot image to the board manually

just download the u-boot.bin and at first try to
flash it with the RZ USB boot helper

after the succesfull burning your radxa zero should
start with the boot sequenze

if this dont help try this link.

https://wiki.radxa.com/Zero/dev/u-boot

you dont have to build a new u-boot.bin but you have to flash it via fastboot( like mention in the last section of the link)

sorry i strugeld too

I’ll update that page later but the instruction under “Flash U-Boot to microSD” section is the proper way to flash U-Boot. Just put your Zero into USB disk mode with rz-udisk-loader and get u-boot.bin.sd.bin from here. Although flashing U-Boot is only the first step to bring up the system. If your OS doesn’t support distro boot you need to figure out how to boot it manually.

@Stigi now I can understand the struggle. I downloaded the “u-boot.bin” and flashed it with the USB Boot helper. Reconnected the Radxa without the USB Boot button. But its the same result.

I tried the doku you postet with the USB Boor helper but it doesn’t changes anything.
Do I have to flash the u-boot.bin with the USB Boot button or without?

i had the problem that after I flashed u-boot.bin on the board the board leaves maskrom mode and started immediately with the boot sequenz (of course you had allready an OS on the emmc).

But If i disconnect the board from my pc and put it back after u-boot flashing it started again with maskrom mode.

As long as my board was connected to my pc after u-boot flashing i was able to start an OS on the board.

I could only solved this problem after i flashed the u-boot direkt with fastboot

sudo fastboot flash 0x200

like in the manuall-link i posted bevor

@Oli If the board goes automatically to maskrom mode and you can succesfully flash your .bin files you dont need to push the button.

But i had the issue that the board goes in maskrom mode and it doesnt execute the flash prozess it just stuck at this point

bin at 0xfffa0000…
[DONE]
Running at 0xfffa0000…

now i had to push the uboot button bevor i plug the board in my pc

If you read the instruction I linked you will see there is also a 444 bytes header flashed to the eMMC. That’s likely why you cannot have board running in cold boot since that part is needed for the board to recognize the bootloader.

@Stigi and @RadxaYuntian you have to excuse me. But I still don’t quite get it.

First I tried it on MacOS but then I switched to Windows 10.
These are the steps I ve done.

  1. Connect Radxa Zero with USB Boot button.

  2. Open RZ USB Boot helper and execute “rz-udisk-loader.bin”.

  3. Flash my OS on the Radxa who is now recognized as a USB Device.

  4. Then Im struggeling. I disconnected and reconnected the Radxa and executed “u-boot.bin” on the USB Boot helper.
    But the only output is:
    ---------- start run ----------
    Firmware Version:
    ROM: 0.7 Stage: 0.16
    Need Password: 0 Password OK: 0
    Writing /u-boot.bin at 0xfffa0000…
    [DONE]
    Running at 0xfffa0000…
    [DONE]

The only commants you showed to me are for Linux. But how can I do this on Windows? What do I need to execute in the USB Boot helper to get out of Maskrom mode and boot the Radxa with the flashed OS?

I actually took a look at this Nitrux OS and I believe this is just another x64 only system. You cannot install it on Radxa Zero.

I suggest you stick to validated systems and install the required packages yourself.

@RadxaYuntian ok that sounds understandable.
I tried the same steps with Debian Buster and got the same result. The Radxa Zero is stuck in the Maskrom mode.
I downloaded " radxa-cm3-io-debian-buster-xfce4-arm64-20220117-0244-gpt.img.xz"

Sorry. I tried to read the documentation but I don’t understand it. I only found a good guide for Android but not for Debian or Ubuntu.

You should download images started with radxa-zero. You flashed an image for a different product and that’s why it is stucked in maskrom mode: it can’t boot from that image.

Can you tell me which part of the documentation you don’t understand? It’s hard to see what you are missing once you know the process.

I also would recommend to do this with linux.

I used Oracle VM and installed the newest ubuntu

OK. Finally I got it.
I installed debian Buster on the Radxa Zero.

@RadxaYuntian the documentation is to confusing. The steps with different OSes (Mac, Windows, Linux) are nearly the same. But they are different. It would be cool when the steps for every OS is written separately.

It would also be cool if only the OS who is valid for the board is in the documentation. I can’t recognize that there is a different OS for every board. This should be mentioned in the documentation.

Finally I flashed the OS with the steps in the documentation. I only have to install the packages for Maui Shell.

@Stigi Thank you for your help and @RadxaYuntian thanks for the great support.

1 Like

Glad you made it, but those different systems are referring to your host computer’s OS. The OS you will be installed (Android or Linux) is written on the title.

I’ll update the Wiki to make this more clear. Thanks for your feedback.

1 Like