Home | History | Annotate | Download | only in crespo
      1 import init.herring.usb.rc
      2 
      3 on boot
      4     mount debugfs /sys/kernel/debug /sys/kernel/debug
      5 
      6     setprop ro.build.product herring
      7     setprop ro.product.device herring
      8     setprop ro.radio.noril yes
      9     setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
     10 
     11     setprop ro.crypto.keyfile.userdata /efs/userdata_footer
     12 
     13 # fake some battery state
     14     setprop status.battery.state Slow
     15     setprop status.battery.level 5
     16     setprop status.battery.level_raw  50
     17     setprop status.battery.level_scale 9
     18 
     19 # phone
     20     setprop ro.telephony.call_ring.multiple 0
     21 
     22 # change permission for uart_switch
     23     chown radio radio /sys/class/sec/uart_switch/UART_SEL/value
     24     chmod 660 /sys/class/sec/uart_switch/UART_SEL/value
     25 
     26 # create data/gps for GPS demon
     27     mkdir /data/gps 770 gps system
     28     chown gps system /data/gps
     29     chown gps root /sys/class/sec/gps/GPS_PWR_EN/value
     30     chmod 660 /sys/class/sec/gps/GPS_PWR_EN/value
     31 
     32 # cpufreq, set ondemand governor
     33     write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
     34 
     35 on fs
     36     mkdir /efs 0775 radio radio
     37     mount yaffs2 mtd@efs /efs noatime nosuid nodev
     38     chmod 770 /efs/bluetooth
     39     chmod 770 /efs/imei
     40     mount ext4 /dev/block/platform/s3c-sdhci.0/by-name/system /system wait ro
     41     mount ext4 /dev/block/platform/s3c-sdhci.0/by-name/userdata /data wait noatime nosuid nodev nomblk_io_submit
     42 
     43     export EXTERNAL_STORAGE /mnt/sdcard
     44     mkdir /mnt/sdcard 0000 system system
     45     symlink /mnt/sdcard /sdcard
     46 
     47 # permissions for bluetooth.
     48     chown bluetooth bluetooth /efs/bluetooth
     49     chown bluetooth bluetooth ro.bt.bdaddr_path
     50     chown bluetooth bluetooth /dev/s3c2410_serial0
     51     chmod 0600 /dev/s3c2410_serial0
     52     chmod 0660 /sys/class/rfkill/rfkill0/state
     53     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
     54     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
     55 
     56 # We chown/chmod /efs because mount is run as root + defaults
     57     chown radio radio /efs
     58     chmod 0775 /efs
     59     mkdir /data/radio 0775 radio radio
     60     mkdir /data/radio/log 0775 radio radio
     61 
     62 # permissions for NFC
     63     setprop ro.nfc.port "I2C"
     64     chmod 0600 /dev/pn544
     65     chown nfc nfc /dev/pn544
     66 
     67 # Permissions for System Server and daemons.
     68     chown system system /sys/class/backlight/s5p_bl/brightness
     69 
     70 on post-fs-data
     71 # wi-fi
     72     mkdir /data/misc/wifi/sockets 0770 wifi wifi
     73     mkdir /data/misc/dhcp 0770 dhcp dhcp
     74 
     75     setprop vold.post_fs_data_done 1
     76 
     77 service gpsd /system/vendor/bin/gpsd -c /vendor/etc/gps.xml
     78     class main
     79     socket gps seqpacket 0660 gps system
     80     user gps
     81     group system inet
     82 
     83 # create filesystems if necessary
     84 service setup_fs /system/bin/setup_fs /dev/block/platform/s3c-sdhci.0/by-name/userdata
     85     class core
     86     user root
     87     group root
     88     oneshot
     89 
     90 # 3D init
     91 service pvrsrvinit /system/vendor/bin/pvrsrvinit
     92     class core
     93     user root
     94     group root
     95     oneshot
     96 
     97 service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0
     98     class main
     99     socket wpa_wlan0 dgram 0660 wifi wifi
    100     disabled
    101     oneshot
    102 
    103 # DHCPCD
    104 # wi-fi
    105 service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
    106     class main
    107     disabled
    108     oneshot
    109 
    110 # wimax
    111 service dhcpcd_uwbr0 /system/bin/dhcpcd -ABKL
    112     class main
    113     disabled
    114     oneshot
    115 
    116 # bluetooth
    117 service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
    118     class main
    119     disabled
    120     oneshot
    121 
    122 # IP Renew
    123 # wi-fi
    124 service iprenew_wlan0 /system/bin/dhcpcd -n
    125     class main
    126     disabled
    127     oneshot
    128 
    129 # wimax
    130 service iprenew_uwbr0 /system/bin/dhcpcd -n
    131     class main
    132     disabled
    133     oneshot
    134 
    135 # bluetooth
    136 service iprenew_bnep0 /system/bin/dhcpcd -n
    137     class main
    138     disabled
    139     oneshot
    140 
    141 service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
    142     --baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/s3c2410_serial0
    143     class main
    144     user bluetooth
    145     group bluetooth net_bt_admin
    146     disabled
    147     oneshot
    148 
    149 # bugreport is triggered by holding down volume down, volume up and power
    150 service bugreport /system/bin/bugmailer.sh -v
    151     class main
    152     disabled
    153     oneshot
    154     keycodes 114 115 116
    155 
    156 service wimax_route /system/bin/route add default dev uwbr0
    157     class main
    158     disabled
    159     oneshot
    160