aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHashcode <hashcode0f@gmail.com>2014-12-27 02:56:02 +0200
committerdoc <doc.divxm@gmail.com>2014-12-27 02:56:06 +0200
commit12548858be1e135f457f8fe34afc1bd6a4e780f6 (patch)
tree185a003fc4ac79443e5fb5de7360293e39e93696
parent3b5ffad8edae16c6b88d38c10c87b9a4632721f4 (diff)
otterx: ramdisk changes
- fstab cleanup - use common omap4 and otter-common init.*.rc files - cleanup usb settings Change-Id: Iae7c81dfb1d7684bcd309d21ac71084636df07f2
-rw-r--r--fstab.otterx18
-rw-r--r--init.otterx.rc259
-rw-r--r--init.otterx.usb.rc18
3 files changed, 19 insertions, 276 deletions
diff --git a/fstab.otterx b/fstab.otterx
index 029a4bd..04481ea 100644
--- a/fstab.otterx
+++ b/fstab.otterx
@@ -1,12 +1,12 @@
# Android fstab file.
-#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
+#<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/platform/omap/omap_hsmmc.1/by-name/system /system ext4 rw,nodev,noatime,errors=continue wait
-/dev/block/platform/omap/omap_hsmmc.1/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,nonremovable,check,encryptable=footer,length=-16384
-/dev/block/platform/omap/omap_hsmmc.1/by-name/cache /cache ext4 rw,nosuid,nodev,noatime,errors=continue wait,check
-/dev/block/platform/omap/omap_hsmmc.1/by-name/boot /boot emmc defaults defaults
-/dev/block/platform/omap/omap_hsmmc.1/by-name/recovery /recovery emmc defaults defaults
-/dev/block/platform/omap/omap_hsmmc.1/by-name/bootloader /bootloader emmc defaults defaults
-
-/dev/block/zram0 none swap defaults zramsize=134217728
+/dev/block/platform/omap/omap_hsmmc.1/by-name/system /system ext4 rw,nodev,noatime,errors=continue wait
+/dev/block/platform/omap/omap_hsmmc.1/by-name/userdata /data f2fs rw,discard,nosuid,nodev,noatime,nodiratime,inline_xattr wait,nonremovable,check,encryptable=footer,length=-16384
+/dev/block/platform/omap/omap_hsmmc.1/by-name/userdata /data ext4 rw,discard,nosuid,nodev,noatime wait,check,encryptable=footer,length=-16384
+/dev/block/platform/omap/omap_hsmmc.1/by-name/cache /cache ext4 rw,discard,nosuid,nodev,noatime wait,check
+/dev/block/platform/omap/omap_hsmmc.1/by-name/boot /boot emmc defaults defaults
+/dev/block/platform/omap/omap_hsmmc.1/by-name/recovery /recovery emmc defaults defaults
+/dev/block/platform/omap/omap_hsmmc.1/by-name/bootloader /bootloader emmc defaults defaults
+/dev/block/zram0 none swap defaults zramsize=67108864
diff --git a/init.otterx.rc b/init.otterx.rc
index 6b6032c..2b0c3e2 100644
--- a/init.otterx.rc
+++ b/init.otterx.rc
@@ -1,16 +1,8 @@
+import init.otter-common.rc
+import init.omap4.rc
import init.otterx.usb.rc
-on early-init
- mount debugfs debugfs /sys/kernel/debug
- symlink /data/tombstones /tombstones
-
on init
- loglevel 7
-
- # See storage config details at http://source.android.com/tech/storage/
- mkdir /mnt/shell/emulated 0700 shell shell
- mkdir /storage/emulated 0555 root root
-
export EXTERNAL_STORAGE /storage/emulated/legacy
export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
export EMULATED_STORAGE_TARGET /storage/emulated
@@ -21,257 +13,26 @@ on init
symlink /storage/emulated/legacy /storage/sdcard0
symlink /mnt/shell/emulated/0 /storage/emulated/legacy
- # create removable USB Mass Storage mountpoints
- mkdir /storage/usb0 0555 root root
- mkdir /storage/usb1 0555 root root
-
on fs
+ # zRAM read only 1 page at a time
+ write /proc/sys/vm/page-cluster 0
+
mkdir /factory 0775 radio radio
mount_all /fstab.otterx
swapon_all /fstab.otterx
setprop ro.crypto.fuse_sdcard true
- # zRAM read only 1 page at a time
- write /proc/sys/vm/page-cluster 0
-
- # pvr module
- insmod /system/lib/modules/pvrsrvkm_sgx540_120.ko
- insmod /system/lib/modules/omaplfb_sgx540_120.ko
- start pvrsrvinit
-
- # change permissions for mtd device
- chmod 0660 /dev/mtd/mtd0
- chown media media /dev/mtd/mtd0
-
- # change permissions for i2c-2 device
- chmod 0660 /dev/i2c-2
- chown media media /dev/i2c-2
-
- # change permissions for Tiler driver
- chmod 0777 /dev/tiler
- chmod 0777 /dev/dmm
-
- # change permissions for ION driver
- chmod 0777 /dev/ion
-
- # change permissions for rfkill
- chmod 0777 /dev/rfkill
-
# We chown/chmod /factory because mount is run as root + defaults
chown radio radio /factory
chmod 0775 /factory
- # change permissions for Sensors
- # bma250
- chown system system /sys/bus/i2c/devices/4-0018/delay
- chmod 0771 /sys/bus/i2c/devices/4-0018/delay
- chown system system /sys/bus/i2c/devices/4-0018/enable
- chmod 0771 /sys/bus/i2c/devices/4-0018/enable
- # stk-als22x7
- chown system system /sys/bus/i2c/devices/4-0010/enable
- chmod 0771 /sys/bus/i2c/devices/4-0010/enable
-
- # change permissions for Thermal sensor TMP105
- chmod 0777 /sys/class/hwmon/hwmon0/device/temp1_max
- chmod 0777 /sys/class/hwmon/hwmon0/device/temp1_max_hyst
-
- # change permissions for Tiler driver
- chown media media /dev/tiler
- chmod 0666 /dev/tiler
-
- # LEDs
- chmod 0777 /dev/ilitek_ctrl
- chmod 0777 /sys/class/leds/lcd-backlight/brightness
- chmod 0666 /sys/class/leds/led-green/brightness
- chmod 0666 /sys/class/leds/led-orange/brightness
- chown system system /sys/class/leds/lcd-backlight/brightness
- chown system system /sys/class/leds/led-green/brightness
- chown system system /sys/class/leds/led-orange/brightness
-
- # Set default maximum of 1008 on cpu0 (peformance settings will change this if set by user)
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1008000
-
- #Give system ownership and permission to boost clock for specified timeout
- #Note boost_timeout cannot be changed from application because of dynamic sysfs creation. It will have default value of 3 sec.
- chown system system /sys/devices/system/cpu/cpu0/cpufreq/boost_cpufreq
- chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/boost_cpufreq
-
- # Set current permissions for charge protection
- chown system system /sys/class/power_supply/usb/device/charge_command
- chown system system /sys/class/power_supply/usb/device/charge_current
- chown system system /sys/class/power_supply/usb/device/float_voltage
- chown system system /sys/class/power_supply/usb/device/bad_battery
-
- chown root system /proc/net/ip_conntrack
-
-on post-fs
- # wi-fi
- setprop wifi.interface "wlan0"
- setprop softap.interface "wlan0"
-
- insmod /system/lib/modules/compat.ko
- insmod /system/lib/modules/cfg80211.ko
- insmod /system/lib/modules/mac80211.ko
- insmod /system/lib/modules/wl12xx.ko
-
- # symlink egl.cfg
- symlink /sys/egl/egl.cfg /system/lib/egl/egl.cfg
-
on post-fs-data
mkdir /data/media 0770 media_rw media_rw
- mkdir /data/tmp 0777 system system
- symlink /data/tmp /tmp
-
- # make dir for trace
- mkdir /cache/trace 0777 system system
- chmod 0777 /cache/trace
-
- # wifi
- mkdir /data/misc/wifi 0770 wifi wifi
- mkdir /data/misc/wifi/sockets 0770 wifi wifi
- mkdir /data/misc/dhcp 0770 dhcp dhcp
- chown dhcp dhcp /data/misc/dhcp
- 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
-
- # run mac script
- start fixmac
-
- # mount system ro
- mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/system /system ro remount
-
- setprop vold.post_fs_data_done 1
on charger
wait /dev/block/platform/omap/omap_hsmmc.1/by-name/system
mount ext4 /dev/block/platform/omap/omap_hsmmc.1/by-name/system /system ro barrier=1
-on boot
- mount debugfs /sys/kernel/debug /sys/kernel/debug
- chmod 0666 /dev/pvrsrvkm
- setprop ro.radio.noril yes
-
-# fake some battery state
- setprop status.battery.state Slow
- setprop status.battery.level 5
- setprop status.battery.level_raw 50
- setprop status.battery.level_scale 9
-
-# create filesystems if necessary
-#service setup_fs /system/bin/setup_fs \
-# /dev/block/platform/omap/omap_hsmmc.1/by-name/cache \
-# /dev/block/platform/omap/omap_hsmmc.1/by-name/userdata
-# class core
-# user root
-# group root
-# oneshot
-
-service fixmac /system/bin/fix-mac.sh
- class core
- user root
- group root
- oneshot
- disabled
-
-service hwprops /sbin/hwprops
- critical
- disabled
- oneshot
-
-# initialize the SGX driver
-service pvrsrvinit /system/bin/pvrsrvinit
- class core
- user root
- group root
- oneshot
- disabled
-
-###################################################
-# MSHIELD SMC Daemon - component required to store persistent data coming
-# from the SMC PA to the device persistent storage
-###################################################
-service tf_daemon /system/bin/tf_daemon \
- -d -c /vendor/etc/smc_normal_world_android_cfg.ini
- class main
- user root
- group root
- oneshot
- disabled
-
-###################################################
-# MSHIELD SMC PA Control - installs the SMC PA into the Secure Environment
-###################################################
-service smc_pa /system/bin/smc_pa_ctrl \
- -c /vendor/etc/smc_normal_world_android_cfg.ini \
- start /vendor/firmware/smc_pa.ift
- class core
- user root
- group root
- oneshot
-
-# wifi services
-service p2p_supplicant /system/bin/wpa_supplicant -e/data/misc/wifi/entropy.bin \
- -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
- -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
- -I/system/etc/wifi/p2p_supplicant_overlay.conf \
- -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \
- -g@android:wpa_wlan0
- 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 -e/data/misc/wifi/entropy.bin \
- -O/data/misc/wifi/sockets -g@android:wpa_wlan0
- class main
- socket wpa_wlan0 dgram 660 wifi wifi
- disabled
- oneshot
-
-service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
- class main
- disabled
- oneshot
-
-service iprenew_wlan0 /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
-
-service dhcpcd_p2p /system/bin/dhcpcd -aABKL
- class main
- disabled
- oneshot
-
-service iprenew_p2p /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
-
-service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
- class main
- disabled
- oneshot
-
-service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
- class main
- disabled
- oneshot
-
-service iprenew_bnep0 /system/bin/dhcpcd -n
- class main
- disabled
- oneshot
-
-service hostapd_bin /system/bin/hostapd -d -e/data/misc/wifi/entropy.bin /data/misc/wifi/hostapd.conf
- socket wpa_wlan0 dgram 660 wifi wifi
- class main
- disabled
- oneshot
-
service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
class late_start
@@ -279,13 +40,3 @@ service charger /sbin/healthd -c
class charger
critical
seclabel u:r:healthd:s0
-
-#on property:init.svc.smc_pa=stopped
-# start tf_daemon
-
-#service watchdog /sbin/watchdog
-# user root
-# oneshot
-
-on property:sys.boot_completed=1
-
diff --git a/init.otterx.usb.rc b/init.otterx.usb.rc
index d1626f7..4f85cef 100644
--- a/init.otterx.usb.rc
+++ b/init.otterx.usb.rc
@@ -1,17 +1,14 @@
-on boot
+on init
write /sys/class/android_usb/android0/iManufacturer Amazon
write /sys/class/android_usb/android0/iProduct "Kindle"
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 1949
write /sys/class/android_usb/android0/idProduct 0006
+ write /sys/class/android_usb/android0/f_rndis/manufacturer Amazon
+ write /sys/class/android_usb/android0/f_rndis/vendorID 1949
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
write /sys/class/android_usb/f_mass_storage/inquiry_string "Amazon Kindle 0100"
-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}
-
on property:sys.usb.config=adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 1949
@@ -89,9 +86,4 @@ on property:sys.usb.config=mass_storage,adb
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:service.adb.root=1
- write /sys/class/android_usb/android0/enable 0
- restart adbd
- write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}