Meaning and usefulness of the following files "img" & "bin" files

Dear forum, I am completely lost on the page listing the following files and do not understand which and when to use one rather than another.

  • factory-loader.img: used to erase eMMC on Windows. Not recommended.

What does this file do? Does it completely clear the eMCC memory?
If it is not recommended, as the description says, why does this file exist?

  • radxa-zero-erase-emmc.bin: automatically erase eMMC, then present eMMC as a USB storage device. This is the recommended way to load a new Linux image.

This file should be flashed to the eMMC before installing a linux distribution, if I understand correctly. What about Android?

  • rz-fastboot-loader.bin: enable fastboot mode. This cannot be used to install our official Android.

What is this file for if it is not used to install Android?

  • android-bootloader.img: this is the same bootloader.img from our official Android image. Some distro uses this bootloader.

Ok, this is clear.

  • rz-udisk-loader.bin: expose embedded eMMC as a USB Mass Storage device.

What is this file for, and when should it be used?

  • u-boot.bin: mainline U-Boot bootloader for USB boot. Won’t work if you flashed it to eMMC/microSD.

What is this file for, and when should it be used?

  • mainline U-Boot bootloader for eMMC/microSD boot. Please refer to this guide to see how to flash it when OS is already installed.

What is this file for, and when should it be used?


1 Like
  • factory-loader.img
    Amlogic has an official burning tool, Amlogic USB Burning Tools, which can burn Amlogic’s Android image. It will write the bootloader in three places, boot0 boot1, and user. So we need to load a special loader to clear it. We do not recommend using this burning tool.

  • rz-fastboot-loader.bin
    Load this loader to enter fastboot mode, and then you can execute fastboot commands, such as erase bootloader

  • rz-udisk-loader.bin
    Expose embedded eMMC as a USB Mass Storage device.

  • radxa-zero-erase-emmc.bin
    It looks like simplifying the work of rz-fastboot-loader.bin + erase bootloader and rz-udisk-loader.bin. But I think it’s a bit unreasonable, it does two things at once. If you haven’t installed another system before, you don’t have to clear it.

  • android-bootloader.img
    Load it into fastboot mode, and then use the fastboot command to install the Android image. It and rz-fastboot-loader.bin are compiled based on different u-boot versions, and they can accept different fastboot commands.

  • u-boot.bin &
    Please refer to this guide

If you do not have a system installed, use rz-udisk-loader.bin to install Linux and android-bootloader.img to install Android.

If you have a system installed, use radxa-zero-erase-emmc.bin to clear the emmc.

Thanks for your quick answer.
Let me get this straight.

To install something on the eMMC:

  1. Press and hold the usb boot button, connect the usb cable (power) to the Radxa Zero.
    The board is now in “maskrom” mode.

  2. I flash rz-fastboot-loader.bin

    • Windows: using RZ_USB_Boot_Helper_V1.0.0
    • Linux: sudo rz-fastboot-loader.bin
  3. The board is now in “fastboot” mode, so I run: fastboot erase bootloader

  4. I flash rz-udisk-loader.bin

    • Windows: using RZ_USB_Boot_Helper_V1.0.0
    • Linux: sudo rz-udisk-loader.bin

Alternatively I flash radxa-zero-erase-emmc.bin to get the same result 1…3 at once

  1. The eMMC is now seen as an USB Mass Storage Device

  2. To flash your version of Android I need to run the file “flash-all” provided with it

  3. To install a Linux img file I can use the software Balena Etcher. eg

    • Armbian_22.08.0-trunk_Radxa-zero_focal_current_5.10.134_xfce_desktop.img
    • Manjaro-ARM-gnome-radxa-zero-22.10.img
  4. Is the file u-boot.bin not needed at all in this case?

1 Like

That’s pretty much right, except I can’t speak for anything Android related. Most Linux images have a U-Boot partition included so you usually do not need to separately flash u-boot.bin. Generally for Linux distros, all you need to do is put it in maskrom mode, flash radxa-zero-erase-emmc.bin, use Balena Etcher to flash your chosen distro image to the resulting USB mass storage device, and reboot.

Quick follow-up question - what’s the difference between and u-boot.bin?
The guides (Boot Troubleshooting and Maskrom guide) ask to flash for eMMC and warn against, but the build instructions ask to flash u-boot.bin and use only for SD-cards.
Is there a difference between the pre-built binaries and building from source?

You can check the fip package scripts for how the u-boot.bin and are generated.

The can be used both for eMMC and SD card.

Thanks, Good to know!
These files do not tell me anything though - the only reference to the sd.bin file I could find is in the call to delete that file when running distclean.