The CM4 router board is compatible with most systems that support Raspberry Pi 4,
but most Linux distributions do not optimize the network device scenarios. So
OpenWRT and Raspberry Pi OS are recommended.
For Raspberry Pi OS
1. Enable USB2.0 Port: After flash the latest image file to TF card and then modify
/boot/config.txt file and add following line to the file.
dtoverlay=dwc2,dr_mode=host
Save it and reboot Raspberry Pi.
2. Enable OLED onboard:
2.1 Enable I2C function, Open a terminal and typing:
sudo raspi-config
Navigate to `Interface Options` -> `I2C` -> `Enable` -> `YES`.
The official snapshot is the smallest system, using serial terminal control, you need to
manually install the Web console, driver, etc. it is recommended for experienced
users.
OpenWRT official website: [ https://openwrt.org/ ]
mkdir openwrt && cd openwrt
git clone --depth=1 https://github.com/openwrt/openwrt
cd openwrt/
./scripts/feeds update -a
./scripts/feeds install -a
Download `luci-app-oled` libraries.
cd ~/openwrt/openwrt/package/feeds/luci/
git clone https://github.com/NateLol/luci-app-oled.git
cd ~/openwrt/openwrt/
./scripts/feeds update -a
./scripts/feeds install -a
** Configure the compile options by typing:
<pre> make menuconfig
And then select "Target System" and "Target Profile" as following picture:
Navigate to `kernel modules` and select `kmod-i2c-xxx` as following picutres:
And then navigate to `USB Support` to add usb2 and usb3 support.
And then select `coreutils` in `Utilites` menu.
and enable `libi2c` in `libraries` menu.
Next step is to enable LuCI `Collections` and `applications`.
Navigate to `Applications` -> `luci-app-oled` and check it:
Save the configuration to `.config` file
Compile it with following command:
Firmware will be generated on location:
Factory image file: openwrt-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz or