thefloweringash / iousbhiddriver-descriptor-override

Fix broken USB HID descriptors. Now with Noppoo Choc Mini support!
http://thefloweringash.github.io/iousbhiddriver-descriptor-override
GNU Lesser General Public License v3.0
204 stars 25 forks source link

Apple Silicon M1 compatibility #50

Open UgurKacak opened 3 years ago

UgurKacak commented 3 years ago

It could be used in pre-silicon systems. But what do we have to do for systems with m1 (apple silicon) processor? I tried the target processor as arm64 on Xcode but it was not successful. Do you have any suggestions for this?

oldsharp commented 2 years ago

The kernel extension works well on Apple Silicon chip machine by applying the patch below and building from source. Everything else are essentially the same as described by README.

Confirmed to be able to work on MacBook Pro 13" M1 2020 with macOS Monterey 12.1, with SIP disabled ( #22 ) & security policy modified (to allow user management of kernel extensions, see https://support.apple.com/guide/security/startup-disk-security-policy-control-sec7d92dc49f/web ). After the kext is loaded, several keys then have to be remapped (in my case, with Karabiner) to make it work as expected.

My keyboard is Noppoo Choc Mid.

--- project.pbxproj.orig    2022-01-12 18:50:42.000000000 +0800
+++ project.pbxproj 2022-01-08 22:37:47.000000000 +0800
@@ -264,7 +264,7 @@
                ONLY_ACTIVE_ARCH = YES;
                PREBINDING = NO;
                SDKROOT = macosx;
-               VALID_ARCHS = x86_64;
+               VALID_ARCHS = arm64e;
            };
            name = Debug;
        };
@@ -277,7 +277,7 @@
                ONLY_ACTIVE_ARCH = NO;
                PREBINDING = NO;
                SDKROOT = macosx;
-               VALID_ARCHS = x86_64;
+               VALID_ARCHS = arm64e;
            };
            name = Release;
        };
@@ -305,7 +305,7 @@
                GCC_SYMBOLS_PRIVATE_EXTERN = NO;
                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
                GCC_WARN_UNINITIALIZED_AUTOS = YES;
-               MACOSX_DEPLOYMENT_TARGET = 10.8;
+               MACOSX_DEPLOYMENT_TARGET = 12.1;
                OTHER_CFLAGS = "";
                OTHER_LDFLAGS = "";
                PRODUCT_NAME = "$(TARGET_NAME)";
@@ -329,7 +329,7 @@
                GCC_ENABLE_OBJC_EXCEPTIONS = YES;
                GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
                GCC_WARN_UNINITIALIZED_AUTOS = YES;
-               MACOSX_DEPLOYMENT_TARGET = 10.8;
+               MACOSX_DEPLOYMENT_TARGET = 12.1;
                OTHER_CFLAGS = "";
                OTHER_LDFLAGS = "";
                PRODUCT_NAME = "$(TARGET_NAME)";