From acca0ffe96ca8b0062f5ba691b6a2a87856615ee Mon Sep 17 00:00:00 2001 From: Serapheim Dimitropoulos Date: Wed, 4 Oct 2023 08:40:22 -0700 Subject: [PATCH] WIP PR URL: https://www.github.com/delphix/linux-pkg/pull/303 --- default-package-config.sh | 15 ++++++++++++++- lib/common.sh | 12 ++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/default-package-config.sh b/default-package-config.sh index 6b9de14..a49560e 100644 --- a/default-package-config.sh +++ b/default-package-config.sh @@ -37,8 +37,9 @@ function merge_with_upstream() { # function kernel_prepare() { logmust install_pkgs \ - equivs \ devscripts \ + equivs \ + gawk \ kernel-wedge } @@ -182,6 +183,18 @@ function kernel_build() { logmust cd "$WORKDIR" logmust mv ./*deb "artifacts/" + # + # XXX: refactor & explain + # + logmust echo "SERAPHEIM START" + logmust ls "$WORKDIR/repo/debian/linux-image-${kernel_version}-dbgsym/usr/lib/debug/boot/" + logmust mkdir ~/vmlinux-artifacts + + if test -d "$WORKDIR/repo/debian/linux-image-${kernel_version}-dbgsym/usr/lib/debug/boot/"; then + logmust cp "$WORKDIR/repo/debian/linux-image-${kernel_version}-dbgsym/usr/lib/debug/boot/vmlinux-${kernel_version}" ~/vmlinux-artifacts/"vmlinux-${kernel_version}" + fi + logmust echo "SERAPHEIM END" + # # Make sure that we recorded the kernel version properly by checking # one of the .debs produced diff --git a/lib/common.sh b/lib/common.sh index 9d1d69c..0930ebe 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -594,6 +594,18 @@ function install_kernel_headers() { for kernel in $KERNEL_VERSIONS; do logmust dpkg-query -l "linux-headers-$kernel" >/dev/null done + + # + # XXX: Refactor & explain + # + logmust "SERAPHEIM START2" + if test -d ~/vmlinux-artifacts; then + local kernel + for kernel in $KERNEL_VERSIONS; do + logmust cp ~/vmlinux-artifacts/"vmlinux-${kernel}" "/usr/src/linux-headers-$kernel/vmlinux" + done + fi + logmust "SERAPHEIM END2" } function delphix_revision() {