-
Notifications
You must be signed in to change notification settings - Fork 1
Integrate out-of-tree DKMS modules into the kernel at build time #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: qcom/debian/latest
Are you sure you want to change the base?
Changes from all commits
51f5859
08c7a69
baf0e79
66a74cd
fd61861
8dbfa09
dfba77c
e76e9ce
6669ce8
1a833dd
0815aad
4244563
916da65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,8 @@ Maintainer: Bjordis Collaku <bcollaku@qti.qualcomm.com> | |
| Standards-Version: 4.6.2 | ||
| Build-Depends: debhelper-compat (= 13), | ||
| bc, bison, flex, libssl-dev, libelf-dev, dwarves, | ||
| python3, kmod, cpio, rsync, pkg-config, gcc, make | ||
| python3, kmod, cpio, rsync, pkg-config, gcc, make, | ||
| kgsl-dkms (>= 1.0.2), dkms | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather this was split into two independent commits:
Also, we now have kgsl 1.0.4 in qli (1.0.10 in qli-staging), can we remove the pinned version for kgsl-dkms?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call, I'll split it into deps vs the |
||
| Homepage: https://kernel.org | ||
| Rules-Requires-Root: binary-targets | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # DKMS modules to build and bundle into linux-image-<KVER>-qcom. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this may be better in a README file on how to add additional dkms modules?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The how-to is in the manifest header and the PR description at the moment. I like having it next to the thing you actually edit, but happy to move it to a README if you prefer. |
||
| # | ||
| # One entry per line: the DKMS package name without the -dkms suffix. | ||
| # A corresponding Build-Depends entry must exist in debian/control.in. | ||
| # | ||
| # To add a module: | ||
| # 1. Append the module name here. | ||
| # 2. Add <name>-dkms (>= <version>) to Build-Depends in debian/control.in. | ||
| # | ||
| # To disable a module temporarily: comment out the line with #. | ||
| # debian/rules and debian/scripts/bundle-dkms-modules.sh are untouched in either case. | ||
| kgsl | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,11 @@ PARALLEL ?= $(shell nproc) | |
| # Prefer the aarch64 cross-compiler's objcopy; fall back to the host objcopy. | ||
| OBJCOPY ?= $(shell which aarch64-linux-gnu-objcopy 2>/dev/null || which objcopy 2>/dev/null || echo objcopy) | ||
|
|
||
| # dkms identifies architectures in uname -m vocabulary (aarch64), unlike the | ||
| # kbuild ARCH token above (arm64). The distinction matters for dkms.conf | ||
| # BUILD_EXCLUSIVE_ARCH gates, which match against this value. | ||
| DKMS_ARCH ?= aarch64 | ||
|
|
||
|
|
||
| # File that caches the kernelrelease (BASE, i.e., uname -r) | ||
| KREL_FILE := debian/kernel.release | ||
|
|
@@ -374,7 +379,22 @@ override_dh_auto_install: | |
| $$DBG_PKG/usr/lib/debug/vmlinux-$$BASE; \ | ||
| else \ | ||
| echo "Warning: vmlinux not found at $$VMLINUX_PATH — debug package will not contain vmlinux"; \ | ||
| fi | ||
| fi; \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also need to build
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the generic tool it's a two-line change per module (manifest + Build-Depends). I'd keep this PR to the mechanism + kgsl since that's the one validated on resolute and trixie, then turn camx and iris-vpu on in follow-ups so any per-module issues don't hold up the mechanism. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. squash this commit :-)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here, this one gets folded into the extraction commit too. |
||
| \ | ||
| # ── DKMS module integration ────────────────────────────────────────────────── | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we make this generic for any DKMS build ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah this is the first inline cut. |
||
| # Delegated to debian/scripts/bundle-dkms-modules.sh. | ||
| # The script reads debian/dkms-modules, builds each listed module against the | ||
| # staging headers produced earlier in this same dpkg-buildpackage run, and | ||
| # bundles the resulting .ko files into the linux-image and -dbg staging trees. | ||
| # It can also be invoked directly by a developer — see the script's --help. | ||
| $(CURDIR)/debian/scripts/bundle-dkms-modules.sh \ | ||
| --kver "$$BASE" \ | ||
| --headers-dir "$(CURDIR)/debian/linux-headers-$$BASE-qcom/usr/src/linux-headers-$$BASE" \ | ||
| --image-pkg-dir "$(CURDIR)/$$PKG" \ | ||
| --dbg-pkg-dir "$(CURDIR)/$$DBG_PKG" \ | ||
| --arch "$(DKMS_ARCH)" \ | ||
| --objcopy "$(OBJCOPY)" \ | ||
| --modules-manifest "$(CURDIR)/debian/dkms-modules" | ||
|
|
||
| # Skip automatic dh_installmodules - we'll call it manually in override_dh_installdeb | ||
| override_dh_installmodules: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to add something to make sure we don't allow users to manually install
camx-dkms, iris-vpu-dkms, kgsl-dkmsto the kernel binary package?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed we shouldn't let both land, I'll add
Conflicts. I'd leaveProvidesout though, since the kernel package ships the built module and not the dkms source, so it would satisfy aDepends: kgsl-dkmsfrom something that actually wants the source.