am 2218c027: am 63e2c1eb: docs: add Google IO 2011 logo
* commit '2218c027117b10fd909083c8c666bebb074c2167':
docs: add Google IO 2011 logo
diff --git a/core/Makefile b/core/Makefile
index 7ff896e..0af846e 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1085,6 +1085,7 @@
ifneq ($(TARGET_PRODUCT),sdk)
ifeq ($(filter generic%,$(TARGET_DEVICE)),)
ifneq ($(TARGET_NO_KERNEL),true)
+ifneq ($(recovery_fstab),)
# -----------------------------------------------------------------
# OTA update package
@@ -1137,6 +1138,7 @@
.PHONY: updatepackage
updatepackage: $(INTERNAL_UPDATE_PACKAGE_TARGET)
+endif # recovery_fstab is defined
endif # TARGET_NO_KERNEL != true
endif # TARGET_DEVICE != generic*
endif # TARGET_PRODUCT != sdk
@@ -1274,7 +1276,7 @@
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)
@@ -1340,11 +1342,21 @@
atree_dir := development/build
+# sdk/build/tools.atree contains the generic rules, while
+#
+# sdk/build/tools.$(TARGET_ARCH).atree contains target-specific rules
+# the latter is optional.
+#
+sdk_tools_atree_files := sdk/build/tools.atree
+ifneq (,$(strip $(wildcard sdk/build/tools.$(TARGET_ARCH).atree)))
+ sdk_tools_atree_files += sdk/build/tools.$(TARGET_ARCH).atree
+endif
+
sdk_atree_files := \
$(atree_dir)/sdk.exclude.atree \
$(atree_dir)/sdk.atree \
$(atree_dir)/sdk-$(HOST_OS)-$(HOST_ARCH).atree \
- sdk/build/tools.atree
+ $(sdk_tools_atree_files)
deps := \
$(target_notice_file_txt) \
@@ -1358,7 +1370,7 @@
$(INSTALLED_BUILD_PROP_TARGET) \
$(ATREE_FILES) \
$(atree_dir)/sdk.atree \
- sdk/build/tools.atree \
+ $(sdk_tools_atree_files) \
$(HOST_OUT_EXECUTABLES)/atree \
$(HOST_OUT_EXECUTABLES)/line_endings
@@ -1399,9 +1411,11 @@
-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 && \
cp -f $(tools_notice_file_txt) $(PRIVATE_DIR)/platform-tools/NOTICE.txt && \
if [ -f $(PRIVATE_DIR)/platform-tools/llvm-rs-cc ]; then \
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 412ec69..25f8aec 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -38,7 +38,7 @@
# You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else
ifeq ($(strip $(TARGET_TOOLS_PREFIX)),)
TARGET_TOOLS_PREFIX := \
- prebuilt/$(HOST_PREBUILT_TAG)/toolchain/i686-unknown-linux-gnu-4.2.1/bin/i686-unknown-linux-gnu-
+ prebuilt/$(HOST_PREBUILT_TAG)/toolchain/i686-android-linux-4.4.3/bin/i686-android-linux-
endif
TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
@@ -51,8 +51,7 @@
ifneq ($(wildcard $(TARGET_CC)),)
TARGET_LIBGCC := \
- $(shell $(TARGET_CC) -m32 -print-file-name=libgcc.a) \
- $(shell $(TARGET_CC) -m32 -print-file-name=libgcc_eh.a)
+ $(shell $(TARGET_CC) -m32 -print-file-name=libgcc.a)
endif
TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined
@@ -85,11 +84,12 @@
-fno-use-cxa-atexit
ifeq ($(TARGET_ARCH_VARIANT),x86-atom)
- TARGET_GLOBAL_CFLAGS += -mtune=i686 -DUSE_SSSE3 -DUSE_SSE2 -mfpmath=sse -msse2
+ TARGET_GLOBAL_CFLAGS += -march=atom -mstackrealign -DUSE_SSSE3 -DUSE_SSE2 -mfpmath=sse
else
TARGET_GLOBAL_CFLAGS += -march=i686
endif
+TARGET_GLOBAL_CFLAGS += -mbionic
TARGET_GLOBAL_CFLAGS += -D__ANDROID__
TARGET_GLOBAL_LDFLAGS += -m32
diff --git a/core/combo/select.mk b/core/combo/select.mk
index c886342..d486255 100644
--- a/core/combo/select.mk
+++ b/core/combo/select.mk
@@ -62,13 +62,23 @@
include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk
ifneq ($(USE_CCACHE),)
- ccache := prebuilt/$(HOST_PREBUILT_TAG)/ccache/ccache
- # prepend ccache if necessary
- ifneq ($(ccache),$(firstword $($(combo_target)CC)))
- $(combo_target)CC := $(ccache) $($(combo_target)CC)
+ CCACHE_HOST_TAG := $(HOST_PREBUILT_TAG)
+ # If we are cross-compiling Windows binaries on Linux
+ # then use the linux ccache binary instead.
+ ifeq ($(HOST_OS)-$(BUILD_OS),windows-linux)
+ CCACHE_HOST_TAG := linux-$(BUILD_ARCH)
endif
- ifneq ($(ccache),$(firstword $($(combo_target)CXX)))
- $(combo_target)CXX := $(ccache) $($(combo_target)CXX)
+ ccache := prebuilt/$(CCACHE_HOST_TAG)/ccache/ccache
+ # Check that the executable is here.
+ ccache := $(strip $(wildcard $(ccache)))
+ ifdef ccache
+ # prepend ccache if necessary
+ ifneq ($(ccache),$(firstword $($(combo_target)CC)))
+ $(combo_target)CC := $(ccache) $($(combo_target)CC)
+ endif
+ ifneq ($(ccache),$(firstword $($(combo_target)CXX)))
+ $(combo_target)CXX := $(ccache) $($(combo_target)CXX)
+ endif
+ ccache =
endif
- ccache =
endif
diff --git a/core/definitions.mk b/core/definitions.mk
index 6db9d8f..e099be3 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -154,7 +154,7 @@
# $(1): List of directories to look for under this directory
define all-named-subdir-makefiles
-$(wildcard $(addsuffix /Android.mk, $(addprefix $(my-dir)/,$(1))))
+$(wildcard $(addsuffix /Android.mk, $(addprefix $(call my-dir)/,$(1))))
endef
###########################################################
diff --git a/core/find-jdk-tools-jar.sh b/core/find-jdk-tools-jar.sh
index ed0b127..e1278c3 100755
--- a/core/find-jdk-tools-jar.sh
+++ b/core/find-jdk-tools-jar.sh
@@ -5,9 +5,9 @@
if [ -z "$JAVAC" ] ; then
exit 1
fi
- while [ -L $JAVAC ] ; do
- LSLINE=$(ls -l $JAVAC)
- JAVAC=$(echo -n $LSLINE | sed -e "s/.* -> //")
+ while [ -L "$JAVAC" ] ; do
+ LSLINE=$(ls -l "$JAVAC")
+ JAVAC=$(echo -n "$LSLINE" | sed -e "s/.* -> //")
done
echo $JAVAC | sed -e "s:\(.*\)/bin/javac.*:\\1/lib/tools.jar:"
fi
diff --git a/core/main.mk b/core/main.mk
index e5824db..a5ee6d1 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -830,9 +830,10 @@
sdk: $(ALL_SDK_TARGETS)
ifneq ($(filter sdk win_sdk,$(MAKECMDGOALS)),)
$(call dist-for-goals,sdk win_sdk, \
- $(ALL_SDK_TARGETS) \
- $(SYMBOLS_ZIP) \
- )
+ $(ALL_SDK_TARGETS) \
+ $(SYMBOLS_ZIP) \
+ $(INSTALLED_BUILD_PROP_TARGET) \
+)
endif
.PHONY: samplecode
diff --git a/core/notice_files.mk b/core/notice_files.mk
index fd76d51..74beb49 100644
--- a/core/notice_files.mk
+++ b/core/notice_files.mk
@@ -2,9 +2,9 @@
## Track NOTICE files
###########################################################
-notice_file:=$(shell find $(LOCAL_PATH) -maxdepth 1 -name NOTICE)
+notice_file:=$(strip $(wildcard $(LOCAL_PATH)/NOTICE))
-ifneq ($(strip $(notice_file)),)
+ifdef notice_file
# This relies on the name of the directory in PRODUCT_OUT matching where
# it's installed on the target - i.e. system, data, etc. This does
diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk
index afcda23..797314a 100644
--- a/core/tasks/sdk-addon.mk
+++ b/core/tasks/sdk-addon.mk
@@ -55,10 +55,10 @@
# 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), \
@@ -110,4 +110,3 @@
$(error Trying to build sdk_addon, but product '$(INTERNAL_PRODUCT)' does not define one)
endif
endif # addon_name
-
diff --git a/envsetup.sh b/envsetup.sh
index 2faeed1..29935de 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -432,6 +432,7 @@
# add the default one here
add_lunch_combo full-eng
add_lunch_combo full_x86-eng
+add_lunch_combo vbox_x86-eng
# if we're on linux, add the simulator. There is a special case
# in lunch to deal with the simulator
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index 83a8c3e..1bad20d 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -1,31 +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_SYSTEMIMAGE_PARTITION_SIZE := 157286400
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 52428800
-BOARD_INSTALLERIMAGE_PARTITION_SIZE := 524288000
-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
-# The eth0 device should be started with dhcp on boot.
-# Useful for emulators that don't provide a wifi connection.
-NET_ETH0_STARTONBOOT := true
+# Set /system/bin/sh to mksh, not ash, to test the transition.
+TARGET_SHELL := mksh
+
diff --git a/target/board/generic_x86/README.txt b/target/board/generic_x86/README.txt
index 585a373..938d982 100644
--- a/target/board/generic_x86/README.txt
+++ b/target/board/generic_x86/README.txt
@@ -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
+It can be used to build the entire user-level system, and
+will work with the IA version of the emulator,
-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 is not a product "base class"; no other products inherit
+from it or use it in any way.
diff --git a/target/board/generic_x86/device.mk b/target/board/generic_x86/device.mk
index bbdc8f4..0b4dc27 100644
--- a/target/board/generic_x86/device.mk
+++ b/target/board/generic_x86/device.mk
@@ -1,9 +1,26 @@
-ifeq ($(TARGET_PREBUILT_KERNEL),)
-LOCAL_KERNEL := prebuilt/android-x86/kernel/kernel
-else
-LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
-endif
+#
+# 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.
+#
-PRODUCT_COPY_FILES += \
- $(LOCAL_KERNEL):kernel \
- build/target/board/generic_x86/init.rc:root/init.rc
+# 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
diff --git a/target/board/generic_x86/disk_layout.conf b/target/board/generic_x86/disk_layout.conf
deleted file mode 100644
index 7b073ee..0000000
--- a/target/board/generic_x86/disk_layout.conf
+++ /dev/null
@@ -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
- }
- }
-}
diff --git a/target/board/generic_x86/system.prop b/target/board/generic_x86/system.prop
new file mode 100644
index 0000000..137a0f9
--- /dev/null
+++ b/target/board/generic_x86/system.prop
@@ -0,0 +1,6 @@
+#
+# system.prop for generic sdk
+#
+
+rild.libpath=/system/lib/libreference-ril.so
+rild.libargs=-d /dev/ttyS0
diff --git a/target/board/vbox_x86/AndroidBoard.mk b/target/board/vbox_x86/AndroidBoard.mk
new file mode 100644
index 0000000..2af7dcd
--- /dev/null
+++ b/target/board/vbox_x86/AndroidBoard.mk
@@ -0,0 +1,7 @@
+LOCAL_PATH := $(call my-dir)
+
+LOCAL_KERNEL := prebuilt/android-x86/kernel/kernel-vbox
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_KERNEL):kernel \
+ $(LOCAL_PATH)/init.rc:root/init.rc
diff --git a/target/board/vbox_x86/BoardConfig.mk b/target/board/vbox_x86/BoardConfig.mk
new file mode 100644
index 0000000..525074e
--- /dev/null
+++ b/target/board/vbox_x86/BoardConfig.mk
@@ -0,0 +1,35 @@
+#
+# IA target for VitualBox
+#
+
+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"
+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 vga=788 verbose
+BOARD_KERNEL_CMDLINE := init=/init console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=generic_x86 androidboot.console=ttyS0
+TARGET_USE_DISKINSTALLER := true
+
+TARGET_DISK_LAYOUT_CONFIG := build/target/board/vbox_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 eth0 device should be started with dhcp on boot.
+# Useful for emulators that don't provide a wifi connection.
+NET_ETH0_STARTONBOOT := true
diff --git a/target/board/vbox_x86/README.txt b/target/board/vbox_x86/README.txt
new file mode 100644
index 0000000..568dc5f
--- /dev/null
+++ b/target/board/vbox_x86/README.txt
@@ -0,0 +1,9 @@
+The "vbox_x86" product defines a non-hardware-specific target intended
+to run on the VirtualBox emulator.
+
+Most of the Android devices (networking, phones, sound, etc) do not work.
+
+ADB via ethernet works with this target. You can use 'adb install' to
+test applications that do not require network, phone or sound support.
+This emulation is useful because VirtualBox runs much faster then does the
+QEMU emulators (at least until a KVM enabled QEMU emulator is available).
diff --git a/target/board/vbox_x86/device.mk b/target/board/vbox_x86/device.mk
new file mode 100644
index 0000000..0b4dc27
--- /dev/null
+++ b/target/board/vbox_x86/device.mk
@@ -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
diff --git a/target/board/vbox_x86/disk_layout.conf b/target/board/vbox_x86/disk_layout.conf
new file mode 100644
index 0000000..12241ab
--- /dev/null
+++ b/target/board/vbox_x86/disk_layout.conf
@@ -0,0 +1,76 @@
+# Best to align all partion start/ends on a cylinder boundary (fdisk prefers it)
+# 512 bytes/sector
+# 63 sectors/track
+# 32 tracks/cylinder
+
+# LBAs are in 'k', so...
+# 1008 blocks (1k each) (1032192 bytes) / cylinder
+
+device {
+
+ path /dev/block/sda
+
+ scheme mbr
+
+ # bytes in a disk sector (== 1 LBA), must be a power of 2!
+ sector_size 512
+
+ # Start_lba should be on a cylindar boundary.
+ start_lba 63
+
+ # Autodetect disk size if == 0
+ num_lba 0
+
+ partitions {
+ # /dev/sdX1
+ sysloader {
+ active y
+ type linux
+ # 8 cyls in length... about 8M
+ len 8064
+ }
+
+ # /dev/sdX2
+ recovery {
+ active y
+ type linux
+ # 8 cyls in length... about 8M
+ len 8064
+ }
+
+ # /dev/sdX3
+ boot {
+ active y
+ type linux
+ # 8 cyls in length... about 8M
+ len 8064
+ }
+
+ # /dev/sdX4
+ # (extended partion begins)
+
+ # /dev/sdX5
+ cache {
+ type linux
+ len 512M
+ }
+
+ # /dev/sdX6
+ system {
+ type linux
+ len 512M
+ }
+
+ # /dev/sdX7
+ third_party {
+ type linux
+ len 512M
+ }
+
+ # /dev/sdX8
+ data {
+ type linux
+ len -1
+ }
+ }
+}
diff --git a/target/board/generic_x86/init.rc b/target/board/vbox_x86/init.rc
similarity index 98%
rename from target/board/generic_x86/init.rc
rename to target/board/vbox_x86/init.rc
index 8f6be28..100cc09 100644
--- a/target/board/generic_x86/init.rc
+++ b/target/board/vbox_x86/init.rc
@@ -90,11 +90,11 @@
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
on fs
-# mount mtd partitions
- mount ext4 /dev/block/sda6 /system rw
- mkdir /system/vendor
- mount ext4 /dev/block/sda8 /data nosuid nodev
- mount ext4 /dev/block/sda7 /cache nosuid nodev
+# mount sda partitions
+ mount ext4 /dev/block/sda6 /system
+ mount ext4 /dev/block/sda6 /system ro remount
+ mount ext4 /dev/block/sda7 /data nosuid nodev
+ mount ext4 /dev/block/sda8 /cache nosuid nodev
on post-fs
# once everything is setup, no need to modify /
@@ -293,11 +293,6 @@
on property:ro.secure=0
start console
-# Enable networking so that adb can connect
-service netcfg /system/bin/netcfg eth0 dhcp
- setprop property:ro.kernel.qemu 1
- oneshot
-
# adbd is controlled by the persist.service.adb.enable system property
service adbd /sbin/adbd
disabled
@@ -425,3 +420,7 @@
socket dumpstate stream 0660 shell log
disabled
oneshot
+
+# Enable networking so that adb can connect
+service netcfg /system/bin/netcfg eth0 dhcp
+ oneshot
diff --git a/target/board/vbox_x86/system.prop b/target/board/vbox_x86/system.prop
new file mode 100644
index 0000000..137a0f9
--- /dev/null
+++ b/target/board/vbox_x86/system.prop
@@ -0,0 +1,6 @@
+#
+# system.prop for generic sdk
+#
+
+rild.libpath=/system/lib/libreference-ril.so
+rild.libargs=-d /dev/ttyS0
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index b27721a..fafd222 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -38,7 +38,9 @@
$(LOCAL_DIR)/generic_x86.mk \
$(LOCAL_DIR)/full.mk \
$(LOCAL_DIR)/full_x86.mk \
+ $(LOCAL_DIR)/vbox_x86.mk \
$(LOCAL_DIR)/sdk.mk \
+ $(LOCAL_DIR)/sdk_x86.mk \
$(LOCAL_DIR)/sim.mk \
$(LOCAL_DIR)/large_emu_hw.mk
endif
diff --git a/target/product/full_x86.mk b/target/product/full_x86.mk
index 9e22bc5..7602da5 100644
--- a/target/product/full_x86.mk
+++ b/target/product/full_x86.mk
@@ -16,8 +16,8 @@
# 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
@@ -33,4 +33,4 @@
PRODUCT_NAME := full_x86
PRODUCT_DEVICE := generic_x86
PRODUCT_BRAND := Android
-PRODUCT_MODEL := Full Android x86
+PRODUCT_MODEL := Full Android on x86 Emulator
diff --git a/target/product/generic_x86.mk b/target/product/generic_x86.mk
index 345a79a..7e77a27 100644
--- a/target/product/generic_x86.mk
+++ b/target/product/generic_x86.mk
@@ -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
+# It includes the base Android platform.
-PRODUCT_PACKAGES := \
- DeskClock \
- AlarmProvider \
- Calendar \
- Camera \
- DrmProvider \
- LatinIME \
- Mms \
- Music \
- Settings \
- Sync \
- Updater \
- CalendarProvider \
- SubscribedFeedsProvider \
- SyncProvider
-
+$(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
diff --git a/target/product/sdk_x86.mk b/target/product/sdk_x86.mk
new file mode 100644
index 0000000..6c5e746
--- /dev/null
+++ b/target/product/sdk_x86.mk
@@ -0,0 +1,28 @@
+#
+# 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 a full-featured build of the
+# Open-Source part of the tree. It's geared toward a US-centric
+# build quite specifically for the emulator, and might not be
+# entirely appropriate to inherit from for on-device configurations.
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/sdk.mk)
+
+# Overrides
+PRODUCT_BRAND := generic_x86
+PRODUCT_NAME := sdk_x86
+PRODUCT_DEVICE := generic_x86
+PRODUCT_MODEL := Android SDK built for x86
diff --git a/target/product/vbox_x86.mk b/target/product/vbox_x86.mk
new file mode 100644
index 0000000..c32b1eb
--- /dev/null
+++ b/target/product/vbox_x86.mk
@@ -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 a full-featured build of the
+# Open-Source part of the tree. It's geared toward a US-centric
+# build quite specifically for the emulator, and might not be
+# entirely appropriate to inherit from for on-device configurations.
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_x86.mk)
+
+PRODUCT_NAME := vbox_x86
+PRODUCT_DEVICE := vbox_x86
+PRODUCT_MODEL := Full Android on x86 VirtualBox
diff --git a/tools/Android.mk b/tools/Android.mk
index fa9d0b7..92603f5 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -14,7 +14,7 @@
# limitations under the License.
#
-LOCAL_PATH := $(my-dir)
+LOCAL_PATH := $(call my-dir)
# If we're building only unbundled apps, this is the only tool we need.
ifneq ($(TARGET_BUILD_APPS),)
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index bcfacb2..40da73a 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -144,10 +144,6 @@
makeint("boot_size")
d["fstab"] = LoadRecoveryFSTab(zip)
- if not d["fstab"]:
- if "fs_type" not in d: d["fs_type"] = "yaffs2"
- if "partition_type" not in d: d["partition_type"] = "MTD"
-
return d
def LoadRecoveryFSTab(zip):
@@ -157,9 +153,7 @@
try:
data = zip.read("RECOVERY/RAMDISK/etc/recovery.fstab")
except KeyError:
- # older target-files that doesn't have a recovery.fstab; fall back
- # to the fs_type and partition_type keys.
- return
+ raise ValueError("Could not find RECOVERY/RAMDISK/etc/recovery.fstab")
d = {}
for line in data.split("\n"):
@@ -397,9 +391,6 @@
p = info_dict["fstab"][mount_point]
fs_type = p.fs_type
limit = info_dict.get(p.device + "_size", None)
- else:
- fs_type = info_dict.get("fs_type", None)
- limit = info_dict.get(target + "_size", None)
if not fs_type or not limit: return
if fs_type == "yaffs2":
@@ -830,9 +821,4 @@
if fstab:
return PARTITION_TYPES[fstab[mount_point].fs_type], fstab[mount_point].device
else:
- devices = {"/boot": "boot",
- "/recovery": "recovery",
- "/radio": "radio",
- "/data": "userdata",
- "/cache": "cache"}
- return info["partition_type"], info.get("partition_path", "") + devices[mount_point]
+ return None
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index c2b0056..6c53f9e 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -140,13 +140,6 @@
(p.fs_type, common.PARTITION_TYPES[p.fs_type],
p.device, p.mount_point))
self.mounts.add(p.mount_point)
- else:
- what = mount_point.lstrip("/")
- what = self.info.get("partition_path", "") + what
- self.script.append('mount("%s", "%s", "%s", "%s");' %
- (self.info["fs_type"], self.info["partition_type"],
- what, mount_point))
- self.mounts.add(mount_point)
def UnpackPackageDir(self, src, dst):
"""Unpack a given directory from the OTA package into the given
@@ -175,12 +168,6 @@
self.script.append('format("%s", "%s", "%s", "%s");' %
(p.fs_type, common.PARTITION_TYPES[p.fs_type],
p.device, p.length))
- else:
- # older target-files without per-partition types
- partition = self.info.get("partition_path", "") + partition
- self.script.append('format("%s", "%s", "%s", "%s");' %
- (self.info["fs_type"], self.info["partition_type"],
- partition, reserve_size))
def DeleteFiles(self, file_list):
"""Delete all files in file_list."""
@@ -221,23 +208,6 @@
'package_extract_file("%(fn)s", "%(device)s");' % args)
else:
raise ValueError("don't know how to write \"%s\" partitions" % (p.fs_type,))
- else:
- # backward compatibility with older target-files that lack recovery.fstab
- if self.info["partition_type"] == "MTD":
- self.script.append(
- ('assert(package_extract_file("%(fn)s", "/tmp/%(partition)s.img"),\n'
- ' write_raw_image("/tmp/%(partition)s.img", "%(partition)s"),\n'
- ' delete("/tmp/%(partition)s.img"));')
- % {'partition': partition, 'fn': fn})
- elif self.info["partition_type"] == "EMMC":
- self.script.append(
- ('package_extract_file("%(fn)s", "%(dir)s%(partition)s");')
- % {'partition': partition, 'fn': fn,
- 'dir': self.info.get("partition_path", ""),
- })
- else:
- raise ValueError("don't know how to write \"%s\" partitions" %
- (self.info["partition_type"],))
def SetPermissions(self, fn, uid, gid, mode):
"""Set file ownership and permissions."""