##// END OF EJS Templates
Nexmon
Unknown -
r444:8f60b41a284e
parent child
Show More
@@ -0,0 +1,49
1 #
2 # Build and Setup fbturbo Xorg driver
3 #
4
5 # Load utility functions
6 . ./functions.sh
7
8 # Build nexmon firmware outside the build system, if we can.
9 cd "${basedir}"
10 git clone https://github.com/seemoo-lab/nexmon.git "${basedir}"/nexmon --depth 1
11 cd "${basedir}"/nexmon
12 # Disable statistics
13 touch DISABLE_STATISTICS
14 source setup_env.sh
15 ls -lah /usr/lib/x86_64-linux-gnu/libl.a
16 ls -lah /usr/lib/x86_64-linux-gnu/libfl.a
17 make
18 cd buildtools/isl-0.10
19 CC=$CCgcc
20 ./configure
21 make
22 sed -i -e 's/all:.*/all: $(RAM_FILE)/g' ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
23 sed -i -e 's/all:.*/all: $(RAM_FILE)/g' ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/Makefile
24 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
25 # Make sure we use the cross compiler to build the firmware.
26 # We use the x86 cross compiler because we're building on amd64
27 unset CROSS_COMPILE
28 #export CROSS_COMPILE=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
29 make clean
30 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
31 LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH=arm CC=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
32 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
33 make clean
34 LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH=arm CC=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
35 # RPi0w->3B firmware
36 mkdir -p "${basedir}"/kali-${architecture}/lib/firmware/brcm
37 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43430-sdio.nexmon.bin
38 cp ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43430-sdio.bin
39 wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43430-sdio.txt -O "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43430-sdio.txt
40 # RPi3B+ firmware
41 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.nexmon.bin
42 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.bin
43 wget https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/master/brcm/brcmfmac43455-sdio.txt -O "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.txt
44 # Make a backup copy of the rpi firmware in case people don't want to use the nexmon firmware.
45 # The firmware used on the RPi is not the same firmware that is in the firmware-brcm package which is why we do this.
46 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
47 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
48 # This is required for any wifi to work on the RPi 3B+
49 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
@@ -234,7 +234,13 Path to a directory (`xf86-video-fbturbo`) of [hardware accelerated Xorg video d
234 234 Install and enable the [Source code for ARM side libraries for interfacing to Raspberry Pi GPU](https://github.com/raspberrypi/userland) `vcgencmd`. Please note that this driver is currently limited to hardware accelerated window moving and scrolling.
235 235
236 236 ##### `VIDEOCORESRC_DIR`=""
237 Path to a directory (`userland`) 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.
237 Path to a directory (`userland`) of [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) that will be copied, configured, build and installed inside the chroot.
238
239 ##### `ENABLE_NEXMON`=false
240 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).
241
242 ##### `NEXMON_DIR`=""
243 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.
238 244
239 245 ##### `ENABLE_IPTABLES`=false
240 246 Enable iptables IPv4/IPv6 firewall. Simplified ruleset: Allow all outgoing connections. Block all incoming connections except to OpenSSH service.
@@ -74,7 +74,7 if [ "$ENABLE_PRINTK" = true ] ; then
74 74 fi
75 75
76 76 # Install udev rule for serial alias
77 install_readonly files/etc/99-com.rules "${ETC_DIR}/udev/rules.d/99-com.rules"
77 install_readonly files/etc/99-com.rules "${LIB_DIR}/udev/rules.d/99-com.rules"
78 78
79 79 if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] || [ "$RPI_MODEL" = 3P ] ; then
80 80
1 NO CONTENT: file renamed from files/udev/99-com.rules to files/etc/99-com.rules
@@ -63,6 +63,7 RPI3_64_DEF_KERNEL_URL=${RPI3_64_DEF_KERNEL_URL:=https://github.com/sakaki-/bcmr
63 63 #enhanced kernel
64 64 RPI3_64_KERNEL_URL=${RPI3_64_KERNEL_URL:=$RPI3_64_BIS_KERNEL_URL}
65 65 BLUETOOTH_URL=${BLUETOOTH_URL:=https://github.com/RPi-Distro/pi-bluetooth.git}
66 NEXMON_URL=${NEXMON_URL:=https://github.com/seemoo-lab/nexmon.git}
66 67
67 68 # Build directories
68 69 WORKDIR=$(pwd)
@@ -152,6 +153,8 ENABLE_FBTURBO=${ENABLE_FBTURBO:=false}
152 153 ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false}
153 154 VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""}
154 155 FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""}
156 ENABLE_NEXMON=${ENABLE_NEXMON:=""}
157 NEXMON_DIR=${NEXMON_DIR:=""}
155 158 ENABLE_HARDNET=${ENABLE_HARDNET:=false}
156 159 ENABLE_IPTABLES=${ENABLE_IPTABLES:=false}
157 160 ENABLE_SPLITFS=${ENABLE_SPLITFS:=false}
@@ -468,6 +471,12 if [ -n "$FBTURBOSRC_DIR" ] && [ ! -d "$FBTURBOSRC_DIR" ] ; then
468 471 exit 1
469 472 fi
470 473
474 # Check if specified FBTURBOSRC_DIR directory exists
475 if [ -n "$NEXMON_DIR" ] && [ ! -d "$NEXMON_DIR" ] ; then
476 echo "error: '${NEXMON_DIR}' specified directory not found (NEXMON_DIR)!"
477 exit 1
478 fi
479
471 480 # Check if specified CHROOT_SCRIPTS directory exists
472 481 if [ -n "$CHROOT_SCRIPTS" ] && [ ! -d "$CHROOT_SCRIPTS" ] ; then
473 482 echo "error: ${CHROOT_SCRIPTS} specified directory not found (CHROOT_SCRIPTS)!"
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant