##// END OF EJS Templates
a
Unknown -
r445:d226b39f2858
parent child
Show More
@@ -5,45 +5,62
5 # Load utility functions
5 # Load utility functions
6 . ./functions.sh
6 . ./functions.sh
7
7
8 if [ "$ENABLE_NEXMON" = true ] ; then
9
10 # Create temporary directory for nexmon sources
11 temp_dir=$(as_nobody mktemp -d)
12
13 # Fetch nexmon sources
14 as_nobody git -C "${temp_dir}" clone "${NEXMON_URL}"
15
16 # Copy downloaded nexmon sources
17 mv "${temp_dir}/nexmon" "${R}"/tmp/
18
19 # Set permissions of the nexmon sources
20 chown -R root:root "${R}"/tmp/nexmon
21
22 # Remove temporary directory for nexmon sources
23 rm -fr "${temp_dir}"
24 fi
8 # Build nexmon firmware outside the build system, if we can.
25 # Build nexmon firmware outside the build system, if we can.
9 cd "${basedir}"
26 cd "${R}"/tmp/nexmon
10 git clone https://github.com/seemoo-lab/nexmon.git "${basedir}"/nexmon --depth 1
11 cd "${basedir}"/nexmon
12 # Disable statistics
27 # Disable statistics
13 touch DISABLE_STATISTICS
28 touch DISABLE_STATISTICS
29 # Setup Enviroment
14 source setup_env.sh
30 source setup_env.sh
15 ls -lah /usr/lib/x86_64-linux-gnu/libl.a
31 # Make nexmon
16 ls -lah /usr/lib/x86_64-linux-gnu/libfl.a
17 make
32 make
33
34 # Make ancient isl build
18 cd buildtools/isl-0.10
35 cd buildtools/isl-0.10
19 CC=$CCgcc
36 CC="$CROSS_COMPILE"
20 ./configure
37 ./configure
21 make
38 make
22 sed -i -e 's/all:.*/all: $(RAM_FILE)/g' ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
39
23 sed -i -e 's/all:.*/all: $(RAM_FILE)/g' ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/Makefile
40 # build patches
24 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
41 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
25 # Make sure we use the cross compiler to build the firmware.
42 # Make sure we use the cross compiler to build the firmware.
26 # We use the x86 cross compiler because we're building on amd64
43 # We use the x86 cross compiler because we're building on amd64
27 unset CROSS_COMPILE
44 #unset CROSS_COMPILE
28 #export CROSS_COMPILE=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
45 #export CROSS_COMPILE=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
29 make clean
46 make clean
30 # We do this so we don't have to install the ancient isl version into /usr/local/lib on systems.
47 # 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-
48 LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH=arm CC="$CROSS_COMPILE"
32 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
49 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
33 make clean
50 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-
51 LD_LIBRARY_PATH=${NEXMON_ROOT}/buildtools/isl-0.10/.libs make ARCH=arm CC="$CROSS_COMPILE"
35 # RPi0w->3B firmware
52 # RPi0w->3B firmware
36 mkdir -p "${basedir}"/kali-${architecture}/lib/firmware/brcm
53 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
54 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
55 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
56 #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
57 # 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
58 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
59 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
60 #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.
61 # 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.
62 # 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
63 #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
64 #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+
65 # 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
66 #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
@@ -151,9 +151,9 UBOOTSRC_DIR=${UBOOTSRC_DIR:=""}
151 ENABLE_UBOOTUSB=${ENABLE_UBOOTUSB=false}
151 ENABLE_UBOOTUSB=${ENABLE_UBOOTUSB=false}
152 ENABLE_FBTURBO=${ENABLE_FBTURBO:=false}
152 ENABLE_FBTURBO=${ENABLE_FBTURBO:=false}
153 ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false}
153 ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false}
154 ENABLE_NEXMON=${ENABLE_NEXMON:="false"}
154 VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""}
155 VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""}
155 FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""}
156 FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""}
156 ENABLE_NEXMON=${ENABLE_NEXMON:=""}
157 NEXMON_DIR=${NEXMON_DIR:=""}
157 NEXMON_DIR=${NEXMON_DIR:=""}
158 ENABLE_HARDNET=${ENABLE_HARDNET:=false}
158 ENABLE_HARDNET=${ENABLE_HARDNET:=false}
159 ENABLE_IPTABLES=${ENABLE_IPTABLES:=false}
159 ENABLE_IPTABLES=${ENABLE_IPTABLES:=false}
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant