Skip to content

DLPX-94011 simplify kernel build and exclusion of dkms modules#346

Merged
sebroy merged 1 commit into
os-upgradefrom
dlpx/pr/sebroy/294023e5-9ffb-4631-9086-0cf0087565a7
Apr 23, 2025
Merged

DLPX-94011 simplify kernel build and exclusion of dkms modules#346
sebroy merged 1 commit into
os-upgradefrom
dlpx/pr/sebroy/294023e5-9ffb-4631-9086-0cf0087565a7

Conversation

@sebroy

@sebroy sebroy commented Apr 22, 2025

Copy link
Copy Markdown
Contributor

We currently use a mix of methods to exclude dkms (out of tree) modules from
our kernel builds. In each of the kernel repos, we have removed all of the
lines from debian.master/dkms-versions except for the line responsible for
building zfs out of tree. For preventing the zfs build, there is a
do_zfs=false debian/rules argument set in linux-pkg’s
default-package-config.sh script which works for that package.

It would be beneficial to restore the debian.master/dkms-versions files to
their original contents, as these are a source of regular merge conflicts.
Instead, we should use the debian/rules argument method from linux-pkg, which
can be shared across all linux kernel repos.

Some investigation reveals that there are two ways of excluding a dkms module
from the kernel build via a debian/rules arg:

  1. setting do_<module>=false (this is how we exclude zfs, by setting
    do_zfs=false)
  2. by including the module name in a dkms_exclude=<module list> argument (this
    is how we were excluding the build of v4l2loopback before that line was
    removed entirely from dkms-versions)

Using method 2 above is more compact, as all modules we need to exclude can be
included in that one argument. Setting this in linux-pkg will allow us to
restore dkms-versions in all of our linux-kernel-* repos and eliminate that
source of merge conflicts.

Once this linux-pkg PR lands, I'll move forward with simplifying our linux-kernel-*
repos.

A secondary problem I noticed in our kernel builds (and this is a problem on develop
as well as on os-upgrade) is that various calls to debian/rules are failing because
the gawk command isn't installed. This can be seen in the console output of our various
build-package jobs for the kernel repos. I've fixed that while in here.

Testing

I'm manually running a kernel build of linux-kernel-generic on an os-upgrade build server
with these linux-pkg changes in place.

@sebroy sebroy force-pushed the dlpx/pr/sebroy/294023e5-9ffb-4631-9086-0cf0087565a7 branch from 64860ce to 6bd1d0c Compare April 22, 2025 22:17
@sebroy sebroy marked this pull request as ready for review April 22, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants