##// END OF EJS Templates
- added new kernel features asked in interactive setup while compiling...
Unknown -
r522:b527883a9d40
parent child
Show More
@@ -7,9 +7,10
7
7
8 # Need to use kali kernel src if nexmon is enabled
8 # Need to use kali kernel src if nexmon is enabled
9 if [ "$ENABLE_NEXMON" = true ] ; then
9 if [ "$ENABLE_NEXMON" = true ] ; then
10 echo "WARNING: if ENABLE_NEXMON is used remember to put the CORRECT KERNELSRC IN KERNELSRC_DIR!!!!!1!"
11 KERNEL_URL="${KALI_KERNEL_URL}"
10 KERNEL_URL="${KALI_KERNEL_URL}"
11 # Clear Branch and KernelSRC_DIR if using nexmon. Everyone will forget to clone kali kernel instead of nomrla kernel
12 KERNEL_BRANCH=""
12 KERNEL_BRANCH=""
13 KERNELSRC_DIR=""
13 fi
14 fi
14
15
15 # Fetch and build latest raspberry kernel
16 # Fetch and build latest raspberry kernel
@@ -159,7 +160,7 if [ "$BUILD_KERNEL" = true ] ; then
159 # New Options
160 # New Options
160 if [ "$KERNEL_NF" = true ] ; then
161 if [ "$KERNEL_NF" = true ] ; then
161 set_kernel_config CONFIG_IP_NF_SECURITY m
162 set_kernel_config CONFIG_IP_NF_SECURITY m
162 set_kernel_config CONFIG_NETLABEL m
163 set_kernel_config CONFIG_NETLABEL y
163 set_kernel_config CONFIG_IP6_NF_SECURITY m
164 set_kernel_config CONFIG_IP6_NF_SECURITY m
164 fi
165 fi
165 set_kernel_config CONFIG_SECURITY_SELINUX n
166 set_kernel_config CONFIG_SECURITY_SELINUX n
@@ -178,6 +179,25 if [ "$BUILD_KERNEL" = true ] ; then
178 set_kernel_config CONFIG_SYSTEM_EXTRA_CERTIFICATE y
179 set_kernel_config CONFIG_SYSTEM_EXTRA_CERTIFICATE y
179 set_kernel_config CONFIG_SECONDARY_TRUSTED_KEYRING y
180 set_kernel_config CONFIG_SECONDARY_TRUSTED_KEYRING y
180 set_kernel_config CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY n
181 set_kernel_config CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY n
182 set_kernel_config CONFIG_SYSTEM_TRUSTED_KEYS m
183 set_kernel_config CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE 4096
184
185 set_kernel_config CONFIG_ARM64_CRYPTO y
186 set_kernel_config CONFIG_CRYPTO_SHA256_ARM64 m
187 set_kernel_config CONFIG_CRYPTO_SHA512_ARM64 m
188 set_kernel_config CONFIG_CRYPTO_SHA1_ARM64_CE m
189 set_kernel_config CRYPTO_GHASH_ARM64_CE m
190 set_kernel_config CRYPTO_SHA2_ARM64_CE m
191 set_kernel_config CONFIG_CRYPTO_CRCT10DIF_ARM64_CE m
192 set_kernel_config CONFIG_CRYPTO_CRC32_ARM64_CE m
193 set_kernel_config CONFIG_CRYPTO_AES_ARM64 m
194 set_kernel_config CONFIG_CRYPTO_AES_ARM64_CE m
195 set_kernel_config CONFIG_CRYPTO_AES_ARM64_CE_CCM y
196 set_kernel_config CONFIG_CRYPTO_AES_ARM64_CE_BLK y
197 set_kernel_config CONFIG_CRYPTO_AES_ARM64_NEON_BLK m
198 set_kernel_config CONFIG_CRYPTO_CHACHA20_NEON m
199 set_kernel_config CONFIG_CRYPTO_AES_ARM64_BS m
200 set_kernel_config SYSTEM_TRUSTED_KEYS
181 fi
201 fi
182
202
183 # Netfilter kernel support See https://github.com/raspberrypi/linux/issues/2177#issuecomment-354647406
203 # Netfilter kernel support See https://github.com/raspberrypi/linux/issues/2177#issuecomment-354647406
@@ -326,8 +346,6 if [ "$BUILD_KERNEL" = true ] ; then
326 unset_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
346 unset_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
327 fi
347 fi
328
348
329
330
331 #Revert to previous directory
349 #Revert to previous directory
332 cd "${WORKDIR}" || exit
350 cd "${WORKDIR}" || exit
333
351
@@ -8,6 +8,11
8 # Install and setup fstab
8 # Install and setup fstab
9 install_readonly files/mount/fstab "${ETC_DIR}/fstab"
9 install_readonly files/mount/fstab "${ETC_DIR}/fstab"
10
10
11 if [ "$ENABLE_UBOOTUSB" = true ] ; then
12 sed -i "s/mmcblk0p1/sda1/" "${ETC_DIR}/fstab"
13 sed -i "s/mmcblk0p2/sda2/" "${ETC_DIR}/fstab"
14 fi
15
11 # Add usb/sda disk root partition to fstab
16 # Add usb/sda disk root partition to fstab
12 if [ "$ENABLE_SPLITFS" = true ] && [ "$ENABLE_CRYPTFS" = false ] ; then
17 if [ "$ENABLE_SPLITFS" = true ] && [ "$ENABLE_CRYPTFS" = false ] ; then
13 sed -i "s/mmcblk0p2/sda1/" "${ETC_DIR}/fstab"
18 sed -i "s/mmcblk0p2/sda1/" "${ETC_DIR}/fstab"
@@ -29,7 +34,7 if [ "$ENABLE_CRYPTFS" = true ] ; then
29 fi
34 fi
30
35
31 # Generate initramfs file
36 # Generate initramfs file
32 if [ "$BUILD_KERNEL" = true ] && [ "$ENABLE_INITRAMFS" = true ] ; then
37 if [ "$ENABLE_INITRAMFS" = true ] ; then
33 if [ "$ENABLE_CRYPTFS" = true ] ; then
38 if [ "$ENABLE_CRYPTFS" = true ] ; then
34 # Include initramfs scripts to auto expand encrypted root partition
39 # Include initramfs scripts to auto expand encrypted root partition
35 if [ "$EXPANDROOT" = true ] ; then
40 if [ "$EXPANDROOT" = true ] ; then
@@ -78,6 +78,11 if [ "$ENABLE_UBOOT" = true ] ; then
78 sed -i "s|bootz|booti|g" "${BOOT_DIR}/uboot.mkimage"
78 sed -i "s|bootz|booti|g" "${BOOT_DIR}/uboot.mkimage"
79 fi
79 fi
80
80
81 # instead of sd, boot from usb device
82 if [ "$ENABLE_UBOOTUSB" = true ] ; then
83 sed -i "s|mmc|usb|g" "${BOOT_DIR}/uboot.mkimage"
84 fi
85
81 # Set mkfile to use the correct dtb file
86 # Set mkfile to use the correct dtb file
82 sed -i "s|bcm2709-rpi-2-b.dtb|${DTB_FILE}|" "${BOOT_DIR}/uboot.mkimage"
87 sed -i "s|bcm2709-rpi-2-b.dtb|${DTB_FILE}|" "${BOOT_DIR}/uboot.mkimage"
83
88
@@ -157,6 +157,7 ENABLE_MINBASE=${ENABLE_MINBASE:=false}
157 ENABLE_REDUCE=${ENABLE_REDUCE:=false}
157 ENABLE_REDUCE=${ENABLE_REDUCE:=false}
158 ENABLE_UBOOT=${ENABLE_UBOOT:=false}
158 ENABLE_UBOOT=${ENABLE_UBOOT:=false}
159 UBOOTSRC_DIR=${UBOOTSRC_DIR:=""}
159 UBOOTSRC_DIR=${UBOOTSRC_DIR:=""}
160 ENABLE_UBOOTUSB=${ENABLE_UBOOTUSB=false}
160 ENABLE_FBTURBO=${ENABLE_FBTURBO:=false}
161 ENABLE_FBTURBO=${ENABLE_FBTURBO:=false}
161 ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false}
162 ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false}
162 ENABLE_NEXMON=${ENABLE_NEXMON:=false}
163 ENABLE_NEXMON=${ENABLE_NEXMON:=false}
@@ -318,6 +319,17 case "$RPI_MODEL" in
318 ;;
319 ;;
319 esac
320 esac
320
321
322 if [ "$ENABLE_UBOOTUSB" = true ] ; then
323 if [ "$ENABLE_UBOOT" = false ] ; then
324 echo "error: Enabling UBOOTUSB requires u-boot to be enabled"
325 exit 1
326 fi
327 if [ "$RPI_MODEL" != 3 ] || [ "$RPI_MODEL" != 3P ] ; then
328 echo "error: Enabling UBOOTUSB requires Raspberry 3"
329 exit 1
330 fi
331 fi
332
321 # Raspberry PI 0,3,3P with Bluetooth and Wifi onboard
333 # Raspberry PI 0,3,3P with Bluetooth and Wifi onboard
322 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
334 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
323 # Include bluetooth packages on supported boards
335 # Include bluetooth packages on supported boards
@@ -398,14 +410,6 if [ "$ENABLE_UBOOT" = true ] ; then
398 APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bison,flex,bc"
410 APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bison,flex,bc"
399 fi
411 fi
400
412
401 if [ "$ENABLE_BLUETOOTH" = true ] ; then
402 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
403 if [ "$ENABLE_CONSOLE" = false ] ; then
404 APT_INCLUDES="${APT_INCLUDES},bluetooth,bluez"
405 fi
406 fi
407 fi
408
409 # Check if root SSH (v2) public key file exists
413 # Check if root SSH (v2) public key file exists
410 if [ -n "$SSH_ROOT_PUB_KEY" ] ; then
414 if [ -n "$SSH_ROOT_PUB_KEY" ] ; then
411 if [ ! -f "$SSH_ROOT_PUB_KEY" ] ; then
415 if [ ! -f "$SSH_ROOT_PUB_KEY" ] ; then
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant