Commit graph

346 commits

Author SHA1 Message Date
Kelvin Zhang
2d0a254101 Mount persist partition in early-init
The graphics hal might need to access /persist early in the boot
process. So mount persist early for 4K devices.

Test: boot 4K device
Bug: 338504890
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:73a68dd6d3794ed8a4e791f2c86c4e55a61ea2aa)
Merged-In: I4b2a0a61ebaff5d85a4daac445d81ae3d21aa9c3
Change-Id: I4b2a0a61ebaff5d85a4daac445d81ae3d21aa9c3
2024-07-10 05:10:21 +00:00
Kelvin Zhang
9d0f747603 Only copy efs files to /data if device is 16K page size
Test: Boot device, test dev options
Bug: 341216848
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:763984677a0630a2100b150c057c3d128a8f6c3d)
Merged-In: I0bf328b8ff90e125dcbca5261fb8dd4e0ad458d8
Change-Id: I0bf328b8ff90e125dcbca5261fb8dd4e0ad458d8
2024-07-10 05:10:05 +00:00
Salmax Chang
6432f05383 Merge "Restore permission of efs/efs_backup/modem_userdata after mount" into main 2024-06-12 10:25:58 +00:00
Kelvin Zhang
d3ce2b9873 Restore permission of efs/efs_backup/modem_userdata after mount
Test: Boot device, erase EFS, check selinux labels
Bug: 345803836
Change-Id: Ia511731e001d74409b40b087432e3535ca5cfc8f
2024-06-11 09:13:27 -07:00
Kelvin Zhang
ba06b04b9e Merge "Use dump.f2fs to extract files from efs partitions" into main 2024-06-05 16:05:21 +00:00
Kelvin Zhang
e3ed1eabdf Use dump.f2fs to extract files from efs partitions
Previously, we rely on mount points to copy files out of
efs partitions. Switch over to dump.f2fs to read directly
from block device without mounting. This allows us to copy
files out of efs partition in both 4K and 16K mode.

Test: Boot dev option enabled ext4 device
Bug: 340965747
Change-Id: I9d3f3d5200adc31f13298488b5be068b0fe7c7f4
2024-06-04 10:02:36 -07:00
Treehugger Robot
e0129184f3 Merge "Add BT offload AOC services for Zuma" into main 2024-05-31 08:45:20 +00:00
Kelvin Zhang
5978809ae7 Only copy EFS files if /data is on ext4
This reduces the amount of computation needed on critical
boot path for F2FS devices. Boot time is expected to improve
with this patch.

Bug: 341216848
Test: boot device with ext4 and f2fs
Change-Id: I7311a22a7bf9773d3909656d98cc578a43cb9477
2024-05-30 16:08:24 -07:00
Madhav Iyengar
5cdbd02063 Add BT offload AOC services for Zuma
Bug: 342415506
Test: Works with other CLs in topic.

Change-Id: Iadf8bc7baedf0b798de673735a6925f60b992646
2024-05-30 18:11:31 +00:00
Dmitry Skiba
ef68e9b578 Restrict kcompactd thread to middle/little cores.
Bug: 340872453
Test: Confirmed kcompactd affinity with taskset -p
Change-Id: I1cc92927dfc22d878819010aa2e9f01b5a3b8851
Signed-off-by: Dmitry Skiba <dskiba@google.com>
2024-05-28 23:50:44 +00:00
Kelvin Zhang
5a679bbf76 Allow devices to pick ext4 as default fs at build time
Products using 16KB kernel may wish to boot into 16KB mode
directly. To do this, these targets would need to use ext4
as their default fs type for /data and /metadata . Add
a build time flag which would install ext4 fstabs.

Test: th
Bug: 339337171
Change-Id: I53de1599bbff583b45ca2bf6d3e3efb83957913e
2024-05-14 15:42:14 -07:00
Kelvin Zhang
c542bcfd03 Split zuma fstab into two files
Common fstab entries(everything but /metadata and /data) are
moved to a separate fstab file.
This allows us to create an ext4 variant of the same fstab later.

Test: device boots
Bug: 339337171
Change-Id: I3129551c98b14473c776f2cf3dee1b81fc0c84b3
2024-05-14 10:03:27 -07:00
Pawan Wagh
213da03c2b Use lzo-rle for 16kb page kernel
Test: Checked zram compression with 4KB and 16KB kernel
======== Using 4KB kernel================
$ adb shell getconf PAGE_SIZE
4096
$ adb shell cat  /sys/block/zram0/comp_algorithm
[lz77eh] zstd deflate lz4 lzo-rle lzo
======== Using 16KB kernel================
$ adb root
restarting adbd as root
$ adb shell cat  /sys/block/zram0/comp_algorithm
lz77eh zstd deflate lz4 [lzo-rle] lzo
$ adb shell getconf PAGE_SIZE
16384

Bug: 316158358
Change-Id: I068cf4f9ab9a1fdc36f141a1de6f4ea293db9d6f
2024-05-10 01:13:39 +00:00
Shiyong Li
0f9fe30938 Merge "Add sepolicy for power_state node" into 24D1-dev am: eaa2a2ee8c
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma/+/27056931

Change-Id: Ib3a211c40b3ce8fbade8ceb2c72b99ef2277191c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-09 05:21:44 +00:00
Kelvin Zhang
4bc3f5a338 Reland: Copy persist partition files to /data on boot
Since /persisit was previously mounted during eraly-init stage,
this CL delays the /persist mount to post-fs-data stage.
Actions which depends on the /persist partition are also moved.

Bug: 319335586
Change-Id: I6bcc775f16331905c6896f3a2ec5bbea9e20744f
2024-05-07 21:31:13 -07:00
Kelvin Zhang
b08f8dbf23 Reland: Copy files on EFS partition to /data on boot
During boot, this CL adds the following sequence of actions:

1. mount original efs partitions(most likely f2fs) on /mnt/vendor/efs
2. copy files in /mnt/vendor/efs to /data/vendor/copied/efs.img
3. fsync all the files in /data/vendor/copied/efs.img
4. rename /data/vendor/copied/efs.img to /data/vendor/copied/efs
5. bind-mount /data/vendor/copied/efs to /mnt/vendor/efs
6. repeat 1-5 for efs_backup and modem_userdata

The original EFS partitions are mounted and only used for file
copying, no destructive action done on original efs partitions.

Test: reformat /data as ext4, boot the device
Bug: 319335586
Change-Id: Ide78be316778acfc5c582c4a7b78853796cf4c1e
2024-05-07 21:31:13 -07:00
Pechetty Sravani
4053a85fe7 Revert "Copy files on EFS partition to /data on boot"
Revert submission 26822004

Reason for revert: Potential culprit for b/339099720- verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:26822004

Change-Id: Ie9598a3b3b56c8ce26f475079798c44314696f44
2024-05-07 07:19:37 +00:00
Pechetty Sravani
327973016e Revert "Copy persist partition files to /data on boot"
Revert submission 26822004

Reason for revert: Potential culprit for b/339099720- verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:26822004

Change-Id: I744fccbf1aacd817ca1a0c6f4a121393307c8797
2024-05-07 07:19:37 +00:00
Kelvin Zhang
62b3d171c7 Copy persist partition files to /data on boot
Since /persisit was previously mounted during eraly-init stage,
this CL delays the /persist mount to post-fs-data stage.
Actions which depends on the /persist partition are also moved.

Bug: 319335586
Change-Id: I0e70f672b9a5f4b05b95dd30b0a74bb8f91f399a
2024-05-06 15:27:46 -07:00
Kelvin Zhang
7251274bee Copy files on EFS partition to /data on boot
During boot, this CL adds the following sequence of actions:

1. mount original efs partitions(most likely f2fs) on /mnt/vendor/efs
2. copy files in /mnt/vendor/efs to /data/vendor/copied/efs.img
3. fsync all the files in /data/vendor/copied/efs.img
4. rename /data/vendor/copied/efs.img to /data/vendor/copied/efs
5. bind-mount /data/vendor/copied/efs to /mnt/vendor/efs
6. repeat 1-5 for efs_backup and modem_userdata

The original EFS partitions are mounted and only used for file
copying, no destructive action done on original efs partitions.

Test: reformat /data as ext4, boot the device
Bug: 319335586
Change-Id: I4c4024b4cad18199226f5644f98254b2230574d6
2024-05-06 15:27:46 -07:00
Kelvin Zhang
39eccba58f Support booting on ext4 for zuma devices
When a user opts into 16K developer option, we would need to convert the
/data and /metadata partition into ext4. Add necessary fstab entries for
ext4 so that zuma devices can boot on ext4.

This CL does not automatically switch existing devices to ext4, the
newly added fstab entries are intentionally marked as "non-formattable",
so that we don't accidentally format a wiped device as ext4. This CL
merely allows the device to boot if the /data partition is already
formatted as ext4.

Test: adb shell cmd recovery wipe ext4 , make sure device boots
Bug: 293313353
Change-Id: I3a2a2e9d09cdea884f58b509a06c6829938dc369
2024-05-06 09:05:09 -07:00
Jaegeuk Kim
76caf6b954 Adjust the fstab option for ZUFS
Bug: 336319772
Change-Id: Ic3088e693d4dd9f784215da27a5c4b6c47759ef2
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2024-05-03 09:58:17 -07:00
Kevin Ying
52be8e937c Add sepolicy for power_state node
Bug: 329703995
Test: manual - use camera
Change-Id: If9f14980e15a3b936bf2117f066e734ee122d72d
Signed-off-by: Kevin Ying <kevinying@google.com>
2024-04-22 22:20:42 +00:00
Kelvin Zhang
bb210c9c43 Move EFS/persist mount to a separate fstab
Next CLs in this stack will make changes to persist/efs mount process
This CL will first move relevant code to a separate file for easier
review.

To support booting under 16K page size, we need to copy files on
persist partition(F2FS, which does not support 16K page size)
to data partition(which will would be EXT4 for dev option enabled
devices).

Bug: 319335586
Change-Id: I2750eb8b53431037cecc972448799409345f5ca3
2024-04-19 20:22:56 -07:00
Martin Liu
2c344ad3fa move common MM settings to gs common folder
Bug: 332916849
Bug: 309409009
Test: boot
Change-Id: If5515f107b4fb2490d83c2d48c78727bd6f2e51f
Signed-off-by: Martin Liu <liumartin@google.com>
2024-04-18 03:49:46 +00:00
Treehugger Robot
18b05dee0e Merge "Disable proactive compaction" into main 2024-04-12 15:03:00 +00:00
Jaegeuk Kim
6f61b2f689 Zuma: disable compression on apex
Compression on apex disables direct IO for loopback, which introduces
double buffering and longer latency.

Bug: 298717358
Change-Id: I3b1de10f17931bec7769947bad62a22637a8a528
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2024-04-11 21:57:05 +00:00
Martin Liu
625450137c Disable proactive compaction
From field data, sometimes kcompactd is
pretty activated and can impact critical
CUJs. Disable it first to mitigate the
impact.

Bug: 332916849
Test: boot
Change-Id: I87cdcf184afb5fe10e873162b94bd3bf54b1acbd
Signed-off-by: Martin Liu <liumartin@google.com>
2024-04-11 00:14:29 +00:00
Oleg Blinnikov
3248117d06 persist.sys.hdcp_checking controls max hdcp
Change-Id: Ibe2554019449b6f958fc6e0168ae0deccc9f589d
Bug: 321344894
Test: set persist.sys.hdcp_checking, check the file is updated
2024-03-20 11:10:41 +00:00
Sergey Volk
b5769ac1f1 Fix permissions for dp_hotplug_error_code sysfs node
DisplayPort kernel driver passes error code/status to hardware composer
via the dp_hotplug_error_code sysfs file. When HWC receives/consumes
the error, it will write "0" into that file to reset the error code. So
this file must be readable and writable by the HWC code running with
"system" user/group permissions.
Previously we used to set the ownership to system:system, but in order
to be more consistent with the rest of sysfs files in that directory,
we can use root:graphics instead with permissions 0664. HWC runs
under the "graphics" group, so this should allow HWC write access.

Bug: 324953626
Test: checked permissions of dp_hotplug_error_code sysfs
Change-Id: Idf65acc12d158a78565c41f4e2aea24362e2cdff
2024-02-14 00:58:35 +00:00
Spade Lee
7bb7687851 dumpstate: add SoC residency dump
Bug: 319536756
Change-Id: Iec35a05a22a6e6315a2ff6b9b5190099c1bcd5c4
Signed-off-by: Spade Lee <spadelee@google.com>
2024-01-22 16:46:36 +00:00
Midas Chien
495a27003c display: allow hwcomposer to access allow_wakeup_by_state_change
Bug: 311495944
Test: check permission
Change-Id: I69b6a1487b84cf798cd61f064a186fca27cd0baf
2024-01-17 07:52:09 +00:00
Jaegeuk Kim
eddcfba6b3 Migrate to gs-common/storage/init.storage.rc
Bug: 311655524
Change-Id: I084717957a3bdf0bcbdca06502867d8e108ac139
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2023-12-20 10:00:10 -08:00
Jenny Ho
624157e600 Adjust bd_state to system for read
Bug: 316432531
Change-Id: Ib4a398d766bb321d0579819f248d4688be7ad1d1
Signed-off-by: Jenny Ho <hsiufangho@google.com>
2023-12-16 02:03:05 +08:00
Kuen-Han Tsai
559da7282a usb: enable media-presence polling for SD cards
After USB enumeration, some SD card readers do not send signals to the
device when the SD card is inserted or removed.

To support SD card hotplugging, this patch enables in-kernel
media-presence polling, which will check the SD card status every 2
seconds after a SD card reader is attached.

Bug: 186479576
Test: SD card insertion/removal and data copy (see b/301566595)
Change-Id: I044aeffd9386c0bee6138402e5130c39e1adbc9f
Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
2023-12-12 14:11:31 +08:00
Kieran Cyphus
8534e092af Merge "LogMaskLibrary: Add newlines and fix posix perms" into main 2023-12-01 07:24:52 +00:00
Treehugger Robot
73592fb6ac Merge "Ueventd changes for new BT channel in zuma" into main 2023-11-30 00:32:17 +00:00
Martin Liu
e55232fbac adjust PCP high level
We have observed more reclaiming activities as upstream
has changed how PCP high is calculated since 5.15 kernel.
Re-align the level back to 5.10 first so we can monitor
how it impacts the MM metrics.

Bug: 309409009
Test: boot
Change-Id: I7ac1eb88a8dae7c823330a2c75aec9547bd5c427
Signed-off-by: Martin Liu <liumartin@google.com>
2023-11-21 10:24:32 +00:00
kierancyphus
741d0c09d7 LogMaskLibrary: Add newlines and fix posix perms
Bug:302435001
Test: Manually build, flash, `adb shell ls -l \
/data/vendor/radio`

Change-Id: If2696c577e66ee27a042ebe8d6ff61a9e832caec
2023-11-21 05:52:39 +00:00
Luis Delgado de Mendoza
9344919fe5 Ueventd changes for new BT channel in zuma
Bug: 308452948
Test: Validated locally on husky.
Change-Id: I4534d3c007f93e7dbd2ec3ed1f32d30ba8a90ea9
2023-11-17 20:02:43 -08:00
Will McVicker
d6716ccd63 fstab: allow unlocked devices to boot with AVB test key am: 1bc7e21a38 am: 9e663230ab
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma/+/25347023

Change-Id: I21eed5267eeff6443478301fe9b039c27aaf3f99
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-11-13 04:39:36 +00:00
Will McVicker
1bc7e21a38 fstab: allow unlocked devices to boot with AVB test key
Set `avb_keys=no_such_key` for dynamic kernel partitions to allow booting
unlocked devices with a custom kernel. This allows a few things:

1) Dogfooders can flash a custom kernel without wiping their device.
   This can help developers track down hard-to-reproduce bugs without
   rolling out a patch to the whole dogfooder population.
2) Developers can uprev their device's kernel without wiping their
   device or packaging the kernel with an Android platform build.

Note: we are using "no_such_key" to ensure an AVB keys file doesn't
accidentally get created.

Test: Flash CI build. Then flash custom kernel on top.
Bug: 274825778
Change-Id: Ibf3cee491404b9efc18c49936edf64c2e3084adf
2023-11-11 15:44:29 -08:00
Chris Lu
c09eb8dc6b zuma: HWC access to panel refresh_ctrl node
Bug: 295603692
Test: write the node successfully
Change-Id: I7a5e908ec6d253791954d1b2071f3d59871650eb
2023-11-06 08:02:29 +00:00
Jacky Liu
a3772510e6 Update i2c pathes with new static i2c bus numbers
Bug: 305242309
Test: Boot to home
Change-Id: I87687b2e3a479a166257ad958ddd07af7967f416
2023-10-23 14:17:22 +08:00
RD Babiera
5cc2bfebf4 Merge "usb: enable/disable displayport alt mode through enableUsbData" into main 2023-10-13 21:23:38 +00:00
Tom Huang
b25c109b04 Merge "init.zuma.rc: bluetooth own uart debug node" into udc-qpr-dev am: 16c49ab709 am: 1dcc691194
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zuma/+/24947930

Change-Id: I2a4a229a25d7f95c901c0c1787f91d2183d5c76c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-13 03:14:05 +00:00
Tom Huang
16c49ab709 Merge "init.zuma.rc: bluetooth own uart debug node" into udc-qpr-dev 2023-10-13 02:47:34 +00:00
jonerlin
7b5f2ae7a5 init.zuma.rc: bluetooth own uart debug node
Bug: 294747612
Test: v2/pixel-pts/release/bootstress/1200counts/suspend-resume
Change-Id: I2d381e37df4e179cc967a0cbc6fbe71458bc23f2
2023-10-11 06:43:35 +00:00
Guibing Cai
a7648dfb45 Merge "init: update vendor_sched procfs paths" into main 2023-10-10 21:45:58 +00:00
Jenny Ho
1886c605a6 Merge "init: add battery persist folder" into main 2023-10-04 07:39:41 +00:00