##// END OF EJS Templates
a
Unknown -
r471:88966a4516b3
parent child
Show More
@@ -242,7 +242,7 Path to a directory (`userland`) of [Source code for a C-based firmware patching
242 ##### `ENABLE_NEXMON`=false
242 ##### `ENABLE_NEXMON`=false
243 Install and enable the [Source code for a C-based firmware patching framework for Broadcom/Cypress WiFi chips that enables you to write your own firmware patches, for example, to enable monitor mode with radiotap headers and frame injection](https://github.com/seemoo-lab/nexmon.git).
243 Install and enable the [Source code for a C-based firmware patching framework for Broadcom/Cypress WiFi chips that enables you to write your own firmware patches, for example, to enable monitor mode with radiotap headers and frame injection](https://github.com/seemoo-lab/nexmon.git).
244
244
245 ##### `NEXMON_DIR`=""
245 ##### `NEXMONSRC_DIR`=""
246 Path to a directory (`nexmon`) of [Source code for ARM side libraries for interfacing to Raspberry Pi GPU](https://github.com/raspberrypi/userland) that will be copied, configured, build and installed inside the chroot.
246 Path to a directory (`nexmon`) of [Source code for ARM side libraries for interfacing to Raspberry Pi GPU](https://github.com/raspberrypi/userland) that will be copied, configured, build and installed inside the chroot.
247
247
248 ##### `ENABLE_IPTABLES`=false
248 ##### `ENABLE_IPTABLES`=false
@@ -32,8 +32,7 if [ "$BUILD_KERNEL" = true ] ; then
32 else
32 else
33 as_nobody -H git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" linux
33 as_nobody -H git -C "${temp_dir}" clone --depth=1 --branch "${KERNEL_BRANCH}" "${KERNEL_URL}" linux
34 fi
34 fi
35 fi
35 fi
36
37 # Copy downloaded kernel sources
36 # Copy downloaded kernel sources
38 cp -r "${temp_dir}/linux/"* "${KERNEL_DIR}"
37 cp -r "${temp_dir}/linux/"* "${KERNEL_DIR}"
39
38
@@ -5,7 +5,7
5 # Load utility functions
5 # Load utility functions
6 . ./functions.sh
6 . ./functions.sh
7
7
8 if [ "$BUILD_KERNEL" = true ] ; then
8 #if [ "$BUILD_KERNEL" = true ] ; then
9 if [ -n "$RPI_FIRMWARE_DIR" ] && [ -d "$RPI_FIRMWARE_DIR" ] ; then
9 if [ -n "$RPI_FIRMWARE_DIR" ] && [ -d "$RPI_FIRMWARE_DIR" ] ; then
10 # Install boot binaries from local directory
10 # Install boot binaries from local directory
11 cp "${RPI_FIRMWARE_DIR}"/boot/bootcode.bin "${BOOT_DIR}"/bootcode.bin
11 cp "${RPI_FIRMWARE_DIR}"/boot/bootcode.bin "${BOOT_DIR}"/bootcode.bin
@@ -38,7 +38,7 if [ "$BUILD_KERNEL" = true ] ; then
38 chown -R root:root "${BOOT_DIR}"
38 chown -R root:root "${BOOT_DIR}"
39 chmod -R 600 "${BOOT_DIR}"
39 chmod -R 600 "${BOOT_DIR}"
40 fi
40 fi
41 fi
41 #fi
42
42
43 # Setup firmware boot cmdline
43 # Setup firmware boot cmdline
44 if [ "$ENABLE_UBOOTUSB" = true ] ; then
44 if [ "$ENABLE_UBOOTUSB" = true ] ; then
@@ -7,28 +7,39
7 . ./functions.sh
7 . ./functions.sh
8
8
9 if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
9 if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
10 # Copy existing nexmon sources into chroot directory
11 if [ -n "$NEXMONSRC_DIR" ] && [ -d "$NEXMONSRC_DIR" ] ; then
12 # Copy local U-Boot sources
13 cp -r "${NEXMONSRC_DIR}" "${R}/tmp"
14 else
15 # Create temporary directory for nexmon sources
16 temp_dir=$(as_nobody mktemp -d)
10
17
11 # Create temporary directory for nexmon sources
18 # Fetch nexmon sources
12 temp_dir=$(as_nobody mktemp -d)
19 as_nobody git -C "${temp_dir}" clone "${NEXMON_URL}"
13
20
14 # Fetch nexmon sources
21 # Copy downloaded nexmon sources
15 as_nobody git -C "${temp_dir}" clone "${NEXMON_URL}"
22 mv "${temp_dir}/nexmon" "${R}"/tmp/
16
23
17 # Copy downloaded nexmon sources
24 # Set permissions of the nexmon sources
18 mv "${temp_dir}/nexmon" "${R}"/tmp/
25 chown -R root:root "${R}"/tmp/nexmon
19
26
20 # Set permissions of the nexmon sources
27 # Remove temporary directory for nexmon sources
21 chown -R root:root "${R}"/tmp/nexmon
28 rm -fr "${temp_dir}"
22
29 fi
30
23 # Set script Root
31 # Set script Root
24 export NEXMON_ROOT="${R}"/tmp/nexmon
32 export NEXMON_ROOT="${R}"/tmp/nexmon
25
33
26 # Remove temporary directory for nexmon sources
27 rm -fr "${temp_dir}"
28
29 # Build nexmon firmware outside the build system, if we can.
34 # Build nexmon firmware outside the build system, if we can.
30 cd "${NEXMON_ROOT}" || exit
35 cd "${NEXMON_ROOT}" || exit
31
36
37 # Make ancient isl build
38 cd buildtools/isl-0.10 || exit
39 CC="${CC}"gcc
40 ./configure
41 make
42
32 # Disable statistics
43 # Disable statistics
33 touch DISABLE_STATISTICS
44 touch DISABLE_STATISTICS
34
45
@@ -49,12 +60,6 if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
49
60
50 # Make nexmon
61 # Make nexmon
51 make
62 make
52
53 # Make ancient isl build
54 cd buildtools/isl-0.10 || exit
55 CC="${CC}"gcc
56 ./configure
57 make
58
63
59 # Backup stock broadcom wlan driver - "${LIB_DIR}"/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
64 # Backup stock broadcom wlan driver - "${LIB_DIR}"/modules/${KERNEL_VERSION}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
60 brcmfmac_path=$(modinfo brcmfmac | grep -m 1 -oP "^filename:(\s*?)(.*)$" | sed -e 's/^filename:\(\s*\)\(.*\)$/\2/g')
65 brcmfmac_path=$(modinfo brcmfmac | grep -m 1 -oP "^filename:(\s*?)(.*)$" | sed -e 's/^filename:\(\s*\)\(.*\)$/\2/g')
@@ -159,7 +159,7 ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false}
159 ENABLE_NEXMON=${ENABLE_NEXMON:=false}
159 ENABLE_NEXMON=${ENABLE_NEXMON:=false}
160 VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""}
160 VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""}
161 FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""}
161 FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""}
162 NEXMON_DIR=${NEXMON_DIR:=""}
162 NEXMONSRC_DIR=${NEXMONSRC_DIR:=""}
163 ENABLE_HARDNET=${ENABLE_HARDNET:=false}
163 ENABLE_HARDNET=${ENABLE_HARDNET:=false}
164 ENABLE_IPTABLES=${ENABLE_IPTABLES:=false}
164 ENABLE_IPTABLES=${ENABLE_IPTABLES:=false}
165 ENABLE_SPLITFS=${ENABLE_SPLITFS:=false}
165 ENABLE_SPLITFS=${ENABLE_SPLITFS:=false}
@@ -372,6 +372,11 if [ "$ENABLE_VIDEOCORE" = true ] ; then
372 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cmake"
372 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} cmake"
373 fi
373 fi
374
374
375 # Add deps for nexmon
376 if [ "$ENABLE_NEXMON" = true ] ; then
377 REQUIRED_PACKAGES="${REQUIRED_PACKAGES},libgmp3-dev,gawk,qpdf,bison,flex,make,autoconf,automake,build-essential,libtool"
378 fi
379
375 # Add libncurses5 to enable kernel menuconfig
380 # Add libncurses5 to enable kernel menuconfig
376 if [ "$KERNEL_MENUCONFIG" = true ] ; then
381 if [ "$KERNEL_MENUCONFIG" = true ] ; then
377 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} libncurses-dev"
382 REQUIRED_PACKAGES="${REQUIRED_PACKAGES} libncurses-dev"
@@ -486,9 +491,9 if [ -n "$FBTURBOSRC_DIR" ] && [ ! -d "$FBTURBOSRC_DIR" ] ; then
486 exit 1
491 exit 1
487 fi
492 fi
488
493
489 # Check if specified NEXMON_DIR directory exists
494 # Check if specified NEXMONSRC_DIR directory exists
490 if [ -n "$NEXMON_DIR" ] && [ ! -d "$NEXMON_DIR" ] ; then
495 if [ -n "$NEXMONSRC_DIR" ] && [ ! -d "$NEXMONSRC_DIR" ] ; then
491 echo "error: '${NEXMON_DIR}' specified directory not found (NEXMON_DIR)!"
496 echo "error: '${NEXMONSRC_DIR}' specified directory not found (NEXMONSRC_DIR)!"
492 exit 1
497 exit 1
493 fi
498 fi
494
499
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant