##// END OF EJS Templates
a
Unknown -
r445:d226b39f2858
parent child
Show More
@@ -5,45 +5,62
5 5 # Load utility functions
6 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 25 # 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
26 cd "${R}"/tmp/nexmon
12 27 # Disable statistics
13 28 touch DISABLE_STATISTICS
29 # Setup Enviroment
14 30 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
31 # Make nexmon
17 32 make
33
34 # Make ancient isl build
18 35 cd buildtools/isl-0.10
19 CC=$CCgcc
36 CC="$CROSS_COMPILE"
20 37 ./configure
21 38 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
39
40 # build patches
24 41 cd ${NEXMON_ROOT}/patches/bcm43430a1/7_45_41_46/nexmon
25 42 # Make sure we use the cross compiler to build the firmware.
26 43 # We use the x86 cross compiler because we're building on amd64
27 unset CROSS_COMPILE
44 #unset CROSS_COMPILE
28 45 #export CROSS_COMPILE=${NEXMON_ROOT}/buildtools/gcc-arm-none-eabi-5_4-2016q2-linux-x86/bin/arm-none-eabi-
29 46 make clean
30 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 49 cd ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon
33 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 52 # RPi0w->3B firmware
36 53 mkdir -p "${basedir}"/kali-${architecture}/lib/firmware/brcm
37 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 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 57 # RPi3B+ firmware
41 58 cp ${NEXMON_ROOT}/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${basedir}"/kali-${architecture}/lib/firmware/brcm/brcmfmac43455-sdio.nexmon.bin
42 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 61 # Make a backup copy of the rpi firmware in case people don't want to use the nexmon firmware.
45 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
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
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
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 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 151 ENABLE_UBOOTUSB=${ENABLE_UBOOTUSB=false}
152 152 ENABLE_FBTURBO=${ENABLE_FBTURBO:=false}
153 153 ENABLE_VIDEOCORE=${ENABLE_VIDEOCORE:=false}
154 ENABLE_NEXMON=${ENABLE_NEXMON:="false"}
154 155 VIDEOCORESRC_DIR=${VIDEOCORESRC_DIR:=""}
155 156 FBTURBOSRC_DIR=${FBTURBOSRC_DIR:=""}
156 ENABLE_NEXMON=${ENABLE_NEXMON:=""}
157 157 NEXMON_DIR=${NEXMON_DIR:=""}
158 158 ENABLE_HARDNET=${ENABLE_HARDNET:=false}
159 159 ENABLE_IPTABLES=${ENABLE_IPTABLES:=false}
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant