Build your own Android system learning, management and compilation platform

2019-10-24

I bought a host, ready to build my own learning and management platform, and build my own compilation environment. Record it here.

System: Ubutun 16.04
Compilation Target System: Android 5.0 Linux4.4 Linux3
Hardware configuration: Mount 3T hard disk to /home directory
Source code retrieval environment: opengrok

 

Prepare the source code package:
    uboot_tiny4412-20130729
    android-5.0.2-fs-20150325.tar
    linux-3.0.86-20150324
    linux4.4 kernel
server platform construction: Gitlab+Gerrit+Jenkins complete docking
reference blog: https://www.cnblogs .com/jiangzhaowei/p/7927382.html I would
like to thank the blogger for his guidance.

For the installation of Ubuntu16.04, refer to the blog:

Android build environment:

ubuntu16.04编译android5.1环境配置,安装openjdk7
	sudo add-apt-repository ppa:openjdk-r/ppa
	sudo apt-get update
	sudo apt-get install openjdk-7-jdk
安装ubuntu 16的依赖
	sudo apt-get install -y git flex bison gperf build-essential libncurses5-dev:i386 \
	libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev g++-multilib \
	tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \
	dpkg-dev libsdl1.2-dev libesd0-dev \
	git-core gnupg flex bison gperf build-essential  \
	zip curl zlib1g-dev gcc-multilib g++-multilib \
	libc6-dev-i386 \
	lib32ncurses5-dev x11proto-core-dev libx11-dev \
	lib32z-dev ccache \
	libgl1-mesa-dev libxml2-utils xsltproc unzip m4
如果提示 “mkimage” command not found – U-Boot images will not be built使用下面命令安装
	sudo apt-get install u-boot-tools
编译时候提示:clang: error: linker command failed with exit code
	修改源码中的 Android/art/build/Android.common_build.mk
	修改前:
	# Host.
	ART_HOST_CLANG := false
	ifneq ($(WITHOUT_HOST_CLANG),true)
	# By default, host builds use clang for better warnings.
	ART_HOST_CLANG := true
	endif
	修改后:
	# Host.
	ART_HOST_CLANG := false
	ifneq ($(WITHOUT_HOST_CLANG),false)
	# By default, host builds use clang for better warnings.
	ART_HOST_CLANG := true
提示error: unsupported reloc 43的话使用下面命令
	cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld
然后执行一次make update-api,再make

The Android5.0 compilation environment is set up.

Ubuntu mounts 3T hard disk or larger than 2T disk,
Linux system remounts /home to other hard disks or partitions

 

 

Guess you like

Origin blog.csdn.net/qq543716996/article/details/102716919