##// END OF EJS Templates
a
Unknown -
r450:b8dc6e31e78f
parent child
Show More
@@ -1,77 +1,80
1 1 #
2 2 # Build and Setup nexmon with monitor mode patch
3 3 #
4 4
5 5 # Load utility functions
6 6 . ./functions.sh
7 7
8 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)
12 12
13 13 # Fetch nexmon sources
14 14 as_nobody git -C "${temp_dir}" clone "${NEXMON_URL}"
15 15
16 16 # Copy downloaded nexmon sources
17 17 mv "${temp_dir}/nexmon" "${R}"/tmp/
18 18
19 19 # Set permissions of the nexmon sources
20 20 chown -R root:root "${R}"/tmp/nexmon
21 21
22 22 # Set script Root
23 23 NEXMON_ROOT="${R}"/tmp/nexmon
24 24
25 25 # Remove temporary directory for nexmon sources
26 26 rm -fr "${temp_dir}"
27 27
28 28 # Build nexmon firmware outside the build system, if we can.
29 29 cd "${NEXMON_ROOT}"
30 30
31 31 # Disable statistics
32 32 touch DISABLE_STATISTICS
33 33
34 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
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 source setup_env.sh
43 44
44 45 # Make nexmon
45 46 make
46 47
47 48 # Make ancient isl build
48 49 cd buildtools/isl-0.10
49 50 CC=$CCgcc
50 51 ./configure
51 52 make
52 53
53 54 # build patches
54 55 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then
55 56 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
56 57 make clean
57 58
58 59 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
59 60 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
61 62 # copy RPi0W & RPi3 firmware
63 mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.org.bin
62 64 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin
63 65 cp -f ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin
64 66 fi
65 67
66 68 if [ "$RPI_MODEL" = 3P ] ; then
67 69 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
68 70 make clean
69 71
70 72 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
71 73 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 74
73 75 # RPi3B+ firmware
76 mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.org.bin
74 77 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.nexmon.bin
75 78 cp -f ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin
76 79 fi
77 80 fi
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant