android系統移植要點之一–以6410為例

來源:互聯網
上載者:User
Rockie's Android Porting Guide(1)——build your own board

Rockie Cheng

Download Android codes from google git!
(1)在android源碼目錄下執行(為何每次都要執行?)

. build/envsetup.sh

(2)建立自己的board
copy build/target/board/generic to build/target/board/idea6410
修改build/target/product/AndroidProduct.mk,添加
$(LOCAL_DIR)/idea6410.mk \
copy build/target/product/generic.mk to build/target/product/idea6410.mk
修改build/target/product/idea6410.mk
# Overrides
PRODUCT_BRAND := idea6410
PRODUCT_DEVICE := idea6410

PRODUCT_NAME := idea6410

(3)tapas
[kyon@SEP4020 android2.0]$ tapas
Build for the simulator or the device?
1. Device
2. Simulator
Which would you like? [1]
Build type choices are:
1. release
2. debug
Which would you like? [1] 1
Which product would you like? [generic] idea6410
Variant choices are:
1. user
2. userdebug
3. eng
Which would you like? [eng]
============================================
PLATFORM_VERSION_CODENAME=Eclair
PLATFORM_VERSION=Eclair
TARGET_PRODUCT=idea6410
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
============================================
[kyon@SEP4020 android2.0]$

以上只是基於generic簡單的複製,需要更詳細的定製開發板裝置

附錄:
1)build/target/product/idea6410.mk內容

# This is a generic product that isn't specialized for a specific device.
# It includes the base Android platform. If you need Google-specific features,
# you should derive from generic_with_google.mk
PRODUCT_PACKAGES := \
AccountAndSyncSettings \
AlarmClock \
AlarmProvider \
Bluetooth \
Calculator \
Calendar \
Camera \
CertInstaller \
DrmProvider \
Email \
Gallery \
LatinIME \
Mms \
Music \
Settings \
Sync \
Updater \
CalendarProvider \
SyncProvider
$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
# Overrides
PRODUCT_BRAND := idea6410
PRODUCT_DEVICE := idea6410
PRODUCT_NAME := idea6410

產品名稱及包含的應用程式

2)build/target/board/idea6410/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
不編譯bootloader及核心
使用arm eabi編譯器
使用HTC和通用音頻(沒有使用ALSA)

如果需要添加HAL層驅動,需要修改此檔案

3)build/target/board/idea6410/AndroidBoard.mk
LOCAL_PATH := $(call my-dir)
file := $(TARGET_OUT_KEYLAYOUT)/tuttle2.kl
ALL_PREBUILT += $(file)
$(file) : $(LOCAL_PATH)/tuttle2.kl | $(ACP)
$(transform-prebuilt-to-target)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := tuttle2.kcm
include $(BUILD_KEY_CHAR_MAP)
目前看來加入了一些鍵盤對應檔案

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.