x86: qemu emulator is the default build target

Change-Id: I200536d2d997eda6a6e62eaa9050269e3c7ff6c4
Orig-Change-Id: I1fc3cb491d593d3e28f90278cfc8de5d77852932
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
This commit is contained in:
Bruce Beare
2011-05-31 13:16:31 -07:00
committed by David 'Digit' Turner
parent 5e2feda773
commit f844ec96dd
9 changed files with 85 additions and 153 deletions

View File

@@ -1219,7 +1219,7 @@ ifneq ($(TARGET_SIMULATOR),true)
INTERNAL_EMULATOR_PACKAGE_FILES += \
$(HOST_OUT_EXECUTABLES)/emulator$(HOST_EXECUTABLE_SUFFIX) \
prebuilt/android-arm/kernel/kernel-qemu \
prebuilt/android-$(TARGET_ARCH)/kernel/kernel-qemu \
$(INSTALLED_RAMDISK_TARGET) \
$(INSTALLED_SYSTEMIMAGE) \
$(INSTALLED_USERDATAIMAGE_TARGET)
@@ -1337,6 +1337,8 @@ $(INTERNAL_SDK_TARGET): $(deps)
-I $(HOST_OUT) \
-I $(TARGET_COMMON_OUT_ROOT) \
-v "PLATFORM_NAME=android-$(PLATFORM_VERSION)" \
-v "TARGET_ARCH=$(TARGET_ARCH)" \
-v "TARGET_CPU_ABI=$(TARGET_CPU_ABI)" \
-o $(PRIVATE_DIR) && \
cp -f $(target_notice_file_txt) \
$(PRIVATE_DIR)/platforms/android-$(PLATFORM_VERSION)/images/NOTICE.txt && \

View File

@@ -1,10 +1,3 @@
LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := prebuilt/android-x86/kernel/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel
#

View File

@@ -1,30 +1,23 @@
TARGET_ARCH=x86
DISABLE_DEXPREOPT := true
TARGET_COMPRESS_MODULE_SYMBOLS := false
TARGET_PRELINK_MODULE := false
TARGET_NO_RECOVERY := true
TARGET_HARDWARE_3D := false
BOARD_USES_GENERIC_AUDIO := true
USE_CAMERA_STUB := true
TARGET_PROVIDES_INIT_RC := true
USE_CUSTOM_RUNTIME_HEAP_MAX := "32M"
# 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 := x86
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_BOOTIMAGE_USE_EXT2 := true
TARGET_ARCH := x86
TARGET_ARCH_VARIANT := x86-atom
TARGET_PRELINK_MODULE := false
# For VirtualBox and likely other emulators
BOARD_INSTALLER_CMDLINE := init=/init console=ttyS0 console=tty0 androidboot.hardware=generic_x86 vga=788 androidboot.console=tty0 verbose
BOARD_KERNEL_CMDLINE := init=/init console=tty0 console=ttyS0 androidboot.hardware=generic_x86 vga=788 androidboot.console=tty0 verbose
TARGET_USE_DISKINSTALLER := true
TARGET_DISK_LAYOUT_CONFIG := build/target/board/generic_x86/disk_layout.conf
BOARD_BOOTIMAGE_MAX_SIZE := 8388608
BOARD_SYSLOADER_MAX_SIZE := 7340032
BOARD_FLASH_BLOCK_SIZE := 512
BOARD_USERDATAIMAGE_PARTITION_SIZE := 50M
BOARD_INSTALLERIMAGE_PARTITION_SIZE := 500M
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
# The IA emulator (qemu) uses the Goldfish devices
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
# The eth0 device should be started with dhcp on boot.
# Useful for emulators that don't provide a wifi connection.
NET_ETH0_STARTONBOOT := true

View File

@@ -1,29 +1,8 @@
The generic_x86 board target provides basic services on very basic
hardware (really for an emulation). To build with generic_x86, you will
need an appropriate kernel for your emulation (or device).
The "generic_x86" product defines a non-hardware-specific IA target
without a kernel or bootloader.
A1. Create a new top level directory and pull the AOSP repository
mkdir $HOME/AOSP
cd $HOME/AOSP
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync
A2. Copy in the kernel
cd $HOME/AOSP
cp ~/bzImage.your_device $HOME/AOSP/prebuilt/android-x86/kernel/kernel
A3. Build
cd $HOME/AOSP
source build/envsetup.sh
lunch generic_x86-eng
make -j8
The build will generate some image files whose format may or may not be correct for your
device. You can build an installer image disk for the VirtualBox emulator using the command:
A4. Build a VirtualBox installer image
cd $HOME/AOSP
source build/envsetup.sh
lunch generic_x86-eng
make -j8 installer_vdi
It can be used to build the entire user-level system, and
will work with the IA version of the emulator,
It is not a product "base class"; no other products inherit
from it or use it in any way.

View File

@@ -0,0 +1,26 @@
#
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This is a build configuration for the product aspects that
# are specific to the emulator.
PRODUCT_PROPERTY_OVERRIDES := \
ro.ril.hsxpa=1 \
ro.ril.gprsclass=10
PRODUCT_COPY_FILES := \
development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
development/data/etc/vold.conf:system/etc/vold.conf

View File

@@ -1,54 +0,0 @@
device {
path /dev/block/sda
scheme mbr
# bytes in a disk sector (== 1 LBA), must be a power of 2!
sector_size 512
# What LBA should the partitions start at?
start_lba 2048
# Autodetect disk size if == 0
num_lba 0
partitions {
sysloader {
active y
type linux
len 7M
}
recovery {
active y
type linux
len 16M
}
boot {
active y
type linux
len 8M
}
cache {
type linux
len 512M
}
system {
type linux
len 512M
}
third_party {
type linux
len 512M
}
data {
type linux
len -1
}
}
}

View File

@@ -0,0 +1,6 @@
#
# system.prop for generic sdk
#
rild.libpath=/system/lib/libreference-ril.so
rild.libargs=-d /dev/ttyS0

View File

@@ -16,19 +16,14 @@
# This is a build configuration for a full-featured build of the
# Open-Source part of the tree. It's geared toward a US-centric
# x86 build, but all those aspects can be overridden
# in inherited configurations.
# build quite specifically for the emulator, and might not be
# entirely appropriate to inherit from for on-device configurations.
# If running on an emulator or some other device that has a LAN connection
# that isn't a wifi connection. This will instruct init.rc to enable the
# network connection so that you can use it with ADB
ifdef NET_ETH0_STARTONBOOT
PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
endif
$(call inherit-product, build/target/product/full.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_x86
PRODUCT_DEVICE := generic_x86
PRODUCT_MODEL := Full Android x86
PRODUCT_BRAND := Android
PRODUCT_MODEL := Full Android on x86 Emulator

View File

@@ -1,34 +1,26 @@
#
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# 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 := \
AlarmClock \
AlarmProvider \
Calendar \
Camera \
DrmProvider \
LatinIME \
Mms \
Music \
Settings \
Sync \
Updater \
CalendarProvider \
SubscribedFeedsProvider \
SyncProvider
# It includes the base Android platform.
$(call inherit-product, $(SRC_TARGET_DIR)/product/generic.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/core.mk)
# Overrides
PRODUCT_BRAND := generic_x86
PRODUCT_DEVICE := generic_x86
PRODUCT_NAME := generic_x86
PRODUCT_POLICY := android.policy_phone
# If running on an emulator or some other device that has a LAN connection
# that isn't a wifi connection. This will instruct init.rc to enable the
# network connection so that you can use it with ADB
ifdef NET_ETH0_STARTONBOOT
PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
endif