zoukankan      html  css  js  c++  java
  • 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

    chythanya

    1月29日

    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 :

    1. 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
    2. Since GCC is deprecated, how kernel images should be built using clang?
    3. 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

     

    doitright

    1月30日

    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

    chythanya

    1月31日

    Thank you,
    Will try this

    chythanya

    2月1日

    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…

    doitright

    2月2日

    You’re going to have to provide more details.

    Precise commands you used for setting up the environment and compiling.

    chythanya

    2月2日

    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/:$PATH
    export ARCH=arm64
    export CROSS_COMPILE=aarch64-linux-gnu-
    ~/aosp/kernel$ ./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

    doitright

    2月2日

    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.

    chythanya

    2月3日

    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

  • 相关阅读:
    [恢]hdu 2391
    [恢]hdu 2352
    [恢]hdu 2393
    [恢]hdu 1868
    [恢]hdu 1279
    [恢]hdu 2086
    [恢]hdu 1405
    [恢]hdu 2088
    [恢]hdu 2106
    [恢]hdu 2537
  • 原文地址:https://www.cnblogs.com/ztguang/p/12644243.html
Copyright © 2011-2022 走看看