Skip to content

Commit

Permalink
older kernels can't be compiled with new pahole: use 2 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mmat11 committed Oct 5, 2023
1 parent 67ff56f commit 34e46dd
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
File renamed without changes.
10 changes: 10 additions & 0 deletions testing/kernel_builder/Dockerfile.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from debian:bullseye

RUN dpkg --add-architecture arm64
RUN apt-get -y update
RUN apt-get -y install \
git gcc make libssl-dev bison flex bc libelf-dev python3 \
gcc-aarch64-linux-gnu curl xz-utils dwarves

WORKDIR /work
CMD ./build.sh
6 changes: 4 additions & 2 deletions testing/kernel_builder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ IMAGE=kernel-builder-local
TAG=latest

all:
${CONTAINER_ENGINE} run -v ${PWD}:/work ${IMAGE}:${TAG}
${CONTAINER_ENGINE} run -v ${PWD}:/work ${IMAGE}-old:${TAG}
${CONTAINER_ENGINE} run -v ${PWD}:/work ${IMAGE}-new:${TAG}

image:
${CONTAINER_ENGINE} build . -t ${IMAGE}:${TAG}
${CONTAINER_ENGINE} build -f Dockerfile.old -t ${IMAGE}-old:${TAG}
${CONTAINER_ENGINE} build -f Dockerfile.new -t ${IMAGE}-new:${TAG}
17 changes: 13 additions & 4 deletions testing/kernel_builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ readonly BUILD_ARCHES=(

# We hit every minor release here, and grab a number of different patch
# releases from each LTS series (e.g. 5.10, 5.15)
readonly BUILD_VERSIONS=(
readonly BUILD_VERSIONS_PAHOLE_120=(
"5.10.16" # Oldest we support
"5.10.130"
"5.11"
Expand All @@ -34,6 +34,9 @@ readonly BUILD_VERSIONS=(
"6.0"
"6.1"
"6.1.55"
)

readonly BUILD_VERSIONS_PAHOLE_SOURCE=(
"6.2"
"6.3"
"6.4"
Expand Down Expand Up @@ -101,9 +104,15 @@ fetch_and_build() {
}

main() {
for version in ${BUILD_VERSIONS[@]}; do
fetch_and_build $version
done
if [ "$(pahole --version)" = "v1.20" ]; then
for version in ${BUILD_VERSIONS_PAHOLE_120[@]}; do
fetch_and_build $version
done
else
for version in ${BUILD_VERSIONS_PAHOLE_SOURCE[@]}; do
fetch_and_build $version
done
fi
}

main

0 comments on commit 34e46dd

Please sign in to comment.