##// 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 install_readonly "${R}/tmp/pi-bluetooth/lib/udev/rules.d/90-pi-bluetooth.rules" "${LIB_DIR}/udev/rules.d/90-pi-bluetooth.rules"
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 # Install Firmware Flash file and apropiate licence
109 # Install Firmware Flash file and apropiate licence
110 mkdir "${ETC_DIR}/firmware/"
110 mkdir -p "$BLUETOOTH_FIRMWARE_DIR"
111 install_readonly "${R}/tmp/pi-bluetooth/LICENCE.broadcom_bcm43xx" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx"
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" "${ETC_DIR}/firmware/LICENCE.broadcom_bcm43xx"
112 install_readonly "${R}/tmp/pi-bluetooth/BCM43430A1.hcd" "${BLUETOOTH_FIRMWARE_DIR}/LICENCE.broadcom_bcm43xx"
113 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service"
113 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.bthelper@.service" "${ETC_DIR}/systemd/system/pi-bluetooth.bthelper@.service"
114 install_readonly "${R}/tmp/pi-bluetooth/debian/pi-bluetooth.hciuart.service" "${ETC_DIR}/systemd/system/pi-bluetooth.hciuart.service"
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 # Load utility functions
5 # Load utility functions
6 . ./functions.sh
6 . ./functions.sh
7
7
8 if [ "$ENABLE_NEXMON" = true ] ; then
8 if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
9
9
10 # Create temporary directory for nexmon sources
10 # Create temporary directory for nexmon sources
11 temp_dir=$(as_nobody mktemp -d)
11 temp_dir=$(as_nobody mktemp -d)
@@ -19,48 +19,59 if [ "$ENABLE_NEXMON" = true ] ; then
19 # Set permissions of the nexmon sources
19 # Set permissions of the nexmon sources
20 chown -R root:root "${R}"/tmp/nexmon
20 chown -R root:root "${R}"/tmp/nexmon
21
21
22 # Set script Root
23 NEXMON_ROOT="${R}"/tmp/nexmon
24
22 # Remove temporary directory for nexmon sources
25 # Remove temporary directory for nexmon sources
23 rm -fr "${temp_dir}"
26 rm -fr "${temp_dir}"
24 fi
27
25 # Build nexmon firmware outside the build system, if we can.
28 # Build nexmon firmware outside the build system, if we can.
26 cd "${R}"/tmp/nexmon
29 cd "${NEXMON_ROOT}"
30
27 # Disable statistics
31 # Disable statistics
28 touch DISABLE_STATISTICS
32 touch DISABLE_STATISTICS
29 # Setup Enviroment
33
30 source setup_env.sh
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
31 # Make nexmon
44 # Make nexmon
32 make
45 make
33
46
34 # Make ancient isl build
47 # Make ancient isl build
35 cd buildtools/isl-0.10
48 cd buildtools/isl-0.10
36 CC="$CROSS_COMPILE"
49 CC=$CCgcc
37 ./configure
50 ./configure
38 make
51 make
39
52
40 # build patches
53 # build patches
54 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then
41 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
55 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
56 make clean
57
47 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
58 # 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"
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
49 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
67 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
50 make clean
68 make clean
51 LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH=arm CC="$CROSS_COMPILE"
69
52 # RPi0w->3B firmware
70 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
53 mkdir -p "${basedir}"/kali-${architecture}/lib/firmware/brcm
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-
54 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43430-sdio.nexmon.bin
72
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
73 # 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
74 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/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
75 cp -f ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/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
76 fi
61 # Make a backup copy of the rpi firmware in case people don't want to use the nexmon firmware.
77 fi
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
@@ -77,6 +77,7 LIB_DIR="${R}/lib"
77 BOOT_DIR="${R}/boot/firmware"
77 BOOT_DIR="${R}/boot/firmware"
78 KERNEL_DIR="${R}/usr/src/linux"
78 KERNEL_DIR="${R}/usr/src/linux"
79 WLAN_FIRMWARE_DIR="${LIB_DIR}/firmware/brcm"
79 WLAN_FIRMWARE_DIR="${LIB_DIR}/firmware/brcm"
80 BLUETOOTH_FIRMWARE_DIR="${ETC_DIR}/firmware/bt"
80
81
81 # Firmware directory: Blank if download from github
82 # Firmware directory: Blank if download from github
82 RPI_FIRMWARE_DIR=${RPI_FIRMWARE_DIR:=""}
83 RPI_FIRMWARE_DIR=${RPI_FIRMWARE_DIR:=""}
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant