38 Commits

Author SHA1 Message Date
Alexander Winkowski
eb2cc22dd9
sm6250-common: Remove zram writeback leftovers
It has been disabled in kernel because of memory corruption.

Change-Id: I50e4cdc39b38a510d39032253606ddec3e41d22c
2022-06-10 15:36:10 +01:00
Randall Huang
cbd27f8900
sm6250-common: remove IO read_ahead_kb tune
If we set 2048KB ra value in the beginning of the
boot process, services initialized at this time would
keep 2048KB ra value even though we adjust the ra value
to 128KB after boot completion.

This may cause memory pressure.

Bug: 174700194
Signed-off-by: Randall Huang <huangrandall@google.com>
Change-Id: I97ee0ee9511eaada011f2634afd68d68cdca4570
2022-05-17 13:27:32 +00:00
Alexander Winkowski
2cf33c94dc
Revert "Revert "sm6250-common: rootdir: Enable s2idle""
This reverts commit fcb861b2155ccb7753563aaaa6b9c9851eb4ec11.

Fixed:
https://review.lineageos.org/q/Idbb2e825c489e174d5701e0c315b51a3149bfe49

Change-Id: I73b3eb3dc9bba90aa4579b31d5122e1cfce52491
2022-05-17 13:27:30 +00:00
Alexander Winkowski
7b38336f3f
sm6250-common: rootdir: Fix typos
Change-Id: I5f4f1a6dd8c4ac4d7a2096d7416846eb66ff9fca
2022-04-13 18:46:07 +01:00
Alexander Winkowski
fcb861b215
Revert "sm6250-common: rootdir: Enable s2idle"
This reverts commit b037c145f5ae958a7471edf95de5590f4a5f2575.

s2idle happens to cause RCU stalls. Disable it until a solution is found.

Change-Id: If0a6c817f415f6ddbdc202423492a7d2ebf1d0fb
2022-03-29 14:47:11 +01:00
Wei Wang
6c07d0e241
sm6250-common: rootdir: boost UFS during boot
Before:
SystemServer_start            : 4.963   0.14877
SystemUi_start                : 6.4789  0.17614
system_server_ready           : 6.8311  0.17777

After:
SystemServer_start            : 4.8848  0.13089
SystemUi_start                : 6.2907  0.14558
system_server_ready           : 6.6286  0.14705

Bug: 63644084
Test: 50 boot with packages/services/Car/tools/bootanalyze/bootanalyze.py
Change-Id: Icebc7a2e5b223c4749adb6575c52a99ef6c5faa0
2022-02-23 05:19:35 +00:00
Alexander Winkowski
4147a5615a
sm6250-common: Switch to AOSP encryption
* From redfin-user 12 SPB5.210812.002 7671067 release-keys

Change-Id: I20d40c93b3861a92716165ab90bb09c73c0e64ed
2021-12-21 15:46:38 +00:00
Sebastiano Barezzi
894afbd8a9
sm6250-common: rootdir: Move to Android.bp
Change-Id: I28c3cb806d47e0e2c4f1fc0cf909d90638f2d2af
2021-10-18 18:48:52 +02:00
Kyle Lin
b037c145f5
sm6250-common: rootdir: Enable s2idle
Test: build and check the suspend_resume trace
Bug: 142553453
Change-Id: I176c0e1adbe3c6a90b9da90dd10ad664024bf164
2021-10-14 19:22:19 +02:00
Alexander Koskovich
54830186e5
sm6250-common: 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
2021-09-23 18:42:57 +02:00
dianlujitao
92b6e36b71
sm6250-common: Make fastrpc_shell_3 publicly available
* Used by GCAM for DSP-accelerated HDR processing
 * Arguably we should label /vendor/dsp/cdsp/fastrpc_shell_3 to
   same_process_hal_file like Pixels, but the partition is prebuilt thus
   we're unable to relabel it.
 * Copy the file to writable tmpfs, setup attributes and bind mount back
   to workaround the limitation.

[ghostrider-reborn]:
Allow adsp/cdsprpcd and neuralnetworks HAL to access fastrpc_shell_3

[kras edit:
 1. rename some contexts as per qva/kona
 2. extend to allow camera HAL and VPP service to access it as well]

[dereference23: Remove VPP policy because atoll doesn't use it]

Co-authored-by: Adithya R <gh0strider.2k18.reborn@gmail.com>
Change-Id: Ide90e5c7307d413db5ece736e859559f06679545
2021-09-09 18:46:35 +02:00
Jimmy Chen
18066f4ebc
sm6250-common: wifi: move supplicant service init to wpa_supplicant
Bug: 138790309
Test: boot and wifi function is ok
Change-Id: Icea6361942873b5177c5fa59f9628c3b383b4509
2021-09-09 18:46:32 +02:00
Nick C
46df85c08a
sm6250-common: Changes for Pixel thermal HAL
Change-Id: Id5e4ec3e15f047a6ffd84af34dd9943fa70f7554
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
2021-09-09 18:46:29 +02:00
Bruno Martins
82f432048b
sm6250-common: Drop I/O prefetcher
This depends on the already removed QTI perf stack.

Change-Id: I06b9a57f868e77bbcbb77c3970aec723404689f4
2021-09-09 18:46:26 +02:00
Wei Wang
bf49e93908
sm6250-common: Remove QTI perfd
Bug: 69270928
Test: Build and boot device and test camera
Change-Id: I87b283206f462fb5c8ec9cdd303ae2934fe9bfc4
2021-09-09 18:46:26 +02:00
Rick Yiu
b0f0c415a1
sm6250-common: rootdir: Apply runtime blkio settings
Bug: 126796415
Test: settings are as expected
Change-Id: I5d90c0baad52cd027d948701c4962226b9b619a5
2021-09-09 18:46:11 +02:00
Kyle Lin
743e44b443
sm6250-common: rootdir: Fine tune the read_ahead size
sync ag/6911752,ag/9342439
fine tune the read_ahead size for boot time

Bug: 137150088
Bug: 139640385
Bug: 143448664

Test: boot to home and boot time measurement
Change-Id: If7929c51222e325a019532ce0d16045a52778165
Signed-off-by: Kyle Lin <kylelin@google.com>
Signed-off-by: Ocean Chen <oceanchen@google.com>
2021-09-09 18:46:11 +02:00
Wei Wang
d35ff1caca
sm6250-common: rootdir: Boot time tuning
RD1A.200703.001
dmesg_action_sys.boot_completed_first_timestamp_avg : 14745.3
With CL
dmesg_action_sys.boot_completed_first_timestamp_avg : 13993.7

Bug: 143857500
Bug: 161478668
Test: build and boottime test
Tested-by: Lisa Liu <liulisa@google.com>
Signed-off-by: Wei Wang <wvw@google.com>
Change-Id: Ib8f31d39501b4747f0c268d2dd87e814bcc7843b
2021-09-09 18:46:11 +02:00
Kyle Lin
1d7a13366a
sm6250-common: rootdir: Setup runtime cpusets
Because the arch is similiar with SDM670, we aling the setting with
bonito.

Bug: 142552311
Test: build , munaual check the settings
Change-Id: Ie4d4cd252cbe5cdaf733a8db09117808eb0ec27c
2021-09-09 18:46:10 +02:00
Jaegeuk Kim
117ae7fbf6
sm6250-common: Get back to default from long-standing VM tweaks
This patch removed the old writeout policy tune which was never touched since
2009. In the meantime, most of Android devices are equipped with over 4GB DRAM
and very fast flash storages like UFS, which becomes more like desktop or
servers in 2009. So, it'd be worth to go back to use the default kernel configs.

Bug: 136483670
Bug: 137190999
Bug: 152936751
Test: check value output
Change-Id: I1ebbf9f1f27a921103db51e96a50aadd6ec0dde8
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
2021-09-09 18:46:10 +02:00
Brock5555
2abc0a364d
sm6250-common: rootdir: Enable qcrild & data services on boot
Fixes lag on getting network service after boot.

Change-Id: I0f7cd9df2a103070b3569a610cc391c54f6e3048
2021-09-09 18:46:10 +02:00
Volodymyr Zhdanov
de4430798e
sm6250-common: rootdir: Override hwcomposer service
* CAF ¯\_(ツ)_/¯
* See https://source.codeaurora.org/quic/la/platform/hardware/interfaces/commit/?id=73a427f95e231a46c2274d51abfec21bd2d316f1

Change-Id: Iae755d16e5d5f70d372112bcbbac8e71d8df1124
2021-09-09 18:46:10 +02:00
Volodymyr Zhdanov
b6f59d3316
sm6250-common: rootdir: Don't enable a2dp offload from rootdir
* this breaks a2dp toggle

Change-Id: I20335149e99a48c7ff8219f94d7a6280e49d7f58
2021-09-09 18:46:09 +02:00
Volodymyr Zhdanov
836bc2c0a3
sm6250-common: rootdir: Remove service for unused wigignpt
Change-Id: I08c9e6e30aee9b606982e10b0a78515475cd3597
2021-09-09 18:46:09 +02:00
Albert I
23d6c382f2
sm6250-common: fstab: Handle avb= fs_mgr flags correctly
Specifying avb=<vbmeta-partition> is only necessary for first entry of
partition groups that use same vbmeta partition. The following entry can have
<vbmeta-parititon> part omitted.

Test: None
Link: https://source.android.com/devices/architecture/kernel/mounting-partitions-early#fstab-entries
Signed-off-by: Albert I <kras@raphielgang.org>
Change-Id: I5a42fd3de72c400acfae56d6a1e1b85c22a79537
2021-09-09 18:46:09 +02:00
Albert I
b09005f206
sm6250-common: Configure zRAM using fstab
* "32-bit overflow" CAF mentioned in the function wrapper inside post-boot
  script sounds very bs, since if it's 64-bit it won't be affected anyways

* We do the setup using fstab instead to allow setting up more flags such
  as setting up backing device and compression streams; as such kanged from
  Pixels

* zRAM size = 50% physical memory size to satisfy what CAF really wants

* Use LZ4 compression even for regular devices

Signed-off-by: Albert I <kras@raphielgang.org>
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Change-Id: Ia6efb3d28e56fb026d9b28fc6633b2eac77dfa47
2021-09-09 18:46:08 +02:00
Alexander Winkowski
f1b745f78f
sm6250-common: fstab: Enable new encryption flags
* From mojito-user 11 RKQ1.201022.002 V12.5.2.0.RKGMIXM release-keys

Change-Id: I63c3e85ec90af17b3c9b40acd30d1458da7eac0a
2021-09-09 18:46:08 +02:00
Alexander Winkowski
e9ddd276cb
sm6250-common: fstab: Add UFS sysfs path
Change-Id: I3b0a34c75ca391f84830640d3c2adab717040a42
2021-09-09 18:46:07 +02:00
Demon000
0adcfcde85
sm6250-common: rootdir: Add /boot to fstab
Build process errors out without this.

Traceback (most recent call last):
  File "build/make/tools/releasetools/ota_from_target_files", line 2455, in <module>
    main(sys.argv[1:])
  File "build/make/tools/releasetools/ota_from_target_files", line 2429, in main
    output_file=args[1])
  File "build/make/tools/releasetools/ota_from_target_files", line 1103, in WriteFullOTAPackage
    common.CheckSize(boot_img.data, "boot.img", target_info)
  File "/home/aicp-dev/rom/lineage-17.1/build/make/tools/releasetools/common.py", line 1190, in CheckSize
    p = info_dict["fstab"][mount_point]
KeyError: '/boot'

Change-Id: I30a396ea62e6e48420c0dd41533c156e90032929
2021-09-09 18:46:07 +02:00
Adam Shih
5cf344ba4d
sm6250-common: rootdir: Remove sdcard legacy support
[    1.667218] audit: type=1400 audit(1804301.953:5): avc:  denied  { write } for  pid=507 comm="init" name="/" dev="tmpfs" ino=17273 scontext=u:r:vendor_init:s0 tcontext=u:object_r:tmpfs:s0 tclass=dir permissive=0
[    1.667362] init: Command 'symlink /sdcard /mnt/sdcard' action=vendor.skip.init=0 && init (/vendor/etc/init/hw/init.sm8150.rc:87) took 1ms and failed: symlink() failed: Permission denied
[    1.669181] init: Command 'symlink /sdcard /storage/sdcard0' action=vendor.skip.init=0 && init (/vendor/etc/init/hw/init.sm8150.rc:88) took 1ms and failed: symlink() failed: Read-only file system

Bug: 131295392
Test: modify rc file, push to device and find error log gone
Change-Id: I24b6f5ac58159a1172a286eb680ded326c7319f9
(cherry picked from commit b1a63f1a7a99fb6c5a526c73426cab0bbf29a352)
Signed-off-by: Jason(HeWei) Sung <jasonsung@google.com>
2021-09-09 18:46:07 +02:00
orgesified
95a05c717d
sm6250-common: rootdir: Remove useless mkdir commands
init    : Command 'mkdir /firmware 0771 system system' action=early-init (/vendor/etc/init/hw/init.target.rc:31) took 0ms and failed: Not a directory on /firmware
init    : Command 'mkdir /bt_firmware 0771 system system' action=early-init (/vendor/etc/init/hw/init.target.rc:32) took 0ms and failed: Not a directory on /bt_firmware
init    : Command 'mkdir /dsp 0771 media media' action=early-init (/vendor/etc/init/hw/init.target.rc:33) took 0ms and failed: Not a directory on /dsp

Signed-off-by: orgesified <me@orgesified.ml>
Change-Id: I129f6fd9210076fffa1912e3dd6dcec32bd5acf6
2021-09-09 18:46:06 +02:00
Ethan Chen
09ab0b4905
sm6250-common: rootdir: Remove bogus tombstone directory directives
* /data/tombstones and /data/vendor/tombstones are both created by
  the system's init.rc.
* Creating /tombstones at the root isn't allowed since the root is
  a ramdisk and mounted read-only.

Change-Id: I04586994280ae48f36542f56e1cace422943376b
2021-09-09 18:46:06 +02:00
Alexander Winkowski
94c1f3209c
sm6250-common: rootdir: Configure cpusets on init
This should be done earlier:
libprocessgroup: Failed to open /dev/cpuset/camera-daemon/tasks: No such file or directory: No such file or directory
libprocessgroup: Failed to apply CameraServiceCapacity task profile: No such file or directory

Change-Id: I9edbdad2e764667a4624b181e0426f14ed9be616
2021-09-09 18:46:06 +02:00
Alexander Winkowski
df538ecabc
sm6250-common: rootdir: Update USB controller configuration
* For USB init scripts from vendor/qcom/opensource/usb/etc

Change-Id: Ia77c3271cc5f81230c6028b6340fdecf21412532
2021-09-09 18:46:06 +02:00
UtsavBalar1231
cd444b3f63
sm6250-common: rootdir: Cleanup Xiaomi's derp
E ueventd : /vendor/ueventd.rc: 418: Invalid section keyword found

Change-Id: I418720d35c74bd2d96ef0f68a590900a06bf7a32
2021-09-09 18:46:05 +02:00
UtsavBalar1231
e9af1ad77a
sm6250-common: rootdir: Properly label /sys/kernel/qvr_external_sensor/fd
E ueventd : /vendor/ueventd.rc: 175: /sys/ lines must have 5 entries

Change-Id: Ib614f778f734da76b3fbe07615f9323058c8631e
2021-09-09 18:46:05 +02:00
Alexander Winkowski
77999ac063
sm6250-common: Clean up rootdir
* Remove unused/duplicated parts
* Make changes to do without other scripts

Co-authored-by: Demon000 <demonsingur@gmail.com>
Change-Id: I8e758337488dc19ecb47ec1b583fba33ef05882d
2021-09-09 18:46:05 +02:00
Alexander Winkowski
4a2375f2bc
sm6250-common: rootdir: Import rootdir files
* From curtana-user 11 RKQ1.200826.002 V12.0.4.0.RJWMIXM release-keys

Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Change-Id: Ibcf71853e6d45b4ca6948f5267f2af26bf8b812a
2021-09-09 18:46:05 +02:00