Skip to content

Instantly share code, notes, and snippets.

@dergeberl
Created September 8, 2021 19:46
Show Gist options
  • Save dergeberl/56a4d29e62acd9aea96e220c64254317 to your computer and use it in GitHub Desktop.
Save dergeberl/56a4d29e62acd9aea96e220c64254317 to your computer and use it in GitHub Desktop.
Raspberry Pi cm4 dfrobot router board - openwrt 21.02 installation

Download release from https://downloads.openwrt.org/releases/21.02.0/targets/bcm27xx/bcm2711/openwrt-21.02.0-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz

gunzip openwrt-21.02.0-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz
dd if=openwrt-21.02.0-bcm27xx-bcm2711-rpi-4-ext4-factory.img of=/dev/SDCARD status=progress

mount rootfs to your pc

add network config to ../etc/config/network:


config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdff:ac50:10da::/48'

config interface 'lan'
	option ifname 'eth1'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'

config interface 'wan'
	option proto 'dhcp'
	option ifname 'eth0'

add crontab for installation of kmod-r8169 and kmod-usb-dwc2 to .../etc/crontabs/root:

*/5 * * * * /bin/opkg update && /bin/opkg install kmod-r8169 && /bin/opkg install kmod-usb-dwc2 && /bin/rm -rf /etc/crontabs/root

boot rpi with lan cabel connected on wan (eth0) and wait.

After 5 min you should be able to connect to the webui on LAN port (http://192.168.1.1)

@saket424
Copy link

saket424 commented Oct 3, 2021

wifi was not working till i tried the fix proposed in this forum

https://forum.openwrt.org/t/raspberry-pi-cm4-wifi-not-working/90280/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment