aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2011-11-23 20:02:04 +0530
committerAmit Pundir <amit.pundir@linaro.org>2011-11-23 20:02:04 +0530
commit992d6d0a61b5515ebeeaf8deeca8b91fff5d10d3 (patch)
tree23d6b377ec955d2563bb2f3a36ea22c08372c2ac
parente28bde25e59057ba736a61faa8bdfae9ecf0f5ba (diff)
ICS build configuration changes for Origen
ALL_PREBUILT is deprecated so file-copy operations are now moved to device.mk from AndroidBoard.mk init.rc is a replica of ICS' default init.rc Bluetooth and Camera are disabled at the moment. Change-Id: I9ef3b0d17bf48c58ff841dc75fd2ffbf4ce2b86a Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r--AndroidBoard.mk47
-rw-r--r--BoardConfig.mk10
-rw-r--r--device.mk23
-rw-r--r--init.rc263
-rw-r--r--origen.mk3
5 files changed, 241 insertions, 105 deletions
diff --git a/AndroidBoard.mk b/AndroidBoard.mk
deleted file mode 100644
index bade14f..0000000
--- a/AndroidBoard.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-file := $(TARGET_OUT_KEYLAYOUT)/gpio-keys.kl
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/gpio-keys.kl | $(ACP)
- $(transform-prebuilt-to-target)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := gpio-keys.kcm
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_KEY_CHAR_MAP)
-
-file := $(TARGET_OUT_KEYLAYOUT)/Logitech_Logitech_USB_Keyboard.kl
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/Logitech_Logitech_USB_Keyboard.kl | $(ACP)
- $(transform-prebuilt-to-target)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := Logitech_Logitech_USB_Keyboard.kcm
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_KEY_CHAR_MAP)
-
-file := $(TARGET_ROOT_OUT)/init.rc
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/init.rc | $(ACP)
- $(transform-prebuilt-to-target)
-
-file := $(TARGET_ROOT_OUT)/init.origen.rc
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/init.origen.rc | $(ACP)
- $(transform-prebuilt-to-target)
-
-file := $(PRODUCT_OUT)/system/etc/init.origen.sh
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/init.origen.sh | $(ACP)
- $(transform-prebuilt-to-target)
-
-file := $(TARGET_ROOT_OUT)/initlogo.rle
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/initlogo.rle | $(ACP)
- $(transform-prebuilt-to-target)
-
-file := $(PRODUCT_OUT)/system/etc/wifi/wpa_supplicant.conf
-ALL_PREBUILT += $(file)
-$(file) : $(LOCAL_PATH)/wpa_supplicant.conf | $(ACP)
- $(transform-prebuilt-to-target)
-
diff --git a/BoardConfig.mk b/BoardConfig.mk
index c14fbbc..7be9ce6 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -19,11 +19,11 @@ BOARD_USES_GENERIC_AUDIO := true
BOARD_USES_ALSA_AUDIO := true
OMAP_ENHANCEMENT := false
HARDWARE_OMX := false
-USE_CAMERA_STUB := false
+USE_CAMERA_STUB := true
-BOARD_HAVE_BLUETOOTH := true
-BOARD_HAVE_BLUETOOTH_BCM := false
-BOARD_HAVE_BLUETOOTH_CSR := true
+#BOARD_HAVE_BLUETOOTH := true
+#BOARD_HAVE_BLUETOOTH_BCM := false
+#BOARD_HAVE_BLUETOOTH_CSR := true
WPA_SUPPLICANT_VERSION := VER_0_6_X
BOARD_WPA_SUPPLICANT_DRIVER := WEXT
@@ -56,6 +56,8 @@ EXTRA_PACKAGE_MANAGEMENT := false
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
+USE_OPENGL_RENDERER := true
+
# bootargs
BOARD_KERNEL_CMDLINE := console=ttySAC2 root=/dev/mmcblk0p2
diff --git a/device.mk b/device.mk
index 6c735a3..cee95ea 100644
--- a/device.mk
+++ b/device.mk
@@ -13,10 +13,27 @@
# limitations under the License.
PRODUCT_COPY_FILES := \
- device/linaro/origen/vold.fstab:system/etc/vold.fstab \
- device/linaro/origen/egl.cfg:system/lib/egl/egl.cfg
+ device/linaro/origen/vold.fstab:system/etc/vold.fstab \
+ device/linaro/origen/egl.cfg:system/lib/egl/egl.cfg
PRODUCT_COPY_FILES += \
+ device/linaro/origen/init.rc:root/init.rc \
device/linaro/origen/init.origen.rc:root/init.origen.rc \
- device/linaro/origen/ueventd.origen.rc:root/ueventd.origen.rc
+ device/linaro/origen/ueventd.origen.rc:root/ueventd.origen.rc \
+ device/linaro/origen/initlogo.rle:root/initlogo.rle \
+ device/linaro/origen/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf
+PRODUCT_PROPERTY_OVERRIDES := \
+ hwui.render_dirty_regions=false
+
+PRODUCT_CHARACTERISTICS := tablet,nosdcard
+
+PRODUCT_TAGS += dalvik.gc.type-precise
+
+PRODUCT_PACKAGES += \
+ librs_jni \
+ com.android.future.usb.accessory
+
+# Filesystem management tools
+PRODUCT_PACKAGES += \
+ make_ext4fs
diff --git a/init.rc b/init.rc
index eb5fe1f..76f8043 100644
--- a/init.rc
+++ b/init.rc
@@ -1,6 +1,10 @@
on early-init
start ueventd
+# create mountpoints
+ mkdir /mnt 0775 root system
+ mkdir /mnt/sdcard 0000 system system
+
on init
sysclktz 0
@@ -17,7 +21,7 @@ loglevel 3
export EXTERNAL_STORAGE /mnt/sdcard
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
- export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
+ export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar
# Backward compatibility
symlink /system/etc /etc
@@ -27,16 +31,12 @@ loglevel 3
# but someday that may change.
symlink /system/vendor /vendor
-# create mountpoints
- mkdir /mnt 0775 root system
- mkdir /mnt/sdcard 0000 system system
-
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
-# Backwards Compat - XXX: Going away in G*
+# Backwards Compat (no longer there in stock ICS)
symlink /mnt/sdcard /sdcard
mkdir /system
@@ -89,30 +89,58 @@ loglevel 3
# 5.0 %
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
- # Set access for camera
- chmod 0666 /dev/video0
+# Allow everybody to read the xt_qtaguid resource tracking misc dev.
+# This is needed by any process that uses socket tagging.
+ chmod 0644 /dev/xt_qtaguid
on fs
# mount mmc partitions
+# mmcblk0p1: /boot
mount ext4 /dev/block/mmcblk0p3 /system ro
mount ext4 /dev/block/mmcblk0p5 /cache
+# mmcblk0p4: extended partition container
mount ext4 /dev/block/mmcblk0p6 /data
+# mmcblk0p6: /sdcard
on post-fs
# once everything is setup, no need to modify /
+ # (stock ICS uses ro remount, let's not do that while debugging)
mount rootfs rootfs / rw remount
+ # We chown/chmod /cache again so because mount is run as root + defaults
+ chown system cache /cache
+ chmod 0770 /cache
+
+ # This may have been created by the recovery system with odd permissions
+ chown system cache /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
+
+ #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
+ chown root system /proc/kmsg
+ chmod 0440 /proc/kmsg
+ chown root system /proc/sysrq-trigger
+ chmod 0220 /proc/sysrq-trigger
+
+ # create the lost+found directories, so as to enforce our permissions
+ mkdir /cache/lost+found 0770 root root
+
+on post-fs-data
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
+ # Set access for camera
+ chmod 0666 /dev/video0
+
# 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
+ mkdir /data/dontpanic 0750 root log
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
@@ -125,35 +153,17 @@ on post-fs
write /proc/apanic_console 1
- # Same reason as /data above
- chown system cache /cache
- chmod 0770 /cache
-
- # This may have been created by the recovery system with odd permissions
- chown system cache /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
-
- #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
- chown root system /proc/kmsg
- chmod 0440 /proc/kmsg
- chown root system /proc/sysrq-trigger
- chmod 0220 /proc/sysrq-trigger
-
-# create basic filesystem structure
+ # create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
- mkdir /data/misc/vpn 0770 system system
+ mkdir /data/misc/keychain 0771 system system
+ mkdir /data/misc/vpn 0770 system vpn
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
- chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
@@ -171,9 +181,17 @@ on post-fs
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
+ # create resource-cache and double-check the perms
+ mkdir /data/resource-cache 0771 system system
+ chown system system /data/resource-cache
+ chmod 0771 /data/resource-cache
+
# create the lost+found directories, so as to enforce our permissions
- mkdir /data/lost+found 0770
- mkdir /cache/lost+found 0770
+ mkdir /data/lost+found 0770 root root
+ mkdir /cache/lost+found 0770 root root
+
+ # create directory for DRM plug-ins
+ mkdir /data/drm 0774 drm drm
# double check the perms, in case lost+found already exists, and set owner
chown root root /data/lost+found
@@ -181,6 +199,17 @@ on post-fs
chown root root /cache/lost+found
chmod 0770 /cache/lost+found
+ # If there is no fs-post-data action in the init.<device>.rc file, you
+ # must uncomment this line, otherwise encrypted filesystems
+ # won't work.
+ # Set indication (checked by vold) that we have finished this action
+ #setprop vold.post_fs_data_done 1
+
+ chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file
+ chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file
+ chown system system /sys/class/android_usb/android0/f_rndis/ethaddr
+ chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr
+
on boot
# basic network init
ifup lo
@@ -190,9 +219,6 @@ on boot
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
-# Turn off battery indicator to finish boot
- setprop hw.nobattery true
-
# Define the oom_adj values for the classes of processes that can be
# killed by the kernel. These are used in ActivityManagerService.
setprop ro.FOREGROUND_APP_ADJ 0
@@ -223,12 +249,26 @@ on boot
# classes will still be killed first.
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,7,15
+# Memory management. Basic kernel parameters, and allow the high
+# level system server to be able to adjust the kernel OOM driver
+# paramters to match how it is managing things.
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,7168,8192
+ chown root system /sys/module/lowmemorykiller/parameters/adj
+ chmod 0664 /sys/module/lowmemorykiller/parameters/adj
+ chown root system /sys/module/lowmemorykiller/parameters/minfree
+ chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
+
+ #userspace configuration for adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/functions adb,acm
+ write /sys/class/android_usb/android0/f_acm/instances 2
+ write /sys/class/android_usb/android0/enable 1
+
# Set init its forked children's oom_adj.
- write /proc/1/oom_adj -16
+ write /proc/1/oom_score_adj -16
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
@@ -276,31 +316,111 @@ on boot
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
- setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
+ setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.hspa 4094,87380,262144,4096,16384,262144
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
- insmod /system/modules/gator.ko
+# Set this property so surfaceflinger is not started by system_init
+ setprop system_init.startsurfaceflinger 0
+
+ class_start core
+ class_start main
+
+on nonencrypted
+ class_start late_start
+
+on charger
+ class_start charger
+
+on property:vold.decrypt=trigger_reset_main
+ class_reset main
+
+on property:vold.decrypt=trigger_load_persist_props
+ load_persist_props
+
+on property:vold.decrypt=trigger_post_fs_data
+ trigger post-fs-data
+
+on property:vold.decrypt=trigger_restart_min_framework
+ class_start main
+
+on property:vold.decrypt=trigger_restart_framework
+ class_start main
+ class_start late_start
+
+on property:vold.decrypt=trigger_shutdown_framework
+ class_reset late_start
+ class_reset main
+
+# Used to disable USB when switching states
+on property:sys.usb.config=none
+ stop adbd
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/bDeviceClass 0
+ setprop sys.usb.state $sys.usb.config
+
+# adb only USB configuration
+# This should only be used during device bringup
+# and as a fallback if the USB manager fails to set a standard configuration
+on property:sys.usb.config=adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 18d1
+ write /sys/class/android_usb/android0/idProduct D002
+ write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state $sys.usb.config
+
+# USB accessory configuration
+on property:sys.usb.config=accessory
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 18d1
+ write /sys/class/android_usb/android0/idProduct 2d00
+ write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state $sys.usb.config
+
+# USB accessory configuration, with adb
+on property:sys.usb.config=accessory,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 18d1
+ write /sys/class/android_usb/android0/idProduct 2d01
+ write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state $sys.usb.config
+
+# Used to set USB configuration at boot and to switch the configuration
+# when changing the default configuration
+on property:persist.sys.usb.config=*
+ setprop sys.usb.config $persist.sys.usb.config
- class_start default
## Daemon processes to be run by init.
##
service ueventd /sbin/ueventd
+ class core
critical
service console /system/bin/sh
+ class core
console
#disabled
#user shell
group log
+on property:ro.debuggable=1
+ start console
+
#on property:ro.secure=0
# start console
# adbd is controlled by the persist.service.adb.enable system property
service adbd /sbin/adbd
+ class core
disabled
# adbd on at boot in emulator
@@ -314,55 +434,91 @@ on property:persist.service.adb.enable=0
stop adbd
service dhcpcd_eth0 /system/bin/dhcpcd -dABKL
+ class main
group dhcp
disabled
oneshot
+# This property trigger has added to imitiate the previous behavior of "adb root".
+# The adb gadget driver used to reset the USB bus when the adbd daemon exited,
+# and the host side adb relied on this behavior to force it to reconnect with the
+# new adbd instance after init relaunches it. So now we force the USB bus to reset
+# here when adbd sets the service.adb.root property to 1. We also restart adbd here
+# rather than waiting for init to notice its death and restarting it so the timing
+# of USB resetting and adb restarting more closely matches the previous behavior.
+on property:service.adb.root=1
+ write /sys/class/android_usb/android0/enable 0
+ restart adbd
+ write /sys/class/android_usb/android0/enable 1
+
service servicemanager /system/bin/servicemanager
+ class core
user system
+ group system
critical
onrestart restart zygote
onrestart restart media
service vold /system/bin/vold
+ class core
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
+ class main
socket netd stream 0660 root system
+ socket dnsproxyd stream 0660 root inet
service debuggerd /system/bin/debuggerd
+ class main
service ril-daemon /system/bin/rild
+ class main
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
- group radio cache inet misc audio sdcard_rw
+ group radio cache inet misc audio sdcard_rw log
+
+service surfaceflinger /system/bin/surfaceflinger
+ class main
+ user system
+ group graphics
+ onrestart restart zygote
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
+ class main
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
onrestart restart netd
+service drm /system/bin/drmserver
+ class main
+ user drm
+ group system inet drmrpc
+
service media /system/bin/mediaserver
+ class main
user media
- group system audio camera graphics inet net_bt net_bt_admin net_raw
+ group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc
ioprio rt 4
service bootanim /system/bin/bootanimation
+ class main
user graphics
group graphics
disabled
oneshot
service dbus /system/bin/dbus-daemon --system --nofork
+ class main
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service bluetoothd /system/bin/bluetoothd -n
+ class main
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
@@ -371,60 +527,65 @@ service bluetoothd /system/bin/bluetoothd -n
disabled
service hfag /system/bin/sdptool add --channel=10 HFAG
+ class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service hsag /system/bin/sdptool add --channel=11 HSAG
+ class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service opush /system/bin/sdptool add --channel=12 OPUSH
+ class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service pbap /system/bin/sdptool add --channel=19 PBAP
+ class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service installd /system/bin/installd
+ class main
socket installd stream 600 system system
service flash_recovery /system/etc/install-recovery.sh
+ class main
oneshot
service racoon /system/bin/racoon
+ class main
socket racoon stream 600 system system
- # racoon will setuid to vpn after getting necessary resources.
- group net_admin
+ # IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
+ group vpn net_admin inet
disabled
oneshot
service mtpd /system/bin/mtpd
+ class main
socket mtpd stream 600 system system
user vpn
- group vpn net_admin net_raw
+ group vpn net_admin inet net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
+ class main
user keystore
group keystore
socket keystore stream 666
service dumpstate /system/bin/dumpstate -s
+ class main
socket dumpstate stream 0660 shell log
disabled
oneshot
-
-#userspace daemon needed for gator
-service gatord /system/bin/gatord
- user root
- oneshot
diff --git a/origen.mk b/origen.mk
index 1885d91..3b338b7 100644
--- a/origen.mk
+++ b/origen.mk
@@ -1,7 +1,10 @@
# The smdkv310
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
$(call inherit-product, device/linaro/common/common.mk)
$(call inherit-product, device/linaro/origen/device.mk)
PRODUCT_BRAND := origen
PRODUCT_DEVICE := origen
PRODUCT_NAME := origen
+PRODUCT_MODEL := origen
+PRODUCT_MANUFACTURER := Samsung