From 1f2bf46a6d7cdaaa3b7cfaa44a8b7b7346dc7e3b 2018-11-28 01:39:51 From: Unknown Date: 2018-11-28 01:39:51 Subject: [PATCH] a --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index a14c8fc..f6ee18a 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -23,16 +23,18 @@ if [ "$BUILD_KERNEL" = true ] ; then # Create temporary directory for kernel sources temp_dir=$(as_nobody mktemp -d) + # Use kali kernel src if nexmon is enabled if [ "$ENABLE_NEXMON" = true ] ; then - NEXMON_URL + KERNEL_URL="${NEXMON_URL}" + 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 - # 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 + as_nobody -H git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" linux fi + # Copy downloaded kernel sources cp -r "${temp_dir}/linux/"* "${KERNEL_DIR}" diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 27dec1c..51bc84b 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -56,17 +56,19 @@ COLLABORA_URL=${COLLABORA_URL:=https://repositories.collabora.co.uk/debian} FBTURBO_URL=${FBTURBO_URL:=https://github.com/ssvb/xf86-video-fbturbo.git} UBOOT_URL=${UBOOT_URL:=https://git.denx.de/u-boot.git} VIDEOCORE_URL=${VIDEOCORE_URL:=https://github.com/raspberrypi/userland} -#BIS= Kernel has KVM and zswap enabled -RPI3_64_BIS_KERNEL_URL=${RPI3_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel-bis/releases/download/4.14.80.20181113/bcmrpi3-kernel-bis-4.14.80.20181113.tar.xz} -#default bcmrpi3_defconfig target kernel -RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel/releases/download/4.14.80.20181113/bcmrpi3-kernel-4.14.80.20181113.tar.xz} -#enhanced kernel -RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_DEF_KERNEL_URL} BLUETOOTH_URL=${BLUETOOTH_URL:=https://github.com/RPi-Distro/pi-bluetooth.git} NEXMON_URL=${NEXMON_URL:=https://github.com/seemoo-lab/nexmon.git} SYSTEMDSWAP_URL=${SYSTEMDSWAP_URL:=https://github.com/Nefelim4ag/systemd-swap.git} + +# Kernel deb packages for 32bit kernel RPI_32_KERNEL_URL=${RPI_32_KERNEL_URL:=https://github.com/hypriot/rpi-kernel/releases/download/v4.14.34/raspberrypi-kernel_20180422-141901_armhf.deb} RPI_32_KERNELHEADER_URL=${RPI_32_KERNELHEADER_URL:=https://github.com/hypriot/rpi-kernel/releases/download/v4.14.34/raspberrypi-kernel-headers_20180422-141901_armhf.deb} +# Kernel has KVM and zswap enabled - use if KERNEL_* parameters and precompiled kernel are used +RPI3_64_BIS_KERNEL_URL=${RPI3_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel-bis/releases/download/4.14.80.20181113/bcmrpi3-kernel-bis-4.14.80.20181113.tar.xz} +# Default precompiled 64bit kernel +RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel/releases/download/4.14.80.20181113/bcmrpi3-kernel-4.14.80.20181113.tar.xz} +# Generic +RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_DEF_KERNEL_URL} # Build directories WORKDIR=$(pwd)