HIAFuzz icon indicating copy to clipboard operation
HIAFuzz copied to clipboard

Build the kernel(problem to generate the vmlinux of Mate 9 in ../out/).

Open haidela223 opened this issue 2 years ago • 2 comments

Hello, after downloading and extracting Huawei Mate 9 kernel kernel source from MHA-NG_EMUI5.0_opensource.tar.gz from Huawei Open Source Release Center, and running the following commands: cd ~/Code_Opensource/kernel sudo sh -c 'for f in $(find . -name Makefile); do sed -i "s/-g /-g3 /g" $f; done' sudo sh -c 'for f in $(find . -name Makefile); do sed -i "s/-g$ /-g3 /g" $f; done' export PATH=$PATH:/home/haidela/Downloads/MHA-AL00_02_HarmonyOS_opensource/Code_Opensource/external/selinux/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- gcc export CROSS_COMPILE=aarch64-linux-android- mkdir ../out

Without problem, and after executing the command "make ARCH=arm64 O=../out merge_hi3660_defconfig" and I had as result: make[1]: Entering directory '/home/haidela/PycharmProjects/HIAFuzz/Code_Opensource/out' 'rivers/huawei_platform/net/himos/Kconfig:1:warning: ignoring unsupported character' 'rivers/huawei_platform/net/himos/Kconfig:2:warning: ignoring unsupported character' 'rivers/huawei_platform/power/hardware_monitor/Kconfig:1:warning: ignoring unsupported character'

configuration written to .config

make[1]: Leaving directory '/home/haidela/PycharmProjects/HIAFuzz/Code_Opensource/out'"

And finally, I executed the command "make ARCH=arm64 O=../out -j8" and I got the following errors:

"make[1]: Entering directory '/home/haidela/PycharmProjects/HIAFuzz/Code_Opensource/out' arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum /home/haidela/PycharmProjects/HIAFuzz/Code_Opensource/kernel/scripts/gcc-version.sh: line 25: aarch64-linux-android-gcc: command not found /home/haidela/PycharmProjects/HIAFuzz/Code_Opensource/kernel/scripts/gcc-version.sh: line 26: aarch64-linux-android-gcc: command not found make[1]: aarch64-linux-android-gcc: No such file or directory make[1]: aarch64-linux-android-gcc: No such file or directory make[1]: aarch64-linux-android-gcc: No such file or directory CHK include/config/kernel.release make[1]: aarch64-linux-android-gcc: No such file or directory Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler make[1]: *** [/home/haidela/PycharmProjects/HIAFuzz/Code_Opensource/kernel/Makefile:1339: prepare-compiler-check] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/haidela/PycharmProjects/HIAFuzz/Code_Opensource/out' make: *** [Makefile:152: sub-make] Error 2"

Please! Can you help to solve these problems. Thank you in advance for your help! Ask to help solve the above problems on the HIAFuzz project.

haidela223 avatar May 18 '23 03:05 haidela223

这个问题可能是aarch64-linux-android-gcc文件没有写入PATH 环境变量里,尝试which aarch64-linux-android-gcc ,如果没有返回任何内容,说明这个编译器没有在 PATH 环境变量所列目录中

aniucw avatar Sep 22 '23 15:09 aniucw

您好,我还没有找到解决方案。

Le ven. 22 sept. 2023 à 23:04, A_Niucw @.***> a écrit :

这个问题可能是aarch64-linux-android-gcc文件没有写入PATH 环境变量里,尝试which aarch64-linux-android-gcc ,如果没有返回任何内容,说明这个编译器没有在 PATH 环境变量所列目录中

— Reply to this email directly, view it on GitHub https://github.com/datadancer/HIAFuzz/issues/6#issuecomment-1731576669, or unsubscribe https://github.com/notifications/unsubscribe-auth/A6T6NG2HXABMWV2BQMVTE5DX3WSHVANCNFSM6AAAAAAYF47UWU . You are receiving this because you authored the thread.Message ID: @.***>

haidela223 avatar Sep 27 '23 03:09 haidela223