aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2026-01-27 13:54:31 +0100
committerAleksandr Nogikh <nogikh@google.com>2026-01-29 16:34:45 +0000
commitebcfe4f8fa38acd1fe9d6cb68af7ebea9f6ba825 (patch)
treee8ed95fd52507a54b3ab42873a4af69172f796a8 /tools
parent1447aee4b4142e8d82ac2ba938bdd7f5950e01b6 (diff)
tools: include a kexec kernel in buildroot amd64 images
The bzImageKexec takes around 12M.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/create-buildroot-image.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/create-buildroot-image.sh b/tools/create-buildroot-image.sh
index ce6bf5654..b18a5cff0 100755
--- a/tools/create-buildroot-image.sh
+++ b/tools/create-buildroot-image.sh
@@ -19,6 +19,9 @@ set -eux
NOMAKE="${NOMAKE:-}"
TARGETARCH="${TARGETARCH:-amd64}"
+LINUX_VERSION="${LINUX_VERSION:-6.18.6}"
+LINUX_KERNEL_CONFIG="${LINUX_KERNEL_CONFIG:-$(pwd)/../dashboard/config/linux/upstream-kexec.config}"
+
case "$TARGETARCH" in
amd64)
DEFCONFIG="pc_x86_64_bios_defconfig";;
@@ -52,6 +55,8 @@ BR2_ROOTFS_POST_FAKEROOT_SCRIPT="./rootfs_script.sh"
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_PACKAGE_DHCPCD=y
BR2_PACKAGE_OPENSSH=y
+BR2_PACKAGE_MAKEDUMPFILE=y
+BR2_PACKAGE_KEXEC=y
# This slows down boot.
# BR2_PACKAGE_URANDOM_SCRIPTS is not set
@@ -112,6 +117,12 @@ BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/x86_64/linux.config"
# This is used to create some device links in devfs (see udev rules below),
# but this is too slow for emulated architectures.
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="${LINUX_VERSION}"
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="${LINUX_KERNEL_CONFIG}"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_KERNEL_HEADERS_5_10=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
EOF
;;
arm64)
@@ -213,6 +224,13 @@ ATTR{name}=="vim2m", SYMLINK+="vim2m"
SUBSYSTEMS=="pci", DRIVERS=="i915", SYMLINK+="i915"
EOF
+if [ -f $1/boot/bzImage ]; then
+ mv $1/boot/bzImage $1/boot/bzImageKexec
+else
+ echo "DEBUG: /boot/bzImage not found in \$1"
+ ls -R $1/boot || echo "/boot directory does not exist"
+fi
+
# Override default grub config with timeout 0.
cat >$1/boot/grub/grub.cfg <<EOF
set default="0"