|
@@
-56,6
+56,10
if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
|
|
56
|
./configure
|
|
56
|
./configure
|
|
57
|
make
|
|
57
|
make
|
|
58
|
|
|
58
|
|
|
|
|
|
59
|
# 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')
|
|
|
|
|
61
|
mv "${brcmfmac_path}" "${brcmfmac_path}".orig
|
|
|
|
|
62
|
|
|
59
|
# build patches
|
|
63
|
# build patches
|
|
60
|
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then
|
|
64
|
if [ "$RPI_MODEL" = 0 ] || [ "$RPI_MODEL" = 3 ] ; then
|
|
61
|
cd "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon || exit
|
|
65
|
cd "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon || exit
|
|
@@
-68,6
+72,8
if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
|
|
68
|
mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.org.bin
|
|
72
|
mv "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.org.bin
|
|
69
|
cp "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin
|
|
73
|
cp "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.nexmon.bin
|
|
70
|
cp -f "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin
|
|
74
|
cp -f "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43430-sdio.bin
|
|
|
|
|
75
|
|
|
|
|
|
76
|
cp "${NEXMON_ROOT}"/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac_4.14.y-nexmon/brcmfmac.ko "${brcmfmac_path}"
|
|
71
|
fi
|
|
77
|
fi
|
|
72
|
|
|
78
|
|
|
73
|
if [ "$RPI_MODEL" = 3P ] ; then
|
|
79
|
if [ "$RPI_MODEL" = 3P ] ; then
|
|
@@
-83,25
+89,7
if [ "$ENABLE_NEXMON" = true ] && [ "$ENABLE_WIRELESS" = true ]; then
|
|
83
|
cp -f "${NEXMON_ROOT}"/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin
|
|
89
|
cp -f "${NEXMON_ROOT}"/patches/bcm43455c0/7_45_154/nexmon/brcmfmac43455-sdio.bin "${WLAN_FIRMWARE_DIR}"/brcmfmac43455-sdio.bin
|
|
84
|
fi
|
|
90
|
fi
|
|
85
|
|
|
91
|
|
|
86
|
# Install kernel module
|
|
|
|
|
87
|
"${LIB_DIR}"/modules/${KERNEL_VERSION}/
|
|
|
|
|
88
|
|
|
|
|
|
89
|
#Revert to previous directory
|
|
92
|
#Revert to previous directory
|
|
90
|
cd "${WORKDIR}" || exit
|
|
93
|
cd "${WORKDIR}" || exit
|
|
91
|
|
|
94
|
|
|
92
|
fi
|
|
95
|
fi
|
|
93
|
|
|
|
|
|
94
|
## To make the RPi load the modified driver after reboot
|
|
|
|
|
95
|
# Find the path of the default driver at reboot
|
|
|
|
|
96
|
# e.g. '/lib/modules/4.14.71-v7+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko'
|
|
|
|
|
97
|
PATH_OF_DEFAULT_DRIVER_AT_REBOOT=$(modinfo brcmfmac | grep -m 1 -oP "^filename:(\s*?)(.*)$" | sed -e 's/^filename:\(\s*\)\(.*\)$/\2/g')
|
|
|
|
|
98
|
# Backup the original driver
|
|
|
|
|
99
|
mv $PATH_OF_DEFAULT_DRIVER_AT_REBOOT "$PATH_OF_DEFAULT_DRIVER_AT_REBOOT.orig"
|
|
|
|
|
100
|
# Copy the modified driver (Kernel 4.14)
|
|
|
|
|
101
|
if is_pizero ; then
|
|
|
|
|
102
|
cp ./patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac_4.14.y-nexmon/brcmfmac.ko $PATH_OF_DEFAULT_DRIVER_AT_REBOOT
|
|
|
|
|
103
|
else
|
|
|
|
|
104
|
cp ./patches/bcm43455c0/7_45_154/nexmon/brcmfmac_4.14.y-nexmon/brcmfmac.ko $PATH_OF_DEFAULT_DRIVER_AT_REBOOT
|
|
|
|
|
105
|
fi
|
|
|
|
|
106
|
# Probe all modules and generate new dependency
|
|
|
|
|
107
|
depmod -a
No newline at end of file
|
|
|
|