From f1e14e2d62421b8479f33e25066be0b60b124453 2018-11-27 15:35:56 From: Unknown Date: 2018-11-27 15:35:56 Subject: [PATCH] a --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 8fa4ef9..b669013 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -22,13 +22,17 @@ if [ "$BUILD_KERNEL" = true ] ; then else # KERNELSRC_DIR="" # Create temporary directory for kernel sources temp_dir=$(as_nobody mktemp -d) - - # Fetch current RPi2/3 kernel sources - if [ -z "${KERNEL_BRANCH}" ] ; then - as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux + + if [ "$ENABLE_NEXMON" = true ] ; then + NEXMON_URL else - as_nobody -H git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" linux - fi + # Fetch current RPi2/3 kernel sources + if [ -z "${KERNEL_BRANCH}" ] ; then + as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux + else + as_nobody -H git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" linux + fi + fi # Copy downloaded kernel sources cp -r "${temp_dir}/linux/"* "${KERNEL_DIR}" @@ -418,7 +422,7 @@ else # BUILD_KERNEL=false if [ "$SET_ARCH" = 64 ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then # Use Sakakis modified kernel if ZSWAP is active - if [ "$KERNEL_ZSWAP" = true ] || ; then + if [ "$KERNEL_ZSWAP" = true ] || [ "$KERNEL_VIRT" = true ] || [ "$KERNEL_NF" = true ] || [ "$KERNEL_BPF" = true ] ; then RPI3_64_KERNEL_URL=RPI3_64_BIS_KERNEL_URL fi diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index dca5968..2529d28 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -156,7 +156,7 @@ UBOOTSRC_DIR=${UBOOTSRC_DIR:=""} ENABLE_UBOOTUSB=${ENABLE_UBOOTUSB=false} ENABLE_FBTURBO=${ENABLE_FBTURBO:=false} ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false} -ENABLE_NEXMON=${ENABLE_NEXMON:="false"} +ENABLE_NEXMON=${ENABLE_NEXMON:=false} VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""} FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""} NEXMON_DIR=${NEXMON_DIR:=""}