Fails to build the kernel prebuilts after GCC got deprecated---gcc-linaro-7.5.0-2019.12-x86_64
https://discuss.96boards.org/t/fails-to-build-the-kernel-prebuilts-after-gcc-got-deprecated/9422
Hi,
I am trying to build the kernel prebuilts using the link:
Build & Update Linux kernel on HiKey970
Build & Update Linux kernel on HiKey970
I am getting this error:
drivers/gpu/arm/bifrost-hikey960/Kconfig:147:warning: choice value used outside its choice group
drivers/gpu/arm/bifrost-hikey960/Kconfig:150:warning: choice value used outside its choice group
drivers/gpu/arm/bifrost-hikey960/Kconfig:152:warning: choice value used outside its choice group
drivers/gpu/arm/bifrost-hikey960/Kconfig:156:warning: choice value used outside its choice group
./scripts/gcc-version.sh: line 25: aarch64-linux-android-gcc: command not found
./scripts/gcc-version.sh: line 26: aarch64-linux-android-gcc: command not found
make: aarch64-linux-android-gcc: Command not found
make: aarch64-linux-android-gcc: Command not found
CHK include/config/kernel.release
make: aarch64-linux-android-gcc: Command not found
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
Makefile:1087: recipe for target ‘prepare-compiler-check’ failed
make: *** [prepare-compiler-check] Error 1
make: *** Waiting for unfinished jobs…
make: *** wait: No child processes. Stop.
My questions are :
- i am trying to build for hikey970, then why do i see the warning related to 960 as given below : drivers/gpu/arm/bifrost-hikey960/Kconfig:147:warning: choice value used outside its choice group
- Since GCC is deprecated, how kernel images should be built using clang?
- why this error:
Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
I was able to build the aosp on hikey 970 successfully in the month of November-2019, without any of these errors. I believe these problems arise only after GCC got deprecated in this month.
Any inputs in this regard will be very helpful.
Thanks
Board based on the Kirin 970 - HI3670 Application Processor
More info: http://www.96boards.org/product/hikey970/ 1 (Website coming soon…)
Buy now: https://www.seeedstudio.com/HiKey-970-Development-Board-p-3046.html
GCC is not deprecated.
Google just doesn’t use it any more. That’s all.
Try this;
https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/ 9
Thank you,
Will try this
Hi,
I tried with this: https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu.tar.xz
But getting the following error:
drivers/firmware/efi/libstub/Makefile:69: recipe for target ‘drivers/firmware/efi/libstub/arm64-stub.stub.o’ failed
make[4]: *** [drivers/firmware/efi/libstub/arm64-stub.stub.o] Error 1
drivers/firmware/efi/libstub/fdt.stub.o: absolute symbol references not allowed in the EFI stub
drivers/firmware/efi/libstub/Makefile:69: recipe for target ‘drivers/firmware/efi/libstub/fdt.stub.o’ failed
make[4]: *** [drivers/firmware/efi/libstub/fdt.stub.o] Error 1
scripts/Makefile.build:552: recipe for target ‘drivers/firmware/efi/libstub’ failed
make[3]: *** [drivers/firmware/efi/libstub] Error 2
scripts/Makefile.build:552: recipe for target ‘drivers/firmware/efi’ failed
make[2]: *** [drivers/firmware/efi] Error 2
scripts/Makefile.build:552: recipe for target ‘drivers/firmware’ failed
make[1]: *** [drivers/firmware] Error 2
make[1]: *** Waiting for unfinished jobs…
Makefile:1009: recipe for target ‘drivers’ failed
make: *** [drivers] Error 2
Kernel Image build fail!
Can you please help me…
You’re going to have to provide more details.
Precise commands you used for setting up the environment and compiling.
Hi,
These are the commands i am using …
source build/envsetup.sh
lunch hikey970-userdebug
export PATH=~/aosp/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/: ./build_kernel.sh
build_kernel_sh is taken from this link https://www.96boards.org/documentation/consumer/hikey/hikey970/build/linux-kernel.md.html 3
A bunch of that stuff you don’t need for building the kernel. envsetup.sh and lunch, for instance, are for building ANDROID, not kernel.
Try this;
Don’t set the PATH. Set ARCH and CROSS_COMPILE as follows (edit the {toolchain} patch to match your path).
export ARCH=arm64
export CROSS_COMPILE={toolchain}/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
make hikey970_defconfig
make -j24
Note that that script does a lot more than just build the kernel, so you should probably break it down until you understand it.
Hi,
I am actually building for Android, reffering to this link: 96boards/documentation/consumer/hikey/hikey970/build/aosp.md.html (unable to post the complete link)
To successfully compile android i need these two binaries : Image.gz-hikey970-4.9 and kirin970-hikey970.dtb-4.9
I gave the path to toolchain in CROSS_COMPILE as you suggested.
I tried giving the individual make commands mentioned in the script.
make hikey970_defconfig--- goes through successfully.
make hisilicon/kirin970-hikey970.dtb---goes through successfully.
make -j$[NCPU*2] Image.gz modules----- command throws the error.
drivers/firmware/efi/libstub/arm-stub.stub.o: absolute symbol references not allowed in the EFI stub
drivers/firmware/efi/libstub/Makefile:69: recipe for target 'drivers/firmware/efi/libstub/arm-stub.stub.o' failed
make[4]: *** [drivers/firmware/efi/libstub/arm-stub.stub.o] Error 1
scripts/Makefile.build:552: recipe for target 'drivers/firmware/efi/libstub' failed
make[3]: *** [drivers/firmware/efi/libstub] Error 2
scripts/Makefile.build:552: recipe for target 'drivers/firmware/efi' failed
make[2]: *** [drivers/firmware/efi] Error 2
scripts/Makefile.build:552: recipe for target 'drivers/firmware' failed
make[1]: *** [drivers/firmware] Error 2
make[1]: *** Waiting for unfinished jobs....
without Image.gz binary i will not be able to compile AOSP successfully…
I get this error if i try to compile AOSP:FAILED: ninja: 'device/linaro/hikey-kernel/Image.gz-hikey970-4.9', needed by 'out/target/product/hikey970/kernel', missing and no known rule to make it
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通