##// END OF EJS Templates
zswap userland sup
Unknown -
r459:816670ca587b
parent child
Show More
@@ -91,7 +91,7 if [ "$BUILD_KERNEL" = true ] ; then
91 91 cd "${KERNEL_DIR}" || exit
92 92
93 93 # enable ZSWAP see https://askubuntu.com/a/472227 or https://wiki.archlinux.org/index.php/zswap
94 if [ "$KERNEL_ZSWAP" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then
94 if [ "$KERNEL_ZSWAP" = true ] ; then
95 95 set_kernel_config CONFIG_ZPOOL y
96 96 set_kernel_config CONFIG_ZSWAP y
97 97 set_kernel_config CONFIG_ZBUD y
@@ -109,7 +109,7 if [ "$BUILD_KERNEL" = true ] ; then
109 109 fi
110 110
111 111 # Netfilter kernel support See https://github.com/raspberrypi/linux/issues/2177#issuecomment-354647406
112 if [ "$KERNEL_NF" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then
112 if [ "$KERNEL_NF" = true ] ; then
113 113 set_kernel_config CONFIG_IP_NF_TARGET_SYNPROXY m
114 114 set_kernel_config CONFIG_NETFILTER_XT_MATCH_CGROUP m
115 115 set_kernel_config CONFIG_NETFILTER_XT_MATCH_IPCOMP m
@@ -216,7 +216,7 if [ "$BUILD_KERNEL" = true ] ; then
216 216 fi
217 217
218 218 # Enables BPF syscall for systemd-journald see https://github.com/torvalds/linux/blob/master/init/Kconfig#L848 or https://groups.google.com/forum/#!topic/linux.gentoo.user/_2aSc_ztGpA
219 if [ "$KERNEL_BPF" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then
219 if [ "$KERNEL_BPF" = true ] ; then
220 220 set_kernel_config CONFIG_BPF_SYSCALL y
221 221 set_kernel_config CONFIG_BPF_EVENTS y
222 222 set_kernel_config CONFIG_BPF_STREAM_PARSER y
@@ -64,12 +64,40 if [ "$ENABLE_CRYPTFS" = true ] ; then
64 64 fi
65 65 fi
66 66
67 if [ "$KERNEL_ZSWAP" = true ] ; then
68 # Create temporary directory for systemd-swap sources
69 temp_dir=$(as_nobody mktemp -d)
70
71 # Fetch systemd-swap sources
72 as_nobody git -C "${temp_dir}" clone "${ZSWAP_URL}"
73
74 # Copy downloaded systemd-swap sources
75 mv "${temp_dir}/systemd-swap" "${R}/tmp/"
76
77 # Set permissions of the systemd-swap sources
78 chown -R root:root "${R}/tmp/systemd-swap"
79
80 # Remove temporary directory for systemd-swap sources
81 rm -fr "${temp_dir}"
82
83 # Change into downloaded src dir
84 cd "${R}/tmp/systemd-swap" || exit
85
86 # Build package
87 . ./systemd-swap/package.sh debian
88
89 # Install package
90 chroot_exec dpkg -i /tmp/systemd-swap/systemd-swap-*any.deb
91
92 # Change back into script root dir
93 cd "${WORKDIR}" || exit
94 fi
95
67 96 #locks cpu at max frequency
68 97 if [ "$ENABLE_TURBO" = true ] ; then
69 98 echo "force_turbo=1" >> "${BOOT_DIR}/config.txt"
70 99 # helps to avoid sdcard corruption when force_turbo is enabled.
71 100 echo "boot_delay=1" >> "${BOOT_DIR}/config.txt"
72
73 101 fi
74 102
75 103 if [ "$ENABLE_PRINTK" = true ] ; then
@@ -64,6 +64,8 RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmr
64 64 RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_BIS_KERNEL_URL}
65 65 BLUETOOTH_URL=${BLUETOOTH_URL:=https://github.com/RPi-Distro/pi-bluetooth.git}
66 66 NEXMON_URL=${NEXMON_URL:=https://github.com/seemoo-lab/nexmon.git}
67 ZSWAP_URL=${ZSWAP_URL:=https://github.com/Nefelim4ag/systemd-swap.git}
68
67 69
68 70 # Build directories
69 71 WORKDIR=$(pwd)
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant