Commit Graph

123 Commits

Author SHA1 Message Date
Cyber Knight
0a1cc039d8 sm6150-common: Mount EROFS at init for /system
- We don't use EXT4 for /system anymore hence let's mount it appropriately.

Change-Id: Ida90e4be8e36ca5778a4ca7d483ca3586b1f95e3
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:09:54 +08:00
Cyber Knight
5f8ce774dd sm6150-common: Switch to EROFS for relevant partitions
- EROFS offers much more compressed partition sizes compared to the likes of ext4 albeit being read-only.
- We have switched to EROFS for /system, /system_ext, /product, /odm and /vendor.
- This patch was inspired by [1].

[1]: 2b52a00408

Change-Id: I438f6b88ede93fe7e5d581439ba630b5c5440a48
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>
Signed-off-by: donjohanliebert <donjohanliebert@gmail.com>
2024-11-12 14:09:54 +08:00
basamaryan
664dde7f2c
sm6150-common: rootdir: Add missing 'vendor.' prefix to cnss-daemon
Missed in 1a7135d93a

Change-Id: I0a47df69637674379ef5e3bd4a95b228e200e269
2024-08-06 12:46:08 +05:30
Sebastiano Barezzi
9a0eaa69db
sm6150-common: Partially revert "Move to QTI health AIDL service"
https://github.com/LineageOS/android_system_core/blob/lineage-21.0/init/init.cpp#L1099

This partially reverts commit 53d51eceb1.

Change-Id: I284f80f364e9057a8373a015f0acaee3ef9e395d
2024-07-03 01:49:09 +05:30
Paul Crowley
527f330c63
sm6150-common: Remove wait_for_keymaster and all references
No longer needed now init listens for property changes on a
separate thread.

Bug: 186580823
Test: Cuttlefish boots successfully
Change-Id: Ief3a546d2154231d18957c2f703bd128966d7288
2024-06-24 20:26:46 +05:30
basamaryan
ea5b035f38
sm6150-common: rootdir: Set missing permissions for goodix and fortsense
Change-Id: I9101f164566deff0062fec976f4ddad8ae5c799f
2024-06-22 17:27:09 +05:30
palaych
87c9d011e8
sm6150-common: init: Set permissions for double tap to wake node
Change-Id: I0244ace82cee4b76a93d36624fe94cc78547860e
2024-06-22 17:27:09 +05:30
Sebastiano Barezzi
ce784237a1
sm6150-common: rootdir: Drop debugfs stuff
Missed in I45e6f20c886d467a215c9466f3a09965ff897d7e

Change-Id: I9ec52e8969b20be027e5693637e65eddb99169c9
2024-04-10 13:26:47 -04:00
Prabhanjan Kandula
2efa487655
sm6150-common: rootdir: Avoid delay for vblank disable from DRM
Set drm_vblank_offdelay parameter to -1, to make DRM
issue the vblank disable immediately with out delay.
By defailt  the DRM framework has a delay of 5 secs
timeout before issuing the vblank disable.

Change-Id: Idc1dfe6a6994f2ac2d3c60ae8fd5a4e883b675d9
2024-04-10 13:26:47 -04:00
Suren Baghdasaryan
4395b79e9f
sm6150-common: Replace writepid with task_profiles command for cgroup migration
writepid command usage to join a cgroup has been deprecated in favor
of a more flexible approach using task_profiles. This way cgroup path
is not hardcoded and cgroup changes can be easily made. Replace
writepid with task_profiles command to migrate between cgroups.

Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ibb56d2379c42e5ed4b2f15c1b04d5fb163b48678
2024-04-10 13:26:46 -04:00
Suren Baghdasaryan
32aba0f3bb
sm6150-common: Replace direct pid writes with setting task profiles for audio interfaces
For easy transition from SchedTune to UtilClamp, direct access to these
cgroups should be abstracted by using task profiles. Replace writepid
commands with new task_profiles command.

Bug: 155419956
Test: change .rc file and confirm task profile is applied
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ide373c283359cf4b73af4cb0813d8c0306942595
2024-04-10 13:26:46 -04:00
Rick Yiu
d8e35a1cd3
sm6150-common: Remove some camera-daemon commands
Those commands have moved to init.rc.

Bug: 170507876
Bug: 171740453
Test: build pass
Change-Id: Icfe520e7f7367461607cc8fb5e524d9699e79124
2024-04-10 13:26:46 -04:00
Bruno Martins
53d51eceb1
sm6150-common: Move to QTI health AIDL service
The health AIDL HAL service provides functionalities of charger,
therefore system charger at /system/bin/charger is deprecated.
On top of that, QTI health AIDL HAL service enables suspend by
default, the equivalent of setting ro.charger.enable_suspend
for legacy charger.

Change-Id: I59c23e7974cea1174b0161f31a535fa3afa1e5c9
2024-04-10 13:26:46 -04:00
basamaryan
a0cab74d88
sm6150-common: rootdir: Fix PowerOffAlarm
* As seen on sweet MIUI V14.0.7.0.TKFMIXM

Change-Id: I5d4e6f515d52290463d4f46882ec771fba7049b1
2023-11-06 03:52:06 -05:00
Arian
10425fe8d7 sm6150-common: rootdir: Add metadata to recovery.fstab
This is necessary for it to be formatted on factory reset

Change-Id: Id859d8ab16c64a1a174aa11ed73379f2c5d7f370
2023-08-21 14:44:52 +02:00
LuK1337
c919ac7971 sm6150-common: rootdir: Set no_sehash_xattr on /mnt/vendor/persist
Change-Id: I070b1e41978aa80eb64b536ab635e9f38a2413c3
2023-08-20 18:47:33 +02:00
Michael Bestas
630f539308 sm6150-common: Build Lineage Health HAL
Change-Id: I70cc903a03ac9fa3303bb8fa039c9de4806449bf
2023-08-20 18:47:33 +02:00
Michael Bestas
4bc7f3e65f sm6150-common: ueventd: Remove all permissions from /sys/devices/soc0/serial_number
Change-Id: I688347cfe59f56e4de2e4bf3c3324ca465f7a897
2023-08-20 18:47:33 +02:00
Michael Bestas
07d61f1855 sm6150-common: Implement xtra-daemon control via property
Default to false if the property is not set.
Device init scripts will need to be adapted to restart
loc_launcher service when property change is detected.

Change-Id: Icbda789cd2a9a3391f437af2c07fc5127f2f09ab
2023-08-20 18:47:33 +02:00
basamaryan
8a68a965a3 sm6150-common: rootdir: Add sdcard1 and usbotg mount to recovery.fstab
Change-Id: Iaed4a828990a40eef1f13150c135d65ff9be1e25
2023-08-20 18:47:33 +02:00
raghavt20
43a2d997bf sm6150-common: rootdir: Remove vbmeta_system from fstab
Change-Id: I58f63641293e92a916bfcf64b9c8056f81416d19
Signed-off-by: raghavt20 <raghavt20@aospa.co>
2023-08-20 18:47:33 +02:00
Arian
e31a6e10d3 sm6150-common: rootdir: Check persist
Change-Id: Ifc66f4ff386ef3fd01eb10ebe7d105ff9f18127b
2023-08-20 18:46:58 +02:00
Arian
21d67b2b71 sm6150-common: rootdir: Drop zram from fstab.default and fstab.emmc
Change-Id: I54b163080471679be0f4b58e0e49d0a48b597cd8
2023-08-20 18:46:58 +02:00
Arian
650cb7d952 sm6150-common: rootdir: Add odm to fstab
Change-Id: I978f2549da6f213ca765577bf8f0a9ac6f8394cc
2023-08-20 18:46:58 +02:00
Arian
da59885981 sm6150-common: rootdir: Import dynamic non-ab fstabs from LA.UM.9.1.r1-13500-SMxxx0.QSSI13.0
Change-Id: Ib54d1fa04bbc57ec432c0e21cc90d04051321564
2023-08-20 18:46:58 +02:00
Arian
dc321889fb sm6150-common: rootdir: Don't specify fstab path unnecessarily
Change-Id: Ide70285090048630a89dc5ae425f9b548c072d0a
2023-08-20 18:46:58 +02:00
Arian
19e23767df Revert "sm6150-common: Force restorecon for /mnt/vendor/persist"
This reverts commit a13246a7fc.

This causes dac_override denials, set no_sehash_xattr on persist
in fstab instead to fix the issue.

Change-Id: I75f824d5b2beca5f7c3835045a7f568736e148f0
2023-06-05 11:38:04 +02:00
Gagan Malvi
0d51b5d042 sm6150-common: rootdir: Set up fingerprint nodes for phoenix.
Change-Id: If73a8a3dd917b625fbed863f81816ec11989e9f7
Signed-off-by: Gagan Malvi <malvi@aospa.co>
2023-06-05 11:38:04 +02:00
danielml
84cbd43575 Revert "sm6150-common: parts: Enable doze_status on screen off"
* Manually setting the doze status before entering the low-power mode
  makes the doze mode not to be set correctly on sweet.

* The doze status is automatically set when entering the low-power mode

This reverts commit 10f101e143.

Change-Id: I4dfee2ffb351b9bc426268e437a26f9eaefec319
2023-06-05 11:38:04 +02:00
Georg Veichtlbauer
016949aaa4 sm6150-common: Remove max ZRAM compression streams setting
Kernels >4.7 will create a comp stream for each online CPU
and ignore /sys/block/max_compression_streams. This has been
backported to many 4.4 kernels as well.

Any device running a kernel with the upstream commit can safely remove
the parameter.

Upstream commit: 43209ea2d1

Change-Id: Ibb29b54a31f0fb5bd941d7709d15d571dd77ebf5
2023-06-05 11:38:04 +02:00
Alexander Koskovich
587bd40505 sm6150-common: init: Don't mount TraceFS twice.
* AOSP already mounts TraceFS in system init, so mounting it twice
   causes SEPolicy denials. See the comments in this change.

   https://android-review.googlesource.com/c/platform/system/sepolicy/+/1294195

Change-Id: Ic5d9ac2dbd36e404a93a8d48aa0ea933fd7fa701
2023-06-05 11:38:04 +02:00
Noonlord
b670e7124d sm6150-common: rootdir: Setup file permissions for fpc
* These are used by courbet/surya/sweet

Change-Id: I605f305ab30fdbc3dd0a3afc6375cd039e5e8117
2023-01-17 07:01:07 +00:00
Mohammed Mirza Mandayappurath Manzoor
6586917049 sm6150-common: rootdir: ueventd: Set permissions for KGSL sysfs node
Some KGSL sysfs nodes need to be access controlled. Set proper
permissions for the same.

Change-Id: Idc7e2447d02742074873901c6539f2c6d9d25862
2022-06-28 00:41:07 +02:00
Varun Arora
6c79c4001d sm6150-common: rootdir: Set system graphics to power control node
Add ueventd entry to change UID and GUID when node is created

Change-Id: I721b30678a4d763d66cc5068aaea97e08ac13f7b
2022-06-28 00:41:07 +02:00
Hoss Zhou
3a3b9ce92a sm6150-common: rootdir: Add edgnss socket directory
Change-Id: Ia8d89cb1e03c31fdb8fb7564441386f56c9563e1
CRs-Fixed: 2881831
2022-06-28 00:41:07 +02:00
Rajeshwar Kurapaty
f87adf6a79 sm6150-common: rootdir: Set Netflix property based on target
Add support to set "ro.netflix.bsp_rev" property at run time
depending on the target. This is needed when 2 or targets are
binary compatible, but have different Netflix proprty for
device whitelisting.

Change-Id: Ieccd17128f1b73c819a3f33816eb8c402cfa17e2
2022-06-28 00:41:07 +02:00
Ashish Bhimanpalliwar
9e0dad8886 sm6150-common: rootdir: Increase the console log level
Increase the log level to '4', which would only log KERN_ERR
and lower, onto the console.Earlier it was incorrectly reduced
to 3 which would only log KERN_CRIT and lower.

Fixes: 06b604b6bef40abdb4b507fc13debb2146a922e1("Decrease the console log level")
Change-Id: Ic87d037450dd49138c3208e1b9f844469550364b
2022-06-28 00:41:07 +02:00
Raghavendra Rao Ananta
9aa8c4c9c5 sm6150-common: rootdir: Decrease the console log level
Decrease the log level to '3', which would only log KERN_ERR
and lower, onto the console. This is to avoid false-positives
in the test cases that may emit excessive logs, ultimately
leading to a watchdog bark.

Change-Id: I7967272de8e425e93035cd937982bfb3aee19597
2022-06-28 00:41:07 +02:00
Arvind Kumar
57d5f1f1d4 sm6150-common: Set soc properties
Set soc model and manufacturer properties

Change-Id: Ieee34b7bfab87b241abc5ed3318b46a5c6f93456
2022-06-28 00:41:07 +02:00
Bruno Martins
cc3ba5c9c2 sm6150-common: Move to common fingerprint HIDL
Change-Id: I7cb0a45c865d9dbfd800b1d633f8d5ae613bb1b9
2022-06-28 00:41:07 +02:00
Felix
a13246a7fc sm6150-common: Force restorecon for /mnt/vendor/persist
The restorecon_recursive directive in init is only applied if the
file_contexts file changed between builds, but not necessarily if any
file or folder inside /mnt/vendor/persist/ has changed.

The restorecon code checks whether an xattr named
"security.sehash" contains a string that matches the current
combined hashes of the SELinux context files and skips restoring labels
if there is a match, see
https://android.googlesource.com/platform/external/selinux/+/refs/tags/android-9.0.0_r35/libselinux/src/android/android_platform.c#1546

Force wiping that xattr so that restorecon always runs since it's not
very expensive (there are currently only about 50 files on /persist).

The restorecon is needed to fix issues such as wrong stock labels on
/mnt/vendor/persist/sensors/:
sensors_persist_file -> persist_sensors_file

Change-Id: Ic0cd848836ee550499d9236f56ed6e939e35f01e
2022-03-27 13:38:12 +02:00
YH_Lin
997e8f03cd
sm6150-common: fstab: Correct zram parameter names
[libfs_mgr]Warning: unknown flag: zram_loopback_path=/data/per_boot/zram_swap
[libfs_mgr]Warning: unknown flag: zram_loopback_size=512M

We don't use zram_loopback_path any longer so remove it.
We also changed zram_loopback_size with zram_backingdev_size so correct it.

Bug: 145330273
Bug: 145116439
Test: confirmed there is no warning and zram backing device was configured

Change-Id: I51be34c59203813a2f493eee6ab442c9940b75d7
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: YH_Lin <yhli@google.com>
2021-08-06 19:27:29 +02:00
YH_Lin
30494c543a
sm6150-common: fstab: Switch zram swap to /data/per_boot
Put zram writeback backing store into /data/per_boot

Bug: 144354600
Bug: 140882488

Change-Id: I405bc12d4b90b9f236deba23c7c8973311ad7bf4
Signed-off-by: YH_Lin <yhli@google.com>
2021-08-06 19:26:28 +02:00
Jenhao Chen
9010fc737d
sm6150-common: Enable zram writeback
Bug: 128889899
Test: Boot to home

Change-Id: I48ae06e54a66a7d6965afbe8db3d2f157cf8a1f4
2021-08-06 19:25:07 +02:00
Tim Murray
560aefb174
sm6150-common: Increase ZRAM to 2GB
Test: boots, works
bug 119988524

Change-Id: I09272e7c753569d16f2be0771835bfdbdc0bf270
2021-07-23 22:59:07 +02:00
Wei Wang
73becf7452
sm6150-common: Tune zram performance
-Switch to LZ4 for better overall performance
-Set max_comp_streams to num of cores since upstream also moves this to
percpu.
-Set page-cluster to 0 as the incremental cost of reading 1 page at a
time is negligible for zram

Bug: 38249616
Test: boot and run zram-perf showing better performance
Change-Id: I0b92b246d773db85aa03d033b2cecee54347cbd1
2021-07-23 22:54:56 +02:00
Adithya R
b2d8bf6c26
sm6150-common: Configure zram from separate fstab
Change-Id: I3d093f06b08ad1cc049325d0136b60cab70c29d0
2021-07-23 22:53:14 +02:00
Arian
a73e27936f
sm6150-common: Set permissions on /dev/xiaomi-touch
Change-Id: I94f9b64f983098b6497ffcdee9817c72d471528f
2021-07-13 22:13:56 +02:00
Arian
10f101e143
sm6150-common: parts: Enable doze_status on screen off
* This allows to enter the doze state faster when unlocking from lockscreen

Change-Id: I1900436c974a605555275ef67b283ead2cf720b5
2021-07-03 21:23:39 +02:00
Arian
727405d31d
sm6150-common: parts: Implement doze modes and auto brightness
Change-Id: I03888d1997b09cb539952dfed935a7ace5e3444c
2021-07-03 21:23:14 +02:00