Skip to content

Instructions to build android-5.0.0_r2 and goldfish3.4

Notifications You must be signed in to change notification settings

enlighten5/android_build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Android_Build

Instructions to build android-5.0.0_r2.0.1 and goldfish3.4

Build android

please find the offical instruction here: https://source.android.com/setup/build/downloading

Build goldfish

  • Clone goldfish
    git clone http://android.googlesource.com/kernel/goldfish.git
    $cd goldfish
    $git branch -a //check all branch
    $git checkout remotes/origin/android-goldfish-3.4
  • Compile goldfish
    $export PATH=$PATH:~/WORKING_DIRECTORY/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin (replace the address accordingly)
    $export ARCH=arm
    $export SUBARCH=arm
    $export CROSS_COMPILE=arm-eabi-
    $cd /path/to/android/source/code
    $source ./build/envsetup.sh
    $lunch aosp_eng
    $cd /path/to/goldfish
    $make goldfish_armv7_defconfig
    $make

Troubleshooting common android build errors:

  • For android-5.0.0, do the following steps before make
    rm -rf ~/<android_art_source>/out
    cp /usr/bin/ld.gold ~/<android_art_source>prebuilts/gcc/Linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld
    make update-api
  • patching build/core/clang/HOST_x86_common.mk
    ifeq ($(HOST_OS),linux)
    CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS := \
    --gcc-toolchain=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG) \
    - --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot
    + --sysroot=$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/sysroot \
    + -B$($(clang_2nd_arch_prefix)HOST_TOOLCHAIN_FOR_CLANG)/x86_64-linux/bin

About

Instructions to build android-5.0.0_r2 and goldfish3.4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published