Skip to content

Commit 903b91c

Browse files
committed
Fix kernel snippet issues
1 parent 47eaa59 commit 903b91c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

base/base.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ BuildPackages=build-essential
5151
gawk
5252
zstd
5353
libssl-dev
54+
libelf-dev

kernel/mkosi.build

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ set -euo pipefail
55
KERNEL_VERSION="6.13.12"
66
KERNEL_REPO="https://github.com/gregkh/linux"
77
BASE_CONFIG="$SRCDIR/kernel/kernel-yocto.config"
8-
SNIPPETS_DIR="$SRCDIR/kernel/snippets"
98

109
echo "Building kernel $KERNEL_VERSION with snippets: ${KERNEL_CONFIG_SNIPPETS:-none}"
1110

@@ -15,7 +14,7 @@ cp "$BASE_CONFIG" "$config_file"
1514
if [[ -n "${KERNEL_CONFIG_SNIPPETS:-}" ]]; then
1615
IFS=',' read -ra snippets <<< "$KERNEL_CONFIG_SNIPPETS"
1716
for snippet in "${snippets[@]}"; do
18-
snippet_file="$SNIPPETS_DIR/${snippet}.config"
17+
snippet_file="$SRCDIR/$snippet"
1918
[[ -f "$snippet_file" ]] && cat "$snippet_file" >> "$config_file"
2019
done
2120
fi
@@ -41,8 +40,8 @@ else
4140
export KBUILD_BUILD_TIMESTAMP="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%s)})"
4241
export KBUILD_BUILD_USER="mkosi" KBUILD_BUILD_HOST="mkosi-builder"
4342

44-
mkosi-chroot make olddefconfig
45-
mkosi-chroot make -j "$(nproc 2>/dev/null || echo 2)" bzImage ARCH=x86_64 CONFIG_EFI_STUB=y
43+
mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" make olddefconfig
44+
mkosi-chroot --chdir "/build/kernel-${KERNEL_VERSION}" make -j "$(nproc 2>/dev/null || echo 2)" bzImage ARCH=x86_64 CONFIG_EFI_STUB=y
4645

4746
# Cache result
4847
mkdir -p "$cache_dir"

0 commit comments

Comments
 (0)