Custom x86_64 kernel and community add on package

Hi Friends.
I not a software guy but got basic skills in networking and linux. I have made some custom scripts on the latest stable release 21.02 that I later will include together with needed packages to a custom image.

The lack of drivers and sysfs for general GPIO on Intel and AMD SoC forces me to recompile the kernel. Well that part I managed kind of (5.1 kernelt ?) but when changing the kernel config and add necessary options the vermagic changes and I can not install the needed packages.

The packages I need is the Mosquitto_ssl and Mosquitto_client_ssl and there dependencies
Now I'm stock. I read a lot of treads and the official docs but no way forward

// Agge

You need to build also all the packages that depend on the kernel.

If you change kernel options, then yes the hash will change. The hash only matches when you compile the kernel with the default options AFAIK.

If the mosquito packages themselves have kernel modules, then it would make sense that they refuse to install on your custom build. If they don't then it's their dependencies playing up, but 99% of the time it's because somewhere along the way you need to pull in kernel modules.

Once you start building yourself, and especially with a modified kernel, it makes more sense to include all those packages in your build (and image!) already. Packages use more space when installed afterwards.

All the kmod and base packages are built but how to get the mosquitto packages needed included ? As I can't use the official ones any more

[*] instead of [m] in make menuconfig.

Sorry for my lack of knowledge. But I can't find that option to include them in make menyconfig, where to get the source for them or where to place the source for those packages

They might be in the package feeds. Did you install those before opening the configuration menu?

./scripts/feeds update -a && ./scripts/feeds install -a

The configuration tool has a search option - hit the forward slash on your keyboard then type what you're searching for, e.g. 'mosquito' (without quotes).

./scripts/feeds install -a did the source trick now before compiling how to asure that I will use 21.02 and 5.4 kernel ?

The wiki has that fully documented. Did you check that?

The command to switch to the 21.02 tree would be this: $ git checkout openwrt-21.02

1 Like

Thought I did that but got 5.10. "git checkout openwrt-21.02" gives me the error that I need to commit or stash my changes ..I'm lost

The Wiki and it got me all the way to current state but I probably made some wrong steps as I'm not skilled in git nor make :wink:

Yes, if you run 'git status' you'll see what's changed versus the default state. You can either stash the changes ('git stash') or copy them ('git diff' can be redirected).

Essentially, you seem to be operating on an upstream copy and that's bad practice. Save your changes somewhere (by creating patches with git diff e.g.), do a hard reset (git reset HEAD --hard) and switch to 21.02, create a separate branch, apply your changes to that branch.

git checkout openwrt-21.02
git branch $your_own_branch
git checkout $your_own_branch
git am $patch

That way, you can rebase your own branch onto the most recent 21.02 everytime and keep up to date.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.