Suppression de l'effacement du build selon les choix de compilation

This commit is contained in:
Vidal Gerard
2025-10-30 08:02:51 +01:00
parent 698e9d4398
commit 1030de2798
3 changed files with 15 additions and 12 deletions

View File

@@ -232,7 +232,7 @@ The following static networking parameters are only supported if `ENABLE_WIFI_DH
|Option|Value|default value|value format|desciption| |Option|Value|default value|value format|desciption|
|---|---|---|---|---| |---|---|---|---|---|
|BUILD_KERNEL||true|`true`\|`false`|Build and install the latest RPi 0/1/2/3/4 Linux kernel. The default RPi 0/1/2/3/ kernel configuration is used most of the time. ENABLE_NEXMON - Changes Kernel Source to [https://github.com/Re4son/](Kali Linux Kernel) Precompiled 32bit kernel for RPI0/1/2/3 by [https://github.com/hypriot/](hypriot) Precompiled 64bit kernel for RPI3/4 by [https://github.com/sakaki-/](sakaki)| |BUILD_KERNEL||build|`build`\|`uselocal`\|`download`|Build and install the latest RPi 0/1/2/3/4 Linux kernel. The default RPi 0/1/2/3/ kernel configuration is used most of the time. ENABLE_NEXMON - Changes Kernel Source to [https://github.com/Re4son/](Kali Linux Kernel) Precompiled 32bit kernel for RPI0/1/2/3 by [https://github.com/hypriot/](hypriot) Precompiled 64bit kernel for RPI3/4 by [https://github.com/sakaki-/](sakaki)|
|CROSS_COMPILE|string|||This sets the cross-compile environment for the compiler. Set by RPI_MODEL| |CROSS_COMPILE|string|||This sets the cross-compile environment for the compiler. Set by RPI_MODEL|
|KERNEL_ARCH|string|||This sets the kernel architecture for the compiler. Set by RPI_MODEL| |KERNEL_ARCH|string|||This sets the kernel architecture for the compiler. Set by RPI_MODEL|
|KERNEL_IMAGE|string|||Name of the image file in the boot partition. Set by RPI_MODEL| |KERNEL_IMAGE|string|||Name of the image file in the boot partition. Set by RPI_MODEL|

View File

@@ -875,6 +875,7 @@ else # BUILD_KERNEL=false
rm -fr "${temp_dir}" rm -fr "${temp_dir}"
rm -f "${R}"/tmp/kernel.deb rm -f "${R}"/tmp/kernel.deb
fi fi
fi
# Check if kernel installation was successful # Check if kernel installation was successful
KERNEL="$(ls -1 "${R}"/boot/firmware/kernel* | sort | tail -n 1)" KERNEL="$(ls -1 "${R}"/boot/firmware/kernel* | sort | tail -n 1)"
@@ -883,4 +884,4 @@ else # BUILD_KERNEL=false
cleanup cleanup
exit 1 exit 1
fi fi
fi

View File

@@ -573,13 +573,15 @@ if [ -r "/dev/mapping/${CRYPTFS_MAPPING}" ] ; then
fi fi
# Don't clobber an old build # Don't clobber an old build
if [ -e "$BUILDDIR" ] ; then if [ -e "$BUILDDIR" ] && [ "$BUILD_KERNEL" = true ] ; then
echo "error: directory ${BUILDDIR} already exists, not proceeding" echo "error: directory ${BUILDDIR} already exists, not proceeding"
exit 1 exit 1
fi fi
if [ "$BUILD_KERNEL" = true ] ; then
# Setup chroot directory # Setup chroot directory
mkdir -p "${R}" mkdir -p "${R}"
fi
# Check if build directory has enough of free disk space >512MB # Check if build directory has enough of free disk space >512MB
if [ "$(df --output=avail "${BUILDDIR}" | sed "1d")" -le "524288" ] ; then if [ "$(df --output=avail "${BUILDDIR}" | sed "1d")" -le "524288" ] ; then