support android-14.0.0_r45
This commit is contained in:
45
android-14.0.0_r45/system/bpf/0001-fix-booting.patch
Normal file
45
android-14.0.0_r45/system/bpf/0001-fix-booting.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
From 37360b6c313bbf923479ef0950ff623dcabd93fe Mon Sep 17 00:00:00 2001
|
||||
From: Ziyang Zhou <ziyang.zhou@outlook.com>
|
||||
Date: Thu, 5 Oct 2023 23:27:52 +0800
|
||||
Subject: [PATCH] fix booting
|
||||
|
||||
---
|
||||
bpfloader/BpfLoader.cpp | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
|
||||
index e53669a..98686c0 100644
|
||||
--- a/bpfloader/BpfLoader.cpp
|
||||
+++ b/bpfloader/BpfLoader.cpp
|
||||
@@ -271,13 +271,15 @@ int main(int argc, char** argv) {
|
||||
// BPF_JIT is required by R VINTF (which means 4.14/4.19/5.4 kernels),
|
||||
// but 4.14/4.19 were released with P & Q, and only 5.4 is new in R+.
|
||||
if (writeProcSysFile("/proc/sys/net/core/bpf_jit_enable", "1\n") &&
|
||||
- android::bpf::isAtLeastKernelVersion(5, 4, 0)) return 1;
|
||||
+ android::bpf::isAtLeastKernelVersion(5, 4, 0))
|
||||
+ PLOG(ERROR) << "change /proc/sys/net/core/bpf_jit_enable to 1 failed";
|
||||
|
||||
// Enable JIT kallsyms export for privileged users only
|
||||
// (Note: this (open) will fail with ENOENT 'No such file or directory' if
|
||||
// kernel does not have CONFIG_HAVE_EBPF_JIT=y)
|
||||
if (writeProcSysFile("/proc/sys/net/core/bpf_jit_kallsyms", "1\n") &&
|
||||
- android::bpf::isAtLeastKernelVersion(5, 4, 0)) return 1;
|
||||
+ android::bpf::isAtLeastKernelVersion(5, 4, 0))
|
||||
+ PLOG(ERROR) << "change /proc/sys/net/core/bpf_jit_kallsyms to 1 failed";
|
||||
|
||||
// Create all the pin subdirectories
|
||||
// (this must be done first to allow selinux_context and pin_subdir functionality,
|
||||
@@ -302,8 +304,10 @@ int main(int argc, char** argv) {
|
||||
ALOGE("If this triggers randomly, you might be hitting some memory allocation "
|
||||
"problems or startup script race.");
|
||||
ALOGE("--- DO NOT EXPECT SYSTEM TO BOOT SUCCESSFULLY ---");
|
||||
+#if 0 // HACKED
|
||||
sleep(20);
|
||||
return 2;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.45.1
|
||||
|
||||
Reference in New Issue
Block a user