##// END OF EJS Templates
a
Unknown -
r446:2de12eedefc7
parent child
Show More
@@ -107,9 +107,9 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
107 107 install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules"
108 108
109 109 # Install Firmware Flash file and apropiate licence
110 mkdir "${ETC_DIR}/firmware/"
111 install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx"
112 install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx"
110 mkdir -p "$BLUETOOTH_FIRMWARE_DIR"
111 install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx"
112 install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx"
113 113 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service"
114 114 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service"
115 115
@@ -5,7 +5,7
5 5 # Load utility functions
6 6 . ./functions.sh
7 7
8 if [ "$ENABLE_NEXMON" = true ] ; then
8 if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
9 9
10 10 # Create temporary directory for nexmon sources
11 11 temp_dir=$(as_nobody mktemp -d)
@@ -18,49 +18,60 if [ "$ENABLE_NEXMON" = true ] ; then
18 18
19 19 # Set permissions of the nexmon sources
20 20 chown -R root:root "${R}"/tmp/nexmon
21
22 # Set script Root
23 NEXMON_ROOT="${R}"/tmp/nexmon
21 24
22 25 # Remove temporary directory for nexmon sources
23 26 rm -fr "${temp_dir}"
24 fi
25 # Build nexmon firmware outside the build system, if we can.
26 cd "${R}"/tmp/nexmon
27 # Disable statistics
28 touch DISABLE_STATISTICS
29 # Setup Enviroment
30 source setup_env.sh
31 # Make nexmon
32 make
33 27
34 # Make ancient isl build
35 cd buildtools/isl-0.10
36 CC="$CROSS_COMPILE"
37 ./configure
38 make
28 # Build nexmon firmware outside the build system, if we can.
29 cd "${NEXMON_ROOT}"
30
31 # Disable statistics
32 touch DISABLE_STATISTICS
33
34 # Setup Enviroment: see https://github.com/NoobieDog/nexmon/blob/master/setup_env.sh
35 ARCH="${KERNEL_ARCH}"
36 SUBARCH="${KERNEL_ARCH}"
37 KERNEL="${KERNEL_IMAGE}"
38 CC="${NEXMON_ROOT}"/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
39 CCPLUGIN="${NEXMON_ROOT}"/buildtools/gcc-nexmon-plugin/nexmon.so
40 ZLIBFLATE="zlib-flate -compress"
41 Q=@
42 NEXMON_SETUP_ENV=1
43
44 # Make nexmon
45 make
46
47 # Make ancient isl build
48 cd buildtools/isl-0.10
49 CC=$CCgcc
50 ./configure
51 make
39 52
40 # build patches
41 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
42 # Make sure we use the cross compiler to build the firmware.
43 # We use the x86 cross compiler because we're building on amd64
44 #unset CROSS_COMPILE
45 #export CROSS_COMPILE=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
46 make clean
47 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
48 LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH=arm CC="$CROSS_COMPILE"
49 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
50 make clean
51 LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH=arm CC="$CROSS_COMPILE"
52 # RPi0w->3B firmware
53 mkdir -p "${basedir}"/kali-${architecture}/lib/firmware/brcm
54 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43430-sdio.nexmon.bin
55 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43430-sdio.bin
56 #wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43430-sdio.txt -O "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43430-sdio.txt
57 # RPi3B+ firmware
58 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.nexmon.bin
59 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.bin
60 #wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.txt -O "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.txt
61 # Make a backup copy of the rpi firmware in case people don't want to use the nexmon firmware.
62 # The firmware used on the RPi is not the same firmware that is in the firmware-brcm package which is why we do this.
63 #wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43430-sdio.bin -O "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43430-sdio.rpi.bin
64 #wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.bin -O "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.rpi.bin
65 # This is required for any wifi to work on the RPi 3B+
66 #wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.clm_blob -O "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
53 # build patches
54 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then
55 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
56 make clean
57
58 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
59 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-
60
61 # copy RPi0W & RPi3 firmware
62 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin
63 cp -f ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin
64 fi
65
66 if [ "$RPI_MODEL" = 3P ] ; then
67 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
68 make clean
69
70 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
71 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-
72
73 # RPi3B+ firmware
74 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.nexmon.bin
75 cp -f ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin
76 fi
77 fi
@@ -77,6 +77,7 LIB_DIR="${R}/lib"
77 77 BOOT_DIR="${R}/boot/firmware"
78 78 KERNEL_DIR="${R}/usr/src/linux"
79 79 WLAN_FIRMWARE_DIR="${LIB_DIR}/firmware/brcm"
80 BLUETOOTH_FIRMWARE_DIR="${ETC_DIR}/firmware/bt"
80 81
81 82 # Firmware directory: Blank if download from github
82 83 RPI_FIRMWARE_DIR=${RPI_FIRMWARE_DIR:=""}
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant