From 2a7f9e49089325221b08bcf32df595214ecab759 Mon Sep 17 00:00:00 2001 From: Ziyan Date: Fri, 4 Mar 2016 13:01:04 +0100 Subject: rootdir: switch to PRODUCT_COPY_FILES Now that we don't need symlinks, we can simplify this part. Change-Id: If4ed194e04de7eeaee60929a1e8b906ffe7ed172 --- BoardConfigCommon.mk | 2 +- device-common.mk | 19 ++-- rootdir/Android.mk | 52 ---------- rootdir/etc/fstab.tab2 | 22 ----- rootdir/etc/init.tab2.rc | 204 --------------------------------------- rootdir/etc/init.tab2.sensors.rc | 113 ---------------------- rootdir/etc/init.tab2.usb.rc | 79 --------------- rootdir/etc/ueventd.tab2.rc | 56 ----------- rootdir/fstab.espresso | 22 +++++ rootdir/init.espresso.rc | 204 +++++++++++++++++++++++++++++++++++++++ rootdir/init.espresso.sensors.rc | 113 ++++++++++++++++++++++ rootdir/init.espresso.usb.rc | 79 +++++++++++++++ rootdir/ueventd.espresso.rc | 56 +++++++++++ 13 files changed, 486 insertions(+), 535 deletions(-) delete mode 100644 rootdir/Android.mk delete mode 100644 rootdir/etc/fstab.tab2 delete mode 100644 rootdir/etc/init.tab2.rc delete mode 100644 rootdir/etc/init.tab2.sensors.rc delete mode 100644 rootdir/etc/init.tab2.usb.rc delete mode 100644 rootdir/etc/ueventd.tab2.rc create mode 100644 rootdir/fstab.espresso create mode 100644 rootdir/init.espresso.rc create mode 100644 rootdir/init.espresso.sensors.rc create mode 100644 rootdir/init.espresso.usb.rc create mode 100644 rootdir/ueventd.espresso.rc diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index a7bf3d3..4f8956b 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -83,5 +83,5 @@ BOARD_SEPOLICY_DIRS += \ # Recovery RECOVERY_FSTAB_VERSION := 2 -TARGET_RECOVERY_FSTAB := device/samsung/espressowifi/rootdir/etc/fstab.tab2 +TARGET_RECOVERY_FSTAB := device/samsung/espressowifi/rootdir/fstab.espresso TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888" diff --git a/device-common.mk b/device-common.mk index dd3c1d2..6294f76 100644 --- a/device-common.mk +++ b/device-common.mk @@ -27,17 +27,20 @@ DEVICE_PACKAGE_OVERLAYS += \ PRODUCT_AAPT_CONFIG := large PRODUCT_AAPT_PREF_CONFIG := mdpi -# Ramdisk -PRODUCT_PACKAGES += \ - fstab.espresso \ - init.espresso.sensors.rc \ - init.espresso.usb.rc \ - init.espresso.rc \ - ueventd.espresso.rc +# Init files +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/rootdir/init.espresso.rc:root/init.espresso.rc \ + $(LOCAL_PATH)/rootdir/init.espresso.sensors.rc:root/init.espresso.sensors.rc \ + $(LOCAL_PATH)/rootdir/init.espresso.usb.rc:root/init.espresso.usb.rc \ + $(LOCAL_PATH)/rootdir/ueventd.espresso.rc:root/ueventd.espresso.rc + +# Fstab +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/rootdir/fstab.espresso:root/fstab.espresso # Recovery Ramdisk PRODUCT_PACKAGES += \ - init.recovery.espresso.rc + $(LOCAL_PATH)/recovery/root/init.recovery.espresso.rc:recovery/root/init.recovery.espresso.rc PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/init.espresso.variant.sh:system/bin/init.espresso.variant.sh diff --git a/rootdir/Android.mk b/rootdir/Android.mk deleted file mode 100644 index 1aa0cfc..0000000 --- a/rootdir/Android.mk +++ /dev/null @@ -1,52 +0,0 @@ -LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) - -# boot.img parts -include $(CLEAR_VARS) -LOCAL_MODULE := fstab.espresso -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/fstab.tab2 -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.espresso.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.tab2.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.espresso.sensors.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.tab2.sensors.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.espresso.usb.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.tab2.usb.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := ueventd.espresso.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/ueventd.tab2.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -# recovery.img parts -include $(CLEAR_VARS) -LOCAL_MODULE := init.recovery.espresso.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := ../recovery/root/init.recovery.espresso.rc -LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT) -include $(BUILD_PREBUILT) diff --git a/rootdir/etc/fstab.tab2 b/rootdir/etc/fstab.tab2 deleted file mode 100644 index d0accb4..0000000 --- a/rootdir/etc/fstab.tab2 +++ /dev/null @@ -1,22 +0,0 @@ -# Android fstab file. -# -# 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/platform/omap/omap_hsmmc.1/by-name/FACTORYFS /system ext4 ro,barrier=1 wait -/dev/block/platform/omap/omap_hsmmc.1/by-name/EFS /efs ext4 nosuid,nodev,barrier=1 wait,check -/dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,journal_async_commit wait,check,encryptable=footer -/dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS /data f2fs noatime,nosuid,nodev,background_gc=off,inline_xattr,active_logs=2 wait,encryptable=footer -/dev/block/platform/omap/omap_hsmmc.1/by-name/CACHE /cache ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,journal_async_commit wait,check -/dev/block/platform/omap/omap_hsmmc.1/by-name/CACHE /cache f2fs noatime,nodiratime,nosuid,nodev,background_gc=off,inline_xattr,active_logs=2 wait - -# vold-managed volumes ("block device" is actually a sysfs devpath) -/devices/platform/omap/omap_hsmmc.0/mmc_host/mmc1* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata -/devices/platform/omap/musb-omap2430/musb-hdrc/usb1* auto auto defaults voldmanaged=usbdisk0:auto,noemulatedsd - -# zRAM -/dev/block/zram0 none swap defaults zramsize=268435456,zramstreams=2 - -# recovery -/dev/block/mmcblk0p5 /boot emmc defaults recoveryonly -/dev/block/mmcblk0p6 /recovery emmc defaults recoveryonly diff --git a/rootdir/etc/init.tab2.rc b/rootdir/etc/init.tab2.rc deleted file mode 100644 index ae14256..0000000 --- a/rootdir/etc/init.tab2.rc +++ /dev/null @@ -1,204 +0,0 @@ -import init.omap4.rc -import init.espresso.sensors.rc -import init.espresso.usb.rc - -on init - # Support legacy paths - symlink /sdcard /mnt/sdcard - symlink /sdcard /storage/sdcard0 - - # KSM - write /sys/kernel/mm/ksm/pages_to_scan 100 - write /sys/kernel/mm/ksm/sleep_millisecs 500 - write /sys/kernel/mm/ksm/run 1 - -on fs - mkdir /efs 0775 radio system - - mount_all /fstab.espresso - swapon_all /fstab.espresso - - restorecon_recursive /efs - - # pvr module - insmod /system/lib/modules/pvrsrvkm_sgx540_120.ko - - # read only 1 page at a time - write /proc/sys/vm/page-cluster 0 - - # set swappines to 100 - write /proc/sys/vm/swappiness 100 - - # increase read-ahead value to 256 kb - write /sys/block/mmcblk0/queue/read_ahead_kb 256 - - mount debugfs debugfs /sys/kernel/debug - -on post-fs-data - # dmrpc - mkdir /data/smc 0770 drmrpc drmrpc - chown drmrpc drmrpc /data/smc/counter.bin - chown drmrpc drmrpc /data/smc/storage.bin - chown drmrpc drmrpc /data/smc/system.bin - - # radio - mkdir /data/misc/radio/hatp 0771 radio system - - # Bluetooth - setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr" - chown bluetooth net_bt_stack ro.bt.bdaddr_path - chown bluetooth net_bt_stack /dev/ttyO1 - chmod 0660 /dev/ttyO1 - chmod 0660 /sys/class/rfkill/rfkill0/state - chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state - chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type - - # Change permission for switch - chmod 0600 /sys/class/sec/switch/jig_on - chown radio radio /sys/class/sec/switch/jig_on - - # create data/gps for GPS demon - chown root system /dev/ttyO0 - chmod 0660 /dev/ttyO0 - chown root system /sys/class/sec/gps/GPS_PWR_EN/value - chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value - chown root system /sys/class/sec/gps/GPS_nRST/value - chmod 0664 /sys/class/sec/gps/GPS_nRST/value - mkdir /data/gps 771 system system - chown system system /data/gps - - # Change permission for backlight - chown system system /sys/class/backlight/panel/brightness - - # IrLED - chown system system /sys/class/sec/sec_ir/ir_send - chown system system /sys/class/sec/sec_ir/check_ir - - # for wifi - mkdir /efs/wifi 0775 system radio - - setprop vold.post_fs_data_done 1 - -on boot -# SMC Service -service tf_daemon /system/bin/tf_daemon \ - -d -c /system/bin/smc.ini - class main - user root - group root - oneshot - disabled - -service smc_pa /system/bin/smc_pa_ctrl \ - -c /system/bin/smc.ini \ - start /system/bin/smc_pa.ift - class core - user root - group root - oneshot - -service p2p_supplicant /system/bin/wpa_supplicant \ - -iwlan0 -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \ - -ip2p0 -Dnl80211 -c /data/misc/wifi/p2p_supplicant.conf \ - -I/system/etc/wifi/p2p_supplicant_overlay.conf \ - -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ - -g@android:wpa_wlan0 - # we will start as root and wpa_supplicant will switch to user wifi - # after setting up the capabilities required for WEXT - # user wifi - # group wifi inet keystore - class main - socket wpa_wlan0 dgram 660 wifi wifi - disabled - oneshot - -service wpa_supplicant /system/bin/wpa_supplicant \ - -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf \ - -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 - # we will start as root and wpa_supplicant will switch to user wifi - # after setting up the capabilities required for WEXT - # user wifi - # group wifi inet keystore - class main - socket wpa_wlan0 dgram 660 wifi wifi - disabled - oneshot - -service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL - class main - disabled - oneshot - -service dhcpcd_p2p /system/bin/dhcpcd -aABKL - class main - disabled - oneshot - -service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL - class main - disabled - oneshot - -service iprenew_wlan0 /system/bin/dhcpcd -n - class main - disabled - oneshot - -service iprenew_p2p /system/bin/dhcpcd -n - class main - disabled - oneshot - -service iprenew_bt-pan /system/bin/dhcpcd -n - class main - disabled - oneshot - -service cpboot-daemon /sbin/cbd -d -p 8 - class main - user root - group radio cache inet misc audio sdcard_rw log sdcard_r - seclabel u:r:cpboot-daemon:s0 - -# GPS -service gpsd /system/bin/gpsd -c /system/etc/gps.xml - class main - socket gps seqpacket 0660 gps system - user gps - group system inet sdcard_rw - -# Keyboard -service dock_kbd_attach /system/bin/dock_kbd_attach /dev/ttyO3 - class main - user root - oneshot - -# Set 7 inch devices as portrait device -service variant_setup /system/bin/init.espresso.variant.sh - class main - user root - oneshot - -# LPM -on property:ro.bootmode=charger - mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS /system wait ro - -on property:ro.bootmode=charger - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6860 - write /sys/class/android_usb/android0/functions adb - write /sys/class/android_usb/android0/enable 1 - write /sys/class/android_usb/android0/iManufacturer samsung - write /sys/class/android_usb/android0/iProduct $(ro.product.model) - start adbd - -on property:ro.bootmode=charger - class_start charger - -service charger /sbin/healthd -c - class charger - critical - seclabel u:r:healthd:s0 diff --git a/rootdir/etc/init.tab2.sensors.rc b/rootdir/etc/init.tab2.sensors.rc deleted file mode 100644 index 895f621..0000000 --- a/rootdir/etc/init.tab2.sensors.rc +++ /dev/null @@ -1,113 +0,0 @@ -on post-fs-data - mkdir /data/sensors 0770 system system - - chown system input /sys/class/input/input2/enable - chown system input /sys/class/input/input2/poll_delay - - chown system input /sys/class/input/input3/enable - chown system input /sys/class/input/input3/poll_delay - - chown system input /sys/class/input/input2/enable - chown system input /sys/class/input/input2/delay - chown system input /sys/class/input/input2/wake - - chown system input /sys/class/input/input3/enable - chown system input /sys/class/input/input3/delay - chown system input /sys/class/input/input3/filter_enable - chown system input /sys/class/input/input3/filter_len - chown system input /sys/class/input/input3/data - chown system input /sys/class/input/input3/status - chown system input /sys/class/input/input3/wake - chown system input /sys/class/input/input3/position - - chown compass input /sys/class/input/input3/offsets - chown compass input /sys/class/input/input3/dynamic_matrix - chown system input /sys/class/input/input3/threshold - chown system input /sys/class/input/input3/distortion - chown system input /sys/class/input/input3/shape - write /sys/class/input/input3/distortion "500 350 15" - - chown system input /sys/class/input/input4/enable - chown system input /sys/class/input/input4/delay - chown system input /sys/class/input/input4/filter_enable - chown system input /sys/class/input/input4/filter_len - chown system input /sys/class/input/input4/data - chown system input /sys/class/input/input4/status - chown system input /sys/class/input/input4/wake - chown system input /sys/class/input/input4/position - - chown compass input /sys/class/input/input4/offsets - chown compass input /sys/class/input/input4/dynamic_matrix - chown system input /sys/class/input/input4/threshold - chown system input /sys/class/input/input4/distortion - chown system input /sys/class/input/input4/shape - write /sys/class/input/input4/distortion "500 350 15" - - chown system input /sys/class/input/input5/enable - chown system input /sys/class/input/input5/delay - chown system input /sys/class/input/input5/filter_enable - chown system input /sys/class/input/input5/filter_len - chown system input /sys/class/input/input5/data - chown system input /sys/class/input/input5/status - chown system input /sys/class/input/input5/wake - chown system input /sys/class/input/input5/position - - chown compass input /sys/class/input/input5/offsets - chown compass input /sys/class/input/input5/dynamic_matrix - chown system input /sys/class/input/input5/threshold - chown system input /sys/class/input/input5/distortion - chown system input /sys/class/input/input5/shape - write /sys/class/input/input5/distortion "500 350 15" - - chown system input /sys/class/input/input6/enable - chown system input /sys/class/input/input6/delay - chown system input /sys/class/input/input6/filter_enable - chown system input /sys/class/input/input6/filter_len - chown system input /sys/class/input/input6/data - chown system input /sys/class/input/input6/status - chown system input /sys/class/input/input6/wake - chown system input /sys/class/input/input6/position - - chown compass input /sys/class/input/input6/offsets - chown compass input /sys/class/input/input6/dynamic_matrix - chown system input /sys/class/input/input6/threshold - chown system input /sys/class/input/input6/distortion - chown system input /sys/class/input/input6/shape - write /sys/class/input/input6/distortion "500 350 15" - - chown system input /sys/class/input/input7/enable - chown system input /sys/class/input/input7/delay - chown system input /sys/class/input/input7/filter_enable - chown system input /sys/class/input/input7/filter_len - chown system input /sys/class/input/input7/data - chown system input /sys/class/input/input7/status - chown system input /sys/class/input/input7/wake - chown system input /sys/class/input/input7/position - - chown system radio /sys/class/sensors/accelerometer_sensor/raw_data - chown system radio /sys/class/sensors/accelerometer_sensor/calibration - chown system radio /sys/class/sensors/accelerometer_sensor/vendor - chown system radio /sys/class/sensors/accelerometer_sensor/name - - chown system radio /sys/class/sensors/magnetic_sensor/vendor - chown system radio /sys/class/sensors/magnetic_sensor/name - - chown system radio /sys/class/sensors/proximity_sensor/state - chown system radio /sys/class/sensors/proximity_sensor/raw_data - chown system radio /sys/class/sensors/proximity_sensor/vendor - chown system radio /sys/class/sensors/proximity_sensor/name - - chown system radio /sys/class/sensors/light_sensor/lux - chown system radio /sys/class/sensors/light_sensor/raw_data - chown system radio /sys/class/sensors/light_sensor/vendor - chown system radio /sys/class/sensors/light_sensor/name - -service orientationd /system/bin/orientationd - class main - user compass - group input - -service geomagneticd /system/bin/geomagneticd - class main - user compass - group system input diff --git a/rootdir/etc/init.tab2.usb.rc b/rootdir/etc/init.tab2.usb.rc deleted file mode 100644 index e86a7bd..0000000 --- a/rootdir/etc/init.tab2.usb.rc +++ /dev/null @@ -1,79 +0,0 @@ -on init - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/f_rndis/manufacturer Samsung - write /sys/class/android_usb/android0/f_rndis/vendorID 04e8 - write /sys/class/android_usb/android0/f_rndis/wceis 1 - -on boot - write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} - write /sys/class/android_usb/android0/iProduct ${ro.product.model} - -on property:sys.usb.config=mtp - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 685c - 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} - -on property:sys.usb.config=mtp,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6860 - 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} - -on property:sys.usb.config=rndis - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6863 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/bDeviceClass 224 - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=rndis,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6864 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/bDeviceClass 224 - write /sys/class/android_usb/android0/enable 1 - start adbd - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=ptp - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6865 - 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} - -on property:sys.usb.config=ptp,adb - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6866 - 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} - -on property:sys.usb.config=rndis,dm - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6864 - 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} - -on property:sys.usb.config=rndis,acm,dm - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/idVendor 04e8 - write /sys/class/android_usb/android0/idProduct 6864 - write /sys/class/android_usb/android0/functions ${sys.usb.config} - write /sys/class/android_usb/android0/f_acm/instances 1 - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} diff --git a/rootdir/etc/ueventd.tab2.rc b/rootdir/etc/ueventd.tab2.rc deleted file mode 100644 index 3fa8bc2..0000000 --- a/rootdir/etc/ueventd.tab2.rc +++ /dev/null @@ -1,56 +0,0 @@ -#for DSSCOMP -/dev/dsscomp 0660 system system -/dev/tiler 0660 system system -/dev/ion 0770 media graphics - -#for SYSLINK -/dev/rpmsg-omx0 0660 drmrpc drmrpc -/dev/rpmsg-omx1 0660 drmrpc drmrpc -/dev/rproc_user 0660 drmrpc drmrpc -/dev/tf_driver 0660 drmrpc drmrpc -/dev/tf_ctrl 0660 drmrpc drmrpc - -#for Sensors -/dev/mpu 0660 system system -/dev/mpuirq 0660 system system -/dev/accelirq 0660 system system -/dev/compassirq 0660 system system -/dev/timerirq 0660 system system -/dev/i2c-4 0660 system system - -#for HSPA RIL -/dev/umts_boot0 0660 radio radio -/dev/umts_boot1 0660 radio radio -/dev/umts_ipc0 0660 radio radio -/dev/umts_rfs0 0660 radio radio -/dev/block/mmcblk0p8 0660 radio radio -/dev/umts_ramdump0 0660 radio radio -/dev/umts_router 0660 radio system -/dev/umts_csd 0660 radio system - -# hdcp -/dev/hdcp 0664 root root - -# used by RIL and GPS -/dev/ttyO0 0660 system radio -/dev/ttyGS0 0660 system system - -# for LTE RIL -/dev/cdma_boot0 0660 radio radio -/dev/lte_boot0 0660 radio radio -/dev/cdma_ipc0 0660 radio radio -/dev/lte_ipc0 0660 radio radio -/dev/cdma_rfs0 0660 radio radio -/dev/lte_rfs0 0660 radio radio -/dev/lte_spi 0660 radio radio -/dev/cdma_rmnet5 0660 radio radio -/dev/cdma_rmnet6 0660 radio radio -/dev/lte_rmnet4 0660 radio radio -/dev/ttyGS1 0660 radio radio -/dev/block/mmcblk0p4 0660 radio radio -/dev/modem_br 0660 radio radio -/dev/cdma_ramdump0 0660 radio radio -/dev/lte_ramdump0 0660 radio radio - -# For SGX -/dev/pvrsrvkm 0666 system system diff --git a/rootdir/fstab.espresso b/rootdir/fstab.espresso new file mode 100644 index 0000000..d0accb4 --- /dev/null +++ b/rootdir/fstab.espresso @@ -0,0 +1,22 @@ +# Android fstab file. +# +# 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/platform/omap/omap_hsmmc.1/by-name/FACTORYFS /system ext4 ro,barrier=1 wait +/dev/block/platform/omap/omap_hsmmc.1/by-name/EFS /efs ext4 nosuid,nodev,barrier=1 wait,check +/dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,journal_async_commit wait,check,encryptable=footer +/dev/block/platform/omap/omap_hsmmc.1/by-name/DATAFS /data f2fs noatime,nosuid,nodev,background_gc=off,inline_xattr,active_logs=2 wait,encryptable=footer +/dev/block/platform/omap/omap_hsmmc.1/by-name/CACHE /cache ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,journal_async_commit wait,check +/dev/block/platform/omap/omap_hsmmc.1/by-name/CACHE /cache f2fs noatime,nodiratime,nosuid,nodev,background_gc=off,inline_xattr,active_logs=2 wait + +# vold-managed volumes ("block device" is actually a sysfs devpath) +/devices/platform/omap/omap_hsmmc.0/mmc_host/mmc1* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata +/devices/platform/omap/musb-omap2430/musb-hdrc/usb1* auto auto defaults voldmanaged=usbdisk0:auto,noemulatedsd + +# zRAM +/dev/block/zram0 none swap defaults zramsize=268435456,zramstreams=2 + +# recovery +/dev/block/mmcblk0p5 /boot emmc defaults recoveryonly +/dev/block/mmcblk0p6 /recovery emmc defaults recoveryonly diff --git a/rootdir/init.espresso.rc b/rootdir/init.espresso.rc new file mode 100644 index 0000000..ae14256 --- /dev/null +++ b/rootdir/init.espresso.rc @@ -0,0 +1,204 @@ +import init.omap4.rc +import init.espresso.sensors.rc +import init.espresso.usb.rc + +on init + # Support legacy paths + symlink /sdcard /mnt/sdcard + symlink /sdcard /storage/sdcard0 + + # KSM + write /sys/kernel/mm/ksm/pages_to_scan 100 + write /sys/kernel/mm/ksm/sleep_millisecs 500 + write /sys/kernel/mm/ksm/run 1 + +on fs + mkdir /efs 0775 radio system + + mount_all /fstab.espresso + swapon_all /fstab.espresso + + restorecon_recursive /efs + + # pvr module + insmod /system/lib/modules/pvrsrvkm_sgx540_120.ko + + # read only 1 page at a time + write /proc/sys/vm/page-cluster 0 + + # set swappines to 100 + write /proc/sys/vm/swappiness 100 + + # increase read-ahead value to 256 kb + write /sys/block/mmcblk0/queue/read_ahead_kb 256 + + mount debugfs debugfs /sys/kernel/debug + +on post-fs-data + # dmrpc + mkdir /data/smc 0770 drmrpc drmrpc + chown drmrpc drmrpc /data/smc/counter.bin + chown drmrpc drmrpc /data/smc/storage.bin + chown drmrpc drmrpc /data/smc/system.bin + + # radio + mkdir /data/misc/radio/hatp 0771 radio system + + # Bluetooth + setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr" + chown bluetooth net_bt_stack ro.bt.bdaddr_path + chown bluetooth net_bt_stack /dev/ttyO1 + chmod 0660 /dev/ttyO1 + chmod 0660 /sys/class/rfkill/rfkill0/state + chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state + chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type + + # Change permission for switch + chmod 0600 /sys/class/sec/switch/jig_on + chown radio radio /sys/class/sec/switch/jig_on + + # create data/gps for GPS demon + chown root system /dev/ttyO0 + chmod 0660 /dev/ttyO0 + chown root system /sys/class/sec/gps/GPS_PWR_EN/value + chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value + chown root system /sys/class/sec/gps/GPS_nRST/value + chmod 0664 /sys/class/sec/gps/GPS_nRST/value + mkdir /data/gps 771 system system + chown system system /data/gps + + # Change permission for backlight + chown system system /sys/class/backlight/panel/brightness + + # IrLED + chown system system /sys/class/sec/sec_ir/ir_send + chown system system /sys/class/sec/sec_ir/check_ir + + # for wifi + mkdir /efs/wifi 0775 system radio + + setprop vold.post_fs_data_done 1 + +on boot +# SMC Service +service tf_daemon /system/bin/tf_daemon \ + -d -c /system/bin/smc.ini + class main + user root + group root + oneshot + disabled + +service smc_pa /system/bin/smc_pa_ctrl \ + -c /system/bin/smc.ini \ + start /system/bin/smc_pa.ift + class core + user root + group root + oneshot + +service p2p_supplicant /system/bin/wpa_supplicant \ + -iwlan0 -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf \ + -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \ + -ip2p0 -Dnl80211 -c /data/misc/wifi/p2p_supplicant.conf \ + -I/system/etc/wifi/p2p_supplicant_overlay.conf \ + -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin \ + -g@android:wpa_wlan0 + # we will start as root and wpa_supplicant will switch to user wifi + # after setting up the capabilities required for WEXT + # user wifi + # group wifi inet keystore + class main + socket wpa_wlan0 dgram 660 wifi wifi + disabled + oneshot + +service wpa_supplicant /system/bin/wpa_supplicant \ + -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ + -I/system/etc/wifi/wpa_supplicant_overlay.conf \ + -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 + # we will start as root and wpa_supplicant will switch to user wifi + # after setting up the capabilities required for WEXT + # user wifi + # group wifi inet keystore + class main + socket wpa_wlan0 dgram 660 wifi wifi + disabled + oneshot + +service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL + class main + disabled + oneshot + +service dhcpcd_p2p /system/bin/dhcpcd -aABKL + class main + disabled + oneshot + +service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL + class main + disabled + oneshot + +service iprenew_wlan0 /system/bin/dhcpcd -n + class main + disabled + oneshot + +service iprenew_p2p /system/bin/dhcpcd -n + class main + disabled + oneshot + +service iprenew_bt-pan /system/bin/dhcpcd -n + class main + disabled + oneshot + +service cpboot-daemon /sbin/cbd -d -p 8 + class main + user root + group radio cache inet misc audio sdcard_rw log sdcard_r + seclabel u:r:cpboot-daemon:s0 + +# GPS +service gpsd /system/bin/gpsd -c /system/etc/gps.xml + class main + socket gps seqpacket 0660 gps system + user gps + group system inet sdcard_rw + +# Keyboard +service dock_kbd_attach /system/bin/dock_kbd_attach /dev/ttyO3 + class main + user root + oneshot + +# Set 7 inch devices as portrait device +service variant_setup /system/bin/init.espresso.variant.sh + class main + user root + oneshot + +# LPM +on property:ro.bootmode=charger + mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/FACTORYFS /system wait ro + +on property:ro.bootmode=charger + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6860 + write /sys/class/android_usb/android0/functions adb + write /sys/class/android_usb/android0/enable 1 + write /sys/class/android_usb/android0/iManufacturer samsung + write /sys/class/android_usb/android0/iProduct $(ro.product.model) + start adbd + +on property:ro.bootmode=charger + class_start charger + +service charger /sbin/healthd -c + class charger + critical + seclabel u:r:healthd:s0 diff --git a/rootdir/init.espresso.sensors.rc b/rootdir/init.espresso.sensors.rc new file mode 100644 index 0000000..895f621 --- /dev/null +++ b/rootdir/init.espresso.sensors.rc @@ -0,0 +1,113 @@ +on post-fs-data + mkdir /data/sensors 0770 system system + + chown system input /sys/class/input/input2/enable + chown system input /sys/class/input/input2/poll_delay + + chown system input /sys/class/input/input3/enable + chown system input /sys/class/input/input3/poll_delay + + chown system input /sys/class/input/input2/enable + chown system input /sys/class/input/input2/delay + chown system input /sys/class/input/input2/wake + + chown system input /sys/class/input/input3/enable + chown system input /sys/class/input/input3/delay + chown system input /sys/class/input/input3/filter_enable + chown system input /sys/class/input/input3/filter_len + chown system input /sys/class/input/input3/data + chown system input /sys/class/input/input3/status + chown system input /sys/class/input/input3/wake + chown system input /sys/class/input/input3/position + + chown compass input /sys/class/input/input3/offsets + chown compass input /sys/class/input/input3/dynamic_matrix + chown system input /sys/class/input/input3/threshold + chown system input /sys/class/input/input3/distortion + chown system input /sys/class/input/input3/shape + write /sys/class/input/input3/distortion "500 350 15" + + chown system input /sys/class/input/input4/enable + chown system input /sys/class/input/input4/delay + chown system input /sys/class/input/input4/filter_enable + chown system input /sys/class/input/input4/filter_len + chown system input /sys/class/input/input4/data + chown system input /sys/class/input/input4/status + chown system input /sys/class/input/input4/wake + chown system input /sys/class/input/input4/position + + chown compass input /sys/class/input/input4/offsets + chown compass input /sys/class/input/input4/dynamic_matrix + chown system input /sys/class/input/input4/threshold + chown system input /sys/class/input/input4/distortion + chown system input /sys/class/input/input4/shape + write /sys/class/input/input4/distortion "500 350 15" + + chown system input /sys/class/input/input5/enable + chown system input /sys/class/input/input5/delay + chown system input /sys/class/input/input5/filter_enable + chown system input /sys/class/input/input5/filter_len + chown system input /sys/class/input/input5/data + chown system input /sys/class/input/input5/status + chown system input /sys/class/input/input5/wake + chown system input /sys/class/input/input5/position + + chown compass input /sys/class/input/input5/offsets + chown compass input /sys/class/input/input5/dynamic_matrix + chown system input /sys/class/input/input5/threshold + chown system input /sys/class/input/input5/distortion + chown system input /sys/class/input/input5/shape + write /sys/class/input/input5/distortion "500 350 15" + + chown system input /sys/class/input/input6/enable + chown system input /sys/class/input/input6/delay + chown system input /sys/class/input/input6/filter_enable + chown system input /sys/class/input/input6/filter_len + chown system input /sys/class/input/input6/data + chown system input /sys/class/input/input6/status + chown system input /sys/class/input/input6/wake + chown system input /sys/class/input/input6/position + + chown compass input /sys/class/input/input6/offsets + chown compass input /sys/class/input/input6/dynamic_matrix + chown system input /sys/class/input/input6/threshold + chown system input /sys/class/input/input6/distortion + chown system input /sys/class/input/input6/shape + write /sys/class/input/input6/distortion "500 350 15" + + chown system input /sys/class/input/input7/enable + chown system input /sys/class/input/input7/delay + chown system input /sys/class/input/input7/filter_enable + chown system input /sys/class/input/input7/filter_len + chown system input /sys/class/input/input7/data + chown system input /sys/class/input/input7/status + chown system input /sys/class/input/input7/wake + chown system input /sys/class/input/input7/position + + chown system radio /sys/class/sensors/accelerometer_sensor/raw_data + chown system radio /sys/class/sensors/accelerometer_sensor/calibration + chown system radio /sys/class/sensors/accelerometer_sensor/vendor + chown system radio /sys/class/sensors/accelerometer_sensor/name + + chown system radio /sys/class/sensors/magnetic_sensor/vendor + chown system radio /sys/class/sensors/magnetic_sensor/name + + chown system radio /sys/class/sensors/proximity_sensor/state + chown system radio /sys/class/sensors/proximity_sensor/raw_data + chown system radio /sys/class/sensors/proximity_sensor/vendor + chown system radio /sys/class/sensors/proximity_sensor/name + + chown system radio /sys/class/sensors/light_sensor/lux + chown system radio /sys/class/sensors/light_sensor/raw_data + chown system radio /sys/class/sensors/light_sensor/vendor + chown system radio /sys/class/sensors/light_sensor/name + +service orientationd /system/bin/orientationd + class main + user compass + group input + +service geomagneticd /system/bin/geomagneticd + class main + user compass + group system input diff --git a/rootdir/init.espresso.usb.rc b/rootdir/init.espresso.usb.rc new file mode 100644 index 0000000..e86a7bd --- /dev/null +++ b/rootdir/init.espresso.usb.rc @@ -0,0 +1,79 @@ +on init + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/f_rndis/manufacturer Samsung + write /sys/class/android_usb/android0/f_rndis/vendorID 04e8 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + +on boot + write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} + write /sys/class/android_usb/android0/iProduct ${ro.product.model} + +on property:sys.usb.config=mtp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 685c + 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} + +on property:sys.usb.config=mtp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6860 + 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} + +on property:sys.usb.config=rndis + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6863 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/bDeviceClass 224 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6864 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/bDeviceClass 224 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6865 + 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} + +on property:sys.usb.config=ptp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6866 + 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} + +on property:sys.usb.config=rndis,dm + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6864 + 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} + +on property:sys.usb.config=rndis,acm,dm + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 04e8 + write /sys/class/android_usb/android0/idProduct 6864 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/f_acm/instances 1 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} diff --git a/rootdir/ueventd.espresso.rc b/rootdir/ueventd.espresso.rc new file mode 100644 index 0000000..3fa8bc2 --- /dev/null +++ b/rootdir/ueventd.espresso.rc @@ -0,0 +1,56 @@ +#for DSSCOMP +/dev/dsscomp 0660 system system +/dev/tiler 0660 system system +/dev/ion 0770 media graphics + +#for SYSLINK +/dev/rpmsg-omx0 0660 drmrpc drmrpc +/dev/rpmsg-omx1 0660 drmrpc drmrpc +/dev/rproc_user 0660 drmrpc drmrpc +/dev/tf_driver 0660 drmrpc drmrpc +/dev/tf_ctrl 0660 drmrpc drmrpc + +#for Sensors +/dev/mpu 0660 system system +/dev/mpuirq 0660 system system +/dev/accelirq 0660 system system +/dev/compassirq 0660 system system +/dev/timerirq 0660 system system +/dev/i2c-4 0660 system system + +#for HSPA RIL +/dev/umts_boot0 0660 radio radio +/dev/umts_boot1 0660 radio radio +/dev/umts_ipc0 0660 radio radio +/dev/umts_rfs0 0660 radio radio +/dev/block/mmcblk0p8 0660 radio radio +/dev/umts_ramdump0 0660 radio radio +/dev/umts_router 0660 radio system +/dev/umts_csd 0660 radio system + +# hdcp +/dev/hdcp 0664 root root + +# used by RIL and GPS +/dev/ttyO0 0660 system radio +/dev/ttyGS0 0660 system system + +# for LTE RIL +/dev/cdma_boot0 0660 radio radio +/dev/lte_boot0 0660 radio radio +/dev/cdma_ipc0 0660 radio radio +/dev/lte_ipc0 0660 radio radio +/dev/cdma_rfs0 0660 radio radio +/dev/lte_rfs0 0660 radio radio +/dev/lte_spi 0660 radio radio +/dev/cdma_rmnet5 0660 radio radio +/dev/cdma_rmnet6 0660 radio radio +/dev/lte_rmnet4 0660 radio radio +/dev/ttyGS1 0660 radio radio +/dev/block/mmcblk0p4 0660 radio radio +/dev/modem_br 0660 radio radio +/dev/cdma_ramdump0 0660 radio radio +/dev/lte_ramdump0 0660 radio radio + +# For SGX +/dev/pvrsrvkm 0666 system system -- cgit v1.1