From ae0c8abd9bbce02444d57e931b23946c39dc31ba 2019-10-23 22:12:42 From: Unknown Date: 2019-10-23 22:12:42 Subject: [PATCH] Merge branch 'pull' into burn --- diff --git a/README.md b/README.md index fb198ea..3a23406 100644 --- a/README.md +++ b/README.md @@ -218,6 +218,7 @@ Support for halt,init,poweroff,reboot,runlevel,shutdown,telinit commands #### Advanced system features: ##### `ENABLE_KEYGEN`=false Recover your lost codec license + ##### `ENABLE_SYSTEMDSWAP`=false Enables [Systemd-swap service](https://github.com/Nefelim4ag/systemd-swap). Usefull if `KERNEL_ZSWAP` is enabled. diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 7f94ad2..1fc9377 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -53,6 +53,7 @@ if [ "$BUILD_KERNEL" = true ] ; then KERNEL_THREADS=$(grep -c processor /proc/cpuinfo) fi + #Copy 32bit config to 64bit if [ "$ENABLE_QEMU" = true ] && [ "$KERNEL_ARCH" = arm64 ]; then cp "${KERNEL_DIR}"/arch/arm/configs/vexpress_defconfig "${KERNEL_DIR}"/arch/arm64/configs/ fi @@ -394,16 +395,16 @@ if [ "$BUILD_KERNEL" = true ] ; then set_kernel_config CONFIG_VHOST_CROSS_ENDIAN_LEGACY y set_kernel_config CONFIG_VHOST_NET m set_kernel_config CONFIG_VIRTUALIZATION y - set_kernel_config CONFIG_MMU_NOTIFIER y - - set_kernel_config CONFIG_SLAB_FREELIST_RANDOM=y - set_kernel_config CONFIG_SLAB_FREELIST_HARDENED=y - - # erratum - set_kernel_config ARM64_ERRATUM_834220 y - # https://sourceforge.net/p/kvm/mailman/message/18440797/ - set_kernel_config CONFIG_PREEMPT_NOTIFIERS y - fi + set_kernel_config CONFIG_SLAB_FREELIST_RANDOM=y + set_kernel_config CONFIG_SLAB_FREELIST_HARDENED=y + set_kernel_config CONFIG_MMU_NOTIFIER y + + # erratum + set_kernel_config ARM64_ERRATUM_834220 y + + # https://sourceforge.net/p/kvm/mailman/message/18440797/ + set_kernel_config CONFIG_PREEMPT_NOTIFIERS y + fi # enable apparmor,integrity audit, if [ "$KERNEL_SECURITY" = true ] ; then diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index dd92ff2..6a00889 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -213,7 +213,7 @@ if [ "$ENABLE_SYSTEMDSWAP" = true ] ; then # Get Verion VERSION=$(git tag | tail -n 1) - sed -i "s/DEB_NAME=.*/DEB_NAME=systemd-swap_all/g" "${R}/tmp/systemd-swap/package.sh" + #sed -i "s/DEB_NAME=.*/DEB_NAME=systemd-swap_all/g" "${R}/tmp/systemd-swap/package.sh" # Build package bash ./package.sh debian @@ -225,7 +225,7 @@ if [ "$ENABLE_SYSTEMDSWAP" = true ] ; then chown -R root:root "${R}/tmp/systemd-swap" # Install package - IMPROVE AND MAKE IT POSSIBLE WITHOUT VERSION NR. - chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap_all.deb + chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap_"$VERSION"_all.deb # Enable service chroot_exec systemctl enable systemd-swap diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index ffb4c27..85df7ff 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -66,14 +66,16 @@ SYSTEMDSWAP_URL=${SYSTEMDSWAP_URL:=https://github.com/Nefelim4ag/systemd-swap.gi 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} +RPI3_64_BIS_KERNEL_URL=${RPI3_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel-bis/releases/download/4.19.80.20191022/bcmrpi3-kernel-bis-4.19.80.20191022.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} -# Sakaki BIS Kernel RPI4 -RPI4_64_DEF_KERNEL_URL=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.59.20190724/bcm2711-kernel-bis-4.19.59.20190724.tar.xz +RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmrpi3-kernel/releases/download/4.19.80.20191022/bcmrpi3-kernel-4.19.80.20191022.tar.xz} +# Sakaki BIS Kernel RPI4 - https://github.com/sakaki-/bcm2711-kernel-bis +RPI4_64_BIS_KERNEL_URL=${RPI4_64_BIS_KERNEL_URL:=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.59.20190724/bcm2711-kernel-bis-4.19.59.20190724.tar.xz} +# Default precompiled 64bit kernel - https://github.com/sakaki-/bcm2711-kernel +RPI4_64_DEF_KERNEL_URL=${RPI4_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcm2711-kernel-bis/releases/download/4.19.59.20190724/bcm2711-kernel-bis-4.19.59.20190724.tar.xz} # Generic RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_DEF_KERNEL_URL} -RPI4_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI4_64_DEF_KERNEL_URL} +RPI4_64_KERNEL_URL=${RPI4_64_KERNEL_URL:=$RPI4_64_DEF_KERNEL_URL} # Kali kernel src - used if ENABLE_NEXMON=true (they patch the wlan kernel modul) KALI_KERNEL_URL=${KALI_KERNEL_URL:=https://github.com/Re4son/re4son-raspberrypi-linux.git} @@ -396,7 +398,7 @@ fi # Add deps for nexmon if [ "$ENABLE_NEXMON" = true ] ; then - REQUIRED_PACKAGES="${REQUIRED_PACKAGES} libgmp3-dev gawk qpdf bison flex make autoconf automake build-essential libtool" + REQUIRED_PACKAGES="${REQUIRED_PACKAGES} libgmp3-dev gawk qpdf make autoconf automake build-essential libtool" fi # Add libncurses5 to enable kernel menuconfig @@ -481,8 +483,7 @@ if [ -n "$MISSING_PACKAGES" ] ; then [ "$confirm" != "y" ] && exit 1 # Make sure all missing required packages are installed - apt-get update - apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"` + apt-get update && apt-get -qq -y install `echo "${MISSING_PACKAGES}" | sed "s/ //"` fi # Check if ./bootstrap.d directory exists