Skip to content
Snippets Groups Projects
Commit e71d34ef authored by bohu's avatar bohu Committed by android-build-merger
Browse files

qemu: get it boot to console

am: 1f2dbc9c

Change-Id: I6dd1023f8004523e2424ba0ac5ab1cad41539655
parents 97ef4f96 1f2dbc9c
No related branches found
No related tags found
No related merge requests found
GrallocSync = on
LogcatPipe = on
GLAsyncSwap = on
GLESDynamicVersion = on
GLDMA = on
SystemAsRoot = on
......@@ -2,7 +2,5 @@
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
/dev/block/vda /system ext4 ro wait
/dev/block/vdb /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
/dev/block/vdc /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
#/devices/platform/goldfish_mmc.0 auto vfat defaults voldmanaged=sdcard:auto
/dev/block/vdc /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check
/devices/*/block/vde auto auto defaults voldmanaged=sdcard:auto,encryptable=userdata
......@@ -2,25 +2,25 @@ on fs
mount_all /fstab.ranchu
on early-init
mount debugfs debugfs /sys/kernel/debug
mount debugfs debugfs /sys/kernel/debug mode=755
on init
# See storage config details at http://source.android.com/tech/storage/
mkdir /storage/sdcard 0555 root root
export EXTERNAL_STORAGE /storage/sdcard
symlink /dev/goldfish_pipe /dev/android_pipe
symlink /dev/goldfish_pipe /dev/qemu_pipe
on post-fs-data
setprop vold.post_fs_data_done 1
#symlink /storage/sdcard /sdcard
#symlink /storage/sdcard /mnt/sdcard
on boot
setprop ARGH ARGH
setprop net.eth0.gw 10.0.2.2
setprop net.eth0.dns1 10.0.2.3
setprop net.gprs.local-ip 10.0.2.15
chown root system /sys/power/wake_lock
chown root system /sys/power/wake_unlock
setprop ro.radio.use-ppp no
setprop ro.build.product generic
setprop ro.product.device generic
setprop ro.hardware.audio.primary goldfish
setprop ro.setupwizard.mode EMULATOR
# fake some battery state
setprop status.battery.state Slow
......@@ -28,18 +28,91 @@ on boot
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
# Disable GPU support
setprop ro.kernel.qemu 1
setprop ro.kernel.qemu.gles 0
# disable RenderScript
setprop config.disable_renderscript 1
# set up the GPU caching
setprop ro.hwui.texture_cache_size 72
setprop ro.hwui.layer_cache_size 48
setprop ro.hwui.r_buffer_cache_size 8
setprop ro.hwui.path_cache_size 32
setprop ro.hwui.gradient_cache_size 1
setprop ro.hwui.drop_shadow_cache_size 6
setprop ro.hwui.texture_cache_flushrate 0.4
setprop ro.hwui.text_small_cache_width 1024
setprop ro.hwui.text_small_cache_height 1024
setprop ro.hwui.text_large_cache_width 2048
setprop ro.hwui.text_large_cache_height 1024
# disable some daemons the emulator doesn't want
stop dund
stop akmd
# start essential services
# These were written for the classic emulator, but are applicable to ranchu
start goldfish-logcat
# start goldfish-setup
# enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector
setprop ro.com.google.locationfeatures 1
#emulator is not much useful before boot complete
#start it later
on property:sys.boot_completed=1
setprop sys.usb.config adb
start adbd
start goldfish-logcat
on property:qemu.adbd=start
setprop sys.usb.config adb
start adbd
start goldfish-logcat
service ranchu-setup /vendor/bin/init.ranchu-core.sh
class core
user root
group root
oneshot
service ranchu-net /vendor/bin/init.ranchu-net.sh
class late_start
user root
group root wakelock
oneshot
# The qemu-props program is used to set various system
# properties on boot. It must be run early during the boot
# process to avoid race conditions with other daemons that
# might read them (e.g. surface flinger), so define it in
# class 'core'
#
service qemu-props /vendor/bin/qemu-props
class core
user root
group root
oneshot
on property:qemu.logcat=start
start goldfish-logcat
# -Q is a special logcat option that forces the
# program to check wether it runs on the emulator
# if it does, it redirects its output to the device
# named by the androidboot.console kernel option
# if not, is simply exits immediately
# logd user added to prevent logcat from logging content.
# log group added to support access to read logs socket.
service goldfish-logcat /system/bin/logcat -Q
user logd
group log
oneshot
service fingerprintd /system/bin/fingerprintd
class late_start
user system
service bugreport /system/bin/dumpstate -d -p -B \
-o /data/user_de/0/com.android.shell/files/bugreports/bugreport
class main
disabled
oneshot
keycodes 114 115 116
......@@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_COPY_FILES += \
prebuilts/qemu-kernel/arm/3.18/kernel-qemu2:kernel-ranchu
$(call inherit-product, $(LOCAL_PATH)/qemu_base.mk)
# Overrides
......
......@@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_COPY_FILES += \
prebuilts/qemu-kernel/arm64/3.18/kernel-qemu2:kernel-ranchu
$(call inherit-product, $(LOCAL_PATH)/qemu_base.mk)
# Overrides
......
......@@ -58,23 +58,30 @@ PRODUCT_PACKAGES += \
logd \
logwrapper \
mkshrc \
netd \
qemu-props \
reboot \
service \
servicemanager \
hwservicemanager \
vndservice \
vndservicemanager \
sh \
toolbox \
toybox \
vold \
vold
# SELinux packages
# SELinux packages are added as dependencies of the selinux_policy
# phony package.
PRODUCT_PACKAGES += \
sepolicy \
file_contexts \
seapp_contexts \
property_contexts \
mac_permissions.xml \
selinux_policy \
# SELinux packages
#PRODUCT_PACKAGES += \
# sepolicy \
# file_contexts \
# seapp_contexts \
# property_contexts \
# mac_permissions.xml \
PRODUCT_COPY_FILES += \
system/core/rootdir/init.usb.rc:root/init.usb.rc \
......@@ -82,8 +89,38 @@ PRODUCT_COPY_FILES += \
system/core/rootdir/ueventd.rc:root/ueventd.rc \
system/core/rootdir/etc/hosts:system/etc/hosts \
PRODUCT_FULL_TREBLE_OVERRIDE := true
PRODUCT_COPY_FILES += \
device/generic/qemu/fstab.ranchu:root/fstab.ranchu \
device/generic/qemu/init.ranchu.rc:root/init.ranchu.rc \
device/generic/qemu/ueventd.ranchu.rc:root/ueventd.ranchu.rc \
PRODUCT_COPY_FILES += \
device/generic/goldfish/data/etc/config.ini:config.ini \
device/generic/qemu/advancedFeatures.ini:advancedFeatures.ini \
#$(call inherit-product, $(SRC_TARGET_DIR)/product/core_tiny.mk)
ifeq ($(TARGET_CORE_JARS),)
$(error TARGET_CORE_JARS is empty; cannot initialize PRODUCT_BOOT_JARS variable)
endif
# The order matters
PRODUCT_BOOT_JARS := \
$(TARGET_CORE_JARS) \
# The set of packages we want to force 'speed' compilation on.
PRODUCT_DEXPREOPT_SPEED_APPS := \
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
ro.zygote=zygote32
PRODUCT_COPY_FILES += \
device/generic/goldfish/fstab.goldfish:root/fstab.goldfish \
device/generic/goldfish/init.goldfish.rc:root/init.goldfish.rc \
device/generic/goldfish/init.goldfish.sh:system/etc/init.goldfish.sh \
device/generic/goldfish/ueventd.goldfish.rc:root/ueventd.goldfish.rc \
system/core/rootdir/init.zygote32.rc:root/init.zygote32.rc
PRODUCT_PROPERTY_OVERRIDES += \
ro.carrier=unknown
$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
......@@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_COPY_FILES += \
prebuilts/qemu-kernel/mips/3.18/kernel-qemu2:kernel-ranchu
$(call inherit-product, $(LOCAL_PATH)/qemu_base.mk)
# Overrides
......
......@@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_COPY_FILES += \
prebuilts/qemu-kernel/mips64/3.18/kernel-qemu2:kernel-ranchu
$(call inherit-product, $(LOCAL_PATH)/qemu_base.mk)
# Overrides
......
......@@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_COPY_FILES += \
prebuilts/qemu-kernel/x86/3.18/kernel-qemu2:kernel-ranchu
$(call inherit-product, $(LOCAL_PATH)/qemu_base.mk)
# Overrides
......
......@@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
PRODUCT_COPY_FILES += \
prebuilts/qemu-kernel/x86_64/3.18/kernel-qemu2:kernel-ranchu
$(call inherit-product, $(LOCAL_PATH)/qemu_base.mk)
# Overrides
......
# These settings are specific to running under the Android emulator
/dev/qemu_trace 0666 system system
/dev/android_pipe 0666 system system
/dev/goldfish_pipe 0666 system system
/dev/ttyS* 0666 system system
/proc 0666 system system
/dev/goldfish_sync 0666 system system
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment