From 55f712d1b281aba74d57eb44273377dfcea54a4e Mon Sep 17 00:00:00 2001 From: weishu Date: Mon, 23 Oct 2023 22:09:44 +0800 Subject: [PATCH 1/2] kernel: dirty fix for pixel8 wlan/bluetooth. close #1074 The wlan and bluetooth driver bcmdhd4398 cannot be loaded because cfg80211.ko has been converted to a vendor module. You can find more information about this conversion at: https://android.googlesource.com/kernel/common/+/ee1e4b7c5e0a2a717ae7994a7e92e1b833367124. The reason why cfg80211.ko cannot be loaded is because the rfkill.ko module in system_dlkm has protected symbols. To fix this issue, we simply need to delete the protected symbol. "There is no ABI stability between GKI and GKI modules. In order for modules to load correctly during runtime, GKI and GKI modules must be built and updated together." We need to find a better solution to address this problem. Co-authored-by: aviraxp --- .github/workflows/gki-kernel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gki-kernel.yml b/.github/workflows/gki-kernel.yml index e7c407df9184..a3ef2269d42b 100644 --- a/.github/workflows/gki-kernel.yml +++ b/.github/workflows/gki-kernel.yml @@ -174,6 +174,7 @@ jobs: if [ -e build/build.sh ]; then CCACHE="/usr/bin/ccache" LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh else + sed -i '/^rfkill_/d' common/android/abi_gki_protected_exports_* tools/bazel run --disk_cache=/home/runner/.cache/bazel --config=fast --config=stamp --lto=thin //common:kernel_aarch64_dist -- --dist_dir=dist fi From bf823a29e8cd1aa83e3c6f72d91a03c9db023343 Mon Sep 17 00:00:00 2001 From: weishu Date: Mon, 23 Oct 2023 22:22:39 +0800 Subject: [PATCH 2/2] kernel: fix incorrect strcmp --- kernel/manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/manager.c b/kernel/manager.c index fcb1b181f978..234cfd969bd1 100644 --- a/kernel/manager.c +++ b/kernel/manager.c @@ -27,7 +27,7 @@ bool become_manager(char *pkg) #ifdef KSU_MANAGER_PACKAGE // pkg is `/` if (strncmp(pkg + 1, KSU_MANAGER_PACKAGE, - sizeof(KSU_MANAGER_PACKAGE) - 1) != 0) { + sizeof(KSU_MANAGER_PACKAGE)) != 0) { pr_info("manager package is inconsistent with kernel build: %s\n", KSU_MANAGER_PACKAGE); return false;