From 49d951e8550e8091e9ce63612a539637cbddc8ef Mon Sep 17 00:00:00 2001 From: gdm85 Date: Mon, 23 Nov 2015 16:02:13 +0100 Subject: [PATCH] Latest fixes for Mac OS 12,1 bluetooth patch --- .gitignore | 1 - docker/scripts/build-macos121-wily-kernel.sh | 32 +++++++++++-------- docker/ubuntu-kernelbuilder/Dockerfile.tpl | 2 ++ .../patches/macos-121-btusb-fix.patch | 21 ++++++++++++ 4 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 docker/ubuntu-kernelbuilder/patches/macos-121-btusb-fix.patch diff --git a/.gitignore b/.gitignore index 6ff7a98..dbe81d9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,3 @@ rkt/nginx/nginx.aci lxd/busybox-nonroot/busybox-nonroot.tar.xz docker/ubuntu-kernelbuilder/packages -docker/ubuntu-kernelbuilder/patches diff --git a/docker/scripts/build-macos121-wily-kernel.sh b/docker/scripts/build-macos121-wily-kernel.sh index 786d4aa..817b04c 100755 --- a/docker/scripts/build-macos121-wily-kernel.sh +++ b/docker/scripts/build-macos121-wily-kernel.sh @@ -4,6 +4,7 @@ ## @author gdm85 ## ## Build a kernel with fixed bluetooth support for Mac OS 12,1 and Ubuntu Wily +## Based on instructions read from http://www.spinics.net/lists/linux-bluetooth/msg64123.html ## # @@ -13,7 +14,9 @@ set -e cd "$SCRIPTS" -#./build-ubuntu-image.sh wily +if ! docker inspect gdm85/wily >/dev/null 2>/dev/null; then + ./build-ubuntu-image.sh wily +fi cd ../ubuntu-pkgbuilder @@ -25,23 +28,24 @@ cat< patches/macos-121-btusb-fix.patch --- a/drivers/bluetooth/btusb.c 2015-10-28 14:52:20.466644715 +0000 +++ b/drivers/bluetooth/btusb.c 2015-10-28 14:52:34.715107143 +0000 @@ -2657,7 +2657,7 @@ - BT_DBG("intf %p id %p", intf, id); + BT_DBG("intf %p id %p", intf, id); - /* interface numbers are hardcoded in the spec */ -- if (intf->cur_altsetting->desc.bInterfaceNumber != 0) -+ if (intf->cur_altsetting->desc.bInterfaceNumber != 1) - return -ENODEV; + /* interface numbers are hardcoded in the spec */ +- if (intf->cur_altsetting->desc.bInterfaceNumber != 0) ++ if (intf->cur_altsetting->desc.bInterfaceNumber != 2) + return -ENODEV; - if (!id->driver_info) { + if (!id->driver_info) { @@ -2827,7 +2827,7 @@ - data->isoc = NULL; - } else { - /* Interface numbers are hardcoded in the specification */ -- data->isoc = usb_ifnum_to_if(data->udev, 1); -+ data->isoc = usb_ifnum_to_if(data->udev, 3); - } + data->isoc = NULL; + } else { + /* Interface numbers are hardcoded in the specification */ +- data->isoc = usb_ifnum_to_if(data->udev, 1); ++ data->isoc = usb_ifnum_to_if(data->udev, 3); + } - if (!reset) + if (!reset) + EOF make wily linux-image-wily diff --git a/docker/ubuntu-kernelbuilder/Dockerfile.tpl b/docker/ubuntu-kernelbuilder/Dockerfile.tpl index 8aeb8b7..b4190da 100644 --- a/docker/ubuntu-kernelbuilder/Dockerfile.tpl +++ b/docker/ubuntu-kernelbuilder/Dockerfile.tpl @@ -12,3 +12,5 @@ RUN mkdir build && cd build && apt-get source linux-image-$KERNEL_VERSION ## add build script COPY build-kernel.sh /home/rdeckard/ + +RUN chown rdeckard.rdeckard /home/rdeckard/build-kernel.sh diff --git a/docker/ubuntu-kernelbuilder/patches/macos-121-btusb-fix.patch b/docker/ubuntu-kernelbuilder/patches/macos-121-btusb-fix.patch new file mode 100644 index 0000000..d2cae38 --- /dev/null +++ b/docker/ubuntu-kernelbuilder/patches/macos-121-btusb-fix.patch @@ -0,0 +1,21 @@ +--- a/drivers/bluetooth/btusb.c 2015-10-28 14:52:20.466644715 +0000 ++++ b/drivers/bluetooth/btusb.c 2015-10-28 14:52:34.715107143 +0000 +@@ -2657,7 +2657,7 @@ + BT_DBG("intf %p id %p", intf, id); + + /* interface numbers are hardcoded in the spec */ +- if (intf->cur_altsetting->desc.bInterfaceNumber != 0) ++ if (intf->cur_altsetting->desc.bInterfaceNumber != 2) + return -ENODEV; + + if (!id->driver_info) { +@@ -2827,7 +2827,7 @@ + data->isoc = NULL; + } else { + /* Interface numbers are hardcoded in the specification */ +- data->isoc = usb_ifnum_to_if(data->udev, 1); ++ data->isoc = usb_ifnum_to_if(data->udev, 3); + } + + if (!reset) +