From a6984c48132dae15c2549d90f41e46ddd91f55b0 2018-11-26 00:09:03 From: Unknown Date: 2018-11-26 00:09:03 Subject: [PATCH] a --- diff --git a/bootstrap.d/13-kernel.sh b/bootstrap.d/13-kernel.sh index 3ff661f..feea104 100644 --- a/bootstrap.d/13-kernel.sh +++ b/bootstrap.d/13-kernel.sh @@ -88,7 +88,7 @@ if [ "$BUILD_KERNEL" = true ] ; then make -C "${KERNEL_DIR}" ARCH="${KERNEL_ARCH}" CROSS_COMPILE="${CROSS_COMPILE}" "${KERNEL_DEFCONFIG}" #Switch to KERNELSRC_DIR so we can use set_kernel_config - cd "${KERNEL_DIR}" + cd "${KERNEL_DIR}" || exit # enable ZSWAP see https://askubuntu.com/a/472227 or https://wiki.archlinux.org/index.php/zswap if [ "$KERNEL_ZSWAP" = true ] && { [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; } ; then @@ -253,7 +253,7 @@ if [ "$BUILD_KERNEL" = true ] ; then #Revert to previous directory - cd "${WORKDIR}" + cd "${WORKDIR}" || exit # Set kernel configuration parameters to enable qemu emulation if [ "$ENABLE_QEMU" = true ] ; then diff --git a/bootstrap.d/44-nexmon_monitor_patch.sh b/bootstrap.d/44-nexmon_monitor_patch.sh index a936201..8488acf 100644 --- a/bootstrap.d/44-nexmon_monitor_patch.sh +++ b/bootstrap.d/44-nexmon_monitor_patch.sh @@ -1,3 +1,4 @@ +#!/bin/sh # # Build and Setup nexmon with monitor mode patch # @@ -26,7 +27,7 @@ if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then rm -fr "${temp_dir}" # Build nexmon firmware outside the build system, if we can. - cd "${NEXMON_ROOT}" + cd "${NEXMON_ROOT}" || exit # Disable statistics touch DISABLE_STATISTICS @@ -34,51 +35,53 @@ if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then # Setup Enviroment: see https://github.com/NoobieDog/nexmon/blob/master/setup_env.sh #ARCH="${KERNEL_ARCH}" #SUBARCH="${KERNEL_ARCH}" - #KERNEL="${KERNEL_IMAGE}" - #CC="${NEXMON_ROOT}"/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi- - #CCPLUGIN="${NEXMON_ROOT}"/buildtools/gcc-nexmon-plugin/nexmon.so - #ZLIBFLATE="zlib-flate -compress" - #Q=@ - #NEXMON_SETUP_ENV=1 - . ./setup_env.sh + KERNEL="${KERNEL_IMAGE}" + ARCH=arm + SUBARCH=arm + CC="${NEXMON_ROOT}"/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi- + CCPLUGIN="${NEXMON_ROOT}"/buildtools/gcc-nexmon-plugin/nexmon.so + ZLIBFLATE="zlib-flate -compress" + Q=@ + NEXMON_SETUP_ENV=1 + #. ./setup_env.sh # Make nexmon make # Make ancient isl build - cd buildtools/isl-0.10 + cd buildtools/isl-0.10 || exit CC="${CC}"gcc ./configure make # build patches if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then - cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon + cd "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon || exit make clean # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems. - LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH="${KERNEL_ARCH}" CC=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi- + LD_LIBRARY_PATH="${NEXMON_ROOT}"/buildtools/isl-0.10/.libs make ARCH="${KERNEL_ARCH}" CC="${NEXMON_ROOT}"/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi- # copy RPi0W & RPi3 firmware mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.org.bin - cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin - cp -f ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin + cp "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin + cp -f "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin fi if [ "$RPI_MODEL" = 3P ] ; then - cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon + cd "${NEXMON_ROOT}"/patches/bcm43455c0/7_45_154/nexmon || exit make clean # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems. - LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH="${KERNEL_ARCH}" CC=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi- + LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH="${KERNEL_ARCH}" CC="${NEXMON_ROOT}"/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi- # RPi3B+ firmware mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.org.bin - cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.nexmon.bin - cp -f ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin + cp "${NEXMON_ROOT}"/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.nexmon.bin + cp -f "${NEXMON_ROOT}"/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin fi #Revert to previous directory -cd "${WORKDIR}" +cd "${WORKDIR}" || exit fi