Skip to content

Commit 4a02aab

Browse files
authored
Update kernel builder to work with kernels 6.6 and later. Add 6.8.x to kernel build list (#1992)
Summary: Update kernel builder to work with kernels 6.6 and later. Add 6.8.x to kernel build list Sicne Ubuntu's current LTS release runs on a 6.8.x kernel, I wanted to keep our newest kernel version in line with that. If/when this is approved, I'll proceed with running the [upload](https://github.com/pixie-io/pixie/blob/33244cd28d79058792a6cc06fe2637f491cd51a7/tools/docker/Makefile#L288) (side stepping the GCS part) and then add this to the [all_kernel_versions](https://github.com/pixie-io/pixie/blob/33244cd28d79058792a6cc06fe2637f491cd51a7/ci/github/matrix.sh#L31) ci matrix. Relevant Issues: N/A Type of change: /kind feature Test Plan: Ran the makefile target for an older and newer kernel to verify it works now --------- Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent 887401c commit 4a02aab

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

tools/docker/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,11 @@ KERNEL_BUILD_DIR := $(BUILD_DIR)/kernel_build
128128
# 4.19.276, 4.14.304 are the correct versions here, but there is a bug with patch > 255.
129129
KERNEL_BUILD_VERSIONS := 4.14.254 \
130130
4.19.254 \
131-
5.4.235 \
132-
5.10.173 \
133-
5.15.101 \
134-
6.1.18
131+
5.4.254 \
132+
5.10.224 \
133+
5.15.165 \
134+
6.1.106 \
135+
6.8.12
135136

136137
KERNEL_BUILD_TEMPLATE := linux-build-%.tar.gz
137138
KERNEL_BUILD_TARGETS = $(addprefix $(KERNEL_BUILD_DIR)/, $(patsubst %,$(KERNEL_BUILD_TEMPLATE), $(KERNEL_BUILD_VERSIONS)))

tools/docker/kernel_builder/build_kernel.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,12 @@ module_path="${pkg_dir}/root/lib/modules/${KERNEL_VERSION}"
119119
module_build_path="${module_path}/build"
120120
module_source_path="${module_path}/source"
121121

122+
# linux 6.6 removed the source symlink from the modules_install target.
123+
# Add in to keep compatibility with older kernels and our build process.
124+
# https://github.com/torvalds/linux/commit/d8131c2965d5ee59bfa4d548641e52a13cbe17c9
125+
if [[ ! -L "${module_source_path}" ]]; then
126+
ln -s "${kernel_source_dir}" "${module_source_path}"
127+
fi
122128
create_unlinked_dir "${module_build_path}"
123129
create_unlinked_dir "${module_source_path}"
124130

0 commit comments

Comments
 (0)