tiann / KernelSU

A Kernel based root solution for Android
https://kernelsu.org
GNU General Public License v3.0
9.22k stars 1.5k forks source link

自己编译 6.1.25 内核,工作中 但是显示版本16 版本过低 #1210

Closed abbuaus closed 7 months ago

abbuaus commented 7 months ago

Please check before submitting an issue

Describe the bug

编译 6.1.25 内核的时候 出现这个 INFO: From Building kernel (lto=default;trim) @//common:kernel_aarch64: /root/android/aosp/out/bazel/output_user_root/975d4c482d4faab5654d7b5db22a8579/sandbox/linux-sandbox/60/execroot/main/common/drivers/kernelsu/Makefile:23: "KSU_GIT_VERSION not defined! It is better to make KernelSU a git submodule!" /root/android/aosp/out/bazel/output_user_root/975d4c482d4faab5654d7b5db22a8579/sandbox/linux-sandbox/60/execroot/main/common/drivers/kernelsu/Makefile:23: "KSU_GIT_VERSION not defined! It is better to make KernelSU a git submodule!" -- KernelSU Manager signature size: 0x033b -- KernelSU Manager signature hash: c371061b19d8c7d7d6133c6a9bafe198fa944e50c1b31c9d8daa8d7f1fc2d2d6 -- KernelSU Manager signature size: 0x033b -- KernelSU Manager signature hash: c371061b19d8c7d7d6133c6a9bafe198fa944e50c1b31c9d8daa8d7f1fc2d2d6 INFO: From Building GKI artifacts @//common:kernel_aarch64_gki_artifacts:

修补内核后刷入开机显示工作中 但是显示版本16 版本过低 但是使用 releases 0.7.1的修补却正常工作,如何修复它

To Reproduce

cd /root/android/aosp repo init --depth=1 --u https://android.googlesource.com/kernel/manifest -b common-android14-6.1-2023-10 --repo-rev=v2.16 REMOTE_BRANCH=$(git ls-remote https://android.googlesource.com/kernel/common android14-6.1-2023-10) DEFAULT_MANIFEST_PATH=.repo/manifests/default.xml repo --version repo --trace sync -c -j$(nproc --all) --no-tags df -h

cd /root/android/aosp/common && curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.7.1 cd /root/android/aosp && rm common/android/abi_gki_protectedexports* cd /root/android/aosp && tools/bazel build //common:kernel_aarch64_dist

Expected behavior

工作中并显示正确的版本

Screenshots

photo_2023-12-13_22-24-56

Logs

No response

Device info

Additional context

No response

abbuaus commented 7 months ago

image

abbuaus commented 7 months ago

搜索过这个问题,有回答说用 build/build.sh 别用bazel ,但是 6.1.25 只能 bazel 编译

abbuaus commented 7 months ago

把 tools/bazel build //common:kernel_aarch64_dist 改成 tools/bazel build --config=fast //common:kernel_aarch64_dist 可以显示出来 kernelsu 版本,但是不开机 -- KernelSU version: 11392 -- KernelSU Manager signature size: 0x033b -- KernelSU Manager signature hash: c371061b19d8c7d7d6133c6a9bafe198fa944e50c1b31c9d8daa8d7f1fc2d2d6

abbuaus commented 7 months ago

重新拉KernelSU 使用 cd /root/android/aosp && tools/bazel run --config=fast //common:kernel_aarch64_dist -- --dist_dir=dist 成功了

JiuGeFaCai commented 2 months ago

请问一下你Image用的编译后哪个路径下的