Skip to content

Commit

Permalink
generate vmlinux
Browse files Browse the repository at this point in the history
  • Loading branch information
likewhatevs committed Oct 4, 2024
1 parent 9ec4ffd commit 6bff524
Show file tree
Hide file tree
Showing 4 changed files with 76,833 additions and 4 deletions.
4 changes: 3 additions & 1 deletion backport-scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ RUN apt update && apt install -y build-essential \
binutils-dev \
pkg-config \
git \
python3-pip \
python3-pip \
pahole \
dwarves \
--no-install-recommends && \
apt -y build-dep linux --no-install-recommends && \
apt clean && rm -rf /var/lib/apt/lists/*
Expand Down
12 changes: 10 additions & 2 deletions backport-scripts/exec-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,19 @@ cd /sched-ext-linux
git checkout "$SHORT_SHA"

# this is for backports and mixing new bpf with old kernel
find . -type f -exec sed -i 's/-Werror/-Wno-error/g' {} \;
# we only care about generated vmlinux.h, so make build work.

echo '' >> /sched-ext.config

echo 'CONFIG_DEBUG_INFO_DWARF4=y' >> /sched-ext.config
echo 'CONFIG_DEBUG_INFO_BTF=y' >> /sched-ext.config
echo 'CONFIG_DEBUG_INFO=y' >> /sched-ext.config

vng -v --kconfig --config /sched-ext.config

make -j "$(nproc)"
make ARCH=x86 KCFLAGS="-fno-pic -fno-stack-protector" -j "$(nproc)" all

pahole -J /sched-ext-linux/vmlinux

bpftool btf dump file "/sched-ext-linux/vmlinux" format c > "/vmlinux-${SHORT_SHA}.h"

Expand Down
Loading

0 comments on commit 6bff524

Please sign in to comment.