Closed liuweibang closed 4 years ago
- Use /defconfig
- Use CC instead of REAL_CC
@arter97 thank you for your reply. But it doesn't work. I followed your guide, the source compile failed. Please guide me how to do. Thank you.
arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
arch/arm64/Makefile:57: Detected assembler with broken .inst; disassembly will be unreliable
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/bin2c
Using .. as source for kernel
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/preempt.h
WRAP arch/arm64/include/generated/asm/qrwlock.h
WRAP arch/arm64/include/generated/asm/rwsem.h
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/set_memory.h
WRAP arch/arm64/include/generated/asm/sizes.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC scripts/mod/empty.o
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/kallsyms
HOSTCC scripts/mod/mk_elfconfig
HOSTCC scripts/dtc/livetree.o
CC scripts/mod/devicetable-offsets.s
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
MKELF scripts/mod/elfconfig.h
CHK scripts/mod/devicetable-offsets.h
UPD scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/sumversion.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/pnmtologo
HOSTCC scripts/conmakehash
HOSTCC scripts/recordmcount
HOSTCC scripts/dtc/util.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/sortextable
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
CHK include/generated/timeconst.h
CC kernel/bounds.s
UPD include/generated/timeconst.h
CHK include/generated/bounds.h
UPD include/generated/bounds.h
CC arch/arm64/kernel/asm-offsets.s
HOSTLD scripts/mod/modpost
In file included from ../arch/arm64/kernel/asm-offsets.c:21:
In file included from ../include/linux/sched.h:14:
In file included from ../include/linux/pid.h:5:
In file included from ../include/linux/rculist.h:11:
In file included from ../include/linux/rcupdate.h:40:
In file included from ../include/linux/preempt.h:81:
In file included from ./arch/arm64/include/generated/asm/preempt.h:1:
In file included from ../include/asm-generic/preempt.h:5:
In file included from ../include/linux/thread_info.h:38:
In file included from ../arch/arm64/include/asm/thread_info.h:31:
../arch/arm64/include/asm/stack_pointer.h:8:51: error: register 'sp' unsuitable for global register variables on this target
register unsigned long current_stack_pointer asm ("sp");
^
In file included from ../arch/arm64/kernel/asm-offsets.c:21:
In file included from ../include/linux/sched.h:15:
In file included from ../include/linux/sem.h:9:
In file included from ../include/uapi/linux/sem.h:5:
In file included from ../include/linux/ipc.h:5:
In file included from ../include/linux/spinlock.h:88:
../arch/arm64/include/asm/spinlock.h:67:28: error: value '65536' out of range for constraint 'I'
: "Q" (lock->owner), "I" (1 << TICKET_SHIFT)
^~~~~
../arch/arm64/include/asm/spinlock.h:95:9: error: value '65536' out of range for constraint 'I'
It seems like your toolchain is broken.
Never got such issues myself.
On Wed, Feb 26, 2020 at 5:10 PM liuweibang notifications@github.com wrote:
- Use /defconfig
- Use CC instead of REAL_CC
@arter97 https://github.com/arter97 thank you for your reply. But it doesn't work. I followed your guide, the source compile failed. Please guide me how to do. Thank you. Command is below: make O=out defconfig make O=out CC=../gclang9.0.6/bin/clang -j8 Error like below: make[1]: Entering directory '/home/liuweibang/android_kernel_oneplus_sm8150-oneplus-SM8150_P_9.0/out'
arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum arch/arm64/Makefile:57: Detected assembler with broken .inst; disassembly will be unreliable CHK include/config/kernel.release GEN ./Makefile CHK include/generated/uapi/linux/version.h HOSTCC scripts/basic/fixdep HOSTCC scripts/basic/bin2c Using .. as source for kernel WRAP arch/arm64/include/generated/asm/bugs.h WRAP arch/arm64/include/generated/asm/clkdev.h WRAP arch/arm64/include/generated/asm/delay.h WRAP arch/arm64/include/generated/asm/div64.h WRAP arch/arm64/include/generated/asm/dma.h WRAP arch/arm64/include/generated/asm/dma-contiguous.h WRAP arch/arm64/include/generated/asm/early_ioremap.h WRAP arch/arm64/include/generated/asm/emergency-restart.h WRAP arch/arm64/include/generated/asm/hw_irq.h WRAP arch/arm64/include/generated/asm/irq_regs.h WRAP arch/arm64/include/generated/asm/kdebug.h WRAP arch/arm64/include/generated/asm/kmap_types.h WRAP arch/arm64/include/generated/asm/local.h WRAP arch/arm64/include/generated/asm/local64.h WRAP arch/arm64/include/generated/asm/mcs_spinlock.h WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h WRAP arch/arm64/include/generated/asm/msi.h WRAP arch/arm64/include/generated/asm/preempt.h WRAP arch/arm64/include/generated/asm/qrwlock.h WRAP arch/arm64/include/generated/asm/rwsem.h WRAP arch/arm64/include/generated/asm/segment.h WRAP arch/arm64/include/generated/asm/serial.h WRAP arch/arm64/include/generated/asm/set_memory.h WRAP arch/arm64/include/generated/asm/sizes.h WRAP arch/arm64/include/generated/asm/switch_to.h WRAP arch/arm64/include/generated/asm/trace_clock.h WRAP arch/arm64/include/generated/asm/unaligned.h WRAP arch/arm64/include/generated/asm/user.h WRAP arch/arm64/include/generated/asm/vga.h WRAP arch/arm64/include/generated/asm/xor.h CHK include/generated/utsrelease.h UPD include/generated/utsrelease.h CC scripts/mod/empty.o HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/flattree.o HOSTCC scripts/dtc/fstree.o HOSTCC scripts/dtc/data.o HOSTCC scripts/kallsyms HOSTCC scripts/mod/mk_elfconfig HOSTCC scripts/dtc/livetree.o CC scripts/mod/devicetable-offsets.s HOSTCC scripts/dtc/treesource.o HOSTCC scripts/dtc/srcpos.o MKELF scripts/mod/elfconfig.h CHK scripts/mod/devicetable-offsets.h UPD scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/sumversion.o HOSTCC scripts/dtc/checks.o HOSTCC scripts/pnmtologo HOSTCC scripts/conmakehash HOSTCC scripts/recordmcount HOSTCC scripts/dtc/util.o HOSTCC scripts/mod/modpost.o HOSTCC scripts/sortextable SHIPPED scripts/dtc/dtc-lexer.lex.c SHIPPED scripts/dtc/dtc-parser.tab.h SHIPPED scripts/dtc/dtc-parser.tab.c HOSTCC scripts/dtc/dtc-lexer.lex.o HOSTCC scripts/mod/file2alias.o HOSTCC scripts/dtc/dtc-parser.tab.o HOSTLD scripts/dtc/dtc CHK include/generated/timeconst.h CC kernel/bounds.s UPD include/generated/timeconst.h CHK include/generated/bounds.h UPD include/generated/bounds.h CC arch/arm64/kernel/asm-offsets.s HOSTLD scripts/mod/modpost In file included from ../arch/arm64/kernel/asm-offsets.c:21: In file included from ../include/linux/sched.h:14: In file included from ../include/linux/pid.h:5: In file included from ../include/linux/rculist.h:11: In file included from ../include/linux/rcupdate.h:40: In file included from ../include/linux/preempt.h:81: In file included from ./arch/arm64/include/generated/asm/preempt.h:1: In file included from ../include/asm-generic/preempt.h:5: In file included from ../include/linux/thread_info.h:38: In file included from ../arch/arm64/include/asm/thread_info.h:31: ../arch/arm64/include/asm/stack_pointer.h:8:51: error: register 'sp' unsuitable for global register variables on this target register unsigned long current_stack_pointer asm ("sp"); ^ In file included from ../arch/arm64/kernel/asm-offsets.c:21: In file included from ../include/linux/sched.h:15: In file included from ../include/linux/sem.h:9: In file included from ../include/uapi/linux/sem.h:5: In file included from ../include/linux/ipc.h:5: In file included from ../include/linux/spinlock.h:88: ../arch/arm64/include/asm/spinlock.h:67:28: error: value '65536' out of range for constraint 'I' : "Q" (lock->owner), "I" (1 << TICKET_SHIFT) ^
~~~~ ../arch/arm64/include/asm/spinlock.h:95:9: error: value '65536' out of range for constraint 'I'— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/arter97/android_kernel_oneplus_sm8150/issues/2?email_source=notifications&email_token=ABJGTHSZDCS2OBBRHTQW4FDREYPVXA5CNFSM4K34DOE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM7G6CY#issuecomment-591294219, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJGTHUI4XQ5FLQCUF6F7RDREYPVXANCNFSM4K34DOEQ .
It seems like your toolchain is broken. Never got such issues myself. … @arter97 could you show me a guide for compile OnePlusOSS release kernel source default branch(https://github.com/OnePlusOSS/android_kernel_oneplus_sm8150), including toolchain? Thanks a lot!
@arter97 hello arter, I cloned OnePlusOSS/android_kernel_oneplus_sm8150 kernel code, but compile failed. Could you tell me how to compile successfully? Thanks. I used config file is arch/arm64/configs/vendor/sm8150_defconfig, cross compile tool is aarch-linux-android-, CC compiler is clang. Command is below: make O=out sm8150_defconfig make O=out REAL_CC=../gclang9.0.6/bin/clang -j8
I am looking forward for your reply. Thank you!