PageRenderTime 49ms CodeModel.GetById 46ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/init.herring.rc

http://github.com/kyapa/sc02b_initramfs
text | 123 lines | 99 code | 24 blank | 0 comment | 0 complexity | cdb54398a41499e24ad956f2673f0f71 MD5 | raw file
  1on boot
  2    mount debugfs /sys/kernel/debug /sys/kernel/debug
  3
  4    setprop ro.build.product herring
  5    setprop ro.product.device herring
  6    setprop ro.radio.noril yes
  7    setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
  8
  9# fake some battery state
 10    setprop status.battery.state Slow
 11    setprop status.battery.level 5
 12    setprop status.battery.level_raw  50
 13    setprop status.battery.level_scale 9
 14
 15# wi-fi
 16    mkdir /data/misc/wifi/sockets 0770 wifi wifi
 17    mkdir /data/misc/dhcp 0770 dhcp dhcp
 18
 19# phone
 20    setprop ro.telephony.call_ring.multiple 0
 21
 22
 23# It is useless
 24#on fs
 25#    mkdir /efs 0775 radio radio
 26#    mount yaffs2 mtd@efs /efs nosuid nodev
 27#    mount ext4 /dev/block/platform/s3c-sdhci.0/by-name/system /system wait ro
 28#    mount ext4 /dev/block/platform/s3c-sdhci.0/by-name/userdata /data wait noatime nosuid nodev
 29
 30# permissions for bluetooth.
 31    chown bluetooth bluetooth ro.bt.bdaddr_path
 32    chown bluetooth bluetooth /dev/s3c2410_serial0
 33    chmod 0660 /dev/s3c2410_serial0
 34    chmod 0660 /sys/class/rfkill/rfkill0/state
 35    chmod 0660 /sys/class/rfkill/rfkill1/state
 36    chmod 0660 /sys/class/rfkill/rfkill2/state
 37    chmod 0660 /sys/class/rfkill/rfkill3/state
 38    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
 39    chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
 40    chown bluetooth bluetooth /sys/class/rfkill/rfkill2/state
 41    chown bluetooth bluetooth /sys/class/rfkill/rfkill3/state
 42    chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
 43    chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type
 44    chown bluetooth bluetooth /sys/class/rfkill/rfkill2/type
 45    chown bluetooth bluetooth /sys/class/rfkill/rfkill3/type
 46
 47# We chown/chmod /efs because mount is run as root + defaults
 48    #SEC Device encryption   
 49    #chown radio system /efs
 50    chown radio system /efs
 51    chmod 0775 /efs
 52
 53# permissions for NFC
 54    setprop ro.nfc.port "I2C"
 55    chmod 0600 /dev/pn544
 56    chown nfc nfc /dev/pn544
 57
 58# Permissions for System Server and daemons.
 59    chown system system /sys/class/backlight/s5p_bl/brightness
 60
 61
 62# create filesystems if necessary
 63service setup_fs /system/bin/setup_fs /dev/block/platform/s3c-sdhci.0/by-name/userdata
 64    user root
 65    group root
 66    oneshot
 67
 68# 3D init
 69service pvrsrvinit /system/vendor/bin/pvrsrvinit
 70    user root
 71    group root
 72    oneshot
 73
 74service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
 75    socket wpa_eth0 dgram 0660 wifi wifi
 76    disabled
 77    oneshot
 78
 79service dhcpcd /system/bin/dhcpcd
 80    disabled
 81    oneshot
 82
 83service btld /system/bin/logwrapper /system/bin/btld -hb 3000000 -hp /dev/s3c2410_serial0 -lpm 1
 84    user root
 85    group bluetooth net_bt_admin
 86    disabled
 87    oneshot
 88
 89# start btld if soft_onoff is enabled
 90on property:service.brcm.bt.soft_onoff=1
 91    start btld
 92
 93# stop btld if soft_onoff is disabled
 94on property:service.brcm.bt.soft_onoff=0
 95    stop btld
 96
 97#STOPSHIP: Remove logwrapper and -d option before production
 98service bluetoothd /system/bin/logwrapper /system/bin/bluetoothd -d -n
 99    socket bluetooth stream 660 bluetooth bluetooth
100    socket dbus_bluetooth stream 660 bluetooth bluetooth
101# init.rc does not yet support applying capabilities, so run as root and
102# let bluetoothd drop uid to bluetooth with the right linux capabilities
103    group bluetooth net_bt_admin misc
104    disabled
105
106service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
107    --baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/s3c2410_serial0
108    user bluetooth
109    group bluetooth net_bt_admin
110    disabled
111    oneshot
112
113# bugreport is triggered by holding down volume down, volume up and power
114service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
115    disabled
116    oneshot
117    keycodes 114 115 116
118
119service tvout /system/bin/tvoutserver
120     user system
121     group graphics
122
123