Added triple choice for kernel : build download or uselocal
This commit is contained in:
@@ -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|
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ if [ "$ENABLE_NEXMON" = true ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Fetch and build latest raspberry kernel
|
# Fetch and build latest raspberry kernel
|
||||||
if [ "$BUILD_KERNEL" = true ] ; then
|
case "$BUILD_KERNEL" in
|
||||||
|
"build")
|
||||||
|
#if [ "$BUILD_KERNEL" = build ] ; then
|
||||||
# Setup source directory
|
# Setup source directory
|
||||||
mkdir -p "${KERNEL_DIR}"
|
mkdir -p "${KERNEL_DIR}"
|
||||||
|
|
||||||
@@ -798,7 +800,9 @@ if [ "$BUILD_KERNEL" = true ] ; then
|
|||||||
chroot_exec ln -sf /usr/src/linux "/lib/modules/${KERNEL_VERSION}/source"
|
chroot_exec ln -sf /usr/src/linux "/lib/modules/${KERNEL_VERSION}/source"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"download")
|
||||||
else # BUILD_KERNEL=false
|
else # BUILD_KERNEL=false
|
||||||
if [ "$SET_ARCH" = 64 ] ; then
|
if [ "$SET_ARCH" = 64 ] ; then
|
||||||
if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
|
if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
|
||||||
@@ -875,6 +879,14 @@ 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
|
||||||
|
;;
|
||||||
|
|
||||||
|
"uselocal")
|
||||||
|
echo "using local kernel previous run"
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
# 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 +895,4 @@ else # BUILD_KERNEL=false
|
|||||||
cleanup
|
cleanup
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
#fi
|
||||||
|
|||||||
Reference in New Issue
Block a user