Posted: Sat Jul 03, 2021 11:56 Post subject: Toolchain for the dd-wrt builds? (for kmod compilation)
I am currently using the r47000 build (on my Netgear R7000), and wanted to build some additional kernel modules for it...
...And I can't seem to find where to get the toolchain. Querying /proc/version yields
Code:
Linux version 4.4.273 (root@linux) (gcc version 11.1.0 (OpenWrt GCC 11.1.0 r16592-aabc632023) ) #3542 SMP Mon Jun 28 09:28:51 +07 2021
Now, I checked OpenWrt toolchains, and it seems you can only build it up to gcc 10, but gcc 11.1 is nowhere to be found. Where can I get it?
Thanks, I will try first to build the 10.3 toolchain first... All the other toolchains I used ended up crashing the kernel after insmoding the compiled module.
Can you please hint about what should be tweaked in the toolchain?
It's... Weird... To say the least...
But okay.
Could you please compile compatible macvlan, ipvlan, vxlan, veth kmods for the R7000 on build 47000?
I compiled them but the result was the same - either "unrecognized symbol" or just plain crash/reboot.
Surprisingly enough, I managed to compile some modules on the device itself (with the help of Entware's Gcc 7.4.0). So the version of gcc is definitely of no concern for kmods, and something other was buggying.
Yep definitely building on the device itself works quite well (although kinda slow, but not horribly slow). It required tinkering around with bypassing ccache, but overall it wasn't hard.
Yep definitely building on the device itself works quite well (although kinda slow, but not horribly slow). It required tinkering around with bypassing ccache, but overall it wasn't hard.
If you could describe in detail how you managed to accomplish this (apart from the obvious #opkg install gcc), it could be quite useful for many folks on this forum, including me. _________________ Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port
Linksys EA8500 WDS Station x2 - DD-WRT r53562
Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.
OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.
Cool. I guess I was just more curious about which kernel headers you used to build against. Did you use the official kernel headers or the openwrt kernel headers? _________________ Linksys EA8500 (Internet Gateway, AP/VAP) - DD-WRT r53562
Features in use: WDS-AP, Multiple VLANs, Samba, WireGuard, Entware: mqtt, mlocate
Netgear R7800 (WDS-AP, WAP, VAP) - DD-WRT r53562
Features in use: multiple VLANs over single trunk port
Linksys EA8500 WDS Station x2 - DD-WRT r53562
Netgear R6400v2 WAP, VAP 2.4ghz only w/VLANs over single trunk port.
OSes: Fedora 38, 9 RPis (2,3,4,5), 20 ESP8266s: Straight from Amiga to Linux in '94, never having owned a Windows PC.
I cloned the whole dd-wrt repo up to the revision of my firmware and built the modules out of it using the cross-compiler path from Entware's staging dir toolchain location. Smth like that.
More modules. Now I added the zram-related ones, for people who struggles with RAM.
Modules list:
ipvlan.ko
lz4.ko
lz4_compress.ko
lz4_decompress.ko
macvlan.ko
macvtap.ko
veth.ko
vxlan.ko
xz.ko
zram.ko
zsmalloc.ko
(see following posts for an updated version)
Last edited by Evengard on Mon Jul 26, 2021 17:36; edited 1 time in total