Skip to content

Commit

Permalink
Update kernel builder to work with kernels 6.6 and later. Add 6.8.x t…
Browse files Browse the repository at this point in the history
…o 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 <[email protected]>
  • Loading branch information
ddelnano authored Aug 26, 2024
1 parent 887401c commit 4a02aab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,11 @@ KERNEL_BUILD_DIR := $(BUILD_DIR)/kernel_build
# 4.19.276, 4.14.304 are the correct versions here, but there is a bug with patch > 255.
KERNEL_BUILD_VERSIONS := 4.14.254 \
4.19.254 \
5.4.235 \
5.10.173 \
5.15.101 \
6.1.18
5.4.254 \
5.10.224 \
5.15.165 \
6.1.106 \
6.8.12

KERNEL_BUILD_TEMPLATE := linux-build-%.tar.gz
KERNEL_BUILD_TARGETS = $(addprefix $(KERNEL_BUILD_DIR)/, $(patsubst %,$(KERNEL_BUILD_TEMPLATE), $(KERNEL_BUILD_VERSIONS)))
Expand Down
6 changes: 6 additions & 0 deletions tools/docker/kernel_builder/build_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ module_path="${pkg_dir}/root/lib/modules/${KERNEL_VERSION}"
module_build_path="${module_path}/build"
module_source_path="${module_path}/source"

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

Expand Down

0 comments on commit 4a02aab

Please sign in to comment.