Skip to content

Instantly share code, notes, and snippets.

@rmoriz
Last active January 20, 2019 14:52
Show Gist options
  • Save rmoriz/66ce640eaee28f983e0827fe088b6fa6 to your computer and use it in GitHub Desktop.
Save rmoriz/66ce640eaee28f983e0827fe088b6fa6 to your computer and use it in GitHub Desktop.
rpi0W nexmon
#!/bin/sh
set -e
sudo apt-get install -y git gawk qpdf adb flex bison checkinstall libgmp3-dev tcpdump raspberrypi-kernel-headers
git clone https://github.com/seemoo-lab/nexmon.git
cd nextmon
cd buildtools/isl-0.10
./configure
make
sudo make install
sudo ln -s /usr/local/lib/libisl.so /usr/lib/arm-linux-gnueabihf/libisl.so.10
cd ../..
source setup_env.sh
make
cd patches/bcm43430a1/7_45_41_46/nexmon
make
make backup-firmware
cp /lib/firmware/brcm/brcmfmac43430-sdio.bin ~/brcmfmac43430-sdio.bin.orig
# this will kill existing wifi connections!
make install-firmware
cp /home/pi/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac_4.14.y-nexmon/brcmfmac.ko /lib/modules/4.14.79+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
cd utilities/nexutil/
make && make install
exit
# restore
cp brcmfmac43430-sdio.bin /lib/firmware/brcm/brcmfmac43430-sdio.bin
cp brcmfmac.ko /lib/modules/4.14.79+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment