##// END OF EJS Templates
a
Unknown -
r480:125a2ab9f215
parent child
Show More
@@ -5,6 +5,11
5 # Load utility functions
5 # Load utility functions
6 . ./functions.sh
6 . ./functions.sh
7
7
8 # Use kali kernel src if nexmon is enabled
9 if [ "$ENABLE_NEXMON" = true ] ; then
10 KERNEL_URL="${NEXMON_URL}"
11 fi
12
8 # Fetch and build latest raspberry kernel
13 # Fetch and build latest raspberry kernel
9 if [ "$BUILD_KERNEL" = true ] ; then
14 if [ "$BUILD_KERNEL" = true ] ; then
10 # Setup source directory
15 # Setup source directory
@@ -23,11 +28,6 if [ "$BUILD_KERNEL" = true ] ; then
23 # Create temporary directory for kernel sources
28 # Create temporary directory for kernel sources
24 temp_dir=$(as_nobody mktemp -d)
29 temp_dir=$(as_nobody mktemp -d)
25
30
26 # Use kali kernel src if nexmon is enabled
27 if [ "$ENABLE_NEXMON" = true ] ; then
28 KERNEL_URL="${NEXMON_URL}"
29 fi
30
31 # Fetch current RPi2/3 kernel sources
31 # Fetch current RPi2/3 kernel sources
32 if [ -z "${KERNEL_BRANCH}" ] ; then
32 if [ -z "${KERNEL_BRANCH}" ] ; then
33 as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux
33 as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux
@@ -116,6 +116,8 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
116 # Install tools
116 # Install tools
117 install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart"
117 install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart"
118 install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper"
118 install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper"
119 chmod +x "${R}/usr/bin/bthelper"
120 chmod +x "${R}/usr/bin/btuart"
119
121
120 # Install bluetooth udev rule
122 # Install bluetooth udev rule
121 install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules"
123 install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules"
@@ -351,6 +351,11 else # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard
351 fi
351 fi
352 fi
352 fi
353
353
354 if [ "$BUILD_KERNEL" = false ] && [ "$ENABLE_NEXMON" = true ]; then
355 echo "error: You have to compile kernel sources, if you want to enable nexmon"
356 exit 1
357 fi
358
354 # Prepare date string for default image file name
359 # Prepare date string for default image file name
355 DATE="$(date +%Y-%m-%d)"
360 DATE="$(date +%Y-%m-%d)"
356 if [ -z "$KERNEL_BRANCH" ] ; then
361 if [ -z "$KERNEL_BRANCH" ] ; then
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant