[Guide] Observations on installing Linux on new Zero

This is mostly notes for me, for the next time I have to set up more of these board but if other people find these useful that’s cool. I’m planning to use these for running astroberry, or at least kstars/indi to build compact robotic telescopes. And thanks to all who contributed to the wiki; it was pretty easy to find the bits I needed.

Some things I would have like to see somewhere in the wiki:

  • Power needs to be supplied on the right side USB-C: [hdmi] [usb-devices-here] [usb-power-here]
  • The boot mode button is tiny. Hopefully you’ll only ever need to use it twice.
  • Be patient while waiting for the serial console. It’ll take a while the first time raspbian boots. Like, a few minutes. :face_with_raised_eyebrow:
  • The apt repo page doesn’t include copy-and-paste instructions for adding the ubuntu focal signing keys. It’s easy enough to figure out which keys to install, but someone might want to update that. See also libmraa and radxa-apt.
  • It would have been nice if, on firstboot, the armbian image presented a composite ethernet device to allow configuration with SSH in addition to serial console.

Things I did to get Linux running from the eMMC

  1. Install some useful tools, eg. minicom: sudo apt install minicom bmaptool p7zip
  2. install the pyamlboot tools: sudo -H pip3 install pyamlboot
  3. download radxa-zero-erase-emmc.bin and rz-udisk-loader.bin from https://dl.radxa.com/zero/images/loader/
  4. download https://dl.radxa.com/zero/images/armbian/Armbian_21.08.0-trunk_Radxa-zero_focal_current_5.10.58_xfce_desktop.img.xz and uncompress it
  5. physically connect serial console and run the terminal program
  6. hold boot button
  7. connect USB cable to the power port, and then to computer
  8. confirm the presence of the bootloader string in serial console (G12A:BL:...)
  9. erase the eMMC: sudo boot-g12.py rz-fastboot-loader.bin (This may not be necessary)
  10. hold down the boot button, and replug the usb power
  11. send the udisk emulation image: sudo boot-g12.py rz-udisk-loader.bin
  12. confirm the presence the UMS banner in the serial console
  13. determine the newly configured emulated disk: dmesg | grep sd | tail
  14. write the armbian image. be patient. It’ll take about 6 minutes to write a 3.6GB image at 10MB/s: sudo bmaptool copy --nobmap Armbian_21.08.0-trunk_Radxa-zero_focal_current_5.10.58_xfce_desktop.img /dev/sda
  15. replug the usb power, and observe the start of the linux boot. be patient - first boot takes almost 5 minutes. Eventually there will be a prompt to set a root password on the serial console.

At this point the board can be set up like any other basic SBC; setting up network connections with nmtui, copying in SSH keys, installing packages, configuring an I2C RTC, … Repeat steps 5-15 for each new board.

3 Likes