I am trying to build a "production" image for a supported device that didn't land in time for 21.02. According to a tip I got at Netgear GS308T "snapshot" vs. GS108T v3 "21.02.1" support - #3 by RaylynnKnight it sounds like this should be possible by applying the patch for the device myself.
I already have a snapshot build installed, but my goal is a
sysupgrade image for my Netgear GS308T that's equivalent to the official downloads that I get for my other OpenWrt routers: the stable 21.02 release with LuCI and any other defaults.
I'm using the Docker
openwrtorg/imagebuilder container, and what I've done so far is:
# starting on host mkdir output chown 1000:1000 output # conveniently, this matches my user account on host docker run -it --rm --user build \ -v "$(pwd)"/output/:/home/build/openwrt/bin \ openwrtorg/imagebuilder:realtek-generic-openwrt-21.02 # within container wget https://github.com/openwrt/openwrt/commit/c829bc1.patch patch -p1 < c829bc1.patch make image PROFILE=netgear_gs308t-v1
But that failed because apparently the profile information does not come from the makefiles that got patched but a hardcoded
.targetinfo file that comes built into the container:
Profile "netgear_gs308t-v1" does not exist!
So what I tried next was to grab a copy of that file from a snapshot imagebuilder and use it back in the 21.02 container:
# back on host docker run --rm --user build \ -v "$(pwd)"/output/:/home/build/openwrt/bin \ openwrtorg/imagebuilder:realtek-generic-snapshot \ cat .targetinfo > snapshot-.targetinfo docker run -it --rm --user build \ -v "$(pwd)"/output/:/home/build/openwrt/bin \ -v "$(pwd)"/snapshot-.targetinfo:/home/build/openwrt/.targetinfo \ # <-- new openwrtorg/imagebuilder:realtek-generic-openwrt-21.02
Then repeating the same patch/
make image … steps within the container. That got a lot farther — seemingly mostly through the build? — but then ultimately fails with an error:
make: *** No rule to make target '/home/build/openwrt/build_dir/target-mips_4kec_musl/linux-realtek_generic/netgear_gs308t-v1-kernel.bin', needed by '/home/build/openwrt/build_dir/target-mips_4kec_musl/linux-realtek_generic/tmp/openwrt-21.02.1-realtek-generic-netgear_gs308t-v1-squashfs-sysupgrade.bin'. Stop.
At this point I'm ± stuck. My most pressing problem is the missing
…-kernel.bin file. Am I missing some sort of steps beyond the new
.targetinfo file and simply applying the device support patch that would somehow trigger the proper build of this device-specific file?
It's also a bit disconcerting that the logs up to that point make no mention of any
luci-related packages. I assumed that using the 21.02 imagebuilder I would get an "official release"–styled image. Is that not the case? What is the recommended way of replicating basically the same 21.02 build that the already-supported GS108T has available, but for my newly-supported GS308T router instead?