Guest hecatae Posted July 25, 2013 Report Posted July 25, 2013 The device tree, for example, /device/lg/e400 would consist of the following make files: Android.mk - this will tell the build system to include and to build sources specifically for your device. See below, for an example. This is dependant on the device and hardware, you could have libsensors, liblights, libcamera subdirectories under the example device tree, i.e. /device/lg/e400/libsensors, /device/lg/e400/liblights, /device/lg/e400/libcamera etc. AndroidBoard.mk - this is for the kernel, the build system uses that to drop the kernel image in place (more about this in a few minutes) AndroidProducts.mk - specifies the appropriate device's make file, to use for building. i.e. /device/lg/e400/device_e400.mk, this is specific also. device_e400.mk - specifies the properties and extras to copy over into the final output. BoardConfig.mk - This is the meat of it all, this is where compiler conditional flags are set, partition layouts, boot addresses, ramdisk size, and so on. Android.mk: ifeq ($(TARGET_BOOTLOADER_BOARD_NAME),xxxxx) include $(call all-named-subdir-makefiles, recovery libsensors liblights libcamera ....) endif[/code] [u]AndroidBoard.mk[/u]: [code]LOCAL_PATH := device/lg/e400/ # # Boot files # TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel file := $(INSTALLED_KERNEL_TARGET) ALL_PREBUILT += $(file) $(file): $(TARGET_PREBUILT_KERNEL) | $(ACP) $(transform-prebuilt-to-target) AndroidProducts.mk: PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/device_e400.mk [/code] [u]device_e400.mk[/u]: [code]PRODUCT_NAME := lg_e400 PRODUCT_DEVICE := e400 PRODUCT_MODEL := LG e400 PRODUCT_COPY_FILES += \ ... specific ... PRODUCT_PROPERTY_OVERRIDES := \ ro.com.android.dateformat=dd-MM-yyyy \ ... more stuff ... BoardConfig.mk: LOCAL_PATH:= $(call my-dir) TARGET_NO_BOOTLOADER := true TARGET_BOARD_PLATFORM := msm7x27a TARGET_BOARD_PLATFORM_GPU := qcom-adreno200 TARGET_CPU_ABI := armeabi-v7a TARGET_CPU_ABI2 := armeabi TARGET_ARCH_VARIANT := armv7-a-neon ARCH_ARM_HAVE_TLS_REGISTER := true TARGET_CPU_SMP := true TARGET_BOOTLOADER_BOARD_NAME := e400 TARGET_CORTEX_CACHE_LINE_32 := true BOARD_KERNEL_CMDLINE := androidboot.hardware=e0 BOARD_KERNEL_BASE := 0x00200000 BOARD_FORCE_RAMDISK_ADDRESS := 0x01300000 BOARD_KERNEL_PAGESIZE := 4096 TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp BOARD_BOOTIMAGE_PARTITION_SIZE := 8388608 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 8388608 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 392167424 BOARD_USERDATAIMAGE_PARTITION_SIZE := 164626432 BOARD_FLASH_BLOCK_SIZE := 131072 TARGET_PREBUILT_KERNEL := device/lge/e400/kernel TARGET_PREBUILT_RECOVERY_KERNEL := device/lg/e400/recovery_kernel TARGET_USERIMAGES_USE_EXT4 := true BOARD_HAS_NO_SELECT_BUTTON := true BOARD_USE_CUSTOM_RECOVERY_FONT := '"font_7x16.h"' COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DQCOM_ROTATOR_KERNEL_FORMATS USE_OPENGL_RENDERER := true # QCOM stuffs BOARD_USES_QCOM_HARDWARE := true TARGET_USES_OVERLAY := false TARGET_HAVE_BYPASS := false TARGET_USES_C2D_COMPOSITION := true TARGET_USES_GENLOCK := true TARGET_QCOM_HDMI_OUT := false TARGET_FORCE_CPU_UPLOAD := true BOARD_USES_QCOM_LIBS := true BOARD_USE_QCOM_PMEM := true BOARD_EGL_CFG := device/lge/e400/egl.cfg TARGET_GRALLOC_USES_ASHMEM := true BOARD_HAVE_BLUETOOTH := true # to enable the GPS HAL BOARD_USES_QCOM_LIBRPC := true BOARD_USES_QCOM_GPS := true BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := e400 # AMSS version to use for GPS BOARD_VENDOR_QCOM_GPS_LOC_API_AMSS_VERSION := 50000 BOARD_WLAN_DEVICE := qcwcn WIFI_EXT_MODULE_PATH := /system/lib/modules/librasdioif.ko WIFI_DRIVER_MODULE_PATH := /system/lib/modules/wlan.ko WIFI_EXT_MODULE_NAME := librasdioif WIFI_DRIVER_MODULE_NAME := wlan BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_wext BOARD_WPA_SUPPLICANT_DRIVER := WEXT WPA_SUPPLICANT_VERSION := VER_0_8_X BOARD_WEXT_NO_COMBO_SCAN := true BOARD_VOLD_MAX_PARTITIONS := 22 COMMON_GLOBAL_CFLAGS += -DBOARD_CHARGING_CMDLINE_NAME='"lge.reboot"' -DBOARD_CHARGING_CMDLINE_VALUE='"pwroff"'[/code] thanks to t0mm13b for his original post here: http://stackoverflow.com/questions/11352709/android-device-configuration-for-aosp
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now