Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Merged init.rc scripts with just the changes needed for b2g to work #2

Merged
merged 2 commits into from

2 participants

@atilag

I overwrited your entirely init.rc (the b2g one)... Now it's merged with the changes we need for b2g.
Sorry! :)

@gokhanmoral gokhanmoral merged commit b1bb4a0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 51 additions and 63 deletions.
  1. +42 −46 res/misc/init.b2g/init.rc
  2. +9 −17 res/misc/init.b2g/init.rc.2
View
88 res/misc/init.b2g/init.rc
@@ -16,7 +16,9 @@ loglevel 3
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
- export LD_LIBRARY_PATH /vendor/lib:/system/lib
+ export TMPDIR /data/local/tmp
+ export GRE_HOME /system/b2g
+ export LD_LIBRARY_PATH /vendor/lib:/system/lib:/system/b2g
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
@@ -107,18 +109,14 @@ loglevel 3
on fs
# mount ext4 partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
- #mount ext4 /dev/block/mmcblk0p9 /system
- mount ext4 /dev/block/mmcblk0p9 /system noatime wait rw
+ mount ext4 /res/dev/system /system noatime wait rw
chmod 0755 /system/b2g/b2g
chmod 0755 /system/b2g/plugin-container
chmod 0755 /system/b2g/updater
- exec sfsck /dev/block/mmcblk0p7 ext4
- mount ext4 /dev/block/mmcblk0p7 /cache nosuid nodev noatime wait
+ exec sfsck /res/dev/cache ext4
+ mount ext4 /res/dev/cache /cache nosuid nodev noatime wait
- #exec sfsck /dev/block/mmcblk0p12 ext4
- #mount ext4 /dev/block/mmcblk0p12 /preload nosuid nodev noatime wait ro
-
mkdir /efs
#mount rfs /dev/block/mmcblk0p1 /efs nosuid nodev check=no
exec sfsck /dev/block/mmcblk0p1 ext4
@@ -133,14 +131,14 @@ on fs
chmod 0775 /efs/wifi
# check encryption status, checking UMS & data should be excuted after this command
- exec check_encryption_status /dev/block/mmcblk0p10
+ exec check_encryption_status /res/dev/data
# verfiy filesystem (UMS)
exec sformat /dev/block/mmcblk0p11 vfat
on post-fs
- exec sfsck /dev/block/mmcblk0p10 ext4
- mount ext4 /dev/block/mmcblk0p10 /data nosuid nodev noatime wait noauto_da_alloc
+ exec sfsck /res/dev/data ext4
+ mount ext4 /res/dev/data /data nosuid nodev noatime wait noauto_da_alloc
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
@@ -153,6 +151,7 @@ on post-fs
chmod 0770 /cache
# This may have been created by the recovery system with odd permissions
+ mkdir /cache/recovery 0770
chown system cache /cache/recovery
chmod 0770 /cache/recovery
@@ -177,6 +176,9 @@ on post-fs-data
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
+ mkdir /data/system
+ chown system system /data/system
+ chmod 0771 /data/system
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
@@ -561,10 +563,11 @@ 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 4095,131072,196608,4096,16384,110208
- setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
+ setprop net.tcp.buffersize.default 4096,87380,704512,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,563200,4096,16384,110208
+ setprop net.tcp.buffersize.hspa 4094,87380,704512,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
@@ -582,16 +585,23 @@ on boot
chmod 0770 /system/bin/rtc_log.sh
chown system system /system/bin/rtc_log.sh
+# DVFS - cpufreq ondemand
+# write /sys/devices/system/cpu/cpufreq/ondemand/down_differential 5
+# write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 85
+
# DVFS - limit cpufreq during booting sequence
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor userspace
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 1000000
+# write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor userspace
+# write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 1000000
+# write /data/dvfs "sleep 10 && echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed && sleep 30 && echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor"
+# chmod 0770 /data/dvfs
# Set this property so surfaceflinger is not started by system_init
- #setprop system_init.startsurfaceflinger 0
+ setprop system_init.startsurfaceflinger 0
class_start core
class_start main
+
on nonencrypted
class_start late_start
@@ -616,7 +626,7 @@ on property:vold.decrypt=trigger_shutdown_framework
class_reset main
on property:persist.sys.storage_preload=1
- mount ext4 /dev/block/mmcblk0p12 /preload nosuid nodev noatime wait ro
+ #mount ext4 /dev/block/mmcblk0p12 /preload nosuid nodev noatime wait ro
setprop storage.preload.complete 1
on property:persist.sys.storage_preload=0
@@ -700,21 +710,11 @@ on property:service.adb.root=1
restart adbd
write /sys/class/android_usb/android0/enable 1
-service servicemanager-g /system/bin/servicemanager
+service servicemanager /system/bin/servicemanager
class core
user system
group system
critical
- disabled
-
-service servicemanager-a /system/bin/servicemanager
- class core
- user system
- group system
- critical
- onrestart restart zygote
- onrestart restart media
- disabled
service vold /system/bin/vold
class core
@@ -774,7 +774,7 @@ service media /system/bin/mediaserver
group system audio camera inet net_bt net_bt_admin
ioprio rt 4
-service samsungani /system/bin/samsungani
+service samsungani /sbin/bootanimation.sh
class main
user graphics
group graphics
@@ -902,10 +902,14 @@ service rtc_log /system/bin/sh /system/bin/rtc_log.sh
oneshot
# DVFS - limit cpufreq during booting sequence
-service dvfs /system/bin/sh /system/bin/dvfs.sh
- class main
+#service dvfs /system/bin/sh /system/bin/dvfs.sh
+# class main
+# user root
+# oneshot
+
+service fakeperm /system/bin/fakeperm
+ class b2g
user root
- oneshot
# 2011-12-08/systemsw/kyo/ bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/bugmailer.sh -v
@@ -913,18 +917,10 @@ service bugreport /system/bin/bugmailer.sh -v
disabled
oneshot
keycodes 114 115 116
+on property:sys.boot_completed=1
+ stop samsungani
-service checktype /check-sysimage.sh
+service postinit /sbin/ext/post-init.sh
class core
+ user root
oneshot
-
-on property:sysimg.android=1
- start servicemanager-a
- start zygote
- start surfaceflinger
-
-on property:sysimg.gonk=1
- start servicemanager-g
- start surfaceflinger
- start TvoutService_C
- class_start b2g
View
26 res/misc/init.b2g/init.rc.2
@@ -1,5 +1,6 @@
on early-init
start ueventd
+ import /init.b2g.rc
# create mountpoints
mkdir /mnt 0775 root system
@@ -16,7 +17,6 @@ loglevel 3
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export TMPDIR /data/local/tmp
- export GRE_HOME /system/b2g
export LD_LIBRARY_PATH /vendor/lib:/system/lib:/system/b2g
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
@@ -110,6 +110,7 @@ on fs
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount ext4 /res/dev/system /system noatime wait rw
chmod 0755 /system/b2g/b2g
+ chmod 0755 /system/b2g/plugin-container
chmod 0755 /system/b2g/updater
# verify filesystem (UMS)
@@ -600,7 +601,7 @@ on boot
class_start core
class_start main
- class_start b2g
+
on nonencrypted
class_start late_start
@@ -911,21 +912,6 @@ service fakeperm /system/bin/fakeperm
class b2g
user root
-service b2g /system/b2g/b2g
- class b2g
- user root
- onrestart restart media
-
-service rilproxy /system/bin/rilproxy
- class b2g
- socket rilproxy stream 660 root system
- socket rilproxyd stream 660 root system
- user root
- group radio
-
-service mount-sdcard /system/bin/mountvol.sh sdcard
- class b2g
- oneshot
# 2011-12-08/systemsw/kyo/ bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/bugmailer.sh -v
@@ -940,3 +926,9 @@ service postinit /sbin/ext/post-init.sh
class core
user root
oneshot
+
+on property:sysimg.gonk=1
+ start servicemanager
+ start surfaceflinger
+ start TvoutService_C
+ class_start b2g
Something went wrong with that request. Please try again.