@@ -597,6 +597,47 @@ function install_kernel_headers() {
597
597
done
598
598
}
599
599
600
+ #
601
+ # Install kernel dbgsym packages for all target kernels.
602
+ # The kernel packages are fetched from S3.
603
+ #
604
+ function install_kernel_dbgsyms() {
605
+ logmust determine_target_kernels
606
+ check_env KERNEL_VERSIONS DEPDIR
607
+
608
+ logmust list_linux_kernel_packages
609
+ # Note: linux packages returned in _RET_LIST
610
+
611
+ local pkg
612
+ for pkg in " ${_RET_LIST[@]} " ; do
613
+ logmust install_pkgs " $DEPDIR /$pkg /" linux-image-* dbgsym* .ddeb
614
+ done
615
+
616
+ #
617
+ # Verify that headers are installed for all kernel versions
618
+ # stored in KERNEL_VERSIONS
619
+ #
620
+ local kernel
621
+ for kernel in $KERNEL_VERSIONS ; do
622
+ logmust dpkg-query -l " linux-image-$kernel -dbgsym*" > /dev/null
623
+ done
624
+ }
625
+
626
+ function install_kernel_headers_and_dbgsyms() {
627
+ logmust install_kernel_headers
628
+ logmust install_kernel_dbgsyms
629
+
630
+ #
631
+ # Additionally, we add these symlinks so that kernel module builds will
632
+ # be able to generate BTF information, as they look for the "vmlinux" file
633
+ # in the kernel header directory.
634
+ #
635
+ local kernel
636
+ for kernel in $KERNEL_VERSIONS ; do
637
+ logmust sudo ln -s " /usr/lib/debug/boot/vmlinux-$kernel " " /usr/src/linux-headers-$kernel /vmlinux"
638
+ done
639
+ }
640
+
600
641
function delphix_revision() {
601
642
#
602
643
# We use "delphix" in the default revision to make it easy to find all
0 commit comments