diff options
author | David 'Digit' Turner <digit@google.com> | 2011-09-16 00:19:40 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2011-09-16 00:25:16 +0200 |
commit | a503456526359767ffb383a06835308f62172dde (patch) | |
tree | 560b1c0352080dd766863669f1d508bbd19b659d /rootdir | |
parent | 243123fb41d7d2981116bd5d11ba168b127d68e9 (diff) | |
download | system_core-a503456526359767ffb383a06835308f62172dde.zip system_core-a503456526359767ffb383a06835308f62172dde.tar.gz system_core-a503456526359767ffb383a06835308f62172dde.tar.bz2 |
emulator: Move qemu-props to core service
The qemu-props program is launched at boot to read a series of
system property assignments from the emulator and apply them.
This is necessary to deal with the dynamic nature of the emulated
platform (e.g. the screen density which depends on the skin and
cannot be hard-coded in the platform image).
This patch ensures that qemu-props is started before any other
service that may read one of these properties (e.g. surface flinger).
This is done by encapsulating the program into a 'core' service.
Core services are all stared before regular ones.
Before the patch, qemu-props was started manually inside a script
that is called from a late emulator-specific boot service
(goldfish-setup).
The problem was that sometimes qemu-props was run too late.
This resulted in random flakiness, especially when running
on a low-end host machine.
Fix for bug 2161189 (and probably a few others)
Change-Id: I2933a25dcb5fecbb1fc238f157264e621b8f295b
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/etc/init.goldfish.rc | 12 | ||||
-rwxr-xr-x | rootdir/etc/init.goldfish.sh | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/rootdir/etc/init.goldfish.rc b/rootdir/etc/init.goldfish.rc index 1ac09ca..83b7f8a 100644 --- a/rootdir/etc/init.goldfish.rc +++ b/rootdir/etc/init.goldfish.rc @@ -52,6 +52,18 @@ service goldfish-setup /system/etc/init.goldfish.sh group root 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 /system/bin/qemu-props + class core + user root + group root + oneshot + service qemud /system/bin/qemud socket qemud stream 666 oneshot diff --git a/rootdir/etc/init.goldfish.sh b/rootdir/etc/init.goldfish.sh index 1156dd7..ece75b4 100755 --- a/rootdir/etc/init.goldfish.sh +++ b/rootdir/etc/init.goldfish.sh @@ -57,10 +57,6 @@ case "$boot_anim" in ;; esac -# call 'qemu-props' to set system properties from the emulator. -# -/system/bin/qemu-props - # set up the second interface (for inter-emulator connections) # if required my_ip=`getprop net.shared_net_ip` |