Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18a130e9 authored by Bruce Beare's avatar Bruce Beare Committed by Vladimir Chtchetkine
Browse files

x86: qemu emulator is the default build target



Change-Id: I1fc3cb491d593d3e28f90278cfc8de5d77852932
Signed-off-by: default avatarBruce Beare <bruce.j.beare@intel.com>
Signed-off-by: default avatarJun Nakajima <jun.nakajima@intel.com>
parent 960ad4e0
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1252,7 +1252,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)
@@ -1377,9 +1377,11 @@ $(INTERNAL_SDK_TARGET): $(deps)
			-I $(TARGET_COMMON_OUT_ROOT) \
			-v "PLATFORM_NAME=android-$(PLATFORM_VERSION)" \
			-v "OUT_DIR=$(OUT_DIR)" \
			-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 && \
				$(PRIVATE_DIR)/platforms/android-$(PLATFORM_VERSION)/images/$(TARGET_CPU_ABI)/NOTICE.txt && \
		cp -f $(tools_notice_file_txt) $(PRIVATE_DIR)/tools/NOTICE.txt && \
		if [ -f $(PRIVATE_DIR)/platform-tools/llvm-rs-cc ]; then \
			$(HOST_STRIP_SDK_LLVM) $(PRIVATE_DIR)/platform-tools/llvm-rs-cc; \
+4 −4
Original line number Diff line number Diff line
@@ -55,10 +55,10 @@ files_to_copy += $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_COPY_FILES)

# All SDK add-ons have these files
files_to_copy += \
        $(BUILT_SYSTEMIMAGE):images/system.img \
        $(BUILT_USERDATAIMAGE_TARGET):images/userdata.img \
        $(BUILT_RAMDISK_TARGET):images/ramdisk.img \
        $(target_notice_file_txt):images/NOTICE.txt
        $(BUILT_SYSTEMIMAGE):images/$(TARGET_CPU_ABI)/system.img \
        $(BUILT_USERDATAIMAGE_TARGET):images/$(TARGET_CPU_ABI)/userdata.img \
        $(BUILT_RAMDISK_TARGET):images/$(TARGET_CPU_ABI)/ramdisk.img \
        $(target_notice_file_txt):images/$(TARGET_CPU_ABI)/NOTICE.txt

# Generate rules to copy the requested files
$(foreach cf,$(files_to_copy), \
+1 −9
Original line number Diff line number Diff line
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 \
    $(LOCAL_PATH)/init.rc:root/init.rc
#
+18 −25
Original line number Diff line number Diff line
TARGET_ARCH=x86
DISABLE_DEXPREOPT := true
TARGET_COMPRESS_MODULE_SYMBOLS := false
# 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_ARCH := x86
TARGET_ARCH_VARIANT := x86-atom
TARGET_PRELINK_MODULE := false
TARGET_NO_RECOVERY := true
TARGET_HARDWARE_3D := false

# The IA emulator (qemu) uses the Goldfish devices
HAVE_HTC_AUDIO_DRIVER := true
BOARD_USES_GENERIC_AUDIO := true
USE_CAMERA_STUB := true
TARGET_PROVIDES_INIT_RC := true
USE_CUSTOM_RUNTIME_HEAP_MAX := "32M"
TARGET_CPU_ABI := x86
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_BOOTIMAGE_USE_EXT2 := true

# 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
# 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
+6 −27
Original line number Diff line number Diff line
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.
Loading