Product definition Makefile of x86vbox

As we know, the AOSP build system will look for AndroidProducts.mk to find the product definition Makefile for a particular device. Let's review the product definition Makefile x86vbox.mk as follows:

# includes the base of Android-x86 platform 
$(call inherit-product,device/generic/common/x86.mk)

# Overrides
PRODUCT_NAME := x86vbox
PRODUCT_BRAND := Android-x86
PRODUCT_DEVICE := x86vbox
PRODUCT_MODEL := x86vbox_ch8

TARGET_KERNEL_SOURCE := kernel
TARGET_KERNEL_CONFIG := android-x86_defconfig
TARGET_ARCH := x86

PRODUCT_OUT ?= out/target/product/$(PRODUCT_DEVICE)

include $(TARGET_KERNEL_SOURCE)/AndroidKernel.mk

# define build targets for kernel
.PHONY: $(TARGET_PREBUILT_KERNEL)

LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)

PRODUCT_COPY_FILES +=
$(LOCAL_KERNEL):kernel

As we can see, the product definition Makefile is very simple. It does the following things:

  • It includes the general x86 product definition Makefile, device/generic/common/x86.mk
  • It defines product definition variables such as PRODUCT_NAME, PRODUCT_BRAND, PRODUCT_DEVICE, PRODUCT_MODEL, and so on
  • It specifies how to build the kernel for x86vbox

It looks even simpler than the one we created in Chapter 4, Customizing the Android Emulator for x86emu. The inherited x86.mk Makefile did most actual work and we will analyze it in greater depth later.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.163.208