I built my own sysupgrade image off master today so I could test ntfs3 with kernel 5.10 on my Ralink MT7621 based Netgear R6700v2. The good news is I successfully ported and built the ntfs3 module. The bad news is I appear to have been a little clueless about how opkg finds kernel module packages. My kernel has a hash that opkg doesn't recognize. The sysupgrade was a sort of success, I can ssh into the device, but I can't use Luci and opkg can no longer install other modules...
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.10.92-1-7318552cb8f6798b0a6d707a2f563d94) for kmod-lib-crc16
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-lib-crc16 found, but incompatible with the architectures configured
Is this salvageable? Is there a way to force opkg to use kernel modules? I am beginning to think I may have to nmrpflash and start over.
Moving forward, how do I build my own image off master and not run into this in the future? I want to build a kernel off master and have opkg still able to download and install modules. Is there somewhere I can educate myself on this?
Hey, when creating your own build use menuconfig to select all the packages you want to use.
To build an image compatible with the release repository you must build a kernel that matches exactly, you won’t be able to do that and add additional functions, like ntfs
Thanks for the tip on the kernel. I'll figure out a way to test my module.
In the mean time, I'm wondering if maybe I didn't stuff it up as bad as I thought. I use nmrpflash to go back to stock, then reflashed from stock with a downloaded factory snapshot and I can't get Luci to respond with that either. I can ssh in, but there is no web server running.
Back to release it looks like.
Snapshots don’t usually include luci.
You can include Luci in your own builds though, or install it to a snapshot with opkg
So one would have to do all the initial network configuration by hand? And then manually install httpd/Luci?
If I use the config.buildinfo from 21.02.1 as the .config when I build the snapshot, will that give me a release configuration?
If the default config doesn’t get you connected you would use uci commands to get up and running.
You can also connect the router to a connected router as a client and add packages that way.
Using the default config will get the release packages, do you have an issue with using menuconfig though?
Nope. Just rebuild your image... And include LuCI this time? It's an option in menuconfig just like all the other stuff .
Bad idea. Just add LuCI to your master configuration. If you're unsure, follow the wiki instructions on how to install feeds and build your image.
Not particularly. I just want to make snapshot builds that are as close to being the same as release builds as possible and I'm not yet familiar enough with the myriad of options in the menuconfig system to know what to include to make that happen. Also I don't want to run into another gotcha like I did with the kernel. I donate and deploy (and then remotely support) quite a few devices to local museums and societies and the like and am thinking of switching to OpenWrt devices rather than Fresh Tomato that I use now.
Thanks for all the tips. I appreciate how helpful everyone is with people who are ramping up to speed.
The nice thing about the buildroot is the default options are what the buildbots churn out (with a few minor differences). So just add LuCI and whatever you need and you'll have a build that follows master closely (except that master builds never have LuCI by default, that is).
P.S. You can use the forward slash
/ as a search function in menuconfig. It's nothing fancy but it does the job.
I made myself a build, didn't touch the default kernel configuration, and still ended up with a kernel that had a different hash from the ones opkg will recognize. I figured out how to fox opkg and the kernel modules I can download will work, but it wasn't worth it to me since I wasn't sure what else might be subtly broken.
In the end I used a pre-made snapshot build and was able to accomplish my goal, which was to successfully test the Paragon ntfs3 kernel module backport to kernel 5.10. I was able to use the ntfs3 kernel module I made in my custom build on the kernel created on a released snapshot.
I'll post the procedure and backport patches sepcor for anyone wanting to test it out too.
Sure, as you are not building all possible kernel packages, the kernel options are slightly different and you will get a different hash. You can't really avoid that with private builds.