Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

any idea which aarch64-linux-android-gcc I should use #46

Open
butterl opened this issue Mar 20, 2020 · 1 comment
Open

any idea which aarch64-linux-android-gcc I should use #46

butterl opened this issue Mar 20, 2020 · 1 comment

Comments

@butterl
Copy link

butterl commented Mar 20, 2020

Hi,
I tried with AOSP master code with Hikey960 4.19 kernel build, it turns out that AOSP removed gcc from prebuilts, which gcc should I use for compile the hikey kernel?

~/code/AOSP/hikey-linaro$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-android- -j32
arch/arm64/Makefile:40: LSE atomics not supported by binutils
arch/arm64/Makefile:48: Detected assembler with broken .inst; disassembly will be unreliable
/bin/sh: 1: aarch64-linux-android-gcc: not found
./scripts/gcc-version.sh: line 26: aarch64-linux-android-gcc: command not found
./scripts/gcc-version.sh: line 27: aarch64-linux-android-gcc: command not found
make: aarch64-linux-android-gcc: Command not found
/bin/sh: 1: aarch64-linux-android-gcc: not found
/bin/sh: 1: aarch64-linux-android-gcc: not found
scripts/kconfig/conf  --syncconfig Kconfig
./scripts/gcc-version.sh: 26: ./scripts/gcc-version.sh: aarch64-linux-android-gcc: not found
./scripts/gcc-version.sh: 27: ./scripts/gcc-version.sh: aarch64-linux-android-gcc: not found
./scripts/gcc-version.sh: 29: ./scripts/gcc-version.sh: aarch64-linux-android-gcc: not found
./scripts/gcc-version.sh: 26: ./scripts/gcc-version.sh: aarch64-linux-android-gcc: not found
./scripts/gcc-version.sh: 27: ./scripts/gcc-version.sh: aarch64-linux-android-gcc: not found
./scripts/gcc-version.sh: 29: ./scripts/gcc-version.sh: aarch64-linux-android-gcc: not found
init/Kconfig:17: syntax error
init/Kconfig:16: invalid option
./scripts/clang-version.sh: 15: ./scripts/clang-version.sh: aarch64-linux-android-gcc: not found
./scripts/gcc-plugin.sh: 11: ./scripts/gcc-plugin.sh: aarch64-linux-android-gcc: not found
scripts/kconfig/Makefile:69: recipe for target 'syncconfig' failed
make[2]: *** [syncconfig] Error 1
Makefile:538: recipe for target 'syncconfig' failed
make[1]: *** [syncconfig] Error 2
Makefile:647: recipe for target 'include/config/auto.conf.cmd' failed
make: *** [include/config/auto.conf.cmd] Error 2

#### failed to build some targets (1 seconds) ####

@liuyq
Copy link

liuyq commented Mar 20, 2020

Hi, @butterl
Since gcc is not supported by aosp master by default, please change to use clang to build the kernel.
For the build instructions, please try like this:

$ repo init -u https://android.googlesource.com/kernel/manifest -b hikey-linaro-android-4.19
$ repo sync
$ cd hikey-kernel
$ git fetch "https://android.googlesource.com/kernel/hikey-linaro" refs/changes/40/1259440/5 && git cherry-pick FETCH_HEAD
$ cd -
$ ./build/build.sh
$ ll out/android-hikey-linaro-4.19/dist/Image.gz-dtb

The changes should be merged soon, after that the steps to apply changes are not necessary any more.

The instructions on https://source.android.com/setup/build/devices will updated after the changes merged.

Please let me know if there is any issues.

Thanks,
Yongqin Liu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants