##// END OF EJS Templates
a
Unknown -
r454:bc762037bb78
parent child
Show More
@@ -1,80 +1,84
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 35 #ARCH="${KERNEL_ARCH}"
36 36 #SUBARCH="${KERNEL_ARCH}"
37 37 #KERNEL="${KERNEL_IMAGE}"
38 38 #CC="${NEXMON_ROOT}"/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
39 39 #CCPLUGIN="${NEXMON_ROOT}"/buildtools/gcc-nexmon-plugin/nexmon.so
40 40 #ZLIBFLATE="zlib-flate -compress"
41 41 #Q=@
42 42 #NEXMON_SETUP_ENV=1
43 source setup_env.sh
43 . ./setup_env.sh
44 44
45 45 # Make nexmon
46 46 make
47 47
48 48 # Make ancient isl build
49 49 cd buildtools/isl-0.10
50 50 CC=$CCgcc
51 51 ./configure
52 52 make
53 53
54 54 # build patches
55 55 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then
56 56 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
57 57 make clean
58 58
59 59 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
60 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-
61 61
62 62 # copy RPi0W & RPi3 firmware
63 63 mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.org.bin
64 64 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin
65 65 cp -f ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin
66 66 fi
67 67
68 68 if [ "$RPI_MODEL" = 3P ] ; then
69 69 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
70 70 make clean
71 71
72 72 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
73 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-
74 74
75 75 # RPi3B+ firmware
76 76 mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.org.bin
77 77 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.nexmon.bin
78 78 cp -f ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin
79 79 fi
80
81 #Revert to previous directory
82 cd "${WORKDIR}"
83
80 84 fi
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant