Add the configuration files for the new device mydevice of the company mycompany.
Create AndroidProducts.mk
mkdir -p device/mycompany/mydevice nano 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) # Overrides PRODUCT_NAME := full_mydevice PRODUCT_DEVICE := mydevice PRODUCT_BRAND := Android PRODUCT_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/mydevice nano 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 := true TARGET_NO_KERNEL := true TARGET_CPU_ABI := armeabi HAVE_HTC_AUDIO_DRIVER := true BOARD_USES_GENERIC_AUDIO := true # no hardware camera USE_CAMERA_STUB := true # Set /system/bin/sh to mksh, not ash, to test the transition. TARGET_SHELL := mksh # CPU TARGET_ARCH_VARIANT := armv7-a-neon ARCH_ARM_HAVE_TLS_REGISTER := true
Configure Android for mydevice
. build/envsetup.sh
including device/htc/passion/vendorsetup.sh including device/mycompany/mydevice/vendorsetup.sh including device/samsung/crespo4g/vendorsetup.sh including device/samsung/crespo/vendorsetup.sh
lunch
You're building on Linux
Lunch 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-userdebug
Which would you like? [full-eng] 5
============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=full_mydevice
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
Build Android for mydevice
make -j4
Combining NOTICE files: out/target/product/mydevice/obj/NOTICE.html Target system fs image: out/target/product/mydevice/obj/PACKAGING/systemimage_intermediates/system.img Install system fs image: out/target/product/mydevice/system.img Installed file list: out/target/product/mydevice/installed-files.txt
本文介绍如何为特定Android设备mydevice创建必要的配置文件,包括AndroidProducts.mk、full_mydevice.mk、vendorsetup.sh及BoardConfig.mk等,并展示了如何设置编译目标、指定硬件特性以及构建过程。
1194

被折叠的 条评论
为什么被折叠?



