From de8f67cc0a52c70993b0b6d26b14c13aaadc5204 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Tue, 15 Aug 2023 09:37:33 -0500 Subject: [PATCH] genimage: leaves tmp in a bad state for rebuilds Signed-off-by: Robert Nelson --- 04_build_linux.sh | 5 +++++ 05_generate_payload.bin.sh | 5 ++++- 07_create_sdcard_img.sh | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/04_build_linux.sh b/04_build_linux.sh index 152225a..20fa39c 100755 --- a/04_build_linux.sh +++ b/04_build_linux.sh @@ -31,6 +31,11 @@ make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} Image modules dtbs KERNEL_UTS=$(cat "${wdir}/linux/include/generated/utsrelease.h" | awk '{print $3}' | sed 's/\"//g' ) +if [ -d "${wdir}/deploy/tmp/" ] ; then + rm -rf "${wdir}/deploy/tmp/" +fi +mkdir -p "${wdir}/deploy/tmp/" + make -s ARCH=riscv CROSS_COMPILE=${CC} modules_install INSTALL_MOD_PATH="${wdir}/deploy/tmp" if [ -f "${wdir}/deploy/${KERNEL_UTS}-modules.tar.gz" ] ; then diff --git a/05_generate_payload.bin.sh b/05_generate_payload.bin.sh index f9bfb83..5ffc694 100755 --- a/05_generate_payload.bin.sh +++ b/05_generate_payload.bin.sh @@ -3,7 +3,10 @@ cd ./deploy/ if [ -f ./src.bin ] ; then - mkdir ./input/ + if [ ! -d ./input/ ] ; then + mkdir ./input/ + fi + if [ -f ./input/payload.bin ] ; then rm -rf ./input/payload.bin || true fi diff --git a/07_create_sdcard_img.sh b/07_create_sdcard_img.sh index 9d5d9db..1522d12 100755 --- a/07_create_sdcard_img.sh +++ b/07_create_sdcard_img.sh @@ -17,4 +17,8 @@ fi genimage --config genimage.cfg +if [ -d ./tmp ] ; then + rm -rf ./tmp || true +fi + #