I have my own image build using git and make menuconfig from git tag v23.05.5. I don't want to reflash whole device to use a package that is not available in feeds from commit hardcoded in v23.05.5. So I created a custom feed with only this one package (lpac) and successfully installed the ipk from it on my router. However the package needs optionali uqmi which depends on kmod-usb-net-qmi-wwan. So I included both as module ("M") with menuconfig and built them. Now I have *.ipk files for both of them. When I try to install the kmod I keep getting dependency error:
root@blue /tmp# opkg --force-depends --force-checksum install /tmp/kmod-usb-net-qmi-wwan_5.15.167-1_mipsel_24kc.ipk
Unknown package 'kmod-usb-net-qmi-wwan'.
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency kernel (= 5.15.167-1-02cf59ceb6f335374a482a691ea5fd62) for kmod-usb-net-qmi-wwan
* pkg_hash_fetch_best_installation_candidate: Packages for kmod-usb-net-qmi-wwan found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package kmod-usb-net-qmi-wwan.
Note that I used --force-depends and --force-checksum. How do I work around that? My kernel is 5.15.167.
Isn't kmod-usb-net-qmi-wwan_5.15.167-1_mipsel_24kc.ipk my own built kernel module? I set it to be a module in menuconfig and after compilation grabbed the ipk file from bin/ directory.
I want to test and debug 'build as a module' flow for some small experiments so I don't reflash whole device if I want to check a tiny package
Indeed - that is why I'm struggling to debug this. Any idea what did I do wrong? I used find . -name kmod-net-qmi-wwan* to find the ipk for the module in my build dir
Just to clarify: afaik this will not build the ipk package and I will have to reflash whole image, won't it? I don't want to reflash whole image - I want to practice this "build an ipk" flow so I can test small changes without waiting for a reboot, fixing extroot uuid etc.
For some reason despite including the module as * the build still produces the ipk - exactly same md5 checksum and it still does not work. I'm not building a single package - each time I'm buidling world, so I guess the ipk is not empty because of this?
Ah I see - because I included uqmi as a module the kmod-usb-net-qmi-wwan is also built as module {*} kmod-usb-net-qmi-wwan. - note the curly braces around asterisk.
The packages are built just the same, whether or not they are included (*) in the image. If you select them in any manner ( M or * ) the package will be built, using using the * just installs the packages into the firmware after building them.
you can always uninstall the package, then reinstall.
This is just silly ... you do not need to build the entire firmware to build a single package, doing so has no affect on the package. You should absolutely being using the ...
make package/<the pkg>/compile V=99
doing a full build for a single package is absolute waste of time and electricity !!
That is about the vermagic checksum, calculated as hash from all kernel options & selection at the compile time. If you add/remove aany knod, the hash changes.
Thus, you can only install kmods that have been compiled at the same build run as the firmware & kernel itself. (or use the SDK from that build run).
(But, you should be able to use the --force-depends to overcome that check. That is the curious part in your error message: Unknown package 'kmod-usb-net-qmi-wwan')
Thanks for bringing this up I did build the package in isolation at first, but I've read here that for kernel modules I need to build the whole kernel with make target/linux/compile and make package/kernel/linux/compile. Initially I went with that, but resorted to murdering mother nature to be sure it's not related to building it in isolation just like the oil companies
Yeah, the Unknown package seems to come from fetching best installation candidate (I'm thinking aloud so to speak )? Something went terribly wrong and opkg looks up for kmod-usb-net-qmi-wwan in a wrong place?
you don't need to rebuild the kernel to rebuild kmod pkgs ... mother nature aside, time is the most valuable thing in life, i prefer not to waste mine ... on purpose anyway
its different because its from a different snapshot build I would assume.
check what snapshot you are running
ubus call system board
If you plan on doing this type of testing, I'd recommend building the complete image and install it fresh. Then use the same build system to build your test kmod packages. You could try to force it with the --force --nodeps flags but it's not recommended if the purpose is for testing. You could also try and hunt down the proper sdk for the snapshot you're running, but this can be hellish depending on where it came from.
Generally, its best to eliminate all unnecessary variables before starting any type of test (aka baseline). Setting up a full build system or a new feature branch is usually among the first steps. If possible, you may want to update the kernel at the same time as 5.15 isn't relevant anymore, in regards to development