Create headers split package for DKMS support
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
name: linux-stable
|
name: linux-stable
|
||||||
description: The stable version of the linux kernel
|
description: The stable version of the linux kernel
|
||||||
version: 7.0.3
|
version: 7.0.3
|
||||||
revision: 1
|
revision: 2
|
||||||
url: https://www.kernel.org/
|
url: https://www.kernel.org/
|
||||||
license: GPL2-only
|
license: GPL2-only
|
||||||
maintainers:
|
maintainers:
|
||||||
@@ -16,10 +16,15 @@ make_depends:
|
|||||||
- libelf
|
- libelf
|
||||||
- lld
|
- lld
|
||||||
- llvm
|
- llvm
|
||||||
|
- openssl
|
||||||
|
- pahole
|
||||||
- perl
|
- perl
|
||||||
- rustc
|
- rustc
|
||||||
- rust-bindgen
|
- rust-bindgen
|
||||||
- rust-src
|
- rust-src
|
||||||
|
- xz-utils
|
||||||
|
- zlib
|
||||||
|
- zstd
|
||||||
downloads:
|
downloads:
|
||||||
- url: https://cdn.kernel.org/pub/linux/kernel/v${BPM_PKG_VERSION%%.*}.x/linux-${BPM_PKG_VERSION}.tar.xz
|
- url: https://cdn.kernel.org/pub/linux/kernel/v${BPM_PKG_VERSION%%.*}.x/linux-${BPM_PKG_VERSION}.tar.xz
|
||||||
extract_to: ${BPM_SOURCE}
|
extract_to: ${BPM_SOURCE}
|
||||||
@@ -28,7 +33,20 @@ downloads:
|
|||||||
split_packages:
|
split_packages:
|
||||||
- name: linux-stable
|
- name: linux-stable
|
||||||
optional_depends:
|
optional_depends:
|
||||||
- linux-stable-docs
|
- linux-stable-docs:For documentation
|
||||||
|
- linux-stable-headers:For building modules
|
||||||
|
- name: linux-stable-headers
|
||||||
|
description: The stable version of the linux kernel (Headers)
|
||||||
|
depends:
|
||||||
|
- linux-stable
|
||||||
|
- binutils
|
||||||
|
- lld
|
||||||
|
- llvm
|
||||||
|
- openssl
|
||||||
|
- pahole
|
||||||
|
- xxhash
|
||||||
|
- zlib
|
||||||
|
- zstd
|
||||||
- name: linux-stable-docs
|
- name: linux-stable-docs
|
||||||
description: The stable version of the linux kernel (Documentation)
|
description: The stable version of the linux kernel (Documentation)
|
||||||
depends:
|
depends:
|
||||||
|
|||||||
+27
-12
@@ -2,18 +2,18 @@
|
|||||||
# Automatically generated file; DO NOT EDIT.
|
# Automatically generated file; DO NOT EDIT.
|
||||||
# Linux/x86 6.18.21 Kernel Configuration
|
# Linux/x86 6.18.21 Kernel Configuration
|
||||||
#
|
#
|
||||||
CONFIG_CC_VERSION_TEXT="clang version 21.1.8"
|
CONFIG_CC_VERSION_TEXT="clang version 22.1.4"
|
||||||
CONFIG_GCC_VERSION=0
|
CONFIG_GCC_VERSION=0
|
||||||
CONFIG_CC_IS_CLANG=y
|
CONFIG_CC_IS_CLANG=y
|
||||||
CONFIG_CLANG_VERSION=210108
|
CONFIG_CLANG_VERSION=220104
|
||||||
CONFIG_AS_IS_LLVM=y
|
CONFIG_AS_IS_LLVM=y
|
||||||
CONFIG_AS_VERSION=210108
|
CONFIG_AS_VERSION=220104
|
||||||
CONFIG_LD_VERSION=0
|
CONFIG_LD_VERSION=0
|
||||||
CONFIG_LD_IS_LLD=y
|
CONFIG_LD_IS_LLD=y
|
||||||
CONFIG_LLD_VERSION=210108
|
CONFIG_LLD_VERSION=220104
|
||||||
CONFIG_RUSTC_VERSION=109401
|
CONFIG_RUSTC_VERSION=109500
|
||||||
CONFIG_RUST_IS_AVAILABLE=y
|
CONFIG_RUST_IS_AVAILABLE=y
|
||||||
CONFIG_RUSTC_LLVM_VERSION=210108
|
CONFIG_RUSTC_LLVM_VERSION=220104
|
||||||
CONFIG_CC_CAN_LINK=y
|
CONFIG_CC_CAN_LINK=y
|
||||||
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
|
||||||
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
|
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
|
||||||
@@ -29,7 +29,7 @@ CONFIG_RUSTC_HAS_SPAN_FILE=y
|
|||||||
CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y
|
CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y
|
||||||
CONFIG_RUSTC_HAS_FILE_WITH_NUL=y
|
CONFIG_RUSTC_HAS_FILE_WITH_NUL=y
|
||||||
CONFIG_RUSTC_HAS_FILE_AS_C_STR=y
|
CONFIG_RUSTC_HAS_FILE_AS_C_STR=y
|
||||||
CONFIG_PAHOLE_VERSION=0
|
CONFIG_PAHOLE_VERSION=131
|
||||||
CONFIG_IRQ_WORK=y
|
CONFIG_IRQ_WORK=y
|
||||||
CONFIG_BUILDTIME_TABLE_SORT=y
|
CONFIG_BUILDTIME_TABLE_SORT=y
|
||||||
CONFIG_THREAD_INFO_IN_TASK=y
|
CONFIG_THREAD_INFO_IN_TASK=y
|
||||||
@@ -297,7 +297,7 @@ CONFIG_PERF_EVENTS=y
|
|||||||
CONFIG_SYSTEM_DATA_VERIFICATION=y
|
CONFIG_SYSTEM_DATA_VERIFICATION=y
|
||||||
CONFIG_PROFILING=y
|
CONFIG_PROFILING=y
|
||||||
CONFIG_RUST=y
|
CONFIG_RUST=y
|
||||||
CONFIG_RUSTC_VERSION_TEXT="rustc 1.94.1 (e408947bf 2026-03-25) (for Tide Linux)"
|
CONFIG_RUSTC_VERSION_TEXT="rustc 1.95.0 (59807616e 2026-04-14) (for Tide Linux)"
|
||||||
CONFIG_BINDGEN_VERSION_TEXT="bindgen 0.72.1"
|
CONFIG_BINDGEN_VERSION_TEXT="bindgen 0.72.1"
|
||||||
CONFIG_TRACEPOINTS=y
|
CONFIG_TRACEPOINTS=y
|
||||||
|
|
||||||
@@ -7701,13 +7701,26 @@ CONFIG_DEBUG_MISC=y
|
|||||||
#
|
#
|
||||||
# Compile-time checks and compiler options
|
# Compile-time checks and compiler options
|
||||||
#
|
#
|
||||||
|
CONFIG_DEBUG_INFO=y
|
||||||
CONFIG_AS_HAS_NON_CONST_ULEB128=y
|
CONFIG_AS_HAS_NON_CONST_ULEB128=y
|
||||||
CONFIG_DEBUG_INFO_NONE=y
|
# CONFIG_DEBUG_INFO_NONE is not set
|
||||||
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set
|
CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
||||||
# CONFIG_DEBUG_INFO_DWARF4 is not set
|
# CONFIG_DEBUG_INFO_DWARF4 is not set
|
||||||
# CONFIG_DEBUG_INFO_DWARF5 is not set
|
# CONFIG_DEBUG_INFO_DWARF5 is not set
|
||||||
CONFIG_FRAME_WARN=2048
|
# CONFIG_DEBUG_INFO_REDUCED is not set
|
||||||
# CONFIG_STRIP_ASM_SYMS is not set
|
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
|
||||||
|
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
|
||||||
|
# CONFIG_DEBUG_INFO_COMPRESSED_ZSTD is not set
|
||||||
|
# CONFIG_DEBUG_INFO_SPLIT is not set
|
||||||
|
CONFIG_DEBUG_INFO_BTF=y
|
||||||
|
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
|
||||||
|
CONFIG_PAHOLE_HAS_BTF_TAG=y
|
||||||
|
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
|
||||||
|
CONFIG_DEBUG_INFO_BTF_MODULES=y
|
||||||
|
# CONFIG_MODULE_ALLOW_BTF_MISMATCH is not set
|
||||||
|
# CONFIG_GDB_SCRIPTS is not set
|
||||||
|
CONFIG_FRAME_WARN=1024
|
||||||
|
CONFIG_STRIP_ASM_SYMS=y
|
||||||
# CONFIG_HEADERS_INSTALL is not set
|
# CONFIG_HEADERS_INSTALL is not set
|
||||||
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
|
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
|
||||||
CONFIG_OBJTOOL=y
|
CONFIG_OBJTOOL=y
|
||||||
@@ -7898,6 +7911,7 @@ CONFIG_FTRACE=y
|
|||||||
CONFIG_TRACEFS_AUTOMOUNT_DEPRECATED=y
|
CONFIG_TRACEFS_AUTOMOUNT_DEPRECATED=y
|
||||||
# CONFIG_BOOTTIME_TRACING is not set
|
# CONFIG_BOOTTIME_TRACING is not set
|
||||||
# CONFIG_FUNCTION_TRACER is not set
|
# CONFIG_FUNCTION_TRACER is not set
|
||||||
|
CONFIG_FUNCTION_TRACE_ARGS=y
|
||||||
# CONFIG_STACK_TRACER is not set
|
# CONFIG_STACK_TRACER is not set
|
||||||
# CONFIG_IRQSOFF_TRACER is not set
|
# CONFIG_IRQSOFF_TRACER is not set
|
||||||
# CONFIG_PREEMPT_TRACER is not set
|
# CONFIG_PREEMPT_TRACER is not set
|
||||||
@@ -7912,6 +7926,7 @@ CONFIG_BRANCH_PROFILE_NONE=y
|
|||||||
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
|
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
|
||||||
# CONFIG_PROFILE_ALL_BRANCHES is not set
|
# CONFIG_PROFILE_ALL_BRANCHES is not set
|
||||||
CONFIG_BLK_DEV_IO_TRACE=y
|
CONFIG_BLK_DEV_IO_TRACE=y
|
||||||
|
CONFIG_PROBE_EVENTS_BTF_ARGS=y
|
||||||
CONFIG_KPROBE_EVENTS=y
|
CONFIG_KPROBE_EVENTS=y
|
||||||
CONFIG_UPROBE_EVENTS=y
|
CONFIG_UPROBE_EVENTS=y
|
||||||
CONFIG_EPROBE_EVENTS=y
|
CONFIG_EPROBE_EVENTS=y
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ prepare() {
|
|||||||
build() {
|
build() {
|
||||||
make LLVM=1 olddefconfig
|
make LLVM=1 olddefconfig
|
||||||
make LLVM=1
|
make LLVM=1
|
||||||
|
make -C tools/bpf/bpftool vmlinux.h feature-clang-bpf-co-re=1
|
||||||
}
|
}
|
||||||
|
|
||||||
# The package function is executed in the source directory
|
# The package function is executed in the source directory
|
||||||
@@ -27,9 +28,106 @@ package_linux-stable() {
|
|||||||
install -Dm644 arch/x86/boot/bzImage "$BPM_OUTPUT"/boot/vmlinuz-linux-stable
|
install -Dm644 arch/x86/boot/bzImage "$BPM_OUTPUT"/boot/vmlinuz-linux-stable
|
||||||
install -Dm644 .config "$BPM_OUTPUT"/boot/config-linux-stable
|
install -Dm644 .config "$BPM_OUTPUT"/boot/config-linux-stable
|
||||||
|
|
||||||
|
# Remove build link
|
||||||
|
rm "$BPM_OUTPUT"/usr/lib/modules/$(make -s kernelrelease)/build
|
||||||
|
|
||||||
# Install package licenses
|
# Install package licenses
|
||||||
install -d "$BPM_OUTPUT"/usr/share/licenses
|
install -d "$BPM_OUTPUT"/usr/share/licenses
|
||||||
cp -r LICENSES "$BPM_OUTPUT"/usr/share/licenses/linux-stable
|
cp -r "$BPM_SOURCE"/LICENSES "$BPM_OUTPUT"/usr/share/licenses/linux-stable
|
||||||
|
}
|
||||||
|
|
||||||
|
package_linux-stable-headers() {
|
||||||
|
local builddir="$BPM_OUTPUT"/usr/lib/modules/$(make -s kernelrelease)/build
|
||||||
|
|
||||||
|
local karch
|
||||||
|
case $CARCH in
|
||||||
|
x86_64) karch=x86 ;;
|
||||||
|
*) echo "Unknown CARCH $CARCH"; exit 1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
echo "Installing build files..."
|
||||||
|
install -Dt "$builddir" -m644 .config Makefile Module.symvers System.map vmlinux tools/bpf/bpftool/vmlinux.h
|
||||||
|
install -Dt "$builddir/kernel" -m644 kernel/Makefile
|
||||||
|
install -Dt "$builddir/arch/$karch" -m644 arch/$karch/Makefile
|
||||||
|
cp -t "$builddir" -a scripts
|
||||||
|
ln -srt "$builddir" "$builddir/scripts/gdb/vmlinux-gdb.py"
|
||||||
|
|
||||||
|
if [[ $(scripts/config -s CONFIG_HAVE_STACK_VALIDATION) = y ]]; then
|
||||||
|
install -Dt "$builddir/tools/objtool" tools/objtool/objtool
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(scripts/config -s CONFIG_DEBUG_INFO_BTF_MODULES) = y ]]; then
|
||||||
|
install -Dt "$builddir/tools/bpf/resolve_btfids" tools/bpf/resolve_btfids/resolve_btfids
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing headers..."
|
||||||
|
cp -t "$builddir" -a include
|
||||||
|
cp -t "$builddir/arch/$karch" -a arch/$karch/include
|
||||||
|
install -Dt "$builddir/arch/$karch/kernel" -m644 arch/$karch/kernel/asm-offsets.s
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/md" -m644 drivers/md/*.h
|
||||||
|
install -Dt "$builddir/net/mac80211" -m644 net/mac80211/*.h
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/media/i2c" -m644 drivers/media/i2c/msp3400-driver.h
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/media/usb/dvb-usb" -m644 drivers/media/usb/dvb-usb/*.h
|
||||||
|
install -Dt "$builddir/drivers/media/dvb-frontends" -m644 drivers/media/dvb-frontends/*.h
|
||||||
|
install -Dt "$builddir/drivers/media/tuners" -m644 drivers/media/tuners/*.h
|
||||||
|
|
||||||
|
install -Dt "$builddir/drivers/iio/common/hid-sensors" -m644 drivers/iio/common/hid-sensors/*.h
|
||||||
|
|
||||||
|
echo "Installing KConfig files..."
|
||||||
|
find . -name 'Kconfig*' -exec install -Dm644 {} "$builddir/{}" \;
|
||||||
|
|
||||||
|
echo "Installing Rust files..."
|
||||||
|
if [[ $(scripts/config -s CONFIG_RUST) = y ]]; then
|
||||||
|
install -Dt "$builddir/rust" -m644 rust/*.rmeta
|
||||||
|
install -Dt "$builddir/rust" rust/*.so
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Installing unstripped VDSO..."
|
||||||
|
make INSTALL_MOD_PATH="$BPM_OUTPUT"/usr vdso_install \
|
||||||
|
link= # Suppress build-id symlinks
|
||||||
|
|
||||||
|
echo "Removing unneeded architectures..."
|
||||||
|
local arch
|
||||||
|
for arch in "$builddir"/arch/*/; do
|
||||||
|
[[ $arch = */$karch/ ]] && continue
|
||||||
|
echo "Removing $(basename "$arch")"
|
||||||
|
rm -r "$arch"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Removing documentation..."
|
||||||
|
rm -r "$builddir/Documentation"
|
||||||
|
|
||||||
|
echo "Removing broken symlinks..."
|
||||||
|
find -L "$builddir" -type l -printf 'Removing %P\n' -delete
|
||||||
|
|
||||||
|
echo "Removing loose objects..."
|
||||||
|
find "$builddir" -type f -name '*.o' -printf 'Removing %P\n' -delete
|
||||||
|
|
||||||
|
echo "Stripping build tools..."
|
||||||
|
local file
|
||||||
|
while read -rd '' file; do
|
||||||
|
case "$(file -Sib "$file")" in
|
||||||
|
application/x-sharedlib\;*) # Libraries (.so)
|
||||||
|
strip -v $STRIP_SHARED "$file" ;;
|
||||||
|
application/x-archive\;*) # Libraries (.a)
|
||||||
|
strip -v $STRIP_STATIC "$file" ;;
|
||||||
|
application/x-executable\;*) # Binaries
|
||||||
|
strip -v $STRIP_BINARIES "$file" ;;
|
||||||
|
application/x-pie-executable\;*) # Relocatable binaries
|
||||||
|
strip -v $STRIP_SHARED "$file" ;;
|
||||||
|
esac
|
||||||
|
done < <(find "$builddir" -type f -perm -u+x ! -name vmlinux -print0)
|
||||||
|
|
||||||
|
echo "Stripping vmlinux..."
|
||||||
|
strip -v $STRIP_STATIC "$builddir/vmlinux"
|
||||||
|
|
||||||
|
echo "Adding symlink..."
|
||||||
|
mkdir -p "$BPM_OUTPUT"/usr/src
|
||||||
|
ln -sr "$builddir" "$BPM_OUTPUT"/usr/src/linux-stable
|
||||||
}
|
}
|
||||||
|
|
||||||
package_linux-stable-docs() {
|
package_linux-stable-docs() {
|
||||||
|
|||||||
Reference in New Issue
Block a user