AOSP建立定制的设备上 [英] AOSP build on custom device

查看:955
本文介绍了AOSP建立定制的设备上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要建 AOSP 4.2果冻豆。 一切正常,当我建立默认全ENG 配置和模拟器中运行它。

我需要建立自定义设备并运行它(在模拟器 - 用于测试它是否真的有效,并在实际设备)。 当我创建自定义设备根据 full_base.mk 的文件,并在模拟器运行 - 模拟器刚刚挂断了Android文字第一个屏幕上,并不会加载。 我有 system.img,userdata.img,的ramdisk.img 全面建设出目录之后。这是所有我需要的用于构建自定义AOSP并在设备上运行呢?我可以在模拟器或者只是在实际设备上运行我的体型?

我应该有一些额外的建设AOSP的实际设备:?内核,设备驱动程序等

自定义设备文件夹中的文件(设备/ my_company / my_product):

Android.mk

  LOCAL_PATH:= $(叫我-DIR)
包括$(CLEAR_VARS)

ifneq($(过滤器my_product,$(TARGET_DEVICE)))
包括$(呼叫全的makefile-下,$(LOCAL_PATH))
万一
 

AndroidProducts.mk

  PRODUCT_MAKEFILES:= \
    $(LOCAL_DIR)/full_myproduct.mk
 

BoardConfig.mk

  TARGET_NO_BOOTLOADER:= TRUE
TARGET_NO_KERNEL:=真

TARGET_ARCH:=手臂

TARGET_ARCH_VARIANT:=的ARMv7-A
TARGET_CPU_VARIANT:=通用
TARGET_CPU_ABI:= armeabi-V7A
TARGET_CPU_ABI2:= armeabi

HAVE_HTC_AUDIO_DRIVER:=真
BOARD_USES_GENERIC_AUDIO:=真

#没有硬件摄像头
USE_CAMERA_STUB:=真

#开启dex- preoptimization加快第一启动顺序
#SDK的AVD的。请注意,此操作只在Linux现在
IFEQ($(HOST_OS),LINUX)
  IFEQ($(WITH_DEX preOPT),)
    WITH_DEX preOPT:= TRUE
  万一
万一

#建立OpenGLES仿真宾主库
BUILD_EMULATOR_OPENGL:=真

#建立并启用了OpenGL ES视图渲染。在模拟器上运行时,
#在GLES渲染器禁用本身如果主机GL加速不可用。
USE_OPENGL_RENDERER:=真
 

full_myproduct.mk

  $(电话继承产品,$(SRC_TARGET_DIR)/product/languages​​_full.mk)
$(电话继承产品,$(SRC_TARGET_DIR)/product/full_base.mk)

#DEVICE_PACKAGE_OVERLAYS:=
#PRODUCT_PACKAGES + =
#PRODUCT_C​​OPY_FILES + =

PRODUCT_NAME:= full_myproduct
PRODUCT_DEVICE:= myProduct的
PRODUCT_MODEL:=定制的Andr​​oid
PRODUCT_BRAND:=机器人
 

vendorsetup.sh

  add_lunch_combo full_myproduct-userdebug
 

解决方案

好像你有AOSP版本系统上掌握得很好,特别是对如何添加新设备。

全ENG 只针对仿真器。通常你对问题的设备构建定制 .IMG ,因为硬件驱动程序中起到了很大的作用的装置是否工作。

例如,如果你有一个石斑鱼金枪鱼,你最终会建设的设备,而不是对全ENG 午餐应该列出其他设备,否则将它们添加到您的设备/ 厂商/ 树木。谷歌提供了必要搭建的Nexus设备上的[公司网址]行的文件[https://developers.google.com/android/nexus/drivers]。

什么是您正在构建自定义设备?如果您的设备在市场上销售,机会是有人在XDA正试图端口AOSP和朋友(CM,AOKP等)到您的设备。

即使您的设备不上XDA,没准它具有通用的硬件与一堆,你可以找到在AOSP其他设备。在这一点上,你必须去的code樱桃挑驱动程序特定的位,像无线芯片组,音响设备等。

我没有一个好的底漆建立了我的头顶部,但 http://wiki.cyanogenmod.org / W / Main_Page 应该是相当对您有所帮助。本维基提高了很多,因为它的创作,现在有一个chockful有用的信息。

I'm building AOSP 4.2 Jelly Bean. Everything is ok when I build default full-eng configuration and run it on emulator.

I need to build custom device and run it (on emulator - for testing if it really works, and on real device). When I create custom device based on full_base.mk file, and run it on emulator - emulator just hangs up on first screen with ANDROID text, and will not load at all. I have system.img, userdata.img, ramdisk.img after building in out directory. Is this all what I need for building custom AOSP and run it on device? Can I run my build on emulator or just on real device?

Should I have something additional for building AOSP for real device: kernel, device drivers, etc.?

custom device folder files (device/my_company/my_product):

Android.mk

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

ifneq ($(filter my_product,$(TARGET_DEVICE)),)
include $(call all-makefiles-under,$(LOCAL_PATH))
endif

AndroidProducts.mk

PRODUCT_MAKEFILES := \
    $(LOCAL_DIR)/full_myproduct.mk

BoardConfig.mk

TARGET_NO_BOOTLOADER := true
TARGET_NO_KERNEL := true

TARGET_ARCH := arm

TARGET_ARCH_VARIANT := armv7-a
TARGET_CPU_VARIANT := generic
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi

HAVE_HTC_AUDIO_DRIVER := true
BOARD_USES_GENERIC_AUDIO := true

# no hardware camera
USE_CAMERA_STUB := true

# Enable dex-preoptimization to speed up the first boot sequence
# of an SDK AVD. Note that this operation only works on Linux for now
ifeq ($(HOST_OS),linux)
  ifeq ($(WITH_DEXPREOPT),)
    WITH_DEXPREOPT := true
  endif
endif

# Build OpenGLES emulation guest and host libraries
BUILD_EMULATOR_OPENGL := true

# Build and enable the OpenGL ES View renderer. When running on the emulator,
# the GLES renderer disables itself if host GL acceleration isn't available.
USE_OPENGL_RENDERER := true

full_myproduct.mk

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

#DEVICE_PACKAGE_OVERLAYS :=
#PRODUCT_PACKAGES +=
#PRODUCT_COPY_FILES +=

PRODUCT_NAME := full_myproduct
PRODUCT_DEVICE := myproduct
PRODUCT_MODEL := Customized Android
PRODUCT_BRAND := Android

vendorsetup.sh

add_lunch_combo full_myproduct-userdebug

解决方案

It seems like you have a good hold on the AOSP build system, especially on how to add new devices.

full-eng only targets the emulator. Usually you build custom .img for the device in question, as the hardware drivers play a big role in whether the device works or not.

For example, if you have a grouper or a maguro, you would end up building for that device instead of full-eng. lunch should list the additional devices as you add them to your device/ and vendor/ trees. Google provides the files necessary to build for the line of Nexus devices on their [website][https://developers.google.com/android/nexus/drivers].

What is the custom device that you are building for? If your device is commercially sold, chances are someone on XDA is trying to port AOSP and friends (CM, AOKP, etc) to your device.

Even if your device isn't on XDA, chances are it has hardware common with a bunch of other devices that you can find on AOSP. At that point, you'd have to go cherry pick driver-specific bits of code, like wifi chipsets, sound devices, etc.

I don't have a good primer for building off the top of my head, but http://wiki.cyanogenmod.org/w/Main_Page should be fairly helpful to you. This wiki has improved a lot since its creation and now has a chockful of useful information.

这篇关于AOSP建立定制的设备上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆