-
-
Save wgallios/e806731dc852ccc7bfba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
if [ ! -z "$1" ]; then | |
KERNEL="$1" | |
else | |
KERNEL="$(uname -r)" | |
fi | |
CURRENT_DIR="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")" | |
echo "Compiling Bluetooth Module" | |
echo "Kernel: $KERNEL; Build Directory: $CURRENT_DIR" | |
# Copy the kernel configuration | |
cp "/boot/config-$KERNEL" "$CURRENT_DIR/.config" | |
cp "/usr/src/linux-headers-$KERNEL/Module.symvers" "$CURRENT_DIR/./" | |
if [ -z "$( cat "$CURRENT_DIR/drivers/bluetooth/btusb.c" | grep "USB_DEVICE(0x0b05, 0x17b5)")" ]; then | |
echo "Patch not found." | |
fi | |
# Prepare for build | |
cd "$CURRENT_DIR" | |
make prepare | |
make scripts | |
make M=drivers/bluetooth modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAKE="./build-bluetooth.sh ${kernelver}" | |
CLEAN="make clean" | |
BUILT_MODULE_NAME=btusb | |
BUILT_MODULE_LOCATION=drivers/bluetooth | |
DEST_MODULE_LOCATION=/kernel/drivers/bluetooth | |
PACKAGE_NAME=btusb | |
PACKAGE_VERSION=0.6 | |
PRE_INSTALL="./preinst.sh" | |
POST_INSTALL="./postinst.sh" | |
REMAKE_INITRD=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo service bluetooth start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo service bluetooth stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment