Android Add new target

  次阅读 作者:智能小宝 来源:互联网 2016-01-13 21:45 我要评论(0)

Add new target

Overview

The article describes how to create a target for your own device under Android-x86. Rewritten from the e-mail Chih-wei Huang sent to android-x86 discussion group. You can find the original e-mail in https://mail.google.com/mail/?ui=2&shva=1#search/Chih-wei/125eb28a674c23e9

Create a directory

First, you have to create a directory to hold all stuff specific for your target device.

mkdir vendor/xxx/yyy

or

mkdir device/xxx/yyy

where xxx is usually the vendor's name and yyy is the product name. Historically, we used the vendor/ directory. However, Google suggested to use device/ since Froyo. We encourage to use the new convention device/ as AOSP does.

Create makefiles

At least you have to create four makefiles in the new directory:

AndroidProducts.mk

This makefile should only contain PRODUCT_MAKEFILES which is a list of product makefiles to expose to the build system. So if your product name is yyy, it is

PRODUCT_MAKEFILES := $(LOCAL_DIR)/yyy.mk

The product makefile: yyy.mk

You have to define PRODUCT_PACKAGES, PRODUCT_NAME, PRODUCT_DEVICE in it, and call inherit-product to inherit from a product makefile.I suggest to to inherit generic_x86.mk to get all common x86 rules.

$(call inherit-product,$(SRC_TARGET_DIR)/product/generic_x86.mk)

The board config makefile: BoardConfig.mk

You can override some variables before including $(GENERIC_X86_CONFIG_MK)

- TARGET_HAS_THIRD_PARTY_APPS

set to true if you hope to compile third party apps like ConnectBot, FileManager introduced by Android-x86.

Default: false

- BOARD_USES_ALSA_AUDIO

Set to false if you don't want ALSA audio.

Default: true.

- BOARD_HAVE_BLUETOOTH

If you don't need bluetooth, set it to false.

Default: true.

- BOARD_USES_TSLIB

Set to true if you need tslib to calibrate the touchscreen.

Default: false

- BOARD_KERNEL_CMDLINE

You can customize your cmdline (kernel boot options)

- BOARD_WPA_SUPPLICANT_DRIVER

Set to true if you need wifi support

The android board makefile: AndroidBoard.mk

You can override some variables before including

$(GENERIC_X86_ANDROID_MK)

- LOCAL_FIRMWARES

Specify the firmwares to be included in the target. The firmwares are supposed to be already in build/target/board/generic_x86/firmware/.

You may also specify a different directory in LOCAL_FIRMWARES_DIR.

- TARGET_INITRD_SCRIPTS

Specify a hook script to be added in the initrd.img. Usually the script should contain a detect_hardware function that will be called by the init script.

Read eeepc_info as an implementation example.

- TARGET_PREBUILT_APPS

本站文章信息来源于网络以及网友投稿,本站只负责对文章进行整理、排版、编辑,是出于传递更多信息之目的,并不意味着赞同其观点或证实其内容的真实性。如果您有什么意见或建议,请联系QQ28-1688-302!

人工智能实验室
相关文章相关文章
  • 无人驾驶汽车如何改变城市生活?听听他们怎么说

    无人驾驶汽车如何改变城市生活?听听他们怎么说

  • 韩春雨称已能重复实验结果 近期将有消息公布

    韩春雨称已能重复实验结果 近期将有消息公布

  • 英国研发“杀生”机器人 通过生命体获取能量

    英国研发“杀生”机器人 通过生命体获取能量

  • 未来两年人工智能要怎么走?看这篇就够了

    未来两年人工智能要怎么走?看这篇就够了

网友点评网友点评
阅读推荐阅读推荐

据国外媒体报道,在过去两年内,聊天机器人(chatbot)、人工智能以及机器学习的研发和采用取得了巨大进展。许多初创公司正利用人工智能和...

霍金 视觉中国 图 英国著名物理学家霍金(Stephen Hawking)再次就人工智能(AI)发声,他认为:对于人类来说,强大AI的出现可能是最美妙的...

文|郑娟娟 今年,人工智能(AI) 60岁了。在AI60岁的时候,笔者想要介绍一下AI100,一个刚刚2岁的研究项目,但它的预设寿命是100年,甚至更长...

AlphaGo与李世石的人机大战,为大众迅速普及了人工智能的概念。 但对谷歌而言,除了下围棋,现在的人工智能进展到哪一步了?未来,人工智能...