Added triple choice for kernel : build download or uselocal
This commit is contained in:
@@ -14,7 +14,9 @@ if [ "$ENABLE_NEXMON" = true ] ; then
|
||||
fi
|
||||
|
||||
# Fetch and build latest raspberry kernel
|
||||
if [ "$BUILD_KERNEL" = true ] ; then
|
||||
case "$BUILD_KERNEL" in
|
||||
"build")
|
||||
#if [ "$BUILD_KERNEL" = build ] ; then
|
||||
# Setup source directory
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
"download")
|
||||
else # BUILD_KERNEL=false
|
||||
if [ "$SET_ARCH" = 64 ] ; then
|
||||
if [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
|
||||
@@ -875,12 +879,20 @@ else # BUILD_KERNEL=false
|
||||
rm -fr "${temp_dir}"
|
||||
rm -f "${R}"/tmp/kernel.deb
|
||||
fi
|
||||
|
||||
# Check if kernel installation was successful
|
||||
KERNEL="$(ls -1 "${R}"/boot/firmware/kernel* | sort | tail -n 1)"
|
||||
if [ -z "$KERNEL" ] ; then
|
||||
echo "error: kernel installation failed! (/boot/kernel* not found)"
|
||||
cleanup
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
"uselocal")
|
||||
echo "using local kernel previous run"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Check if kernel installation was successful
|
||||
KERNEL="$(ls -1 "${R}"/boot/firmware/kernel* | sort | tail -n 1)"
|
||||
if [ -z "$KERNEL" ] ; then
|
||||
echo "error: kernel installation failed! (/boot/kernel* not found)"
|
||||
cleanup
|
||||
exit 1
|
||||
fi
|
||||
#fi
|
||||
|
||||
Reference in New Issue
Block a user