RaghuVarma331 / android_kernel_nokia_sdm660

Kernel Source Belongs to FIH-SDM630/636/660
https://www.nokia.com/phones/en_int/opensource
Other
1 stars 5 forks source link

Error when compiling kernel #1

Closed fakeowl1 closed 1 year ago

fakeowl1 commented 1 year ago

Branch: android-10-clang

OS: ArchLinux x86_64

Cross Compiler: aarch64-linux-android-4.9.git

Clang compiler: clang

I'm try compile kernel and face the following error:

make[1]: Entering directory '/home/q/repos/android_kernel_nokia_sdm660/out'
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
drivers/Kconfig:219:warning: multi-line strings not supported
  CHK     include/config/kernel.release
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  Using .. as source for kernel
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/dtc/data.o
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/selinux/mdp/mdp
  MKELF   scripts/mod/elfconfig.h
  CHK     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/mod/sumversion.o
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
  CHK     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  HOSTLD  scripts/mod/modpost
  HOSTLD  scripts/dtc/dtc
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [scripts/Makefile.host:100: scripts/dtc/dtc] Error 1
make[2]: *** [../scripts/Makefile.build:489: scripts/dtc] Error 2
make[1]: *** [/home/q/repos/android_kernel_nokia_sdm660/Makefile:558: scripts] Error 2
make[1]: *** Waiting for unfinished jobs....
  CHK     include/generated/asm-offsets.h
  CALL    ../scripts/checksyscalls.sh
make[1]: Leaving directory '/home/q/repos/android_kernel_nokia_sdm660/out'
make: *** [Makefile:152: sub-make] Error 2

PS: I'm edit scripts/dtc/dtc-lexer.lex.c.c_shipped and corrected YYLTYPE yyloc to extern YYLTYPE yyloc this solved a problem but a new error occurred:

make[1]: Entering directory '/home/q/repos/android_kernel_nokia_sdm660/out'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  GEN     ./Makefile
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
drivers/Kconfig:219:warning: multi-line strings not supported
#
# configuration written to .config
#
make[1]: Leaving directory '/home/q/repos/android_kernel_nokia_sdm660/out'
make[1]: Entering directory '/home/q/repos/android_kernel_nokia_sdm660/out'
  GEN     ./Makefile
scripts/kconfig/conf  --silentoldconfig Kconfig
drivers/Kconfig:219:warning: multi-line strings not supported
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  GEN     ./Makefile
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  Using .. as source for kernel
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/selinux/genheaders/genheaders
  CHK     scripts/mod/devicetable-offsets.h
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  CC      kernel/bounds.s
  HOSTCC  scripts/mod/file2alias.o
  CHK     include/generated/timeconst.h
  UPD     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  UPD     include/generated/bounds.h
  CC      arch/arm64/kernel/asm-offsets.s
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/pnmtologo
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  CHK     include/generated/asm-offsets.h
  UPD     include/generated/asm-offsets.h
  CALL    ../scripts/checksyscalls.sh
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/dtc/dtc
  HOSTLD  scripts/mod/modpost
  LDS     arch/arm64/kernel/vdso/vdso.lds
  VDSOA   arch/arm64/kernel/vdso/gettimeofday.o
  VDSOA   arch/arm64/kernel/vdso/note.o
  VDSOA   arch/arm64/kernel/vdso/sigreturn.o
../arch/arm64/kernel/vdso/gettimeofday.S:223:24: error: too many positional arguments
 clock_gettime_return, shift=1
                       ^
../arch/arm64/kernel/vdso/gettimeofday.S:246:24: error: too many positional arguments
 clock_gettime_return, shift=1
                       ^
../arch/arm64/kernel/vdso/gettimeofday.S:267:24: error: too many positional arguments
 clock_gettime_return, shift=1
                       ^
make[2]: *** [../arch/arm64/kernel/vdso/Makefile:53: arch/arm64/kernel/vdso/gettimeofday.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [arch/arm64/Makefile:154: vdso_prepare] Error 2
make[1]: Leaving directory '/home/q/repos/android_kernel_nokia_sdm660/out'
make: *** [Makefile:152: sub-make] Error 2
RaghuVarma331 commented 1 year ago

just run the build.sh under root id. make sure to setup your machine with all required android tools. for reference please check this link https://github.com/RaghuVarma331/scripts/raw/master/setup/setup.sh . finally update your path in build.sh

i use ubuntu 18

On Sat, Jan 7, 2023 at 1:08 AM Mr.D @.***> wrote:

Branch: android-10-clang

Cross Compiler: aarch64-linux-android-4.9.git https://github.com/RaghuVarma331/aarch64-linux-android-4.9.git

Clang compiler: clang https://github.com/RaghuVarma331/clang.git

I'm try compile kernel and face the following error:

make[1]: Entering directory '/home/q/repos/android_kernel_nokia_sdm660/out' which: no aarch64-linux-android-elfedit in (/home/q/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl) GEN ./Makefile scripts/kconfig/conf --silentoldconfig Kconfig drivers/Kconfig:219:warning: multi-line strings not supported which: no aarch64-linux-android-elfedit in (/home/q/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl) CHK include/config/kernel.release GEN ./Makefile CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h Using .. as source for kernel HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/flattree.o CC scripts/mod/empty.o HOSTCC scripts/selinux/genheaders/genheaders HOSTCC scripts/mod/mk_elfconfig HOSTCC scripts/selinux/mdp/mdp HOSTCC scripts/kallsyms CC scripts/mod/devicetable-offsets.s HOSTCC scripts/dtc/fstree.o HOSTCC scripts/pnmtologo HOSTCC scripts/conmakehash MKELF scripts/mod/elfconfig.h CHK scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/sumversion.o CC kernel/bounds.s HOSTCC scripts/dtc/data.o CHK include/generated/timeconst.h CHK include/generated/bounds.h CC arch/arm64/kernel/asm-offsets.s HOSTCC scripts/sortextable HOSTCC scripts/dtc/livetree.o HOSTCC scripts/dtc/treesource.o HOSTCC scripts/dtc/srcpos.o HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/file2alias.o HOSTCC scripts/dtc/checks.o HOSTCC scripts/dtc/util.o CHK include/generated/asm-offsets.h CALL ../scripts/checksyscalls.sh HOSTCC scripts/dtc/dtc-lexer.lex.o HOSTCC scripts/dtc/dtc-parser.tab.o LDS arch/arm64/kernel/vdso/vdso.lds HOSTLD scripts/mod/modpost VDSOA arch/arm64/kernel/vdso/gettimeofday.o VDSOA arch/arm64/kernel/vdso/note.o VDSOA arch/arm64/kernel/vdso/sigreturn.o ../arch/arm64/kernel/vdso/gettimeofday.S:223:24: error: too many positional arguments clock_gettime_return, shift=1 ^ ../arch/arm64/kernel/vdso/gettimeofday.S:246:24: error: too many positional arguments clock_gettime_return, shift=1 ^ ../arch/arm64/kernel/vdso/gettimeofday.S:267:24: error: too many positional arguments clock_gettime_return, shift=1 ^ make[2]: [../arch/arm64/kernel/vdso/Makefile:53: arch/arm64/kernel/vdso/gettimeofday.o] Error 1 make[2]: Waiting for unfinished jobs.... HOSTLD scripts/dtc/dtc make[1]: [arch/arm64/Makefile:154: vdso_prepare] Error 2 make[1]: Waiting for unfinished jobs.... /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here collect2: error: ld returned 1 exit status make[3]: [scripts/Makefile.host:100: scripts/dtc/dtc] Error 1 make[2]: [../scripts/Makefile.build:489: scripts/dtc] Error 2 make[1]: [/home/q/repos/android_kernel_nokia_sdm660/Makefile:558: scripts] Error 2 make[1]: Leaving directory '/home/q/repos/android_kernel_nokia_sdm660/out' make: [Makefile:152: sub-make] Error 2

— Reply to this email directly, view it on GitHub https://github.com/RaghuVarma331/android_kernel_nokia_sdm660/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKEYOLDEVQIR5Z2UGDVNMHLWRBYETANCNFSM6AAAAAATTMSXZY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fakeowl1 commented 1 year ago

@RaghuVarma331

OS: Arch Linux x86_64

fakeowl1 commented 1 year ago

@RaghuVarma331 I checked and reinstalled the dependencies, but it had no effect