From ae74be73d2c793b0847569d6c2993717ea9ec6b8 Mon Sep 17 00:00:00 2001 From: Stuart Hannon Date: Wed, 8 Jul 2026 12:34:17 -0400 Subject: [PATCH] Fix LINUX_OUT defaults to prevent parallel kernel cross-contamination MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both build-kernel-mainline.sh and build-kernel-bsp.sh defaulted to LINUX_OUT=prebuilt/linux. Running them in parallel (even with --no-kernel on one) corrupted each other's output since both wrote to the same directory. Change the defaults to distinct paths: build-kernel-mainline.sh → prebuilt/linux-mainline build-kernel-bsp.sh → prebuilt/linux-bsp Update README to reflect that parallel runs are now safe. Closes #79. --- README.md | 2 +- build-kernel-bsp.sh | 2 +- build-kernel-mainline.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a8b70685..bbd9c9a9 100644 --- a/README.md +++ b/README.md @@ -226,7 +226,7 @@ Once you have bootloader outputs in `prebuilt/u-boot/` and kernel outputs in `pr This produces compressed images for each board whose bootloader is present. The kernel and root filesystem are shared; only the bootloader partition differs per board. Output files: `out/debian---.img.gz` with a matching `.bmap` file, for both 512-byte and 4096-byte sector variants. When run inside the container, images go to `out/images/` instead (the container sets `IMG_OUT=/artifacts/images`). -Don't run the mainline and BSP kernel scripts in parallel against the same output directory — both write to the same `prebuilt/linux/` path and the final packaging step will fail. Run one, then the other (or set separate `LINUX_OUT` paths). +The mainline and BSP kernel scripts now default to separate output directories (`prebuilt/linux-mainline` and `prebuilt/linux-bsp`), so they can safely be run in parallel. If you need a custom path, set `LINUX_OUT` in the environment. ### Writing the image to SD/eMMC diff --git a/build-kernel-bsp.sh b/build-kernel-bsp.sh index 6f60141e..5f81678e 100755 --- a/build-kernel-bsp.sh +++ b/build-kernel-bsp.sh @@ -3,7 +3,7 @@ : "${VENDOR_DTS:=vendor-dts}" : "${PATCHES_DIR:=patches/bsp}" : "${KEEP_SRC:=no}" -: "${LINUX_OUT:=prebuilt/linux}" +: "${LINUX_OUT:=prebuilt/linux-bsp}" : "${CROSS_COMPILE:=aarch64-linux-gnu-}" : "${CONFIGS:=configs/linux-bsp}" diff --git a/build-kernel-mainline.sh b/build-kernel-mainline.sh index 64de932d..acdcce82 100755 --- a/build-kernel-mainline.sh +++ b/build-kernel-mainline.sh @@ -2,7 +2,7 @@ : "${LINUX_DIR:=src/linux}" : "${VENDOR_DTS:=vendor-dts}" : "${KEEP_SRC:=no}" -: "${LINUX_OUT:=prebuilt/linux}" +: "${LINUX_OUT:=prebuilt/linux-mainline}" : "${CROSS_COMPILE:=aarch64-linux-gnu-}" : "${BASE_CONFIG:=configs/minconfig-mainline}" : "${CONFIGS:=configs/linux}"