summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-11-12 18:46:23 -0800
committerJean-Baptiste Queru <jbq@google.com>2009-11-12 18:46:23 -0800
commit4b29fe640ae852c04d5d87d0f9527bdc32177ad1 (patch)
tree310b38e74c5942a86975af4bcb32d3adab9b6e88 /rootdir
parent85b3fcc5de004999756c1e90bcf845480217b3f6 (diff)
downloadsystem_core-4b29fe640ae852c04d5d87d0f9527bdc32177ad1.tar.gz
system_core-4b29fe640ae852c04d5d87d0f9527bdc32177ad1.tar.bz2
system_core-4b29fe640ae852c04d5d87d0f9527bdc32177ad1.zip
eclair snapshot
Diffstat (limited to 'rootdir')
-rw-r--r--rootdir/Android.mk17
-rw-r--r--rootdir/etc/vold.conf10
-rw-r--r--rootdir/init.rc67
3 files changed, 85 insertions, 9 deletions
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index db98fab01..3bb226211 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -5,9 +5,20 @@ include $(CLEAR_VARS)
copy_from := \
etc/dbus.conf \
- etc/init.goldfish.sh \
etc/hosts
+ifeq ($(TARGET_PRODUCT),generic)
+copy_from += etc/vold.conf
+endif
+
+# the /system/etc/init.goldfish.sh is needed to enable emulator support
+# in the system image. In theory, we don't need these for -user builds
+# which are device-specific. However, these builds require at the moment
+# to run the dex pre-optimization *in* the emulator. So keep the file until
+# we are capable of running dex preopt on the host.
+#
+copy_from += etc/init.goldfish.sh
+
copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
copy_from := $(addprefix $(LOCAL_PATH)/,$(copy_from))
@@ -28,11 +39,13 @@ $(file) : $(LOCAL_PATH)/init.rc | $(ACP)
ALL_PREBUILT += $(file)
endif
+# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
+# to allow -user builds to properly run the dex pre-optimization pass in
+# the emulator.
file := $(TARGET_ROOT_OUT)/init.goldfish.rc
$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
-
# create some directories (some are mount points)
DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
diff --git a/rootdir/etc/vold.conf b/rootdir/etc/vold.conf
new file mode 100644
index 000000000..4e045090e
--- /dev/null
+++ b/rootdir/etc/vold.conf
@@ -0,0 +1,10 @@
+## vold configuration file for the 'generic' target
+
+volume_sdcard {
+ ## This is the direct uevent device path to the SD slot on the device
+ media_path /devices/platform/goldfish_mmc.0/mmc_host/mmc0
+
+ media_type mmc
+ mount_point /sdcard
+ ums_path /devices/platform/usb_mass_storage/lun0
+}
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 2bed98029..f62d1d816 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -17,12 +17,14 @@ loglevel 3
# Backward compatibility
symlink /system/etc /etc
+ symlink /sys/kernel/debug /d
# create mountpoints and mount tmpfs on sqlite_stmt_journals
mkdir /sdcard 0000 system system
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
+ mkdir /config 0500 root root
mkdir /sqlite_stmt_journals 01777 root root
mount tmpfs tmpfs /sqlite_stmt_journals size=4m
@@ -34,6 +36,7 @@ loglevel 3
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
+ write /proc/sys/kernel/sched_child_runs_first 0
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
@@ -64,6 +67,30 @@ loglevel 3
chown system system /data
chmod 0771 /data
+ # Create dump dir and collect dumps.
+ # Do this before we mount cache so eventually we can use cache for
+ # storing dumps on platforms which do not have a dedicated dump partition.
+
+ mkdir /data/dontpanic
+ chown root log /data/dontpanic
+ chmod 0750 /data/dontpanic
+
+ # Collect apanic data, free resources and re-arm trigger
+ copy /proc/apanic_console /data/dontpanic/apanic_console
+ chown root log /data/dontpanic/apanic_console
+ chmod 0640 /data/dontpanic/apanic_console
+
+ copy /proc/apanic_threads /data/dontpanic/apanic_threads
+ chown root log /data/dontpanic/apanic_threads
+ chmod 0640 /data/dontpanic/apanic_threads
+
+ write /proc/apanic_console 1
+
+ # Collect ramconsole data
+ copy /proc/last_kmsg /data/dontpanic/last_kmsg
+ chown root log /data/dontpanic/last_kmsg
+ chmod 0640 /data/dontpanic/last_kmsg
+
# Same reason as /data above
mount yaffs2 mtd@cache /cache nosuid nodev
chown system cache /cache
@@ -73,10 +100,14 @@ loglevel 3
chown system system /cache/recovery
chmod 0770 /cache/recovery
+ #change permissions on vmallocinfo so we can grab it from bugreports
+ chown root log /proc/vmallocinfo
+ chmod 0440 /proc/vmallocinfo
+
# create basic filesystem structure
mkdir /data/misc 01771 system misc
- mkdir /data/misc/hcid 0770 bluetooth bluetooth
- mkdir /data/misc/keystore 0770 keystore keystore
+ mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
+ mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/vpn 0770 system system
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
@@ -90,6 +121,7 @@ loglevel 3
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
+
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
@@ -148,6 +180,10 @@ on boot
# Set init its forked children's oom_adj.
write /proc/1/oom_adj -16
+ # Tweak background writeout
+ write /proc/sys/vm/dirty_expire_centisecs 200
+ write /proc/sys/vm/dirty_background_ratio 5
+
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
@@ -238,12 +274,13 @@ service ril-daemon /system/bin/rild
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
- group radio cache inet misc
+ group radio cache inet misc audio
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
+ onrestart restart media
service media /system/bin/mediaserver
user media
@@ -265,11 +302,11 @@ service dbus /system/bin/dbus-daemon --system --nofork
user bluetooth
group bluetooth net_bt_admin
-service hcid /system/bin/hcid -s -n -f /etc/bluez/hcid.conf
+service bluetoothd /system/bin/bluetoothd -n
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
- # let hcid drop uid to bluetooth with the right linux capabilities
+ # let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
@@ -285,6 +322,18 @@ service hsag /system/bin/sdptool add --channel=11 HSAG
disabled
oneshot
+service opush /system/bin/sdptool add --channel=12 OPUSH
+ user bluetooth
+ group bluetooth net_bt_admin
+ disabled
+ oneshot
+
+service pbap /system/bin/sdptool add --channel=19 PBAP
+ user bluetooth
+ group bluetooth net_bt_admin
+ disabled
+ oneshot
+
service installd /system/bin/installd
socket installd stream 600 system system
@@ -294,7 +343,7 @@ service flash_recovery /system/etc/install-recovery.sh
service racoon /system/bin/racoon
socket racoon stream 600 system system
# racoon will setuid to vpn after getting necessary resources.
- group net_admin keystore
+ group net_admin
disabled
oneshot
@@ -305,8 +354,12 @@ service mtpd /system/bin/mtpd
disabled
oneshot
-service keystore /system/bin/keystore
+service keystore /system/bin/keystore /data/misc/keystore
user keystore
group keystore
socket keystore stream 666
+service dumpstate /system/bin/dumpstate -s
+ socket dumpstate stream 0660 shell log
+ disabled
+ oneshot