##// END OF EJS Templates
a
Unknown -
r454:bc762037bb78
parent child
Show More
@@ -1,80 +1,84
1 #
1 #
2 # Build and Setup nexmon with monitor mode patch
2 # Build and Setup nexmon with monitor mode patch
3 #
3 #
4
4
5 # Load utility functions
5 # Load utility functions
6 . ./functions.sh
6 . ./functions.sh
7
7
8 if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = 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)
12
12
13 # Fetch nexmon sources
13 # Fetch nexmon sources
14 as_nobody git -C "${temp_dir}" clone "${NEXMON_URL}"
14 as_nobody git -C "${temp_dir}" clone "${NEXMON_URL}"
15
15
16 # Copy downloaded nexmon sources
16 # Copy downloaded nexmon sources
17 mv "${temp_dir}/nexmon" "${R}"/tmp/
17 mv "${temp_dir}/nexmon" "${R}"/tmp/
18
18
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
22 # Set script Root
23 NEXMON_ROOT="${R}"/tmp/nexmon
23 NEXMON_ROOT="${R}"/tmp/nexmon
24
24
25 # Remove temporary directory for nexmon sources
25 # Remove temporary directory for nexmon sources
26 rm -fr "${temp_dir}"
26 rm -fr "${temp_dir}"
27
27
28 # Build nexmon firmware outside the build system, if we can.
28 # Build nexmon firmware outside the build system, if we can.
29 cd "${NEXMON_ROOT}"
29 cd "${NEXMON_ROOT}"
30
30
31 # Disable statistics
31 # Disable statistics
32 touch DISABLE_STATISTICS
32 touch DISABLE_STATISTICS
33
33
34 # Setup Enviroment: see https://github.com/NoobieDog/nexmon/blob/master/setup_env.sh
34 # Setup Enviroment: see https://github.com/NoobieDog/nexmon/blob/master/setup_env.sh
35 #ARCH="${KERNEL_ARCH}"
35 #ARCH="${KERNEL_ARCH}"
36 #SUBARCH="${KERNEL_ARCH}"
36 #SUBARCH="${KERNEL_ARCH}"
37 #KERNEL="${KERNEL_IMAGE}"
37 #KERNEL="${KERNEL_IMAGE}"
38 #CC="${NEXMON_ROOT}"/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
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
39 #CCPLUGIN="${NEXMON_ROOT}"/buildtools/gcc-nexmon-plugin/nexmon.so
40 #ZLIBFLATE="zlib-flate -compress"
40 #ZLIBFLATE="zlib-flate -compress"
41 #Q=@
41 #Q=@
42 #NEXMON_SETUP_ENV=1
42 #NEXMON_SETUP_ENV=1
43 source setup_env.sh
43 . ./setup_env.sh
44
44
45 # Make nexmon
45 # Make nexmon
46 make
46 make
47
47
48 # Make ancient isl build
48 # Make ancient isl build
49 cd buildtools/isl-0.10
49 cd buildtools/isl-0.10
50 CC=$CCgcc
50 CC=$CCgcc
51 ./configure
51 ./configure
52 make
52 make
53
53
54 # build patches
54 # build patches
55 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then
55 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then
56 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
56 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
57 make clean
57 make clean
58
58
59 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
59 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
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 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 # copy RPi0W & RPi3 firmware
62 # copy RPi0W & RPi3 firmware
63 mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.org.bin
63 mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.org.bin
64 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin
64 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin
65 cp -f ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin
65 cp -f ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin
66 fi
66 fi
67
67
68 if [ "$RPI_MODEL" = 3P ] ; then
68 if [ "$RPI_MODEL" = 3P ] ; then
69 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
69 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
70 make clean
70 make clean
71
71
72 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
72 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
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-
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 # RPi3B+ firmware
75 # RPi3B+ firmware
76 mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.org.bin
76 mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.org.bin
77 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.nexmon.bin
77 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.nexmon.bin
78 cp -f ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin
78 cp -f ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin
79 fi
79 fi
80
81 #Revert to previous directory
82 cd "${WORKDIR}"
83
80 fi
84 fi
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant