Below is the LiteX-M2SDR installed on an OrangePi 5 Max. Please follow the step-by-step tutorial below to get your SDR running.
Please make sure to use a fast MicroSD card of 64GB or larger. We are using the Rockchip community project maintained by Joshua Riek. You can download the latest Ubuntu 24.04 base image for OrangePI 5 Max here.
# Download base image ...
curl -L -O https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.3.1/ubuntu-24.04-preinstalled-server-arm64-orangepi-5-max.img.xz
# ... and write to MicroSD card plugged into the /dev/sdg drive.
# Please replace /dev/sdg with your MicroSD disk drive (see below)
xzcat ubuntu-24.04-preinstalled-server-arm64-orangepi-5-max.img.xz | sudo dd bs=128M of=/dev/sdg
# Ensure that all data is written by flushing disk caches.
sync
# You can unplug the MicroSD card now
Use fdisk
to list all disk drives and identify where your MicroSD card is plugged in:
sudo fdisk -l
Connect your Ethernet cable, HDMI monitor, USB keyboard, and the MicroSD card you prepared earlier. Power your OrangePI via the USB-C port using a 5V@5A power supply.
For the first login, your OrangePI system will prompt you to change the default user password on the HDMI monitor. It will then display its DHCP IP address.
You can now log in over SSH using the IP shown earlier and the new user password:
ssh ubuntu@10.254.1.21
# Update the freshly installed system
sudo apt update
sudo apt upgrade
sudo reboot
Insert the LiteX-M2SDR module before powering your updated OrangePI. You’ll need an M2x3mm screw to secure the SDR module in place.
# Log in over SSH using your IP and password
ssh ubuntu@10.254.1.21
# On OrangePI, clone the LiteX-M2SDR source tree
mkdir Code
cd Code
git clone https://github.com/enjoy-digital/litex_m2sdr
# Compile the LiteX-M2SDR Linux kernel driver for arm64 ...
cd litex_m2sdr/software/kernel
# This line compiles and activates the driver
sudo ARCH=arm64 ./init.sh
# Compile the command-line tools and the SoapySDR driver for LiteX-M2SDR
cd ..
# Install missing dependencies ...
sudo apt install -y cmake soapysdr-tools libsoapysdr0.8 libsoapysdr-dev
# Compile command-line tools and SoapySDR driver
./build
# Verify the list of compiled tools
git status
# If you want to use LiteX-M2SDR Python tools later
sudo apt install -y python3-numpy
user/m2sdr_util info
user/m2sdr_rf
On subsequent boots, you’ll need to manually insert the LitePCI driver and grant access to your user to avoid using sudo
:
sudo modprobe ~/Code/litex_m2sdr/software/kernel/litepcie.ko
sudo chmod 666 /dev/m2sdr0
# Check if it works
~/Code/litex_m2sdr/software/user/m2sdr_util info
Ubuntu is a trademark of Canonical Ltd. Rockchip is a trademark of Fuzhou Rockchip Electronics Co., Ltd. The Ubuntu Rockchip project is not affiliated with Canonical Ltd or Fuzhou Rockchip Electronics Co., Ltd. All other product names, logos, and brands are property of their respective owners. The Ubuntu name is owned by Canonical Limited.