Difference between revisions of "Zero/dev/maskrom"
RadxaYuntian (Talk | contribs) |
(→Enable maskrom) |
||
(12 intermediate revisions by one other user not shown) | |||
Line 21: | Line 21: | ||
[[File:Zero_usb_boot.jpg | 300px]] | [[File:Zero_usb_boot.jpg | 300px]] | ||
− | Hold | + | Hold this button, then plug Zero into your computer. You can let go the button when you see power LED is on. |
On Windows, you can open Device Manager and find the device: | On Windows, you can open Device Manager and find the device: | ||
− | + | [[File:Windows-GX-CHIP.png]] | |
On Linux, you can run <code>lsusb</code> to confirm the device is indeed in maskrom mode: | On Linux, you can run <code>lsusb</code> to confirm the device is indeed in maskrom mode: | ||
− | Bus 001 Device | + | Bus 001 Device 048: ID 1b8e:c003 Amlogic, Inc. GX-CHIP |
=== Install required tools === | === Install required tools === | ||
Line 39: | Line 39: | ||
[[File:Zagdig-libusb.png]] | [[File:Zagdig-libusb.png]] | ||
− | + | Additionally you can install '''fastboot with '''nexus-tools''' by running the following command in PowerShell: | |
+ | |||
+ | iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.ps1')) | ||
+ | |||
+ | You will also need [https://dl.google.com/android/repository/usb_driver_r13-windows.zip the Android driver] from Google. | ||
Unzip it and right click the '''.inf''' file to install the driver. | Unzip it and right click the '''.inf''' file to install the driver. | ||
Line 45: | Line 49: | ||
[[File:Install-win-android-driver.png]] | [[File:Install-win-android-driver.png]] | ||
− | + | '''fastboot''' is for installing Android, or manually clear eMMC bootloader. If you do not need those you can skip this step. | |
− | + | ||
− | + | ||
RZ USB Boot Helper is a Windows tool made by Radxa for maskrom sideloading. Download it from [https://dl.radxa.com/zero/tools/windows/RZ_USB_Boot_Helper_V1.0.0.zip Radxa DL] and unzip everything to a convenient location. | RZ USB Boot Helper is a Windows tool made by Radxa for maskrom sideloading. Download it from [https://dl.radxa.com/zero/tools/windows/RZ_USB_Boot_Helper_V1.0.0.zip Radxa DL] and unzip everything to a convenient location. | ||
Line 68: | Line 70: | ||
sudo pip3 install pyamlboot | sudo pip3 install pyamlboot | ||
− | Additionally you can install | + | Additionally you can install '''fastboot''' with '''nexus-tools''': |
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh) | bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh) | ||
+ | |||
+ | '''fastboot''' is for installing Android, or manually clear eMMC bootloader. If you do not need those you can skip this step. | ||
=== Side loading binaries === | === Side loading binaries === | ||
Line 88: | Line 92: | ||
Some precomplied loaders are provided on [https://dl.radxa.com/zero/images/loader/ Radxa website]. Below is a brief description on some of them: | Some precomplied loaders are provided on [https://dl.radxa.com/zero/images/loader/ Radxa website]. Below is a brief description on some of them: | ||
− | * [https://dl.radxa.com/zero/images/loader/factory-loader.img factory-loader.img]: used to erase eMMC on Windows. | + | * [https://dl.radxa.com/zero/images/loader/factory-loader.img factory-loader.img]: used to erase eMMC on Windows. Not recommended. |
− | * [https://dl.radxa.com/zero/images/loader/rz-fastboot-loader.bin rz-fastboot-loader.bin]: enable fastboot mode. This cannot be used to install Android. | + | * [https://dl.radxa.com/zero/images/loader/radxa-zero-erase-emmc.bin 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. |
+ | * [https://dl.radxa.com/zero/images/loader/rz-fastboot-loader.bin rz-fastboot-loader.bin]: enable fastboot mode. This cannot be used to install our official Android. | ||
+ | * [https://dl.radxa.com/zero/images/loader/android-bootloader.img android-bootloader.img]: this is the same <b>bootloader.img</b> from our official Android image. Some distro uses this bootloader. | ||
* [https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin rz-udisk-loader.bin]: expose embedded eMMC as a USB Mass Storage device. | * [https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin rz-udisk-loader.bin]: expose embedded eMMC as a USB Mass Storage device. | ||
− | * [https://dl.radxa.com/zero/images/loader/u-boot.bin u-boot.bin]: U-Boot bootloader. | + | * [https://dl.radxa.com/zero/images/loader/u-boot.bin u-boot.bin]: mainline U-Boot bootloader for USB boot. Won't work if you flashed it to eMMC/microSD. |
+ | * [https://dl.radxa.com/zero/images/loader/u-boot.bin.sd.bin u-boot.bin.sd.bin]: mainline U-Boot bootloader for eMMC/microSD boot. Please refer to [[Zero/dev/u-boot#Run_U-boot | this guide]] to see how to flash it when OS is already installed. | ||
Once Radxa Zero enters into maskrom mode, it will reboot into maskrom mode until the power is cut. As such, it is recommended to completely shut down, unplug, and replug Radxa Zero when you are finish with the maintenance task. | Once Radxa Zero enters into maskrom mode, it will reboot into maskrom mode until the power is cut. As such, it is recommended to completely shut down, unplug, and replug Radxa Zero when you are finish with the maintenance task. | ||
+ | |||
+ | === Troubleshooting === | ||
+ | |||
+ | * Q: RZ USB Boot Helper says "Not detected". | ||
+ | * A: Please make sure your USB driver is installed and Zero is in maskrom mode. You should see the following device in your Device Manager: | ||
+ | |||
+ | [[File:libusb.png]] | ||
+ | |||
+ | * Q: RZ USB Boot Helper's Erase button is disabled. | ||
+ | * A: You can use [https://dl.radxa.com/zero/images/loader/radxa-zero-erase-emmc.bin radxa-zero-erase-emmc.bin] to erase eMMC. It will wipe the device once you click "Run" button. |
Latest revision as of 21:03, 26 November 2022
Radxa Zero > Development Guide > Enter maskrom mode
Contents
Description
This guide describes how to enter maskrom mode on Radxa Zero. Maskrom mode is a special boot mode for Radxa Zero. In this mode CPU will not boot off eMMC or microSD but will instead side load binaries from USB OTG port. This allows you to perform many low level maintenance tasks.
Requirement
- Radxa Zero
- A PC/laptop running Windows, Linux, or macOS
- USB A to C cable or C to C cable, depending on your host
Enable maskrom
First locate the USB boot button on the bottom of Zero:
Hold this button, then plug Zero into your computer. You can let go the button when you see power LED is on.
On Windows, you can open Device Manager and find the device:
On Linux, you can run lsusb
to confirm the device is indeed in maskrom mode:
Bus 001 Device 048: ID 1b8e:c003 Amlogic, Inc. GX-CHIP
Install required tools
Windows
Download and install Zagdig for USB device driver. Make sure that the device is GX-CHIP
, USB ID is 1B8E:C003
and choose libusb-win32, then click Install Driver.
Additionally you can install fastboot with nexus-tools by running the following command in PowerShell:
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.ps1'))
You will also need the Android driver from Google.
Unzip it and right click the .inf file to install the driver.
fastboot is for installing Android, or manually clear eMMC bootloader. If you do not need those you can skip this step.
RZ USB Boot Helper is a Windows tool made by Radxa for maskrom sideloading. Download it from Radxa DL and unzip everything to a convenient location.
The tool will list the current mode on its interface. Right now we have Maskrom mode:
Linux(Ubuntu) & macOS
On *nix platform we can use Amlogic boot tool to side load binary. Run following commands in a new terminal:
macOS:
brew install python lsusb libusb pip3 install pyamlboot
Ubuntu:
sudo apt update sudo apt install python3-pip sudo pip3 install pyamlboot
Additionally you can install fastboot with nexus-tools:
bash <(curl -s https://raw.githubusercontent.com/corbindavenport/nexus-tools/master/install.sh)
fastboot is for installing Android, or manually clear eMMC bootloader. If you do not need those you can skip this step.
Side loading binaries
On Windows, once the tool detected maskrom mode, you can choose binary with Select button then side load with Runbutton:
On *nix you can use boot-g12.py tool instead:
macOS:
boot-g12.py rz-fastboot-loader.bin
Ubuntu:
sudo boot-g12.py rz-fastboot-loader.bin
Some precomplied loaders are provided on Radxa website. Below is a brief description on some of them:
- factory-loader.img: used to erase eMMC on Windows. Not recommended.
- 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.
- rz-fastboot-loader.bin: enable fastboot mode. This cannot be used to install our official Android.
- android-bootloader.img: this is the same bootloader.img from our official Android image. Some distro uses this bootloader.
- rz-udisk-loader.bin: expose embedded eMMC as a USB Mass Storage device.
- u-boot.bin: mainline U-Boot bootloader for USB boot. Won't work if you flashed it to eMMC/microSD.
- u-boot.bin.sd.bin: mainline U-Boot bootloader for eMMC/microSD boot. Please refer to this guide to see how to flash it when OS is already installed.
Once Radxa Zero enters into maskrom mode, it will reboot into maskrom mode until the power is cut. As such, it is recommended to completely shut down, unplug, and replug Radxa Zero when you are finish with the maintenance task.
Troubleshooting
- Q: RZ USB Boot Helper says "Not detected".
- A: Please make sure your USB driver is installed and Zero is in maskrom mode. You should see the following device in your Device Manager:
- Q: RZ USB Boot Helper's Erase button is disabled.
- A: You can use radxa-zero-erase-emmc.bin to erase eMMC. It will wipe the device once you click "Run" button.