I've been using a Starfive Visionfive 2 board for a month or so that has Arch Linux running on it and then 2 x Openwrt containers set up via systemd-nspawn
Everything just working basically.
This is an example of how I start one:
systemd-nspawn --capability=CAP_SYS_TIME --private-users=no --network-interface end0 --network-interface veth0 --console=passive -bD /var/lib/machines/openwrt1/ &
So that container has the ability to run the ntp server, has direct access to one network port and a virtual network out to anything else on the device internally.
I've recently had a look at lxc with openwrt on a Dynalink DL-WRX36 as the host, it actually seems pretty easy so far, the luci gui system set up to make the containers is cool, there's a drop down list of containers to set up but it still seems to work the same way as setting up any container so it should be fine to make my own too. So far all I had to do was mount a usb device at /srv/lxc and create a lxcbr0 bridge to get one starting.
It looks like lxc needs the same command to get into the command line of an openwrt container. e.g...
echo "console::askfirst:/usr/libexec/login.sh" >> /srv/lxc/[container-name-here]/rootfs/etc/inittab
Then boom, that easy to get to a login.
root@openwrt:~# lxc-start -F test
lxc-start: test: ../src/lxc/utils.c: safe_mount: 1330 No such file or directory - Failed to mount "/usr/lib/lxc/rootfs/proc/tty" onto "/usr/lib/lxc/rootfs/proc/sys/net"
/etc/preinit: line 58: can't create /sys/class/leds/red:/trigger: Read-only file system
/etc/preinit: line 58: can't create /sys/class/leds/red:/trigger: Read-only file system
Please press Enter to activate this console.
login[129]: root login on 'console'
BusyBox v1.37.0 (2024-12-19 08:01:46 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r28354-31e45f62ca
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
OpenWrt recently switched to the "apk" package manager!
OPKG Command APK Equivalent Description
------------------------------------------------------------------
opkg install <pkg> apk add <pkg> Install a package
opkg remove <pkg> apk del <pkg> Remove a package
opkg upgrade apk upgrade Upgrade all packages
opkg files <pkg> apk info -L <pkg> List package contents
opkg list-installed apk info List installed packages
opkg update apk update Update package lists
opkg search <pkg> apk search <pkg> Search for packages
------------------------------------------------------------------
For more https://openwrt.org/docs/guide-user/additional-software/opkg-to-apk-cheatsheet
root@test:~#
Also quick tips when originally setting up, sometimes if you're testing connectivity you can just quickly drop the firewall.
nft flush ruleset
With the kernel stuff and support i'm not sure but yes, if you run openwrt containers on a host, obviously then the possibility is you aren't running an openwrt kernel, and they do have some patches that add or alter functionality. eg take a look in target/linux/generic/hack or target/linux/generic/pending
I think in general you may not see software offloading option and the like or some packet marking things won't be available.