I simply run ansible command and within a few minutes I have all my openwrt settings and packages, my openvpn and wireguard tunnels and my static_dns settings for devices, etc. It was a pain in the ass to do and learn how to debug that ansible-openwrt library without a lot of documentation - but after 3 weekends and a lot of trial and error it works.
Perhaps consider doing that? the only cool thing is that now when I want to add new networks (vlans) I simply just add a new element to my config like so:
I'm back into testing mode this weekend, two questions:
why is "option macaddr '68:27:19:ac:a5:fa'" on both eth1 and eth0?
why is there no 'wireguard' package in the opkg repo? I worked around by removing the ansible task that triggers package install but this is not something one would expect?
I was able to figure out why my ansible playbook was not working on openwrt 20.02 - the 'ifname' to 'device' migration changed the configuration syntax.
specifically the https://github.com/richb-hanover/OpenWrtScripts#config-openwrtsh one. i used that with bit of editing to be able to auto config from clean flash to working. Add in or take away whatever you want. Also means for testing issues etc you dont miss a package or screw up a config. Its helped me go from 19.07 through all the 20 RCs.
I found out that using the ext4 version that 'factory reset' function will not work ("firstboot && reboot now"). Trying a squashfs image instead.
Does anyone have any recommended ways to extend the partition to the rest of the microSD?
root@OpenWrt:/# fdisk -l
Disk /dev/loop0: 963.06 MiB, 1009844224 bytes, 1972352 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mmcblk0: 58.09 GiB, 62377689088 bytes, 121831424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: x
Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 65536 147455 81920 40M 83 Linux
/dev/mmcblk0p2 196608 2293759 2097152 1G 83 Linux
Sidebar question: does anyone have any good example github action/workflows repositories to fork that automate the building of images with all kmods and packages desired?
That is a known behaviour of images without a read-only core (squashfs rootfs), so ext4 or jffs2 images without an overlay. The factory reset technically works by deleting the writable overlay and re-creating it on the next boot (with the contents of the underlying read-only squashfs providing the defaults again), you don't have that on ext4 images, any change is final (target independent, so no r4s specific, but also happening on any other target providing ext4 or jffs2 images e.g RPi, x86, x86_64 or even ar71xx or bcm47xx in older releases).
A new realtek target has been added, which is often found in managed switches. As a result, it is now possible to run OpenWrt on devices with a significant number of Ethernet ports. See supported devices for realtek.
In addition, new bcm4908 and rockchip targets have been added.
No, r4s support has only been merged after openwrt-21.02 was branched off - unless it gets backported to this stable branch (at this point probably not too likely), it's not going to be part of the 21.02.x stable releases (but will be part of the next major stable release after that).
I still have that reboot bug on the snapshot (updated yesterday). Every time I reboot, I have to pull off the power supply and plug it again. I think it's related to the MicroSD card reader/driver. Anyone also having this issue? Is it easily solvable (i.e. without patching and recompiling manually)?
I haven't had this on FriendlyWRT.
I bought one of these to tinker with due to the promising initial results in this thread, but have been unable to get mine to boot. Tried snapshot and compiling from a fresh clone of master (my x86_64 and ipq806x builds work perfectly). I have been prepping the SD card with the following:
>sudo shred -f -v -n 0 -z /dev/sde (clear all sectors)
>sudo fdisk /dev/sde (to write dos disklabel then quit)
>sudo dd if=openwrt-rockchip-armv8-friendlyarm_nanopi-r4s-squashfs-sysupgrade.img of=/dev/sde
SD card then shows the following from fdisk:
Disk /dev/sde: 30.01 GiB, 32220643328 bytes, 62930944 sectors
Disk model: USB3.0 CRW-SD/MS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f
Device Boot Start End Sectors Size Id Type
/dev/sde1 * 65536 98303 32768 16M 83 Linux
/dev/sde2 131072 344063 212992 104M 83 Linux
Insert SD card into R4S and connect power. Red power light comes on but that's it. Ethernets never come up.
Can someone point out if I am doing something obviously wrong before I have to open the unit and connect to serial? Perhaps I have a bad unit?
This sounds familiar to my first tries with this device, if the microSD is not properly formatted no LEDs or anything will boot. I even purchased a UART cable to see the serial output, apparently if the microsd is also not properly formatted then serial output will also be nil.
My recommendation is to try using balenaEtcher to flash the SD card using a known image like snapshots from owrt and go from there.
There is a guide here. RPi Resize Flash Partitions - eLinux.org
Its for the pi but the section you want is right at the bottom. - Manually resizing the SD card on Raspberry Pi.
It looks like the resize can't be done while openwrt is booted?
root@meow:/# resize.f2fs /dev/mmcblk0p2
Error: In use by the system!
I did fdisk, deleted, created new partition and rebooted. Final step seems is where I am stuck.
I did try gparted on the ext4 image but I keep reading that squashfs is better to keep the life of the microsd? Anyhow any tips appreciated on resizing the SD on squashfs while booted.