##// END OF EJS Templates
may break - be caref
Unknown -
r524:213afb8eaa67
parent child
Show More
@@ -8,6 +8,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 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
11 KERNEL_BRANCH=""
12 KERNEL_BRANCH=""
12 KERNELSRC_DIR=""
13 KERNELSRC_DIR=""
13 fi
14 fi
@@ -345,7 +346,6 if [ "$BUILD_KERNEL" = true ] ; then
345 unset_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
346 unset_kernel_config CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE
346 fi
347 fi
347
348
348
349 #Revert to previous directory
349 #Revert to previous directory
350 cd "${WORKDIR}" || exit
350 cd "${WORKDIR}" || exit
351
351
@@ -435,11 +435,6 if [ "$BUILD_KERNEL" = true ] ; then
435 if [ "$KERNEL_HEADERS" = true ] && [ "$KERNEL_REDUCE" = false ] ; then
435 if [ "$KERNEL_HEADERS" = true ] && [ "$KERNEL_REDUCE" = false ] ; then
436 make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" INSTALL_HDR_PATH=../.. headers_install
436 make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" INSTALL_HDR_PATH=../.. headers_install
437 fi
437 fi
438 # make tar.gz kernel package - missing os bzw. modules
439 #** ** ** WARNING ** ** **
440 #Your architecture did not define any architecture-dependent files
441 #to be placed into the tarball. Please add those to ./scripts/package/buildtar .
442 # make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" CC="${cc}" targz-pkg
443
438
444 # Prepare boot (firmware) directory
439 # Prepare boot (firmware) directory
445 mkdir "${BOOT_DIR}"
440 mkdir "${BOOT_DIR}"
@@ -506,8 +501,6 if [ "$BUILD_KERNEL" = true ] ; then
506 fi
501 fi
507
502
508 else # BUILD_KERNEL=false
503 else # BUILD_KERNEL=false
509 # echo Install precompiled kernel...
510 # echo error: not implemented
511 if [ "$SET_ARCH" = 64 ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then
504 if [ "$SET_ARCH" = 64 ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then
512
505
513 # Use Sakakis modified kernel if ZSWAP is active
506 # Use Sakakis modified kernel if ZSWAP is active
@@ -5,7 +5,6
5 # Load utility functions
5 # Load utility functions
6 . ./functions.sh
6 . ./functions.sh
7
7
8 #if [ "$BUILD_KERNEL" = true ] ; then
9 if [ -n "$RPI_FIRMWARE_DIR" ] && [ -d "$RPI_FIRMWARE_DIR" ] ; then
8 if [ -n "$RPI_FIRMWARE_DIR" ] && [ -d "$RPI_FIRMWARE_DIR" ] ; then
10 # Install boot binaries from local directory
9 # Install boot binaries from local directory
11 cp "${RPI_FIRMWARE_DIR}"/boot/bootcode.bin "${BOOT_DIR}"/bootcode.bin
10 cp "${RPI_FIRMWARE_DIR}"/boot/bootcode.bin "${BOOT_DIR}"/bootcode.bin
@@ -38,7 +37,6
38 chown -R root:root "${BOOT_DIR}"
37 chown -R root:root "${BOOT_DIR}"
39 chmod -R 600 "${BOOT_DIR}"
38 chmod -R 600 "${BOOT_DIR}"
40 fi
39 fi
41 #fi
42
40
43 # Setup firmware boot cmdline
41 # Setup firmware boot cmdline
44 if [ "$ENABLE_UBOOTUSB" = true ] ; then
42 if [ "$ENABLE_UBOOTUSB" = true ] ; then
@@ -164,7 +162,7 if [ "$ENABLE_CONSOLE" = true ] ; then
164 CMDLINE="${CMDLINE} console=serial0,115200"
162 CMDLINE="${CMDLINE} console=serial0,115200"
165
163
166 # Enable serial console systemd style
164 # Enable serial console systemd style
167 chroot_exec systemctl enable serial-getty@serial0.service
165 chroot_exec systemctl enable serial-getty\@serial0.service
168 else
166 else
169 echo "enable_uart=0" >> "${BOOT_DIR}/config.txt"
167 echo "enable_uart=0" >> "${BOOT_DIR}/config.txt"
170 fi
168 fi
@@ -9,9 +9,10 if [ "$ENABLE_IPTABLES" = true ] ; then
9 # Create iptables configuration directory
9 # Create iptables configuration directory
10 mkdir -p "${ETC_DIR}/iptables"
10 mkdir -p "${ETC_DIR}/iptables"
11
11
12 # make sure iptables-legacy is the used alternatives
12 if [ "$KERNEL_NF" = false ] ; then
13 #iptables-save and -restore are slaves of iptables and thus are set accordingly
13 # iptables-save and -restore are slaves of iptables and thus are set accordingly
14 chroot_exec update-alternatives --verbose --set iptables /usr/sbin/iptables-legacy
14 chroot_exec update-alternatives --verbose --set iptables /usr/sbin/iptables-legacy
15 fi
15
16
16 # Install iptables systemd service
17 # Install iptables systemd service
17 install_readonly files/iptables/iptables.service "${ETC_DIR}/systemd/system/iptables.service"
18 install_readonly files/iptables/iptables.service "${ETC_DIR}/systemd/system/iptables.service"
@@ -27,9 +28,10 if [ "$ENABLE_IPTABLES" = true ] ; then
27 chroot_exec systemctl enable iptables.service
28 chroot_exec systemctl enable iptables.service
28
29
29 if [ "$ENABLE_IPV6" = true ] ; then
30 if [ "$ENABLE_IPV6" = true ] ; then
30 # make sure ip6tables-legacy is the used alternatives
31 if [ "$KERNEL_NF" = false ] ; then
32 # iptables-save and -restore are slaves of iptables and thus are set accordingly
31 chroot_exec update-alternatives --verbose --set ip6tables /usr/sbin/ip6tables-legacy
33 chroot_exec update-alternatives --verbose --set ip6tables /usr/sbin/ip6tables-legacy
32
34 fi
33 # Install ip6tables systemd service
35 # Install ip6tables systemd service
34 install_readonly files/iptables/ip6tables.service "${ETC_DIR}/systemd/system/ip6tables.service"
36 install_readonly files/iptables/ip6tables.service "${ETC_DIR}/systemd/system/ip6tables.service"
35
37
@@ -8,6 +8,7 INITRAMFS_UBOOT="${INITRAMFS}.uboot"
8 # Extract kernel arch
8 # Extract kernel arch
9 case "${KERNEL_ARCH}" in
9 case "${KERNEL_ARCH}" in
10 arm*) KERNEL_ARCH=arm ;;
10 arm*) KERNEL_ARCH=arm ;;
11 aarch64) KERNEL_ARCH=arm64 ;;
11 esac
12 esac
12
13
13 # Regenerate initramfs
14 # Regenerate initramfs
@@ -186,6 +186,7 KERNEL_VIRT=${KERNEL_VIRT:=false}
186 KERNEL_BPF=${KERNEL_BPF:=false}
186 KERNEL_BPF=${KERNEL_BPF:=false}
187 KERNEL_DEFAULT_GOV=${KERNEL_DEFAULT_GOV:=powersave}
187 KERNEL_DEFAULT_GOV=${KERNEL_DEFAULT_GOV:=powersave}
188 KERNEL_SECURITY=${KERNEL_SECURITY:=false}
188 KERNEL_SECURITY=${KERNEL_SECURITY:=false}
189 KERNEL_NF=${KERNEL_NF:=false}
189
190
190 # Kernel compilation from source directory settings
191 # Kernel compilation from source directory settings
191 KERNELSRC_DIR=${KERNELSRC_DIR:=""}
192 KERNELSRC_DIR=${KERNELSRC_DIR:=""}
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant