Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/qcom-preflight-checks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Qualcomm Preflight Checks
on:
pull_request_target:
pull_request:
branches: [ main ]
push:
branches: [ main ]
Expand Down
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@
debian/control
debian/changelog

# Kernel release cache (generated during build)
# Generated by debian/rules prepare — runtime state files
debian/kernel.release
debian/localversion
debian/pkgversion

# Generated maintainer scripts (versioned names, created during build)
debian/linux-image-*.postinst
debian/linux-image-*.preinst
debian/linux-image-*.postrm
debian/linux-image-*.prerm

# Default kernel source and build output directories
kernel-source/
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,10 @@ Merges `arch/arm64/configs/debug.config` from the kernel source if present.
| Ubuntu 26.04 | `resolute` | |
| Debian 13 | `trixie` | Default |
| Debian unstable | `sid` | |

---

## License

pkg-linux-qcom is licensed under the BSD 3-Clause License. See
[LICENSE.txt](LICENSE.txt).
15 changes: 8 additions & 7 deletions build-kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ OPTIONS:
--build-mode MODE docker|native|sbuild (default: $DEFAULT_BUILD_MODE)
--docker-build PATH Path to docker_deb_build.py (docker mode)
--profiles PROFILES DEB_BUILD_PROFILES (e.g. debug)
--enable-configs LIST Comma-separated config fragments from
--kernel-config LIST Comma-separated config fragments from
debian/config-available/ to activate

Paths:
Expand All @@ -73,7 +73,7 @@ EXAMPLES:
$0 --tag qcom-next-6.12.0-20260210 --distro noble
$0 --local-source /path/to/kernel --build-mode native
$0 --local-source /path/to/kernel --kver-extra -mybuild
$0 --latest-tag --enable-configs docker,systemd-boot
$0 --latest-tag --kernel-config docker,systemd-boot
$0 --latest-tag --profiles debug

DISTRIBUTIONS:
Expand All @@ -90,7 +90,7 @@ EOF
TAG=""; LATEST_TAG=false; BRANCH="$DEFAULT_BRANCH"; REPO="$DEFAULT_REPO"
DISTRO="$DEFAULT_DISTRO"; BUILD_MODE="$DEFAULT_BUILD_MODE"
LOCALVERSION=""; KVER_EXTRA=""; PROFILES=""; CLEAN=false
LOCAL_SOURCE=""; ENABLE_CONFIGS=""; SKIP_PREPARE=false
LOCAL_SOURCE=""; ENABLE_CONFIGS="squashfs,systemd-boot,qcom-imsdk,docker,qemu-boot,usb-can"; SKIP_PREPARE=false

while [[ $# -gt 0 ]]; do
case $1 in
Expand All @@ -107,7 +107,8 @@ while [[ $# -gt 0 ]]; do
--localversion) LOCALVERSION="$2"; shift 2 ;;
--kver-extra) KVER_EXTRA="$2"; shift 2 ;;
--profiles) PROFILES="$2"; shift 2 ;;
--enable-configs) ENABLE_CONFIGS="$2"; shift 2 ;;
--kernel-config) ENABLE_CONFIGS="$2"; shift 2 ;;
--enable-configs) ENABLE_CONFIGS="$2"; shift 2 ;; # deprecated alias
--build-mode) BUILD_MODE="$2"; shift 2 ;;
--skip-prepare) SKIP_PREPARE=true; shift ;;
--clean) CLEAN=true; shift ;;
Expand All @@ -119,7 +120,7 @@ done
[[ -z "${OUTPUT_DIR:-}" ]] && OUTPUT_DIR="$OUTPUT_BASE_DIR/$DISTRO"

# Validate distro and build mode
VALID_DISTROS=(noble questing resolute trixie sid)
VALID_DISTROS=(noble questing resolute trixie forky sid unstable)
VALID_MODES=(docker native sbuild)
[[ " ${VALID_DISTROS[*]} " =~ " $DISTRO " ]] || { log_error "Invalid distro: $DISTRO (valid: ${VALID_DISTROS[*]})"; exit 1; }
[[ " ${VALID_MODES[*]} " =~ " $BUILD_MODE " ]] || { log_error "Invalid build mode: $BUILD_MODE (valid: ${VALID_MODES[*]})"; exit 1; }
Expand Down Expand Up @@ -253,7 +254,7 @@ if [[ "$SKIP_PREPARE" != true ]]; then
PREPARE_ARGS=(--source-dir "$KERNEL_DIR" --distro "$DISTRO" --debian-dir "$DEBIAN_DIR")
[[ -n "$LOCALVERSION" ]] && PREPARE_ARGS+=(--localversion "$LOCALVERSION")
[[ -n "$KVER_EXTRA" ]] && PREPARE_ARGS+=(--kver-extra "$KVER_EXTRA")
[[ -n "$ENABLE_CONFIGS" ]] && PREPARE_ARGS+=(--enable-configs "$ENABLE_CONFIGS")
[[ -n "$ENABLE_CONFIGS" ]] && PREPARE_ARGS+=(--kernel-config "$ENABLE_CONFIGS")
"$SCRIPT_DIR/prepare-source.sh" "${PREPARE_ARGS[@]}"
else
log_info "Skipping source preparation (--skip-prepare set)."
Expand Down Expand Up @@ -322,7 +323,7 @@ if [[ $BUILD_STATUS -eq 0 ]]; then
log_info "Packages in: $OUTPUT_DIR"
ls -lh "$OUTPUT_DIR"/*.deb 2>/dev/null
echo
log_info "Install: sudo dpkg -i $OUTPUT_DIR/linux-image-*-qcom_*.deb"
log_info "Install: sudo dpkg -i $OUTPUT_DIR/linux-image-*_*_arm64.deb"
else
log_error "Build failed (exit $BUILD_STATUS)"
exit $BUILD_STATUS
Expand Down
6 changes: 3 additions & 3 deletions debian/changelog.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
linux-image-@KVER@-qcom (1-1) @DISTRO@; urgency=medium
@SRCPKG@ (@PKGVER@) @DISTRO@; urgency=medium

* Qualcomm ARM64 Linux kernel package
* Kernel version: @KVER@
* Includes kernel image, modules, DTBs, and headers
* Supports multiple kernel installations via versioned package names
* Source: @GITCLONE@ @BRANCH@
* Includes kernel image, modules, DTBs, headers, and debug symbols

-- Bjordis Collaku <bcollaku@qti.qualcomm.com> Fri, 14 Nov 2025 10:00:00 -0800
4 changes: 4 additions & 0 deletions debian/clean
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
debian/kernel.release
debian/linux-image-*.postinst
debian/linux-image-*.preinst
debian/linux-image-*.postrm
debian/linux-image-*.prerm
File renamed without changes.
File renamed without changes.
File renamed without changes.
71 changes: 38 additions & 33 deletions debian/control.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: linux-image-@KVER@-qcom
Source: @SRCPKG@
Section: kernel
Priority: optional
Maintainer: Bjordis Collaku <bcollaku@qti.qualcomm.com>
Expand All @@ -9,56 +9,61 @@ Build-Depends: debhelper-compat (= 13),
Homepage: https://kernel.org
Rules-Requires-Root: binary-targets

Package: linux-image-@KVER@-qcom
Package: linux-image-@KVER@
Architecture: arm64
Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: initramfs-tools | dracut | linux-initramfs-tool
Suggests: linux-headers-@KVER@-qcom
Suggests: linux-headers-@KVER@
Provides: linux-image, linux-image-arm64
Description: Qualcomm ARM64 Linux kernel @KVER@
Installs the built kernel Image, .config, all DTBs, and modules under
versioned paths keyed to the kernel's release version.
Description: Qualcomm ARM64 Linux kernel image @KVER@
Kernel image, modules, and DTBs for kernel release @KVER@ on ARM64
Qualcomm platforms.
.
This package contains kernel version @KVER@ with all necessary components
for booting and running the kernel on ARM64 systems.
.
Files are installed to:
Files installed:
- /boot/vmlinuz-@KVER@
- /boot/config-@KVER@
- /lib/modules/@KVER@/
- /usr/lib/linux-image-@KVER@/
- /usr/lib/linux-image-@KVER@/ (DTBs)
- /usr/lib/firmware/@KVER@/device-tree (Ubuntu flash-kernel symlink)

Package: @BINPKG@
Architecture: arm64
Depends: linux-image-@KVER@, ${misc:Depends}
Description: Qualcomm ARM64 Linux kernel image (meta-package)
This meta-package always depends on the latest @BINPKG@ kernel image
for ARM64 Qualcomm platforms. Installing this package ensures that
apt upgrade will automatically install new kernel releases.

Package: linux-headers-@KVER@-qcom
Package: linux-headers-@KVER@
Architecture: arm64
Depends: ${misc:Depends}
Provides: linux-headers, linux-headers-arm64
Description: Qualcomm ARM64 Linux kernel headers @KVER@
This package provides the kernel headers for building out-of-tree modules
and other kernel development tasks for kernel version @KVER@.
Kernel headers for building out-of-tree modules (DKMS, etc.) against
kernel release @KVER@.
.
Headers are installed under /usr/src/linux-headers-@KVER@/ and include
the necessary build infrastructure for compiling external modules.
.
Installing this package also fixes the /lib/modules/@KVER@/build symlink
to point to /usr/src/linux-headers-@KVER@/.
Headers are installed under /usr/src/linux-headers-@KVER@/ and the
/lib/modules/@KVER@/build symlink is pointed there.

Package: @HDRPKG@
Architecture: arm64
Depends: linux-headers-@KVER@, ${misc:Depends}
Description: Qualcomm ARM64 Linux kernel headers (meta-package)
This meta-package always depends on the latest @HDRPKG@ kernel headers
for ARM64 Qualcomm platforms.

Package: linux-image-@KVER@-qcom-dbg
Package: linux-image-@KVER@-dbg
Architecture: arm64
Section: debug
Priority: optional
Depends: ${misc:Depends}, linux-image-@KVER@-qcom (= ${binary:Version})
Depends: ${misc:Depends}, linux-image-@KVER@ (= ${binary:Version})
Provides: linux-image-dbg
Description: Qualcomm ARM64 Linux kernel debugging symbols @KVER@
This package provides debugging symbols for the Qualcomm ARM64 kernel
version @KVER@, following the standard GNU debuglink layout used by the
upstream kernel builddeb script.
.
Debug symbols are installed under /usr/lib/debug/ and do not conflict
with the main linux-image package. Both packages can be installed
simultaneously.
Description: Qualcomm ARM64 Linux kernel debug symbols @KVER@
Debug symbols for kernel release @KVER@, following the GNU debuglink
layout used by the upstream kernel builddeb script.
.
Files installed:
- /usr/lib/debug/lib/modules/@KVER@/ (per-module .ko debug symbols)
- /usr/lib/debug/lib/modules/@KVER@/vmlinux (unstripped vmlinux, for perf/crash)
- /usr/lib/debug/boot/vmlinux-@KVER@ (symlink, for systemtap)
- /usr/lib/debug/vmlinux-@KVER@ (symlink, for kdump-tools)
- /usr/lib/debug/lib/modules/@KVER@/ (per-module .ko debug symbols)
- /usr/lib/debug/lib/modules/@KVER@/vmlinux (unstripped vmlinux)
- /usr/lib/debug/boot/vmlinux-@KVER@ (symlink for systemtap)
- /usr/lib/debug/vmlinux-@KVER@ (symlink for kdump-tools)
Loading
Loading