Skip to content
Merged
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
41 changes: 41 additions & 0 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,47 @@ function install_kernel_headers() {
done
}

#
# Install kernel dbgsym packages for all target kernels.
# The kernel packages are fetched from S3.
#
function install_kernel_dbgsyms() {
logmust determine_target_kernels
check_env KERNEL_VERSIONS DEPDIR

logmust list_linux_kernel_packages
# Note: linux packages returned in _RET_LIST

local pkg
for pkg in "${_RET_LIST[@]}"; do
logmust install_pkgs "$DEPDIR/$pkg/"linux-image-*dbgsym*.ddeb
done

#
# Verify that headers are installed for all kernel versions
# stored in KERNEL_VERSIONS
#
local kernel
for kernel in $KERNEL_VERSIONS; do
logmust dpkg-query -l "linux-image-$kernel-dbgsym*" >/dev/null
done
}

function install_kernel_headers_and_dbgsyms() {
logmust install_kernel_headers
logmust install_kernel_dbgsyms

#
# Additionally, we add these symlinks so that kernel module builds will
# be able to generate BTF information, as they look for the "vmlinux" file
# in the kernel header directory.
#
local kernel
for kernel in $KERNEL_VERSIONS; do
logmust sudo ln -s "/usr/lib/debug/boot/vmlinux-$kernel" "/usr/src/linux-headers-$kernel/vmlinux"
done
}

function delphix_revision() {
#
# We use "delphix" in the default revision to make it easy to find all
Expand Down
2 changes: 1 addition & 1 deletion packages/connstat/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function prepare() {
debhelper \
dpkg-dev \
llvm-14
logmust install_kernel_headers
logmust install_kernel_headers_and_dbgsyms
logmust install_pkgs "$DEPDIR"/dwarves/*.deb
}

Expand Down
2 changes: 1 addition & 1 deletion packages/zfs/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function prepare() {
python3 \
uuid-dev \
zlib1g-dev
logmust install_kernel_headers
logmust install_kernel_headers_and_dbgsyms
logmust install_pkgs "$DEPDIR"/delphix-rust/*.deb
logmust cargo install cargo-bundle-licenses@2.1.1 --locked
logmust install_pkgs "$DEPDIR"/delphix-go/*.deb
Expand Down