[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian kernel-config file for Linux 6.3



On Mon, May 8, 2023 at 4:18 PM Ben Hutchings <ben@decadent.org.uk> wrote:
>
> On Mon, 2023-05-08 at 07:48 +0200, Sedat Dilek wrote:
> > Hi Ben and Debian kernel team,
> >
> > Today, I have seen on salsa.d.o there is some progress/update in
> > master Git branch to use Linux 6.3
> >
> > Can you give help and/or instructions on how to generate a Debian
> > kernel-config file?
> > Alternatively point to a URL or provide such a kernel-config file?
>
> You should be able to generate any .config file like this:
>
> $ debian/rules debian/control-real
> ...
> $ ARCH=$(dpkg --print-architecture)  # or some other Debian
> architecture
> $ FEATURESET=none               # or "rt" for builds with realtime
> patches
> $ FLAVOUR=...                   # whichever flavour you're interested
> in
> $ dpkg-architecture -a$ARCH -c make -f debian/rules.gen
> setup_${ARCH}_${FEATURESET}_${FLAVOUR}
> ...
> $ cat debian/build/build_${ARCH}_${FEATURESET}_${FLAVOUR}/.config
>
> The setup rule is currently broken on master, so you'll need to apply
> this patch first:
>
> --- a/debian/rules.real
> +++ b/debian/rules.real
> @@ -345,7 +345,7 @@ binary_support: PACKAGE_ROOT =
> /usr/share/$(PACKAGE_NAME)
>         dh_link $(PACKAGE_ROOT) /usr/src/$(PACKAGE_NAME)
>         +$(MAKE_SELF) install-base
>
> -setup_image: $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR))
> +setup_image: $(STAMPS_DIR)/setup_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
>
>  build_image: $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR)
>
> --- END ---
>

Hi Ben,

Thanks for the quick response and your help!
Much appreciated as I know you are in a stressed situation in
terminating Debian/bookworm release.

While digging through my own docs I found the attached document -
cannot say it's still up2date.

I will verify by generating a dot-config for a known Git tag like
debian/6.1.25-1 as you described.

Just see this morning linux-kernel v6.3.1 Debian packages in
Debian/rc-buggy (experimental):

root# apt-get install -t rc-buggy linux-image-6.3.0-0-amd64-unsigned
-o APT::Get::Upgrade-By-Source-Package=0 -y

( This time the installation went fine this way - with no (DKMS) errors. )

Have more fun.

Best regards,
-Sedat-



> Ben.
>
> --
> Ben Hutchings
> I haven't lost my mind; it's backed up on tape somewhere.
HELP-1: 4.2. Rebuilding official Debian kernel packages
HELP-1: <https://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official>
HELP-2: 4.2.5. Building packages for one flavour
HELP-2: <https://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s4.2.5>
HELP-3: 4.5. Building a custom kernel from Debian kernel source
HELP-3: <https://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-building>

[ PREPARE: DOWNLOAD DEBIAN-KERNEL SOURCES ]

mkdir -p ~/src/linux-kernel
cd ~/src/linux-kernel
apt-get source linux-image-$(uname -r)

[ PREPARE: ENTER BUILD-ENVIRONMENT ]

KVER="4.9.30"
cd linux-$KVER

[ PREPARE: GENERATE SETUP FOR ONE SINGLE_KERNEL_VARIANT ]

ARCH="amd64"
FEATURESET="none"
FLAVOUR="amd64"
SINGLE_KERNEL_VARIANT="${ARCH}_${FEATURESET}_${FLAVOUR}"

fakeroot make -f debian/rules.gen setup_$SINGLE_KERNEL_VARIANT

NOTE: This generates a debian/build/build_amd64_none_amd64/.config file.

[ EXAMPLE: DISABLE AND CHECK UNWANTED KCONFIG OPTIONS (OPTIONAL) ]

LINUX_CONFIG="debian/build/build_$SINGLE_KERNEL_VARIANT/.config"

scripts/config --file $LINUX_CONFIG --disable DEBUG_INFO
grep DEBUG_INFO $LINUX_CONFIG

NOTE: The usage of scripts/config is 'config options command' whereas --file is an option and --disable a command (the order is important).

[ BUILD: GENERATE LINUX-IMAGE AND LINUX-HEADERS PACKAGES ]

MAX_JOBS=$(($(getconf _NPROCESSORS_ONLN)+1))
PARALLEL_MAKE_JOBS="$MAX_JOBS"
fakeroot make -j${PARALLEL_MAKE_JOBS} -f debian/rules.gen binary-arch_$SINGLE_KERNEL_VARIANT

NOTE-1: This generates a linux-image-$(uname -r) and linux-headers-$(uname -r) package.
NOTE-2: Using 'make -j' works in any case here to speedup the build.
NOTE-3: Using DEB_BUILD_OPTIONS=parallel=5 or DEBIAN_KERNEL_JOBS=5 was not possible as both are defined in debian/rules.

[ BUILD: GENERATE MISSING LINUX-HEADERS-COMMON PACKAGE ]

fakeroot make -f debian/rules.gen binary-indep_${FEATURESET}

NOTE: binary-indep-featureset make-target in debian/rules.real invokes install-common-headers_$(FEATURESET).


-sdi // 15-JUN-2017

Reply to: