diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index f6ee18a..73c0821 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -5,6 +5,11 @@ # Load utility functions . ./functions.sh +# Use kali kernel src if nexmon is enabled +if [ "$ENABLE_NEXMON" = true ] ; then + KERNEL_URL="${NEXMON_URL}" +fi + # Fetch and build latest raspberry kernel if [ "$BUILD_KERNEL" = true ] ; then # Setup source directory @@ -23,11 +28,6 @@ if [ "$BUILD_KERNEL" = true ] ; then # Create temporary directory for kernel sources temp_dir=$(as_nobody mktemp -d) - # Use kali kernel src if nexmon is enabled - if [ "$ENABLE_NEXMON" = true ] ; then - KERNEL_URL="${NEXMON_URL}" - fi - # Fetch current RPi2/3 kernel sources if [ -z "${KERNEL_BRANCH}" ] ; then as_nobody -H git -C "${temp_dir}" clone --depth=1 "${KERNEL_URL}" linux diff --git a/bootstrap.d/15-rpi-config.sh b/bootstrap.d/15-rpi-config.sh index 4328de4..a968d28 100644 --- a/bootstrap.d/15-rpi-config.sh +++ b/bootstrap.d/15-rpi-config.sh @@ -116,6 +116,8 @@ if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then # Install tools install_readonly "${R}/tmp/pi-bluetooth/usr/bin/btuart" "${R}/usr/bin/btuart" install_readonly "${R}/tmp/pi-bluetooth/usr/bin/bthelper" "${R}/usr/bin/bthelper" + chmod +x "${R}/usr/bin/bthelper" + chmod +x "${R}/usr/bin/btuart" # Install bluetooth udev rule install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules" diff --git a/rpi23-gen-image.sh b/rpi23-gen-image.sh index 8a8fe28..42024a1 100755 --- a/rpi23-gen-image.sh +++ b/rpi23-gen-image.sh @@ -351,6 +351,11 @@ else # Raspberry PI 1,1P,2 without Wifi and bluetooth onboard fi fi +if [ "$BUILD_KERNEL" = false ] && [ "$ENABLE_NEXMON" = true ]; then + echo "error: You have to compile kernel sources, if you want to enable nexmon" + exit 1 +fi + # Prepare date string for default image file name DATE="$(date +%Y-%m-%d)" if [ -z "$KERNEL_BRANCH" ] ; then