Add new device

来源:互联网 发布:求好听的淘宝店铺名字 编辑:程序博客网 时间:2024/06/01 07:51

Add the configuration files for the new device mydevice of the company mycompany.

Create AndroidProducts.mk

mkdir -p device/mycompany/mydevicenano device/mycompany/mydevice/AndroidProducts.mk
PRODUCT_MAKEFILES := \    $(LOCAL_DIR)/full_mydevice.mk

Create file full_mydevice.mk
Example is build/target/product/full.mk

nano device/mycompany/mydevice/full_mydevice.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)$(call inherit-product, $(SRC_TARGET_DIR)/board/generic/device.mk)# OverridesPRODUCT_NAME := full_mydevicePRODUCT_DEVICE := mydevicePRODUCT_BRAND := AndroidPRODUCT_MODEL := Full Android on mydevice

Create file vendorsetup.sh

nano device/mycompany/mydevice/vendorsetup.sh
add_lunch_combo full_mydevice-eng

Create file BoardConfig.mk

Examples are
build/target/board/generic/BoardConfig.mk
device/samsung/crespo/BoardConfig.mk 
device/samsung/crespo/BoardConfigCommon.mk

mkdir -p device/mycompany/mydevicenano device/mycompany/mydevice/BoardConfig.mk
# config.mk## Product-specific compile-time definitions.## The generic product target doesn't have any hardware-specific pieces.TARGET_NO_BOOTLOADER := trueTARGET_NO_KERNEL := trueTARGET_CPU_ABI := armeabiHAVE_HTC_AUDIO_DRIVER := trueBOARD_USES_GENERIC_AUDIO := true# no hardware cameraUSE_CAMERA_STUB := true# Set /system/bin/sh to mksh, not ash, to test the transition.TARGET_SHELL := mksh# CPUTARGET_ARCH_VARIANT := armv7-a-neonARCH_ARM_HAVE_TLS_REGISTER := true

Configure Android for mydevice

. build/envsetup.sh 
including device/htc/passion/vendorsetup.shincluding device/mycompany/mydevice/vendorsetup.shincluding device/samsung/crespo4g/vendorsetup.shincluding device/samsung/crespo/vendorsetup.sh
lunch
You're building on LinuxLunch menu... pick a combo:     1. full-eng     2. full_x86-eng     3. simulator     4. full_passion-userdebug     5. full_mydevice-eng     6. full_crespo4g-userdebug     7. full_crespo-userdebugWhich would you like? [full-eng] 5============================================PLATFORM_VERSION_CODENAME=AOSPPLATFORM_VERSION=AOSPTARGET_PRODUCT=full_mydeviceTARGET_BUILD_VARIANT=engTARGET_SIMULATOR=falseTARGET_BUILD_TYPE=releaseTARGET_BUILD_APPS=TARGET_ARCH=armTARGET_ARCH_VARIANT=armv7-a-neonHOST_ARCH=x86HOST_OS=linuxHOST_BUILD_TYPE=releaseBUILD_ID=OPENMASTER============================================

Build Android for mydevice

make -j4
Combining NOTICE files: out/target/product/mydevice/obj/NOTICE.htmlTarget system fs image: out/target/product/mydevice/obj/PACKAGING/systemimage_intermediates/system.imgInstall system fs image: out/target/product/mydevice/system.imgInstalled file list: out/target/product/mydevice/installed-files.txt
0 0
原创粉丝点击