From 953480cdb07df375a18ffae46f353399496b3e92 Mon Sep 17 00:00:00 2001 From: Serapheim Dimitropoulos Date: Tue, 22 Aug 2023 20:20:17 -0700 Subject: [PATCH] DLPX-88183 Generate BTF data for ZFS kernel module during git-zfs-make PR URL: https://www.github.com/delphix/appliance-build/pull/740 --- .../appliance-build.minimal-common/tasks/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml b/live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml index 9bb70ec9..d95545e6 100644 --- a/live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml +++ b/live-build/misc/ansible-roles/appliance-build.minimal-common/tasks/main.yml @@ -69,3 +69,18 @@ delay: 30 register: result until: result is succeeded + +- shell: ls /lib/modules + register: kernel_versions + +# +# In order to generate BTF data when building the ZFS kernel module +# through git-zfs-make we need to provide a symlink of our vmlinux +# (with debug info) in the kernel header source directory which is +# referenced during the kernel module's compilation. +# +- ansible.builtin.file: + src: '/usr/lib/debug/boot/vmlinux-{{ item }}' + dest: '/usr/src/linux-headers-{{ item }}/vmlinux' + state: link + loop: '{{ kernel_versions.stdout_lines }}'