Skip to content

Failed to build goldfish kernel  #11

@ysun

Description

@ysun

Hi the guide is pretty cool. But I met a failure when I make kernel:

make O=out ARCH=x86_64 CC=clang CLANG_TRIPLE=x86_64-linux-gnu x86_64_defconfig

make[1]: Entering directory '/data/kernel-android-emulator/goldfish/out'
  GEN     Makefile
#
# No change to .config
#
make[1]: Leaving directory '/data/kernel-android-emulator/goldfish/out'

make -j64 O=out ARCH=x86_64 CC=clang CLANG_TRIPLE=x86_64-linux-gnu- CROSS_COMPILE=x86_64-linux-android-

root@chrome-server:/data/kernel-android-emulator/goldfish# make -j64 O=out  ARCH=x86_64 CC=clang CLANG_TRIPLE=x86_64-linux-gnu- CROSS_COMPILE=x86_64-linux-android-
make[1]: Entering directory '/data/kernel-android-emulator/goldfish/out'
  GEN     Makefile
scripts/kconfig/conf  --syncconfig Kconfig
scripts/Kconfig.include:39:  gold linker 'x86_64-linux-android-ld' not supported
make[3]: *** [../scripts/kconfig/Makefile:73: syncconfig] Error 1
make[2]: *** [../Makefile:571: syncconfig] Error 2
make[1]: *** [/data/kernel-android-emulator/goldfish/Makefile:691: include/config/auto.conf.cmd] Error 2
make[1]: Leaving directory '/data/kernel-android-emulator/goldfish/out'
make: *** [Makefile:179: sub-make] Error 2
root@chrome-server:/data/kernel-android-emulator/goldfish#

I have not much experience on compiling Android or cross build kernel, so could you please guide me more ? Great thank.

Before the code change, I can cross build kernel 4.19 with gcc, but i have no idea how to do that with CLang.

Thanks
--Yi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions