Establish Android Build Environment Under Fedora 27 Install required packages dnf install git-core gnupg flex bison gperf zip curl zlib-devel gcc-arm-linux-gnu gcc-c++-arm-linux-gnu ccache unzip java-1.8.0-openjdk-devel make automake autoconf python2 ncurses-compat-libs libstdc++.i686 Configure USB Access
abi –This folder contains a sub folder called cpp which actually contains many C++ files linked to many places. art –it is the folder that deals with the compilation of the latest android ART runtime. If you’re looking into source directories of some other android versions, you won’t fins it obviously bionic –the C-runtime for Android. Note that Android is not using glibc like most Linux distributions. Instead the c-library is called bionic and is based mostly on BSD-derived sources.
理解构建层 先看看Android官方的解释
Understand Build Layers The build hierarchy includes the abstraction layers that correspond to the physical makeup of a device. These layers are described in the table below. Each layer relates to the one above it in a one-to-many relationship. For example, an architecture can have more than one board and each board can have more than one product. You may define an element in a given layer as a specialization of an element in the same layer, thus eliminating copying and simplifying maintenance.
build/core/main.mk:108:include $(BUILD_SYSTEM)/config.mk build/core/config.mk:137:include $(BUILD_SYSTEM)/envsetup.mk build/core/config.mk:155:include $(board_config_mk) build/core/envsetup.mk:115:include $(BUILD_SYSTEM)/product_config.mk build/core/product_config.mk:179:include $(BUILD_SYSTEM)/product.mk build/core/product_config.mk:180:include $(BUILD_SYSTEM)/device.mk build/core/config.mk:45:SRC_TARGET_DIR := $(TOPDIR)build/target build/core/config.mk:139:# Boards may be defined under $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE) build/core/config.mk:145: $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \ build/core/product_config.mk:185: $(SRC_TARGET_DIR)/product/AndroidProducts.mk) build/core/product_config.mk:267:$(foreach runtime, $(product_runtimes), $(eval include $(SRC_TARGET_DIR)/product/$(runtime).mk)) build/core/product.mk:33: $(SRC_TARGET_DIR)/product/AndroidProducts.mk