Help with make command and image builder

So I have installed OpenWrt 24.10.0 on a x86 platform, however I want to recompile a kmod for OpenWrt 24.10.0 where I have induced some changes in one specific file.

I am having trouble installing the ipk on the router because I have a hash mismatch.

Basically, I need to compile kmod-mt7915e with a change in the driver, but to compile that, it needs mt76 as a dependency, which itself needs the corresponding kernel version. However, when I compiled, the hash was different than the one the already installed OpenWrt was expecting. The kernel version was the same, however due to the hash mismatch, I could not install the kmod, no -f options either.

Not sure what to do in order to be able to apply my modified package as I am quite inexperienced with git and make commands. I know that I should look at the config.buildinfo and feeds.buildinfo files on the download page but still not sure what to do afterwards.

The easy solution would be to rebuild the whole firmware image from source, the imagebuilder won't help you (the SDK could, kind of).

whoops. maybe it is what I tried. by using the imagebuilder I meant the GUI I get when i run make menuconfig after building the source tree. Not sure if it is the same thing? basically, I selected the kmod-mt7915e package from there and tried building just that, but I ended up with a different version somehow. I think I might have used the source for mt76 which is already different than the one used when 24.10.0 was built and uploaded. I had to download the source locally so I can edit what I need to edit and then build from the source I had downloaded so the changes are actually built instead of using the web repo.

Every change (to the kernel or kernel configuration) will change the hash, so in practical terms you always need to (re-)build everything, so all components match each others expectations.

oh.. so i will have to completely wipe the router fs then just build OpenWrt 24.10.0 from scracth, I get it.
So what is the default .config in that case, cause in make menuconfig, I don't want to add anything else.
And I still don't understand - if I have the default config which is the same as vanilla 24.10.0, why would the hash be any different from the image I downloaded straight from the downloads page for owrt?

I just want to edit a specific package which doesn't even come preinstalled.
Sorry if the questions are stupid, I just can't wrap my head around how to approach this.

You'll find the configs used for building default images next to the firmware files you downloaded - but you DON'T want to use them (too much to build, affecting build times and scratch space needed).

Select:

  • target/ subtarget
  • device
  • luci
  • everything else you'd usually install afterwards (keep in mind, you can't install much else to your personal builds at run time)
  • nothing more
  • rinse and repeat until you're happy with the results
1 Like

i've read somewhere that updating individual packages is not a good idea, but I am not sure if that applies to such barebones x86 builds? If I don't have a package baked into the kernel, is it safe to update it?