First Boot of Armbian on Rock Pi 4B
This guide focuses on additional software setup and optimization for the Rock Pi 4B running Armbian. If you’re just starting, check out Optimizing your first Armbian setup guide to get your system ready before diving into advanced tweaks.
Installing Software for ROCK Pi 23W PoE HAT
To fully utilize the ROCK Pi 23W PoE HAT, you’ll need to install some additional software. Here’s how:
Install necessary packages to build the mraa library:
apt update && \ apt -y install git build-essential swig4.0 python3-dev libnode-dev cmake libjson-c-dev
Download the “user overlay” from Radxa:
mkdir -p /boot/overlay-user cd /boot/overlay-user curl -sL https://rock.sh/rockpi-poe-dtbo -o rockpi-poe.dtbo
Update
/boot/armbianEnv.txt
:Add the following line to enable the overlay:
user_overlays=rockpi-poe
Compile and install mraa packages:
cd ~ git clone https://github.com/eclipse/mraa mkdir mraa/build cd mraa/build cmake .. \ -DPYTHON3_INCLUDE_DIR=$(python3 -c "import sysconfig; print(sysconfig.get_path('include'))") \ -DPYTHON3_LIBRARY=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") make -j7 # Adjust based on available cores+1 make install ldconfig
Install the PoE package from Radxa:
cd /tmp wget https://cos.setq.me/rockpi/deb/rockpi-poe-0.13.deb dpkg -i rockpi-poe-0.13.deb systemctl enable rockpi-poe.service
Reboot the device:
reboot
After the reboot, the fan should spin rapidly and then slow down, indicating that it is working correctly.
Check the service status:
Run the following command to ensure the service is active:
systemctl status rockpi-poe.service
You should see an output similar to this:
● rockpi-poe.service - Rockpi PoE-FAN Loaded: loaded (/lib/systemd/system/rockpi-poe.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2024-06-22 21:24:47 +08; 3min 8s ago Main PID: 11117 (python3) Tasks: 1 (limit: 4447) Memory: 4.6M CPU: 182ms CGroup: /system.slice/rockpi-poe.service └─11117 /usr/bin/python3 /usr/bin/rockpi-poe.py start
Enable PCIe Gen2 mode to get max speed
By default, the PCIe on the Rock Pi 4B runs in Gen1 mode to ensure maximum compatibility. However, if you’ve confirmed that your NVMe drive is working well, you can enable PCIe Gen2 mode to significantly boost its speed, achieving read/write speeds of over 1000MB/s.
To enable PCIe gen2 mode, add the following lines to /boot/armbianEnv.txt
:
overlays=rk3399-pcie-gen2
After saving the changes, reboot your Rock Pi 4B. This will apply the new configuration and you should see a noticeable increase in NVMe performance.