(Re-)Build OpenWrt kernel w/ SDK?


I'd like to build the OpenWrt 18.06 kernel w/ a slightly different configuration, meaning I need to enable the build of some additional modules. Is this possible w/ the SDK?

"make menuconfig" doesn't allow configuration of any kernel options (everything blank), so the directory tree is presumably missing necessary files but I'm not sure which exactly and how to proceed.

SDK is preferred b/c I want to do the same thing for different platforms and possibly not build the entire toolchain each time.

Thanks for suggestions/advice, R.

If you want to change kernel options, then the full build system is required. It isn't that much more complex than the image builder (and you may never go back :wink:)

You probably have most of the dependencies already installed, but worth checking https://openwrt.org/docs/guide-developer/build-system/install-buildsystem to start.

Sort of depressing news. This:
"Add support for building kernel modules using the SDK"

inspired some hope in me that a full build might not be necessary to merely get some extra kernel modules (nftables ones, in my case).

It isn't so bad, time-wise, in my opinion, once you get the toolchain built the first time.

A full build, after the toolchain is built once

make -j4 clean download world

on a mid-range Intel i3-7100T takes me around 20 minutes for my Archer C7 images with ccache enabled, which includes nftables, OpenSSL suite, git, python3, mosquitto in the build, and for some reason looks like it builds perl and wolfssl as well.

It's around 12 minutes on a AMD Ryzen 5 2600X with -j6 (haven't tried with with -j12, but now you've got me wondering) -j12 builds it in 8 minutes.

For me, even at 20 minutes, I always do a clean build so any of my images are "production quality" as far as build cleanliness goes.

Maybe, but your line of reasoning - it's just a couple of minutes - effectively nullifies the benefits of the SDK. Which, frankly, is an incredible offering that has saved me lots of time in the past.

So where you say "after the toolchain is built once" it's in fact built thrice in my case, for two x86 and one mips platform. Then, when the next point release w/ a kernel upgrade comes out, the same procedure again, because you might want some other feature that's coming w/ it.

And then again. And again. And again.

In conclusion, thanks indeed for the clarification. But I can positively tell you that the SDK does make a substantial difference. And that I would have been extremely delighted if I could have built those 3 or 4 extra kernel modules w/ it.