From 1894d8c65f1228ce898f2d382aa862f8c1be4de3 Mon Sep 17 00:00:00 2001 From: Nolen Johnson Date: Tue, 27 Jul 2021 16:00:49 -0400 Subject: [PATCH] g12: init-files: Format contents and delete blank triggers Change-Id: I266b0a34f4e9eb9d2943a933078421f1504294cb --- init-files/fstab.amlogic | 47 +++++++++++++------------ init-files/init.amlogic.board.rc | 2 -- init-files/init.amlogic.media.rc | 1 - init-files/init.amlogic.rc | 18 +++++----- init-files/init.amlogic.usb.rc | 5 --- init-files/init.amlogic.wifi.rc | 1 - init-files/ueventd.rc | 60 ++++++++++++++++---------------- 7 files changed, 64 insertions(+), 70 deletions(-) diff --git a/init-files/fstab.amlogic b/init-files/fstab.amlogic index 077c8bf..9cda2e8 100644 --- a/init-files/fstab.amlogic +++ b/init-files/fstab.amlogic @@ -1,25 +1,26 @@ -# Android fstab file. -# -# 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 +## Dynamic partitions +odm /odm ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount +product /product ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount +system /system ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount +system_ext /system_ext ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount +vendor /vendor ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount -odm /odm ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount -product /product ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount -system /system ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount -system_ext /system_ext ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount -vendor /vendor ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount -/dev/block/boot /boot emmc defaults defaults -/dev/block/dtbo /dbto emmc defaults defaults -/dev/block/misc /misc emmc defaults defaults -/dev/block/data /data ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,fileencryption=aes-256-xts,quota,formattable,reservedsize=32M +## Block devices +/dev/block/boot /boot emmc defaults defaults +/dev/block/dtbo /dbto emmc defaults defaults /dev/block/cache /cache ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,formattable -/dev/block/metadata /metadata ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,formattable,first_stage_mount -/devices/*.sd*/mmc_host/sd* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata -/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sd* auto auto defaults voldmanaged=usb:auto,encryptable=userdata -/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sr* auto auto defaults voldmanaged=sr0:auto,encryptable=userdata -/dev/block/loop auto loop defaults voldmanaged=loop:auto -/dev/block/param /mnt/vendor/param ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,quota -# Add for zram. zramsize can be in numeric (byte) , in percent -/dev/block/zram0 none swap defaults wait,zramsize=268435456 -/dev/block/tee /mnt/vendor/tee ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check -/dev/block/factory /mnt/vendor/factory ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check +/dev/block/data /data ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,fileencryption=aes-256-xts,quota,formattable,reservedsize=32M +/dev/block/factory /mnt/vendor/factory ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check +/dev/block/metadata /metadata ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,formattable,first_stage_mount +/dev/block/misc /misc emmc defaults defaults +/dev/block/param /mnt/vendor/param ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,quota +/dev/block/tee /mnt/vendor/tee ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check + +## Virtual devices +/dev/block/loop auto loop defaults voldmanaged=loop:auto +/dev/block/zram0 none swap defaults wait,zramsize=268435456 + +## Removable devices +/devices/*.sd*/mmc_host/sd* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata +/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sd* auto auto defaults voldmanaged=usb:auto,encryptable=userdata +/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sr* auto auto defaults voldmanaged=sr0:auto,encryptable=userdata diff --git a/init-files/init.amlogic.board.rc b/init-files/init.amlogic.board.rc index abb3f74..751adb0 100644 --- a/init-files/init.amlogic.board.rc +++ b/init-files/init.amlogic.board.rc @@ -4,8 +4,6 @@ import /vendor/etc/init/hw/init.amlogic.tb_detect.rc on early-init loglevel 3 -on init - on post-fs-data insmod /vendor/lib/modules/mali.ko insmod /vendor/lib/modules/dovi.ko diff --git a/init-files/init.amlogic.media.rc b/init-files/init.amlogic.media.rc index cae9e76..b25e95d 100644 --- a/init-files/init.amlogic.media.rc +++ b/init-files/init.amlogic.media.rc @@ -39,4 +39,3 @@ on fs insmod /vendor/lib/modules/amlogic_fbc_lib.ko insmod /vendor/lib/modules/amvdec_mavs.ko insmod /vendor/lib/modules/amvdec_av1.ko - diff --git a/init-files/init.amlogic.rc b/init-files/init.amlogic.rc index af11b56..2705833 100644 --- a/init-files/init.amlogic.rc +++ b/init-files/init.amlogic.rc @@ -13,15 +13,16 @@ on init # Support legacy paths symlink /sdcard /mnt/sdcard start console - #30 means reserve 3% memory using for high water mark, 1GB DDR x 3% = 30MB + # 30 means reserve 3% memory using for high water mark, 1GB DDR x 3% = 30MB write /proc/sys/vm/watermark_scale_factor 30 - #12288KB + # 12288 KB write /proc/sys/vm/min_free_kbytes 12288 - #init the unifykeys + # Init the unifykeys write /sys/class/unifykeys/attach 1 chmod 666 /dev/video_composer.0 chmod 666 /dev/video_composer.1 + on boot chown system graphics /sys/module/fb/parameters/osd_logo_index chmod 0660 /sys/module/fb/parameters/osd_logo_index @@ -35,24 +36,25 @@ on boot chown media system /sys/devices/virtual/switch/hdmi/state chmod 0660 /sys/devices/virtual/switch/hdmi/state chmod 666 /dev/v4lvideo - # thermal + + # Thermal chown system system /sys/class/thermal/thermal_zone0/mode chown system system /sys/class/thermal/thermal_zone1/mode chmod 664 /sys/class/thermal/thermal_zone0/mode chmod 664 /sys/class/thermal/thermal_zone1/mode - #power + # Power chmod 664 /sys/power/early_suspend_trigger chown root system /sys/power/early_suspend_trigger - #vfm map + # vfm map chown media system /sys/class/vfm/map chmod 666 /sys/class/vfm/map write /sys/class/vfm/map "rm default" write /sys/class/vfm/map "add default decoder ppmgr deinterlace amvideo" - #0: normal user and root user can read - #1: only root user can read + # 0: normal user and root user can read + # 1: only root user can read write /proc/sys/kernel/dmesg_restrict 0 diff --git a/init-files/init.amlogic.usb.rc b/init-files/init.amlogic.usb.rc index 7db1312..b503ce0 100644 --- a/init-files/init.amlogic.usb.rc +++ b/init-files/init.amlogic.usb.rc @@ -1,8 +1,3 @@ -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - on early-boot mount configfs none /config mkdir /config/usb_gadget/g1 0770 diff --git a/init-files/init.amlogic.wifi.rc b/init-files/init.amlogic.wifi.rc index 2cff02e..c55d64f 100644 --- a/init-files/init.amlogic.wifi.rc +++ b/init-files/init.amlogic.wifi.rc @@ -1,4 +1,3 @@ -on fs service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \ -g@android:wpa_wlan0 diff --git a/init-files/ueventd.rc b/init-files/ueventd.rc index 44a96b7..fc88671 100644 --- a/init-files/ueventd.rc +++ b/init-files/ueventd.rc @@ -1,11 +1,11 @@ -# /dev/ devices +## /dev/ devices # # Amlogic AV streaming devices /dev/amvideo 0666 media system /dev/ionvideo 0666 media system -/dev/video_composer.0 0660 media system -/dev/video_composer.1 0660 media system +/dev/video_composer.0 0660 media system +/dev/video_composer.1 0660 media system /dev/ppmgr 0660 media system /dev/amstream_* 0666 media system /dev/audiodsp0 0660 media system @@ -24,35 +24,35 @@ /dev/video19 0660 system mediadrm /dev/video20 0660 system mediadrm /dev/video21 0660 system mediadrm -/dev/video23 0660 system mediadrm -/dev/video26 0660 system mediadrm -/dev/video30 0660 system mediadrm -/dev/video31 0660 system mediadrm -/dev/video32 0660 system mediadrm -/dev/video33 0660 system mediadrm -/dev/video34 0660 system mediadrm -/dev/video35 0660 system mediadrm -/dev/video36 0660 system mediadrm -/dev/video37 0660 system mediadrm -/dev/video38 0660 system mediadrm -/dev/video50 0660 system camera +/dev/video23 0660 system mediadrm +/dev/video26 0660 system mediadrm +/dev/video30 0660 system mediadrm +/dev/video31 0660 system mediadrm +/dev/video32 0660 system mediadrm +/dev/video33 0660 system mediadrm +/dev/video34 0660 system mediadrm +/dev/video35 0660 system mediadrm +/dev/video36 0660 system mediadrm +/dev/video37 0660 system mediadrm +/dev/video38 0660 system mediadrm +/dev/video50 0660 system camera /dev/amaudio_utils 0660 media system /dev/amaudio_ctl 0660 media system /dev/amvenc_avc 0660 mediacodec system /dev/HevcEnc 0660 mediacodec system /dev/amsubtitle 0660 media system /dev/jpegenc 0660 media system -/dev/videosync 0666 media system -/dev/ac_sbuf0 0660 system camera -/dev/ac_isp4uf 0660 system camera +/dev/videosync 0666 media system +/dev/ac_sbuf0 0660 system camera +/dev/ac_isp4uf 0660 system camera -#audio data +# Audio data /dev/audio_data_debug 0660 mediacodec audio /dev/amjpegdec 0666 system system /dev/ge2d 0660 system system /dev/vdin0 0660 system system -/dev/vdin1 0660 system system +/dev/vdin1 0660 system system /dev/virtmem 0666 system system # Mali @@ -64,13 +64,13 @@ # uvm /dev/uvm 0660 system graphics -# video tunnel +# Video tunnel /dev/videotunnel 0666 system graphics # sw_sync /dev/sw_sync 0666 system graphics -#possible serial +# Possible serial /dev/ttyS1 0660 bluetooth bluetooth /dev/ttyS2 0660 bluetooth bluetooth /dev/ttyS3 0666 system system @@ -88,7 +88,7 @@ /dev/rtk_btusb 0660 bluetooth bluetooth -#mtkbt +# mtkbt /dev/stpbt 0664 bluetooth bluetooth /dev/rtkbt_dev 0660 bluetooth bluetooth /dev/hidraw* 0660 system audio @@ -110,10 +110,10 @@ /dev/block/by-name/frp 0660 system system -# /sys/ sysfs +## /sys/ sysfs # -#bluetooth +# Bluetooth /sys/devices/platform/bt-dev/rfkill/rfkill0 state 0666 bluetooth bluetooth /sys/devices/platform/bt-dev/rfkill/rfkill0 type 0660 bluetooth bluetooth /sys/devices/platform/aml_bt/rfkill/rfkill0 state 0666 bluetooth bluetooth @@ -121,7 +121,7 @@ /sys/devices/bt-dev.*/rfkill/rfkill0 state 0660 bluetooth bluetooth /sys/devices/bt-dev.*/rfkill/rfkill0 type 0660 bluetooth bluetooth -#hdmi cec +# HDMI CEC /sys/class/amhdmitx/amhdmitx0 hpd_state 0664 system system /sys/class/amhdmitx/amhdmitx0 disp_mode 0664 system system /sys/class/amhdmitx/amhdmitx0 config 0664 system system @@ -133,7 +133,7 @@ /sys/class/amhdmitx/amhdmitx0 contenttype_cap 0664 system system /sys/class/amhdmitx/amhdmitx0 contenttype_mode 0664 system system -#graphic +# Graphics /sys/class/graphics/fb* blank 0664 media system /sys/class/graphics/fb* order 0664 media system /sys/class/graphics/fb* scale 0664 media system @@ -150,11 +150,11 @@ /sys/class/graphics/fb0 free_scale_axis 0664 system system /sys/class/graphics/fb0 window_axis 0664 system system -#cpu +# CPU /sys/devices/system/cpu/cpu1 online 0664 system system /sys/devices/system/cpu/cpu0 cpufreq/scaling_governor 0664 system system /sys/devices/system/cpu/cpu0 cpufreq/hmp_boost 0664 system system -#led -/sys/devices/platform/gpioleds/leds/yellow_led trigger 0666 root root +# LED +/sys/devices/platform/gpioleds/leds/yellow_led trigger 0666 root root /sys/devices/platform/gpioleds/leds/sys_led brightness 0666 root root -- 2.20.1