Commit Graph

766 Commits

Author SHA1 Message Date
Aaron Kling
d3b66d57c6 kernel: Support building from kernel platform
This expects a few build variables to be set:

* TARGET_KERNEL_PLATFORM_TARGET: The base target name. For example,
  'tegra' will indicate that the dist target is tegra_dist, abi is
  tegra_abi, etc.
* TARGET_KERNEL_VERSION: Used to determine the kernel checkout path. For
  example, a value of 6.6 will expect the kernel platform repo to be
  checked out to $BUILD_TOP/../kernel-6.6.
* TARGET_KERNEL_SOURCE: Relative to the top of the kernel platform
  checkout, the path to the kernel build rules. For example,
  vendor/nvidia/tegra.
* BOARD_KERNEL_IMAGE_NAME: The kernel image to use. For example, Image.

Using the examples above, this will run bazel in the kernel-6.6
directory on the target //vendor/nvidia/tegra:tegra_dist, then source
the output from $OUT/tegra/dist, with the prebuilt kernel image being
Image.

Change-Id: If96e96dffa2c0bfd9bd824bb3d8064eb861c9d00
2025-11-05 10:00:21 +00:00
inferno0230
8e68ce44b1 merge_dtbs: Use DeviceTreeInfo's hash in get_name()
Fixes duplicate output filename collision:

INFO: Saving to: benz-23871-crow-overlay-DVT1-camera-0x46232744d57254d9.dtbo
Merging overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/camera/oplus/benz-camera-overlay.dtbo
Reloading overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/camera/oplus/benz-camera-overlay.dtbo
Merging overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/camera/oplus/benz-camera-overlay.dtbo
INFO: Saving to: benz-23871-crow-overlay-DVT1-23061-audio-23061-display-camera-0x46232744d57254d9.dtbo
Merging overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/audio/oplus/benz-23061-audio-crow-overlay.dtbo
Reloading overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/audio/oplus/benz-23061-audio-crow-overlay.dtbo
Merging overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/audio/oplus/benz-23061-audio-crow-overlay.dtbo
Merging overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/display/oplus/benz-23061-display-crow-overlay.dtbo
Reloading overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/display/oplus/benz-23061-display-crow-overlay.dtbo
Merging overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/display/oplus/benz-23061-display-crow-overlay.dtbo
Merging overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/camera/oplus/benz-camera-overlay.dtbo
Reloading overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/camera/oplus/benz-camera-overlay.dtbo
Merging overlay blob out/target/product/benz/obj/DTB_OBJ/arch/arm64/boot/dts/vendor/qcom/camera/oplus/benz-camera-overlay.dtbo
INFO: Saving to: benz-23871-crow-overlay-DVT1-23061-audio-23061-display-camera-0x46232744d57254d9.dtbo
Traceback (most recent call last):
  File "/sauce/los/vendor/lineage/build/tools/merge_dtbs.py", line 567, in
    main()
    ~~~~^^
  File "/sauce/los/vendor/lineage/build/tools/merge_dtbs.py", line 551, in main
    created.extend(dt.save(args.out))
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/sauce/los/vendor/lineage/build/tools/merge_dtbs.py", line 469, in save
    yield mdt.save(name, out_dir)
          ~~~~~~~~^^^^^^^^^^^^^^^
  File "/sauce/los/vendor/lineage/build/tools/merge_dtbs.py", line 361, in save
    assert not os.path.exists(out_file), "Cannot overwrite: {}".format(out_file)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Cannot overwrite: out/target/product/benz/obj/DTB_OBJ/out/benz-23871-crow-overlay-DVT1-23061-audio-23061-display-camera-0x46232744d57254d9.dtbo

Change-Id: Ia7817e91da7bde1e3a4d577c3b45d5805b0b9938
Signed-off-by: inferno0230 <mail@inferno0230.in>
2025-11-05 10:00:21 +00:00
Nick Reuter
f6bd5d36f6 build: Update rust toolchain dynamically
Change-Id: Iedcc0ebc7f42f65bd1b9578d92bf101f642dec7e
2025-11-05 10:00:21 +00:00
Yumi Yukimura
0f82be69c5 lineage: Move build-manifest.xml build rule into build/tasks
* For Android.mk deprecation

Change-Id: I4aba949ae0af7674955d7a2c439d191348b41f3c
2025-11-05 10:00:21 +00:00
Yumi Yukimura
052820db0a lineage: Restore Android.mk based build-manifest.xml build rule
Users don't like the increased delay during `. build/envsetup.sh` or `lunch`...

Change-Id: I1a92a171f2e2ec1ba2453d6c666cefcd9884b39b
2025-11-05 10:00:21 +00:00
Yumi Yukimura
e5f2191d40 lineage: Move build-manifest.xml generation to a separate script
Change-Id: I68a13fdb47a034157a54ff5781c13b3fa17371d2
2025-11-05 10:00:21 +00:00
Ghosuto
9b40cfec67 Revert "Enable ThinLTO cache"
This reverts commit 5411637a845005a46a3bb80ffd13fdfa34de0792.

Change-Id: I08ca89a52689ae1c9e194aa014ceee7c1d636990
2025-11-05 09:59:16 +00:00
LuK1337
9a1c53a045 kernel: Introduce macros for comparing versions and make use of them
Change-Id: Ie7debfea218117987f7e9588a71447061db08416
2025-11-05 09:53:04 +00:00
Danny Lin
41d350fa42 vendor: Disable ABI checks
ABI compatibility checks fail for several reasons:
  - The update to Clang 12 causes some changes, but no breakage has been
    observed in practice.
  - Switching to zlib-ng changes some internal structs, but not the public
    API.

We may fix these eventually by updating the ABI specifications, but it's
likely not worth the effort for us because of how many repos are affected.
We would need to fork a lot of extra repos (thus increasing maintenance
overhead) just to update the ABI specs.

For now, just skip the ABI checks to fix build errors.

Change-Id: I0967cc2680e384310f5f3859c7d8296580928046
2025-11-05 09:16:56 +00:00
Michael Bestas
bea793b517 build: Drop VARIANT_DEFCONFIG/SELINUX_DEFCONFIG support
This has been unused for a long time and any users that mistakenly use
this should migrate to defconfig fragments.

Change-Id: I70f1aa82e3adcbf85b11e8685f188d0eadfff2e3
2025-11-05 09:16:56 +00:00
Michael Bestas
92ef449956 build: Drop separate recovery kernel support
Last users were in lineage-18.1, build side is no longer being ported.

Change-Id: I091498ab3536eeb050511d71cc37373f6a77486d
2025-11-05 09:16:56 +00:00
LuK1337
dff5fbe91d build: Make {aosp,clo}remote work when not in the root dir of the repo
Change-Id: I59dcfb7a7c50ad5ae70b3823cea50b3cbf4671d6
2025-11-05 09:16:56 +00:00
LuK1337
109142da04 Revert "soong: Make mkdir install dir optional"
This reverts commit ff19773ea4.

Change-Id: Ia701f07eaabbf33098434ea2e4851d9ba5cdaff6
2025-11-05 09:16:06 +00:00
Yumi Yukimura
1bcdb3937c kernel: Fix building x86 kernel with GCC
Change-Id: Ib1097d604776adc63c31b90cec9a0d13729248be
2025-11-05 07:32:03 +00:00
Yumi Yukimura
3c840dfd77 kernel: Sign kernel modules only if CONFIG_MODULE_SIG_FORMAT=y
Change-Id: If8ef12f2b751390fc1689edb551379ca2e4e78be
2025-11-05 07:32:03 +00:00
Yumi Yukimura
0e55d14351 kernel: Fix build when device does not set BOARD_SYSTEM_KERNEL_MODULES_LOAD
... but sets SYSTEM_KERNEL_MODULES

build/make lets BOARD_SYSTEM_KERNEL_MODULES_LOAD default to false
when it's unset.

Change-Id: I581da33bf0321f171aa6a20bdb023e1ee824cb18
2025-11-05 07:32:03 +00:00
Yumi Yukimura
80fb955aae kernel: Support installing kernel modules to system
* Example usecase: Installing zram.ko on devices without system_dlkm

Change-Id: I3afe358bcd444f7c3724e5682d4056fe52cfeea9
2025-11-05 07:32:03 +00:00
Yumi Yukimura
7b96386510 kernel: Add support for external kernel configs (v2)
For targets that uses mainline kernel, the kernel tree usually only
contains configs on top of the upstream repository.

In such case, if we put the configs in elsewhere, we can simply just
track the upstream kernel repo, without needing to import configs.

Example usage:

TARGET_KERNEL_CONFIG_EXT := \
    $(COMMON_PATH)/kconfig/platform_defconfig \
    $(COMMON_PATH)/kconfig/common-addons.config

TARGET_KERNEL_CONFIG_EXT += \
    $(DEVICE_PATH)/kconfig/device.config

Change-Id: Ibafd0afa7ec06df643ba290a6149a4f0781d67fb
2025-11-05 07:30:11 +00:00
Yumi Yukimura
48cd0222c1 kernel: Enhancements to searching DTBs during non-QCOM DTB image generation
* Allow wildcard pattern
* Support searching in specified directory
* Add variable that accepts a list of such patterns

Change-Id: I35da8ed19447b4ab69142152d7dc8e60bc55bf14
2025-11-05 07:30:11 +00:00
Cosmin Tanislav
18bda17466 merge_dtbs: allow one overlay to depend on multiple others
Some overlays might depend on multiple other overlays, remove this check
to allow it to happen.

Change-Id: Ib60c194fb4c0cfef02233da6539da61fa387f428
2025-11-05 07:12:32 +00:00
Julian Veit
0394419108 repopick: Fix showing help when no arguments given the correct way
Previous solution broke picking from topic/hashtag/query.

Change-Id: I087de693e3a8e16d62f318d59287e53ea3fc2430
2025-11-05 07:09:36 +00:00
SpiritCroc
2f2cb75521 repopick: Fix showing help when no arguments given
Change-Id: I7a996a95a057dc70b1e8b54ea35326ec44ee81f4
2025-11-05 07:08:20 +00:00
rmp22
c16add78db Enable ThinLTO cache
Change-Id: I8438591a418fc4f9ce3ceead84cda9b6870758ff
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
2025-11-04 20:29:48 +00:00
rmp22
d916318f2f envsetup.sh: Override host metadata
reference taken from
https://grapheneos.social/@GrapheneOS/113870255397154703

instead of fixed host number, use a random generated host number that follows google's host number format to bypass revolut's host checks

Change-Id: I72feafd663a551eb0c6c4146d52137ed0dc7456d
Signed-off-by: rmp22 <195054967+rmp22@users.noreply.github.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-11-04 20:29:48 +00:00
Zabuka_zuzu
eb307c1fcb lineage: Initial rebrand
Co-authored-by: Pranav Vashi <neobuddy89@gmail.com>
Co-authored-by: Lup Gabriel <gwolf2u.website@gmail.com>
Co-authored-by: Hemant Sachdeva <hemant.evolver@gmail.com>
Change-Id: I35e1b706cf3319212d4f723dd95fcb3126dd85fb
2025-11-04 20:26:28 +00:00
dianlujitao
74d4aec321 kernel: Automatically adapt path suffix for GKI modules
It has been noticed that sm8750 no longer puts GKI modules in the
subdirectory. Moreover, this seems to be something specific to QCOM,
so guard it as such.

Change-Id: Iac9c895c9c1eef06b2e4ce75bd7c5c2aa356fbb1
2025-07-06 00:39:44 +00:00
Julian Veit
426b8a4d19 repopick: Fix showing help when no arguments given the correct way
Previous solution broke picking from topic/hashtag/query.

Change-Id: I087de693e3a8e16d62f318d59287e53ea3fc2430
2025-07-05 12:10:29 +02:00
SpiritCroc
16b1b5f8c0 repopick: Fix showing help when no arguments given
Change-Id: I7a996a95a057dc70b1e8b54ea35326ec44ee81f4
2025-07-02 22:32:59 +00:00
Michael W
230d1dca1c repopick: Paginate queries properly
Currently there is a limit of 500 changes per page, giving us only
those when repopicking a query. By observing the "_more_changes" field
in the response and adding the "start" parameter to the query we can
do pagination and return all changes

Test: repopick -p -Q "branch:lineage-23.0"
Result before: 500 changes
Result after: 1094 changes (correct count as of time of commit)

Change-Id: I00304bc2c87b75cef89a26838da3dd1b1f0e65db
2025-06-27 15:07:55 +00:00
micky387
a8b479083d envsetup.sh: Export LLVM_AOSP_PREBUILTS_VERSION with the current clang version from soong
Needed for KERNEL_CLANG_VERSION if TARGET_KERNEL_CLANG_VERSION hasn't been set by the device config

It's boring to change it on each Google change ...

Change-Id: I1d682611cbf6c60d7ae6227b0b5afde591adf471
2025-06-26 22:04:16 +01:00
Alexander Koskovich
40161df056 merge_dtbs: Add qcom,oem-id to EXTRA_KEYS
This is used by Nothing to differentiate between the base & pro models
on the Phone (3a).

Change-Id: I56f7e58f134571ea35a6dafef54e2b30ba20b5f0
2025-06-14 18:24:24 +00:00
Cosmin Tanislav
49cbf625f2 merge_dtbs: ignore not matching DTBOs when finding symbols for a fixup
Change-Id: I1705341d9ec68b46ac6f6c1007c6ea28f9c4e95d
2025-06-11 05:53:44 +00:00
Yumi Yukimura
101451f332 lineage: products: Add Cuttlefish products
How-to:
1. Build and install cuttlefish packages by following [1]
2. Build LineageOS image and hosttar
    ```
    source build/envsetup.sh
    breakfast cf_phone_x86_64
    m hosttar updatepackage
    ```
3. Extract LineageOS image and hosttar
    ```
    mkdir lineage-cvd
    cd lineage-cvd
    unzip <LineageOS tree>/out/target/product/vsoc_x86_64/lineage_cf_phone_x86_64-img.zip
    tar xzvf <LineageOS tree>/out/host/linux-x86/cvd-host_package.tar.gz
    ```
4. Run it
    ```
    HOME=$PWD ./bin/launch_cvd
    ```
5. Open https://127.0.0.1:8443 in browser, and enjoy

[1]: https://github.com/google/android-cuttlefish?tab=readme-ov-file#debian-packages

Change-Id: I7d69db7be99d250f02d7e76fd398ebf5c2ca7c5f
2025-06-10 01:47:16 +08:00
Cosmin Tanislav
0ea2a44fbc merge_dtbs: Sort DTBOs based on needed symbols
Some DTBOs might use symbols from other DTBOs and require them to be
applied before them.

Sort them based on the __symbols__ and __fixups__ nodes, by creating a
dependency graph.

Change-Id: I40acf5da6b673b636a91f75ae3f3c634f2b5c505
2025-06-08 18:34:54 +03:00
Nikita Savchenko
722d1ce1be kernel: Report all modules not found at once
Change-Id: Ic46f72989b2dd5de574cc33b7e9f7499323d9bb0
2025-06-07 17:12:21 +00:00
Aaron Kling
67bbe4a32d kernel: Stop warnings for prebuilt kernel platform
If both prebuilt kernel and prebuilt kernel headers are provided, assume
that they match.

Change-Id: I8818659bd4642aa20260ff638d4a0c3f2b56a463
2025-05-31 19:24:17 +00:00
Aaron Kling
cae9b362a9 soong: Support prebuilt_kernel_headers
This depends on a kernel headers tarball path being passed in
TARGET_PREBUILT_KERNEL_HEADERS, in the style that the kleaf kernel
platform build generates.

Change-Id: Ib82659fa44ef221e73d0d129daafbaae6bad87a2
2025-05-31 19:24:17 +00:00
Michael Bestas
e1e121bea4 Revert "Add product_launched_with_j{,_mr1,mr2}.mk"
This reverts commit c756f6051f.

Reason for revert: Dead.

Change-Id: Ia4f1e45d18459004625c38754440c018333a3452
2025-05-27 18:19:07 +03:00
Michael Bestas
c9cf7884ba config: Move additional gralloc 10 usage bits to select()
Change-Id: If1542af472e74cd953d9ca093dd225dbba028aea
2025-04-30 01:08:39 +01:00
Michael Bestas
93ebcc2fa2 config: Move camera override format from reserved to select()
Change-Id: Ic8453eb9ef5fcd5b9bbfe22a8bb8100be2644e2d
2025-04-30 01:08:39 +01:00
Michael Bestas
2d041eca9e config: Move bootloader message offset to select()
Change-Id: Ic97af638005c299963d0aaa39e04227dcbca8751
2025-04-30 01:08:39 +01:00
Michael Bestas
2bd35f62c1 config: Move USB restrictions to select()
Change-Id: I0dd6ccca2493ac50019d7d077c25302d62ea4ab3
2025-04-30 01:07:53 +01:00
Michael Bestas
712c75560f config: Move vendor_init lib to select()
Change-Id: Iccda5ad6d1c37a63ff7959bd3887e120ad403d5c
2025-04-30 00:12:46 +01:00
Michael Bestas
f12b53506a config: Move libperfmgr mode extension lib to select()
Change-Id: I81ff7c05e9918a6f52f8b1bb7bcf179d3a76d078
2025-04-30 00:11:48 +01:00
Michael Bestas
92164a2390 config: Move Lineage PowerShare HAL to select()
Change-Id: If687bda38370e8dc664cef26fbb907202444d049
2025-04-26 11:58:21 +01:00
Michael Bestas
1c1551858c config: Move Lineage Health HAL to select()
Change-Id: Ie7f29e75d812fff0faf27f9c82ca432a78c199fb
2025-04-26 11:58:21 +01:00
Michael Bestas
20a2227caf config: Move surfaceflinger UDFPS lib to select()
Change-Id: Iecf818e3f45811760a2e51156014e4ef6ec6afa7
2025-04-26 11:58:21 +01:00
Michael Bestas
695e44e1ba soong: Move QTI gralloc configs to select()
Change-Id: Icb28d5c2aa5d51860799b87b7b9b04c48014f7f4
2025-04-26 10:18:05 +00:00
Michael Bestas
d690c9eb9f build: Remove reference to deprecated VR HAL
Change-Id: Ia2319ca64e85a64d4c8b0ab4972c78e97cebc76b
2025-04-24 20:25:01 +03:00
Nolen Johnson
2130319a7f Revert "kernel: Add support for external kernel configs"
This reverts commit 1b1687b456.

Reason: Breaks variant defconfigs.
Change-Id: Ie81301eb5a3376ab969430eed54a432d7d300408
2025-04-22 15:20:41 -04:00