:: Re: [DNG] To use a preconfigured (5…
Etusivu
Poista viesti
Vastaa
Lähettäjä: tito
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] To use a preconfigured (5.4 / Ubuntu) kernel config file to recompile the (5.4) kernel for Devuan.
On Sat, 19 Aug 2023 01:01:30 +0200
Mario Marietto via Dng <dng@???> wrote:

> Hello to everyone.
>
> What am I trying to do ? I have enabled Kvm for armhf on my ARM Chromebook
> with the kernel 5.4. Now I'm trying to configure iptables and nftables by
> manually selecting every necessary entry inside the kernel file needed to
> enable those features. I need to do this to configure a network that I will
> use with qemu with the aim to virtualize FreeBSD 13.2 for arm on the
> Chromebook.
>
> Unfortunately I have recompiled the kernel several times,but I couldn't get
> iptables or nftables to work. It seems very complicated to reach the goal
> using this approach.
>
> The closest (for my needs) precompiled kernel I found for Devuan is the
> 5.10,present by default on the Devuan 4. But I can't use it,because the
> support for kvm for armhf has been removed on the kernel 5.7. So,I've been
> forced to grab an older kernel. For sure,Devuan uses a kernel version lower
> than 5.10,but it is not shipped on Devuan 4,but on Devuan 3...and it is too
> low. Furthermore,Devuan 3 is much older than 4 and I don't want to use it.
>
> So I've got an idea : If I get the kernel 5.4 config file of Ubuntu for
> armhf and then I use it with the devuan 4,can this approach work ? I know
> that Ubuntu has a release,more or less it is 20.04,that I can install on a
> different sd card and then I can extract the kernel config file and I
> should hope that it is already configured for the iptables and / or the
> nftables. For sure that kernel file will not be configured for enabling
> kvm,but this step is easier.
>
> Can this approach work ? thanks.


Hi,
ever thought of using the source from kernel.org? e.g. longterm:     5.10.191.


I use some script like this (untested) to compile it:

#! /bin/sh
arch=x86_64
SRCDIR=YOURDIR
cd $SRCDIR
CONFIG="/path/to/config.yours"
cp -f $CONFIG "$SRCDIR/.config"
echo "REMOVE CONFIG_SYSTEM_TRUSTED_KEYS"
./scripts/config --set-val CONFIG_SYSTEM_TRUSTED_KEYS \"\"
echo "REMOVE CONFIG_DEBUG_INFO"
./scripts/config --set-val CONFIG_DEBUG_INFO n
grep CONFIG_SYSTEM_TRUSTED_KEYS .config
make oldconfig

# add the configs you need
./scripts/config --set-val CONFIG_THAT_YOU_NEED y
make oldconfig

make -j4 bindeb-pkg LOCALVERSION=-custom

the result will be 3 debs that you can install e.g.:

linux-headers-5.10.191-custom_5.10.191-custom-53_amd64.deb
linux-image-5.10.191-custom_5.10.191-custom-53_amd64.deb
linux-libc-dev_5.10.191-custom-53_amd64.deb

Hope this helps.
Ciao,
Tito