dabao1955 / kernel_build_action

a action to build kernel automatically[force push warning!]
Apache License 2.0
69 stars 81 forks source link

[Bug]: The build process fails with a "can't open file" error for `drivers/kernelsu/Kconfig`. #40

Open WhiteSnow00 opened 2 days ago

WhiteSnow00 commented 2 days ago

CheckBox

Configuration

A simple action usage

name: Build Kernel on: workflow_dispatch:

jobs: Build-Kernel: strategy: fail-fast: false runs-on: ubuntu-latest permissions: contents: read

steps:
- name: Build Kernel
  uses: dabao1955/kernel_build_action@main
  with:
      kernel-url: https://github.com/Shirayuki39/kernel_new
      kernel-dir: msm-5.10
      kernel-branch: shirayuki-5.10
      config: gki_defconfig
      arch: arm64
      aosp-gcc: true
      aosp-clang: true
      android-version: 12
      aosp-clang-version: r383902
      anykernel3: true

Describe the bug

drivers/Kconfig:240: can't open file "drivers/kernelsu/Kconfig" make[3]: [../scripts/kconfig/Makefile:88: gki_defconfig] Error 1 make[2]: [../Makefile:618: gki_defconfig] Error 2 make[1]: [/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-5.10/Makefile:357: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/kernel_build_action/kernel_build_action/kernel/msm-5.10/out' make: [Makefile:192: __sub-make] Error 2

Screenshots

No response

How to reproduce

No response

Expected behavior

No response

Error Logs

No response

Additional context

No response

dabao1955 commented 2 days ago

Not enable ksu?

Fyg369 commented 2 days ago

查看了内核源码,不需要开启ksu选项

4

6

5

Fyg369 commented 2 days ago

Not enable ksu?

ksu判断代码可能要在修改一下,需要添加个判断,是否内核源码已存在kernelsu子模块 if grep -qsi "path = .*KernelSU" .gitmodules || [ -f KernelSU/kernel/Kconfig ]; then echo "KernelSU has been initialized, skipped." fi

dabao1955 commented 2 days ago

Not enable ksu?

ksu判断代码可能需要在修改一下,编译脚本里可能需要加个判断,是否内核源码已存在kernelsu文件夹

Compiling with a script is not the same as compiling with a workflow.

Fyg369 commented 2 days ago

Not enable ksu?

ksu判断代码可能需要在修改一下,编译脚本里可能需要加个判断,是否内核源码已存在kernelsu文件夹

Compiling with a script is not the same as compiling with a workflow.

这里判断代码根据上面报错情况是否需要修改一下? if [ ${{ inputs.ksu }} = true ]; then echo "::group:: Initializing KernelSU" if [ -f KernelSU/kernel/Kconfig ]; then echo "KernelSU has been initialized,skipped."

dabao1955 commented 1 day ago

full build log please

Fyg369 commented 1 day ago

full build log please

Building Kernel with selected cross compiler mkdir: created directory 'out' using command: make -j4 gki_defconfig ARCH=arm64 all O=out PATH=/home/runner/clang/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin CROSS_COMPILE=/home/runner/gcc-64/bin/aarch64-linux-android- CROSS_COMPILE_ARM32=/home/runner/gcc-32/bin/arm-linux-androideabi- CLANG_TRIPLE=aarch64-linux-gnu- CC=clang make[1]: Entering directory '/home/runner/work/Kernel-Action/Kernel-Action/kernel/vip/out' GEN Makefile HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] HOSTCC scripts/kconfig/preprocess.o HOSTCC scripts/kconfig/symbol.o HOSTCC scripts/kconfig/util.o HOSTCC scripts/kconfig/lexer.lex.o HOSTCC scripts/kconfig/parser.tab.o HOSTLD scripts/kconfig/conf drivers/Kconfig:240: can't open file "drivers/kernelsu/Kconfig" make[3]: [../scripts/kconfig/Makefile:88: gki_defconfig] Error 1 make[2]: [../Makefile:618: gki_defconfig] Error 2 make[1]: [/home/runner/work/Kernel-Action/Kernel-Action/kernel/vip/Makefile:357: __build_one_by_one] Error 2 make[1]: Leaving directory '/home/runner/work/Kernel-Action/Kernel-Action/kernel/vip/out' make: [Makefile:192: __sub-make] Error 2 Error: Process completed with exit code 2.

dabao1955 commented 1 day ago

No KernelSU directory in original kernel source code

Fyg369 commented 1 day ago

No KernelSU directory in original kernel source code

不用开启ksu选项,或者加一个判断KernelSU文件夹是否子模块 Screenshot_20241111-140845

averagePedestrian commented 1 day ago

@dabao1955, I want to use a KSU fork, so if I set ksu-other to true do I need to set ksu: true too?

Fyg369 commented 1 day ago

@dabao1955, I want to use a KSU fork, so if I set ksu-other to true do I need to set ksu: true too?

ksu: true ksu-version: main ksu-other: true ksu-url: https://github.com/rsuntk/KernelSU

averagePedestrian commented 1 day ago

@dabao1955, I want to use a KSU fork, so if I set ksu-other to true do I need to set ksu: true too?

ksu: true ksu-version: main ksu-other: true ksu-url: https://github.com/rsuntk/KernelSU

Didn't work it still cloned the original KSU repo

ksu: true
ksu-version: legacy
ksu-other: true
ksu-url: https://github.com/backslashxx/KernelSU
[+] Setting up KernelSU...
  Cloning into 'KernelSU'...
  [+] Repository cloned.
  No local changes to save
  [-] Stashed current changes.
  Already up to date.
  [+] Repository updated.
  error: pathspec 'legacy' did not match any file(s) known to git
  [-] Checkout default branch
  [+] Symlink created.
  [+] Modified Makefile.
  [+] Modified Kconfig.
  [+] Done.
Fyg369 commented 1 day ago

@dabao1955, I want to use a KSU fork, so if I set ksu-other to true do I need to set ksu: true too?

ksu: true ksu-version: main ksu-other: true ksu-url: https://github.com/rsuntk/KernelSU

Didn't work it still cloned the original KSU repo

ksu: true
ksu-version: legacy
ksu-other: true
ksu-url: https://github.com/backslashxx/KernelSU
[+] Setting up KernelSU...
  Cloning into 'KernelSU'...
  [+] Repository cloned.
  No local changes to save
  [-] Stashed current changes.
  Already up to date.
  [+] Repository updated.
  error: pathspec 'legacy' did not match any file(s) known to git
  [-] Checkout default branch
  [+] Symlink created.
  [+] Modified Makefile.
  [+] Modified Kconfig.
  [+] Done.

ksu-version: legacy

dabao1955 commented 1 day ago

Well test workflow tested successfully...? I did not know if it is a bug or kernel source problem? How about official KernelSU?

Fyg369 commented 1 day ago

Well test workflow tested successfully...? I did not know if it is a bug or kernel source problem? How about official KernelSU?

If there is no feedback, the problem should be solved hahaha

averagePedestrian commented 21 hours ago

Apologies for the late reply, everyone. The issue was with the KSU fork.