Hello Computer Enthusiastic,

Quoting Computer Enthusiastic (2026-03-08 10:07:05)
> I would like to rebuild a Debian source package of the Linux kernel after
> changing one or more kernel configuration parameters.
> 
> The Debian Administrator Handbook [1] suggests generating the 
> configuration file '.config' in the root directory of the source code 
> form current running configuration, and then modifying it. This method 
> works, but I would like to understand how to modify the Linux kernel 
> configuration used by the Debian packaging system.

the Debian Administrator Handbook links you to a better document to understand
how to do this at the very top: The Debian Kernel Handbook

https://kernel-team.pages.debian.net/kernel-handbook/

The Debian Administrator Handbook suggests using "make deb-pkg" which still
works fine (I use it often to bisect the kernel) but you want to build it using
the methods used by the Debian Linux kernel maintainers as I understand it?

> If I understand correctly, the config snippets in ./debin/config are
> assembled using the ./debian/bin/kconfig.py program [3] in ./debian/rules.gen
> to generate the final .config file required for building the kernel's binary
> images.
> 
> What's the "cleanest" debian way to change some kernel parameters in 
> Debian Linux source package before building the binary packages  ?
> 
> As an example, how to enable the following parameters (that are disabled 
> in the default configuration) ?
>      # CONFIG_BOOT_CONFIG is not set
>      # CONFIG_BOOTTIME_TRACING is not set

Read the relevant kernel handbook pages to get the details. The summary is,
that you (assuming you want to modify an existing flavour and not create a new
one) append your custom options to the bottom of debian/config/${arch}/config
(replace ${arch} by the flavour corresponding to your architecture) and then
you rebuild the control files by running:

    debian/rules debian/control

I don't think you need to run "debian/rules source" in your case but somebody
else might correct me if I'm wrong. The links you listed including the very
helpful blog post by ema have more details.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to