Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
hardware:radxa_zero [2021/09/30 10:20] – created (WIP) atarihardware:radxa_zero [2026/01/12 15:27] (current) – added dd progress feedback lbrpdx
Line 1: Line 1:
 ====== Radxa Zero ====== ====== Radxa Zero ======
  
-<WRAP center round todo 60%> +{{ hardware:700px-radxa-zero_angle_view.jpg?nolink&300|Cute!}}
-Under constructionBe warned, some sets of instructions are incomplete. +
-</WRAP>+
  
 +Supported since Batocera **v33**, this little chip is a micro-powerhouse!
  
-Some manual steps are required to install custom operating systems onto the Radxa ZeroYou will need computer with Python 3 (with PIP3) installed with a live environment running.+The Radxa Zero comes with a u-boot from the factory that does not allow booting off the micro-SD card, so it is recommended instead to install Batocera to the eMMC storageIncidentally, this means you can reserve the eMMC entirely for Batocera while using larger micro-SD card to act as your userdata partitionOrganization!
  
-== Flash onto micro-SD card ==+You will need a computer with Python 3 (including PIP3) installed.
  
-This involves editing the eMMC, however only the bootloader will be flashed onto it. Batocera will be flashed onto the micro-SD card.+===== Flash Batocera to the Radxa Zero's eMMC ===== 
 + 
 +  - Remove any Micro-SD card that you might have in the Radxa Zero. 
 +  - Connect the Radxa Zero to the computer via ''USB2/PWR'' OTG USB-C port (can use a USB-C to USB-C or USB-C to full-sized USB-A cable). This is the port closest to the corner. 
 +  - Press the USB button underneath the board. The Radxa is now attempting to connect to your computer as a USB gadget (OTG). 
 +  - Download the latest nightly build of Batocera (despite its name, it's pretty stable): https://batocera.org/users/liberodark/nightly/radxa/batocera-s905gen2-33-20210929.img.gz 
 + 
 +==== Flash onto eMMC using Linux ==== 
 + 
 +  - Install ''python3-pip'' for your distribution. 
 +  - Run the following: <code>sudo pip3 install pyamlboot 
 +wget https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin 
 +sudo boot-g12.py rz-udisk-loader.bin 
 +</code> 
 +  - Check ''lsusb'', you should now have a device that reads ''Bus 001 Device 082: ID 1b8e:2200 Amlogic, Inc.'' 
 +  - Run ''lsblk'' or ''blkid'' to discover the mount point of your Radxa Zero (it is now acting like an ordinary USB storage device). 
 +  - Run the following: <code> 
 +dd if=batocera-s905gen2-<XX-XXXXXXXX>.img of=/dev/<your radxa mount point> bs=1M status=progress 
 +</code> 
 +  - Reboot your Radxa and enjoy! :-D 
 + 
 +==== Flash onto eMMC using Windows ==== 
 + 
 +If on **Windows** you may have to install the driver using [[https://github.com/pbatard/libwdi/releases/download/b755/zadig-2.6.exe|Zadig]]: 
 +  - Install and run Zadig. 
 +  - Confirm that the device is ''GX-CHIP'' and that its USB ID is ''1B8E:C003''
 +  - Choose **libusb-win32** as the driver and install it. 
 +  - Download [[https://dl.google.com/android/repository/usb_driver_r13-windows.zip|Google's Windows Android driver]]. 
 +  - Right-click ''android_winusb.inf'' and click **Install**. 
 +  - Reboot Windows. You always have to reboot Windows to do anything... 
 + 
 +When you no longer have an "unknown USB device" attached and it's coming up as the Radxa, continue on with the following: 
 +  - Ensure the latest [[https://www.python.org/downloads/windows/|Python 3]] is installed with the PIP3 module (check with ''pip3 version'' while inside an interactive Python 3 environment) and accessible in your command prompt from any directory. 
 +  - Download [[https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin|rz-udisk-loader.bin]] and store it somewhere easy to access. 
 +  - Open a command prompt with administrative privileges and run the following in the same directory you saved the BIN file to: <code>pip3 install pyamlboot 
 +boot-g12.py rz-udisk-loader.bin 
 +</code> <WRAP center round tip> 
 +You can open a command prompt at the currently opened directory by holding ''[Shift]'' while right-clicking the white space in file explorer. 
 +</WRAP> 
 +  - At some point the Radxa's internal eMMC should have appeared as a regular USB storage device on your computer. [[:install_batocera|Flash Batocera]] onto it as you would any other micro-SD card. 
 +  - Reboot your Radxa and enjoy. :-D 
 + 
 +===== Flash Batocera to the Radxa Zero's micro-SD card ===== 
 + 
 +<WRAP center round important> 
 +Flashing to eMMC as mentioned above is the recommended and easier method, if you're a beginner with these sorts of things it's best just to stick to that. However, should you be a tinkerer, and for whatever reason you want to leave the eMMC completely unused and boot directly off the micro-SD card, then this is for you. 
 +</WRAP> 
 + 
 +This involves editing the eMMC, however only the bootloader will be flashed onto it. Batocera in its entirety will be flashed onto the micro-SD card.
  
   - [[:install_batocera|Flash Batocera]] onto the micro-SD card using an external reader.   - [[:install_batocera|Flash Batocera]] onto the micro-SD card using an external reader.
   - Connect the Radxa Zero to the computer via ''USB2/PWR'' OTG USB-C port (can use a USB-C-to-USB-C or USB-C-to-full-sized USB-A cable). This is the port closest to the corner.   - Connect the Radxa Zero to the computer via ''USB2/PWR'' OTG USB-C port (can use a USB-C-to-USB-C or USB-C-to-full-sized USB-A cable). This is the port closest to the corner.
   - Press the USB button underneath the board.   - Press the USB button underneath the board.
-  Open up a terminal window on your computer: + 
-    * If on **Arch Linux**: +==== Flash to micro-SD card using Linux ==== 
-      - Run the following: <code> + 
-sudo pacman -S fastboot wget python3-pip+  - Install ''python3-pip'' for your distribution. 
 +  - Run the following: <code>
 sudo pip3 install pyamlboot sudo pip3 install pyamlboot
  
Line 38: Line 86:
 sudo dd if=u-boot.bin of=/dev/sdx bs=512 seek=1 sudo dd if=u-boot.bin of=/dev/sdx bs=512 seek=1
 </code> </code>
-      - (Optional) Remove the downloaded files if you never intend to flash again. +  - Reboot the Radxa to get into Batocera. :-D 
-    * FIXME (these instructions are incomplete) If on **Windows**: +  - (Optional) Remove the downloaded files if you never intend to flash again.
-      - Ensure [[https://www.python.org/downloads/windows/|Python 3]] is installed with the PIP3 module (check with ''pip3 version'' while inside an interactive Python environment) and accessible in your command prompt from any directory. +
-        * You may have to install the driver using [[https://github.com/pbatard/libwdi/releases/download/b755/zadig-2.6.exe|Zadig]]: +
-          - Install and run Zadig. +
-          - Confirm that the device is ''GX-CHIP'' and that its USB ID is ''1B8E:C003''+
-          - Choose **libusb-win32** as the driver and install it. +
-          - Download [[https://dl.google.com/android/repository/usb_driver_r13-windows.zip|Google's Windows Android driver]]. +
-          - Right-click ''android_winusb.inf'' and click **Install**. +
-      - Download and extract [[https://developer.android.com/studio/releases/platform-tools|Android's SDK Platform Tools for Windows]] to get the ''fastboot'' tool. +
-      - Navigate to the ''platform tools'' folder. +
-      - Download [[https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin|rz-udisk-loader.bin]] and save it to the ''platform tools'' folder. +
-      - Open a command prompt with administrative privileges and navigate to the ''platform tools'' folder: <code>cd "C:\path\to\platform tools\"</code> +
-      - Run the following (you should be in the same directory as where you saved the ''rz-udisk-loader.bin'' file to): <code> +
-pip3 install git+https://github.com/superna9999/pyamlboot +
-boot-g12.py rz-udisk-loader.bin+
  
-rest of the code is WIP +==== Flash to micro-SD card using Windows ====
-</code> +
-  - Reboot the Radxa to get into Batocera.+
  
-== Flash onto eMMC == +  Ensure [[https://www.python.org/downloads/windows/|Python 3]] is installed with the PIP3 module (check with ''pip3 version'' while inside an interactive Python environmentand accessible in your command prompt from any directory
- +    * You may have to install the driver using [[https://github.com/pbatard/libwdi/releases/download/b755/zadig-2.6.exe|Zadig]]:
-  Remove any Micro-SD card that you might have in the Radxa Zero. +
-  - Connect the Radxa Zero to the computer via ''USB2/PWR'' OTG USB-C port (can use a USB-C to USB-C or USB-C to full-sized USB-A cable). This is the port closest to the corner. +
-  - Press the USB button underneath the board. The Radxa is now attempting to connect to your computer as a USB device+
-    * If on **Windows** you may have to install the driver using [[https://github.com/pbatard/libwdi/releases/download/b755/zadig-2.6.exe|Zadig]]:+
       - Install and run Zadig.       - Install and run Zadig.
       - Confirm that the device is ''GX-CHIP'' and that its USB ID is ''1B8E:C003''.       - Confirm that the device is ''GX-CHIP'' and that its USB ID is ''1B8E:C003''.
Line 70: Line 98:
       - Download [[https://dl.google.com/android/repository/usb_driver_r13-windows.zip|Google's Windows Android driver]].       - Download [[https://dl.google.com/android/repository/usb_driver_r13-windows.zip|Google's Windows Android driver]].
       - Right-click ''android_winusb.inf'' and click **Install**.       - Right-click ''android_winusb.inf'' and click **Install**.
-  - Open up a terminal window on your computer: +  - Download and extract [[https://androidmtk.com/download-minimal-adb-and-fastboot-tool|Android MTK's Minimal ADB and Fastboot Tool for Windows]]
-    * If on **Windows**: +  - Navigate to the ''platform tools'' folder. With the default install location, it should be at ''C:\Program Files\Minimal ADB and Fastboot\platform tools\''
-      - Ensure [[https://www.python.org/downloads/windows/|Python 3]] is installed with the PIP3 module (check with ''pip3 version'' while inside an interactive Python environment) and accessible in your command prompt from any directory+  - Download the following files into that folder: 
-      - Download [[https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin|rz-udisk-loader.bin]] and store it somewhere easy to access+    * [[https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin|rz-udisk-loader.bin]] 
-      - Open a command prompt with administrative privileges and run the following in the same directory you saved the BIN file to: <code>pip3 install pyamlboot+    * [[https://dl.radxa.com/zero/images/loader/factory-loader.img|factory-loader.img]] 
 +    * [[https://dl.radxa.com/zero/images/loader/rz-fastboot-loader.bin|rz-fastboot-loader.bin]] 
 +  - Open a command prompt with administrative privileges and navigate to the ''platform tools'' folder: <code>cd "C:\<path\to\platform tools\>"</code> 
 +  - Run the following (you should be in the same directory as where you saved the ''rz-udisk-loader.bin'' file to): <code> 
 +pip3 install pyamlboot
 boot-g12.py rz-udisk-loader.bin boot-g12.py rz-udisk-loader.bin
 +
 +boot-g12.py factory-loader.img 
 +fastboot flashing unlock_critical
 +fastboot flashing unlock
 +
 +boot-g12.py rz-fastboot-loader.bin
 +fastboot erase bootloader
 +fastboot erase 0
 +fastboot erase 1
 +
 +boot-g12.py rz-udisk-loader.bin
 +
 +dd if=u-boot.bin of=/dev/sdx bs=512 seek=1
 </code> </code>
-    * If on a generic **Linux** distribution with coreutils and Python3: +  Reboot the Radxa to get into Batocera. :-D 
-      Install ''python3-pip'' for your distribution. +  - (Optional) Remove the downloaded files if you never intend to flash again
-      - Run the following<code>sudo pip3 install pyamlboot +
-wget https://dl.radxa.com/zero/images/loader/rz-udisk-loader.bin +
-sudo boot-g12.py rz-udisk-loader.bin +
-</code> +
-  - At some point the Radxa's internal eMMC should have appeared as a regular USB storage device on your computer. [[:install_batocera|Flash Batocera]] onto it as you would any other micro-SD card+
-  - Reboot your Radxa and enjoy. :-D+
  • hardware/radxa_zero.1632997220.txt.gz
  • Last modified: 5 years ago
  • by atari