2015-11-17 11:05:58 -04:00
|
|
|
# AnyKernel2 Ramdisk Mod Script
|
2014-02-28 21:50:22 -04:00
|
|
|
# osm0sis @ xda-developers
|
|
|
|
|
|
|
|
|
|
## AnyKernel setup
|
|
|
|
|
# EDIFY properties
|
|
|
|
|
kernel.string=DirtyV by bsmitty83 @ xda-developers
|
|
|
|
|
do.devicecheck=1
|
2014-08-26 14:53:42 -03:00
|
|
|
do.modules=0
|
2014-02-28 21:50:22 -04:00
|
|
|
do.cleanup=1
|
2017-02-17 22:26:44 +01:00
|
|
|
do.cleanuponabort=0
|
2014-02-28 21:50:22 -04:00
|
|
|
device.name1=maguro
|
|
|
|
|
device.name2=toro
|
|
|
|
|
device.name3=toroplus
|
2014-10-14 16:37:48 -03:00
|
|
|
device.name4=
|
|
|
|
|
device.name5=
|
2014-02-28 21:50:22 -04:00
|
|
|
|
|
|
|
|
# shell variables
|
|
|
|
|
block=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot;
|
2016-11-25 08:34:22 -04:00
|
|
|
is_slot_device=0;
|
2014-02-28 21:50:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## AnyKernel methods (DO NOT CHANGE)
|
2016-11-30 23:10:37 -04:00
|
|
|
# import patching functions/variables - see for reference
|
|
|
|
|
. /tmp/anykernel/tools/ak2-core.sh;
|
2014-02-28 21:50:22 -04:00
|
|
|
|
|
|
|
|
|
2014-03-01 16:01:59 -04:00
|
|
|
## AnyKernel permissions
|
2016-11-30 23:10:37 -04:00
|
|
|
# set permissions for included ramdisk files
|
2014-03-01 16:01:59 -04:00
|
|
|
chmod -R 755 $ramdisk
|
|
|
|
|
chmod 644 $ramdisk/sbin/media_profiles.xml
|
|
|
|
|
|
|
|
|
|
|
2014-02-28 21:50:22 -04:00
|
|
|
## AnyKernel install
|
|
|
|
|
dump_boot;
|
|
|
|
|
|
|
|
|
|
# begin ramdisk changes
|
|
|
|
|
|
|
|
|
|
# init.rc
|
|
|
|
|
backup_file init.rc;
|
|
|
|
|
replace_string init.rc "cpuctl cpu,timer_slack" "mount cgroup none /dev/cpuctl cpu" "mount cgroup none /dev/cpuctl cpu,timer_slack";
|
|
|
|
|
append_file init.rc "run-parts" init;
|
|
|
|
|
|
|
|
|
|
# init.tuna.rc
|
|
|
|
|
backup_file init.tuna.rc;
|
2015-11-17 11:05:58 -04:00
|
|
|
insert_line init.tuna.rc "nodiratime barrier=0" after "mount_all /fstab.tuna" "\tmount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data remount nosuid nodev noatime nodiratime barrier=0";
|
2014-02-28 21:50:22 -04:00
|
|
|
append_file init.tuna.rc "dvbootscript" init.tuna;
|
|
|
|
|
|
|
|
|
|
# init.superuser.rc
|
|
|
|
|
if [ -f init.superuser.rc ]; then
|
|
|
|
|
backup_file init.superuser.rc;
|
|
|
|
|
replace_string init.superuser.rc "Superuser su_daemon" "# su daemon" "\n# Superuser su_daemon";
|
|
|
|
|
prepend_file init.superuser.rc "SuperSU daemonsu" init.superuser;
|
|
|
|
|
else
|
|
|
|
|
replace_file init.superuser.rc 750 init.superuser.rc;
|
2015-11-17 11:05:58 -04:00
|
|
|
insert_line init.rc "init.superuser.rc" after "on post-fs-data" " import /init.superuser.rc";
|
2014-02-28 21:50:22 -04:00
|
|
|
fi;
|
|
|
|
|
|
|
|
|
|
# fstab.tuna
|
|
|
|
|
backup_file fstab.tuna;
|
2015-11-17 11:05:58 -04:00
|
|
|
patch_fstab fstab.tuna /system ext4 options "nodiratime,barrier=0" "nodev,noatime,nodiratime,barrier=0,data=writeback,noauto_da_alloc,discard";
|
|
|
|
|
patch_fstab fstab.tuna /cache ext4 options "barrier=0,nomblk_io_submit" "nosuid,nodev,noatime,nodiratime,errors=panic,barrier=0,nomblk_io_submit,data=writeback,noauto_da_alloc";
|
2016-01-10 03:40:46 -04:00
|
|
|
patch_fstab fstab.tuna /data ext4 options "nomblk_io_submit,data=writeback" "nosuid,nodev,noatime,errors=panic,nomblk_io_submit,data=writeback,noauto_da_alloc";
|
2014-02-28 21:50:22 -04:00
|
|
|
append_file fstab.tuna "usbdisk" fstab;
|
|
|
|
|
|
|
|
|
|
# end ramdisk changes
|
|
|
|
|
|
|
|
|
|
write_boot;
|
|
|
|
|
|
|
|
|
|
## end install
|
|
|
|
|
|