Commit Graph

696 Commits

Author SHA1 Message Date
Guru Das Srinagesh
81c8cad9e8 merge_dtbs: Use logging and argparse
Use the logging module to log important information to various log
levels: info, debug, warning and error.
- Modify __str__ representations of classes DeviceTree and
  InnerMergedDeviceTree for readability in debug logs
- Make parse_dt_files() return instead of yield so as to order all the
  filename parsing at one go after the preceding log messages

Use the argparse module to specify script arguments cleanly. Also make
the corresponding change to merge_dtbs.sh to invoke this script with the
correct flags.

Change-Id: Id09d9d7b34cde60eff99876f0c0c4f6643852aee
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2025-01-30 19:16:33 +08:00
Guru Das Srinagesh
bd92c42017 merge_dtbs.py: Print only basenames of dtb* files
When debugging issues with the script, it helps to not have in the
script's output the fully qualified path names of the DTB and DTBO files
being merged as they are very lengthy. Retain only the relevant parts of
the filnames - the basenames for better readability.

Change-Id: Ia18584fcf9ff173c4b22d4543c83c4091e15b8f8
Signed-off-by: Guru Das Srinagesh <quic_gurus@quicinc.com>
2025-01-30 19:14:46 +08:00
Patrick Gaskin
1c00116c6e fixup! roomservice: Skip setting revision if it's the same as default
If the project remote starts with "aosp-", the revision already gets
removed, causing a KeyError.

Change-Id: Ie016f55d55f4cf64e66de529db9caca1de9b2e82
2025-01-23 07:34:46 +00:00
LuK1337
caae07034a roomservice: Skip setting revision if it's the same as default
Change-Id: I8bcb638c1c395ae460363c626be45727c10c6db7
2025-01-22 10:21:10 +01:00
LuK1337
ff19773ea4 soong: Make mkdir install dir optional
This prevents overriding commands error when device doesn't have it in
PRODUCT_PACKAGES.

Change-Id: Id4924ffe60d18ea54eb7c4dfa0d270ed2b00cef7
2025-01-19 01:21:54 +01:00
Luca Stefani
e0ff29e915 soong: Add mkdir module
Co-authored-by: LuK1337 <priv.luk@gmail.com>
Change-Id: I7b98cf5b120817a271036fca3aa0582d77861993
2025-01-18 12:45:58 +01:00
LuK1337
991fd49cd8 fixup! fixup! roomservice: Migrate from GitHub API to git ls-remote
Change-Id: Ide422d1b056816114c7e372bcd296dbf8675ec95
2025-01-07 01:48:23 +01:00
LuK1337
d5aa270f99 fixup! roomservice: Migrate from GitHub API to git ls-remote
Change-Id: I7a86c7d2344dd4cf1757ffea3c51c3dfc52c6e62
2025-01-07 01:27:43 +01:00
LuK1337
4de0265cdd roomservice: Migrate from GitHub API to git ls-remote
Change-Id: Ia62594dc0d350c2eaa93e9f02372443ac737abb7
2025-01-04 10:23:52 +01:00
LuK1337
ee73731e4e roomservice: Exit if get_default_or_fallback_revision() fails
This was accidentally broken in 8e47b888.

Change-Id: I86c986202afb30cba14b1a1378f8403e462d0e55
2025-01-02 10:24:02 +01:00
Chirayu Desai
0c5aab2704 repopick: unquote URL
Test: repopick -Q "status:open+-is:wip" works
Change-Id: I346c5c40e8197ad1c91235ee1cbacaa3d30c7b91
2024-12-22 17:42:42 +00:00
Michael Bestas
5bbc612621 fixup! build: Add privateremote helper
Change-Id: I09c52df9e9dc7c5a825e641d6299581432591920
2024-12-20 17:18:58 +00:00
Michael Bestas
5319975d22 soong: generator: Update for AP4A
Change-Id: I57d820cd25fa8fa4557f671510c39bfe9923845d
2024-12-19 23:28:24 +00:00
Michael Bestas
7cefcff4a6 build: Add privateremote helper
Change-Id: I8f406d397914836ac1ac12a50f56263cfcf85b55
2024-12-20 00:07:51 +02:00
LuK1337
be60f23b63 repopick: Use add_mutually_exclusive_group() where possible
Change-Id: I7e38e2371d075afd53200d60703eb4466fff07e3
2024-12-09 19:19:23 +01:00
Michael Bestas
8e7b7795df repopick: Add support for hashtags
Test: repopick -H redbull
Change-Id: I1522be31e547a7f8917223e7eeae4389de083227
2024-12-09 19:19:23 +01:00
Luca Stefani
87edd14894 Zap aapt_version_code_defaults
It was caused by package-cache in case Build.VERSION.INCREMENTAL
doesn't change across builds, which is always the case for local
builds, exporting BUILD_NUMBER to something != eng.$USER will fix
it the next build.

Change-Id: Ic602197e6711ced511a0b102b1140c5db4ec8397
2024-12-09 11:47:07 +00:00
Christian Hoffmann
621f14f2ce lineage: products: Add ATV x86_64 emulator targets
Change-Id: I2ab42a7800b9754e784b2bf5dad7e6fea839b8ff
2024-12-05 19:23:52 +01:00
Christian Hoffmann
00ca937549 lineage: products: Use 6.1 for atv x86
Kernel 6.6 is not currently set up for CONFIG_NETFILTER_XTABLES_COMPAT,
breaking 32-bit iptables userspace.

Change-Id: I79823ea1c66d841f204a1d3c241619abb51f9040
2024-12-05 15:07:58 +00:00
Alexander Martinz
8e47b88870 roomservice: check all device repositories
Some devices have the same codename but shipped a long time
ago and may not have a current branch set up.
Continue looking up all repositories until a match is found
or no repos are left to check.

For example:

  - android_device_amazon_thor
    - cm-14.1
  - android_device_xiaomi_thor
    - lineage-21.0

  - android_device_semc_zeus
    - jellybean
  - android_device_xiaomi_zeus
    - lineage-21.0

  - android_device_amazon_otter
    - cm-12.1
  - android_device_shift_otter
    - lineage-21.0

Change-Id: Icf9826b31efd872363fdfe73d5a71ff2d06cbe20
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
2024-12-04 16:58:36 +00:00
Michael Bestas
d6777fa812 config: Changes for libfmjni bp conversion
Change-Id: I666bdc4c1d0cdab4d2557c07f32466cceabe8439
2024-11-01 20:32:14 +00:00
LuK1337
426aa2d862 soong: Remove LD_SHIM_LIBS support
Change-Id: I4a45fdd9a140a95aa42861bf294bfb8e8bb91f34
2024-10-30 08:38:03 +01:00
Michael Bestas
dc34f77675 kernel: Nuke --cuda-path/--hip-path
Revert "kernel: Check HIP support of clang before disabling it"

This reverts commit 62c1374385.

Revert "kernel: Force disable LLVM HIP"

This reverts commit ef68678120.

Revert "kernel: Force disable LLVM CUDA"

This reverts commit ba14020f85.

Change-Id: I5cb2b4624eb0ec25dbc8c1b5888708d961ae59d7
2024-10-19 01:10:12 +02:00
Michael Bestas
e2610f23f2 build: Don't set a default fingerprint
Since ADDITIONAL_SYSTEM_PROPERTIES is being deprecated, this will
need to be handled in build/make and build/soong

Change-Id: Ib4925969f0d9f60ea5b30455806ff80a1817d61f
2024-10-19 01:10:12 +02:00
Michael Bestas
870c3ef1b3 build: Move version & legal properties to PRODUCT_SYSTEM_PROPERTIES
ADDITIONAL_SYSTEM_PROPERTIES is being deprecated.
No functional changes.

Change-Id: I01fd45edcc6c700540d3b7352fc466e65677a44e
2024-10-19 01:10:12 +02:00
Michael Bestas
39b81453e7 build: goodbye Cid :')
Change-Id: Ida0778c0f6a9d02f7e87f75847472358b7c03076
2024-10-19 01:10:12 +02:00
Michael Bestas
e93a56f126 build: Drop lineage sdk versions
Change-Id: I2448822be41835723995734b4e20f191f3ce8987
2024-10-19 01:10:12 +02:00
Michael Bestas
ffca5f4c63 soong: generator: Update for 15
Change-Id: I6f5be3f06f282b036cee5c2a884f1082f698bcaf
2024-10-19 01:10:11 +02:00
Michael Bestas
89c5cd1501 build: Switch to _get_build_var_cached
Change-Id: Id53622f5ce7de406f66b8374c3e91604deb4742b
2024-10-19 01:10:11 +02:00
Michael Bestas
44dcb39378 build: Drop makerecipe/mk_timer from envsetup
Change-Id: I5c15e2f509f69abb3cf993aaab945da47098f3da
2024-10-19 01:10:11 +02:00
Michael Bestas
a01acb80ff build: Split envsetup help to a separate file
Document missing functions while we are at it.

Change-Id: I76063d36775c8c7326153de50e44a24410fc11a2
2024-10-19 01:10:11 +02:00
Michael Bestas
a422a1a574 build: Import check_product from lineage-21.0 build/make
Change-Id: I6cb2856bbc15bc25fc3ad6a4c1a6aa6aa56057f1
2024-10-19 01:10:11 +02:00
LuK1337
6f60459814 Revert "roomservice: Try major-only revision if default doesn't exist"
This reverts commit 39392c99e1.

Change-Id: I124fb3cb668715b1c15a7bcd07f5889785333c16
2024-10-19 01:10:11 +02:00
Sebastiano Barezzi
f887bc5ac5 kernel: Add {recovery}kernelconfig
This target just builds the `.config` in
`KERNEL_OBJ`/`RECOVERY_KERNEL_OBJ` to quickly check if fragments are
applied properly, not to be used during an actual kernel build

Change-Id: Ic92fe7bd544f6d0f1b3169c1405aceb6702775e0
2024-10-18 12:59:55 +00:00
LuK1337
beb9645944 build: Make gsi_arm{,64} inherit full_base_telephony.mk
Without it, some packages such as overlays for 3 button/gestural
navigation aren't installed.

Change-Id: Ic72d9cb628e6f276de0cec6d84130d09d4e218ec
2024-10-09 18:00:00 +00:00
Yumi Yukimura
25dd1aad63 bacon: Make it possible to let other build targets depend on lineage OTA package
Change-Id: I04ed91b62beed9728c354ea73f7c0baa72213808
2024-09-20 15:32:30 +00:00
Chirayu Desai
2d402ed8c0 Revert "roomservice: Use ElementTree.indent()"
Revert submission 402436

Reason for revert: Breaks build

Reverted changes: /q/submissionid:402436

Change-Id: Ia53f8a2c2a39ee437c334c5157a2f7dc5aed44ac
2024-09-13 00:44:07 +00:00
Chirayu Desai
76b04d2f8b Revert "roomservice: Use ElementTree.write()"
Revert submission 402436

Reason for revert: Breaks build

Reverted changes: /q/submissionid:402436

Change-Id: Iac5d3be6cb7692d93dc68c7124dd4362e0800321
2024-09-13 00:44:07 +00:00
Jyotiraditya Panda
13e7f92f72 roomservice: Use ElementTree.write()
write() handles XML conversion and file writing internally.
The xml_declaration=True parameter adds the XML header
automatically, eliminating the need for manual string manipulation

Change-Id: Ib8c3fe33e60accad05572c5af0f0b90866a219d9
Signed-off-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
2024-09-12 18:50:41 +05:30
Jyotiraditya Panda
3bab6429ec roomservice: Use ElementTree.indent()
Replace custom indent() function with the built-in ElementTree.indent()
method, which was introduced in Python 3.9:
https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.indent

Change-Id: I45c513a2f02a36c012490db9b05b8fa1eec356ca
Signed-off-by: Jyotiraditya Panda <jyotiraditya@aospa.co>
2024-09-12 18:32:31 +05:30
Cosmin Tanislav
198966577a soong: add powershare configs
Change-Id: Ia0654765e45b9b36caca680eac134c714dcb4da0
2024-08-22 15:00:48 +00:00
LuK1337
8ba07c4cfc kernel: Deduplicate file paths in file_list.txt
This is a workaround for broken dirty rebuilds.

Test: breakfast gts4lvwifi && m && m
Change-Id: I2529efd0685f15eace5031df39e226dd5eaca1e8
2024-07-24 17:32:08 +00:00
Han Sol Jin
ed59eaf090 kernel: use systemimage_intermediates on devices with no vendor
Change I8b6040e03589bde2af4e161c891ded237a9bb335 did not account for
devices without a separate vendor partition, causing build to fail with
the following:

FAILED: ninja: '/file_list.txt', needed by 'out/target/product/joan/obj/KERNEL_OBJ/arch/arm64/boot/Image.gz-dtb', missing and no known rule to make it

Use systemimage_intermediates instead on said devices.

Test: m kernel
Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Change-Id: If9eb75a1bef98345e9c137c2463e392d50be239b
2024-07-12 21:05:05 -07:00
Sebastiano Barezzi
3fe68ad58a kernel: Better x86 support
- Mention the right kernel image on documentation
- Build dtbs only when the dts folder exists, Google enables CONFIG_OF
  on x86_64 GKI config, this is also the same check done on Linux
  Makefile

Change-Id: I1b0f7a39b0b00f2a4516d2cff79e591136ee3af8
2024-07-12 03:11:30 +02:00
Aaron Kling
b3f09c69c8 kernel: Add kernel modules to partition file list
This is required to ensure that kernel modules end up on the final
partition images when `BUILD_BROKEN_INCORRECT_PARTITION_IMAGES`
environment variable or board config variable is not set.

See 152cdfab7c
for more information.

Co-authored-by: Bruno Martins <bgcngm@gmail.com>
Change-Id: I8b6040e03589bde2af4e161c891ded237a9bb335
2024-07-11 07:05:32 +00:00
Dhina17
b9ca97bc45 envsetup: dopush: Update regex to match remaining build time
QPR2 introduced remaining build time in the progress box [0]
but it was broken with tee cmd so dopush() was worked fine.
Now, QPR3 fixed that issue so dopush() is broken.

Example:
[ 99% 394/395 1m30s remaining] Copy: out/target/product/devon/apex/art_boot_images/javalib/arm/boot.art
[100% 395/395 1m30s remaining] Install: out/target/product/devon/system/framework/framework.jar

Change-Id: Ifdfcfe0f750d39f4e3fe7d669e5094729d75e224
2024-07-10 22:04:25 +05:30
Yumi Yukimura
14403c2122 roomservice: Set timeout when accessing GitHub
* Bypasses the literally infinite timeout for users who have
  limited access to GitHub (before: 2m13.749s, after: 0m14.354s)
* The timeouts should be enough for users who have freedom internet
  access, even ADSL network connection shouldn't take that long...

Test:
1. Execute `source build/envsetup.sh`
2. `breakfast` a existing device
3. Add "0.0.0.1 github.com" and "0.0.0.1 raw.githubusercontent.com"
   to /etc/hosts
4. `breakfast` any device, observe that it should not take up to
   minutes to quit

Change-Id: Ib90e69c75a50e66b47e6245cb6d0521351b5c71b
2024-07-02 00:28:34 +00:00
Maitreya25
15bbe27486 kernel: Include OEM DTBs in build
Some OEMs (for example: oplus) push their dtbs to their own folders which causes kernel build to error out, fix this by including non qcom dtbs as well.

Change-Id: I2f51db103475cd2609cd061e0ec66af5accb96ab
2024-05-30 17:18:55 +00:00
Arian
0b86619dc5 soong: Add power libperfmgr extension config
Change-Id: I401335a1851948bae8de42d0f86af4763dd795b3
2024-05-19 15:53:36 +01:00
Aaron Kling
49c4dd8f86 kernel: Error on duplicate modules
This can happen when an out of tree module target uses a matching module
name from the base kernel. This causes two problems:

1) Depmod gets confused and only pulls symbols from one of the modules
2) Copying the modules to modules_out is not entirely deterministic and
   is based on the first variant to be returned by find, meaning that
   the variant that gets copied to the device could change build to
   build.

To avoid these issues, fail the build if this happens and force the
build target to only generate one copy of each module name.

Change-Id: I2e47ba4e142054feabaa1ab80fbbe0332fd84a62
2024-05-13 20:45:15 +00:00