datadancer / HIAFuzz

Hybrid Interface Aware Fuzz for Android Kernel Drivers
Other
31 stars 9 forks source link

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

Open haidela223 opened 1 year ago

haidela223 commented 1 year ago

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 CROSSCOMPILE=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.

aniucw commented 1 year ago

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

haidela223 commented 1 year ago

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

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: @.***>