How to compile OpenWRT to specific Kernal

Ok, totally new with OpenWRT, did some search on google and can't find much on the question I have.

I have a Cellular router that uses MediaTek 7621. Under MenuConfig, I've selected:

Target system: MediaTek Ralink MIPS
Subtarget: MT7621 based boards

But when I tried to add on luci-app-nlbwmon via the web GUI of the router (LUCI in this case), it showed that my kernal is not compatible. It says "require 5.10.176-1-2d6f3ce7… while 5.10.176-1-0b9ac5a2… is installed"

So that being said, is it possible to me to recompile my .bin firmware file with a different kernal as specified by the error message? If yes, how? Maybe poiont me to some url or instruction to do so? I don't see anything in make menu that I can do this, does it require me to download a different file into the source code folder?

Thank you!

Find the module in menuconfig and make it a *, or edit .config, find the same module there, and make sure it's =*

1 Like

Hello Frollic,

thank you for QUICK the reply. Sorry, but maybe can you make it a big more clear as I am pretty new to OpenWRT. Are you saying to do "make menuconfig"? But the only "module" I see under the menu items is "Kernal modules" under the main menu. And if is under there, there is no "kernal version" especially no kernal version of "5.10.176-1-2d6f3ce" or anything close to that.

If you create an image, all modules included, will obviously have the right version.

ok so are you saying that since I pick "MediaTek 7621" in the subtarget so maybe that "board" simply don't support kernal version of 56.10.176-1-2d6f3ce that is REQUIRED by the luci-app-nlbwmon package?

meaning that when I compile mediatek 7621 it will HAVE TO USE version 5.10.176-1-0b9ac5a2?

If you compile it from scratch, including the modules, they will all have the same version.

If you're trying to add modules from the official repo, then all kmods will fail, you'll have to provide your own.

oh so you mean that when I compile, in the menuconfig I pick the package luci-app-nlbwmon that it will pick the correct kernal to use?

Not needed for the application, but the kmod it wants.

I see, let me give that a shot, THANK YOU VERY MUCH for the quick help!

Basically, if application wants kmod X, you add it to your kernel, as * or m, so it gets the right version info.

yes, I am trying now, under menuconfig, I picked the luci-app-nlbwomon and the actually it automatically selected (*) all the kmod-nf module it needed. And I am compiling now. Originally what I did was simply go to the LUCI web gui and under the "software" section, tried to install the nlbwomon package just to see how it looks like and what it does. But I guess going foward, whenever I see the "kenral version" compatibilty issue, most likely I have have to add the package and re-compile it seems...

just a side question, do you know if there are places or web site where we can find OpenWRT contractor or expert that we can pay to modify OpenWRT to our needs?

People sometimes post about it in this sub forum, but it's hard to know if they ever get any replies, since I assume those are sent by PM.

are you a developer or just an user? Do you do any contracting job?

I do, but not in the Openwrt space :slight_smile:

oh but it seems you know stuff about it...

thank you, that worked by the way.

2 Likes