Commit graph

667 commits

Author SHA1 Message Date
Michael Bestas
0d450dd954
kernel: Changes for 5.10 build without GCC
Change-Id: Id6e09467937e60e6b00a30a246ba0a4a8d71687b
2022-10-01 00:46:45 +03:00
Michael Bestas
8ab31cfc01
kernel: add pahole dependency
This is needed for 5.10+ T kernel build.

Change-Id: I0729af39cad5509ea3bc8629fdf1176156be6c08
2022-09-28 22:03:50 +03:00
Chirayu Desai
404fb47daf fixup! Hookup GRALLOC_HANDLE_HAS_RESERVED_SIZE
Change-Id: Id12058a238c241acb138e3e419bb0bab8280e51b
2022-09-20 01:50:24 +05:30
Chirayu Desai
b5da4d5070 Hookup GRALLOC_HANDLE_HAS_RESERVED_SIZE
* Needed for camera on redbull 13

Change-Id: Ibc1d941f8a6e5e61e3a56cb0065e387022fa3441
2022-09-19 19:17:27 +05:30
Michael Bestas
1c39c90a8d QCOM: RIP pre-UM families
Change-Id: I36e88d74928303ef13334e5feb3d4d3a98c25bd3
2022-09-19 11:26:29 +02:00
Luca Stefani
a1af8cb166 kernel: Allow passing empty DTB to mkbootimg via board-flag
* Boot Image header v2 demands a DTB be passed by default.
* We don't /need/ one at all, as we have and use a dedicated
  DTB partition.
* Signing hates trying to find dtb.img anywhere for some magical
  reason, so cheat and introduce a flag to include a blank one.

Change-Id: I889ce3815476a55829870b30de1b9210283a79ae
(cherry picked from commit fa16b42ddd1eb341f201b8d810c717ea12afe1cb)
2022-09-15 23:02:14 +02:00
Michael Bestas
18dd1748df
kernel: Changes for LLVM binutils
* Remove KERNEL_LD from kernel.mk, we simply set LD in BoardConfigKernel
* Add llvm-ar in path allowlist (used by LTO)

Change-Id: I76addb6f9d8d413edb1832dba23082ffb6d5ebc3
2022-09-08 04:39:49 +03:00
Michael Bestas
a8bbd0e4aa
config: Remove BOOTLOADER_MESSAGE_OFFSET
This hasn't been ported after lineage-18.1

Change-Id: Ie3d798a009a4e0042b767839b39dd6f68695ef2a
2022-08-30 03:13:55 +03:00
Michael Bestas
50fb699870
config: Remove TARGET_PROCESS_SDK_VERSION_OVERRIDE
This hasn't been ported after lineage-18.1

Change-Id: I3024e503e97075d5bfffc41b60da83a445a4e580
2022-08-30 03:13:55 +03:00
Michael Bestas
fa5bc45a95
config: Remove TARGET_DISABLE_POSTRENDER_CLEANUP
This hasn't been ported after lineage-18.1

Change-Id: Ib1bca251c6de7529c58ea2fb9b439e37b55be6c5
2022-08-30 03:13:55 +03:00
Michael Bestas
3bff07a506
config: Remove TARGET_NEEDS_NETD_DIRECT_CONNECT_RULE
This hasn't been ported after lineage-18.1

Change-Id: I2946fdb08c09a3bfd238d65103869dc89ca2b558
2022-08-30 03:13:55 +03:00
Michael Bestas
e19c6db3c9
config: Remove TARGET_IGNORES_FTP_PPTP_CONNTRACK_FAILURE
This hasn't been ported after lineage-17.1

Change-Id: I2aff9bb7bc17fa1444a904d47248d885268bf29b
2022-08-30 03:13:55 +03:00
Michael Bestas
e020bffce2
config: Remove TARGET_HAS_MEMFD_BACKPORT
Change-Id: I17444007429f826bf3d7504cba760204c476e664
2022-08-30 03:13:54 +03:00
Michael Bestas
1cfc6cbf4b
config: Remove TARGET_SPECIFIC_CAMERA_PARAMETER_LIBRARY
This hasn't been ported after lineage-18.1

Change-Id: Ib3ae63ee549b774349268a42923e462a3ef975a0
2022-08-30 03:13:54 +03:00
Michael Bestas
829f975cd8
config: Remove TARGET_HAS_LEGACY_CAMERA_HAL1
Change-Id: I6f4cbe41f6df3ceb6b4058d5b6e77c02e1899809
2022-08-30 02:43:52 +03:00
Michael Bestas
89fd58c860
config: Remove TARGET_USES_QCOM_BSP_LEGACY
Change-Id: I93f111285c46e1a1f811b9d8555de96474d60386
2022-08-30 02:39:47 +03:00
Michael Bestas
f1614da261
config: Remove QCOM HW FDE setup
Change-Id: Ia88a5331e5f3b69a2eea95aa13338f4282779856
2022-08-30 02:36:39 +03:00
Michael Bestas
73732cd931 envsetup: cafremote -> cloremote
Adapt function for .gitupstream so we always get the correct
remote without needing to calculate the path manually.

RIP CodeAurora

Change-Id: I56720dfb859a08c53e79255a9e5e61e7a2e50619
2022-08-25 15:44:58 +02:00
Arian
eb72c64757
soong: generator: Replace android.SourceDepTag usage with IsSourceDepTagWithOutputTag
Change-Id: Iad5d9a07d06a7efda233cc8d3387e8db5c3b0ab5
2022-08-23 02:02:20 +03:00
Michael Bestas
5dfc89a4db
kernel: Always build dtb targets before dtbo.img
Fixes:
error: unable to open output file
'arch/arm64/boot/dts/google/devices/bluejay/google-base/.gs101-b0.dtb.dts.tmp':
'No such file or directory'

Change-Id: I457062e46062fb3553421d196b432de7d06a49ad
2022-08-13 15:16:31 +03:00
Michael Bestas
319d4c4e9a
kernel: Add support for vendor_boot image header version 4
vendor_boot v4 supports packaging multiple "fragmented" vendor ramdisks.
A secondary can be used to store the kernel modules instead of storing
them in the "normal" vendor_ramdisk.

Test: Create a vendor_boot with source built kernel/modules,
      gs101 still boots.
Change-Id: Ic295ccf201c2593e08b9559ae28f80c70a7eb341
2022-08-13 03:02:44 +03:00
Neel Chauhan
fadfdbf4f5
kernel.mk: Allow building external kernel modules
Here, we introduce the TARGET_EXTERNAL_KERNEL_MODULES variable
for the list of external modules.

Change-Id: I1f8b7a48e66bb0c9efbc396692e5a7159f0b835c
2022-08-11 18:34:23 +03:00
Michael Bestas
98447383e4
kernel: Allow overriding dtb target
On some devices we might want to build just the *.dtb files
that we actually need instead of the every dtb that exists.

Change-Id: Id7a152499d4ee1dd08f79d34cc34bfe959313515
2022-08-11 18:34:23 +03:00
Michael Bestas
12b812b4c9
kernel: Allow overriding dtbo target name
gs101 kernel uses google/dtbo.img target for dtbo.img

Change-Id: Ib03f35c0035f56d303771de9399bcce3d02c0775
2022-08-11 18:34:23 +03:00
SahilSonar
cb15b81b01 qcom: Add holi platform
Change-Id: I1f41059c385a37bef71bd7d8ee34739d8bcca77a
2022-07-19 18:12:17 +02:00
althafvly
68544f936f lineage: products: Un-break SDK addon
- Fixes error while building
  Trying to build sdk_addon, but product 'vendor/lineage/build/target/product/lineage_sdk_phone_x86_64.mk' does not define one
- Move gsi_release.mk to gsi_tv_arm*.mk. SDK and x86* targets won't build.
- Set TARGET_SUPPORTS_64_BIT_APPS for x86_64 gsi to support both arch apps.

Change-Id: If01e2eecfc5e27a98e696c29f29babbc1a5ec726
2022-07-04 20:05:29 +02:00
Alexander Koskovich
a78681c09c
kernel: Move TARGET_KERNEL_ADDITIONAL_FLAGS to kernel task
* Currently, because DTC_EXT make flag is in the
   kernel task the only way to override it is to
   have TARGET_KERNEL_ADDITIONAL_FLAGS come after.

Change-Id: If62ed979581dc07eafd4628ce2b2d799388d3704
2022-06-24 14:23:06 +03:00
Alexander Koskovich
911b7c47b3
kernel: Switch to AOSP DTC instead of using scripts/dtc
Change-Id: I8faf295dfb84ab7481b80d5b7d2add8ed8ddf6d9
2022-06-24 14:23:05 +03:00
Michael Bestas
87c0acd05e Revert "kernel: Remove unneeded MKDTIMG dependency"
This reverts commit caa3bddf00.

Reason for revert: Breaks pixel dtbo.img build, since kernel depends on
mkdtimg. Add it back so it gets compiled and kernel can pick it up.

Change-Id: I2b9fd0b2b35e0cf2f908516b10f65399780d5c30
2022-06-20 11:51:56 +02:00
Michael Bestas
caa3bddf00 kernel: Remove unneeded MKDTIMG dependency
Change-Id: Icc1923e922adb50b02252883aa6814101837adfc
2022-06-18 10:26:14 +02:00
dianlujitao
709371be5e kernel: Ensure dtb(o) always get rebuilt
* AOSP build system is not aware of dtb(o) source update, and thus
   won't rebuild the images, results in outdated artifact.
 * Convert DTB(O)_OUT to make targets and make the images depend on them
   to address the issue. This makes AOSP build system be aware of
   their timestamp changes and re-execute recipes depending on them.
   Finally, it's up to kernel's build system to decide actions to take.

Test: m dtb(o)image and observe dtb(o).img get rebuilt
Change-Id: I197e7d2d3e013ded0e555fc22bb6a1200d40df9c
2022-06-18 10:26:14 +02:00
dianlujitao
9955cd657b kernel: Avoid unnecessary savedefconfig
Change-Id: I5400e549a6574208d67c5d107ca56eee402fa7f2
2022-06-18 10:26:14 +02:00
dianlujitao
8c6398e9fd kernel: Clean up kernel copy recipes
ACP and ALL_PREBUILT are dropped years ago and thus have become no-ops.

Change-Id: Ic317cb4a4fa406cce0dc86555fb8da34d21fb2bf
2022-06-18 10:26:14 +02:00
Danny Trunk
20bf195599 soong: Add TARGET_USES_EGL_DISPLAY_ARRAY conditional
This soong variable is used to conditionally revert a commit [1]
which causes random camera crashes on tama devices

[1] a9550f3fe9

Change-Id: I749c7029f8f2b6d6d95b066aed4929c33e3c75e7
2022-06-16 17:04:56 +02:00
Michael W
39881f863a repopick: Limit commit counting
* For every commit, repopick checks the last commits for the presence of
  the commits to be picked
* In every project a change should go in, it calls "git rev-list --count"
  to find the maximum amount of commits to be searched, but it only cares
  if there are less (or equal) commits at all than to be checked
* Therefore, we can limit the counting to one more than we want to check
* This is relevant for example for fw/b, where there is a huge amount of
  changes and therefore a lot of time used to count

* Example: fw/b
  git rev-list --count HEAD: 46.693s
  git rev-list --count --max-count=1000 : 0.019s
* Real-life example:
  repopick -t qs-lightmode
  Old: 2m33.375s
  New: 0m6.657s

Change-Id: If0500574fb282e332996b606dd9926841f8e0e88
2022-06-15 20:57:30 +02:00
Michael Bestas
fbadddae84
envsetup: Add sort-blobs-list
Change-Id: Ie871fe0bc9dd432e632ca8e9d7fa70c96a82a8c3
2022-06-09 18:50:47 +03:00
Alexander Koskovich
3bab7d780e lineage: build: Wipe DTB/O OBJs before build
* They can linger and cause problems, e.g. mismatching
   kernel and DTBs.

Change-Id: I4adafe140093ff675fc3f55e3233a754d44d5656
2022-05-31 01:37:14 +02:00
Sebastiano Barezzi
f224255cd9 soong: Drop TARGET_USES_QTI_CAMERA_DEVICE
* qcom-camera topic hasn't been ported to 19.1

Change-Id: Ifb053d215527d602109bbb451d96ec80cf028548
2022-05-19 16:05:23 +02:00
Bruno Martins
bf9c45fa42 kernel: Document TARGET_KERNEL_RECOVERY_CONFIG usage
Change-Id: Idefd38dae5e8beac7d7de797f3f792fea25dacef
2022-04-09 14:46:47 +02:00
Bruno Martins
f5023f46f9 kernel: Fix building recovery images
Commit 8ac7d31 introduced this issue.

Test: run `m recoveryimage` and verify that recovery
image is now built.

Change-Id: Iffdd8112db2ba1baff28db7ee4c340dbb5ebd917
2022-04-09 14:46:47 +02:00
Bruno Martins
03f2b69dc7 kernel: Fix kernel rebuilding
Commit 8ac7d31 introduced this issue.

Test: run `m installclean && m bootimage` and observe that
kernel image is built.

Change-Id: I41eb7cd2e5108bae8f4c40c0f9a300a8a3cc95a7
2022-04-09 12:58:09 +02:00
Sebastiano Barezzi
8ac7d31285 build: tasks: kernel: Rework kernel fragments handling
* Since some time you can specify multiple configs when you prepare .config and they'll get merged to main one
* To use it inline:
TARGET_KERNEL_CONFIG := main_defconfig fragment1.config fragment2.config ...
* TARGET_KERNEL_ADDITIONAL_CONFIG has been nuked since it's superseed by this new logic
* kernelsavedefconfig will only use the base defconfig

Change-Id: I479c762a9235ed0ef6fcdc79b53e084d5e2d78a6
2022-04-04 03:54:39 +02:00
Edwin Moquete
834a1081c3 lineage: Pass mka argument to m
* Needed for brunch/mka bacon to work

Change-Id: I0eb44c030eb965e76404e10a7c710ff411eec7ff
2022-03-26 02:27:06 +00:00
Nolen Johnson
057ffca824 lineage: Make mka a function again
* This caused breakages in subshells from scripts.

* Still keep the dropping of `-j`, as it's not needed.

This is a squashed revert of:

    Author:     Timi Rautamaki <timi.rautamaki@gmail.com>
    AuthorDate: 2022-03-24 08:21:34 +0000
    lineage: move mka definition above brunch

    Otherwise it's not defined for brunch.

    Change-Id: I642e3db365fab46d4428d1b1f310304280b72efc

    Author:     Alexander Koskovich <akoskovich@pm.me>
    AuthorDate: 2022-03-21 07:54:20 -0700

    envsetup: Remove threads argument from mka

     * "m" is multi-threaded by default.

    Change-Id: I5c9bb30dc49dafa31ba9fc70e617f477b6814b41

Change-Id: If4112ae739d8356f922cbbaf8e3d7ded5d078bd0
2022-03-25 18:52:34 +01:00
LuK1337
ec10ed10f8 soong: Add TARGET_TRUST_USB_CONTROL_{PATH,ENABLE,DISABLE}
Change-Id: Ib245114588fd14c83069e4365f9ca3e9e9536ba9
2022-03-24 14:46:34 +01:00
Timi Rautamäki
b55f5af61b lineage: move mka definition above brunch
Otherwise it's not defined for brunch.

Change-Id: I642e3db365fab46d4428d1b1f310304280b72efc
2022-03-24 09:28:07 +01:00
Alexander Koskovich
145ffa4316 envsetup: Remove threads argument from mka
* "m" is multi-threaded by default.

Change-Id: I5c9bb30dc49dafa31ba9fc70e617f477b6814b41
2022-03-23 15:21:01 +01:00
Nolen Johnson
8db975cd36 lineage: products: Rename ATV targets to reflect AOSP GSI names
Change-Id: I96a28e5beaffd9148be2ddb379f8990c172ca69f
2022-03-19 19:21:02 +01:00
Nolen Johnson
4d09aac1ec lineage: products: Create new Automotive GSI targets
* And split out emulator includes as needed to do so.

Change-Id: I9a9e02dc9ebf4613bf2da6be9985a8565dac93fc
2022-03-19 19:20:54 +01:00
Michael Bestas
518ab667f2 build: Fix kernelsavedefconfig target
Change-Id: Ie3d9a187693f2435f2555658c833de666848e48e
2022-03-15 17:21:22 +01:00
Tom Pratt
c86992e0cd Fix GSI targets
Inherit from AOSP gsi_{arch}.mk, because aosp_{arch}.mk files
are obsolete in Android 12. Rename for consistency with
AOSP gsi/sdk targets.

Change-Id: I449390521307ff4f269a9ebf1ad3a5ffc398bc97
2022-03-13 23:33:39 +01:00
Nolen Johnson
d0b3a4af0f lineage: products: Add ATV emulator targets
* device/google/atv only supports armv7 and x86, so
  for emulator at least, we will too.

Change-Id: I5c7f00f8dd34d9d95747d05b6c091376451cc986
2022-03-12 23:49:24 +01:00
Alexander Koskovich
6d88852d2e lineage: config: Make LLVM kernel compile the default
* GCC was deprecated awhile ago, the large majority
   of devices should now be using this. Clang should
   be opt out as opposed to opt in.

Change-Id: Ie388aff8eca189663f2f615f7d059e47eaf2dce3
2022-03-10 11:06:43 +01:00
Alexander Koskovich
c5853fe2b8 lineage: build: Drop MSM7K board platforms
* If someone finds a device that uses these platforms
   in 2022, let me know.

Change-Id: I5478d45f40497788d28a4bd04fae7838aae7e116
2022-03-03 17:08:28 +01:00
Alexander Koskovich
4d0c884d23 lineage: build: Drop QSD8K board platform
* This platform was last mentioned during CM 9 in
   android_vendor_qcom_opensource_kernel-tests_mm-audio.

Change-Id: I7e91d17303b74bed3a9c220366868afd8176a7f7
2022-03-03 17:08:28 +01:00
Alexander Koskovich
e12f9f0d97 lineage: build: Drop MTK board platforms
* Remove MTK board platforms, nothing uses this when
   looking for 'MTK_BOARD_PLATFORMS' across the entire
   organization. This lets us revert the utilities back
   to how they were in the QCOM tree.

Change-Id: If3d3a3e7543b79108b26a30c0e02bb3ab154f279
2022-03-03 17:08:28 +01:00
Jarl-Penguin
7adc095f6a kernel: INSTALLED_RECOVERY_KERNEL -> INSTALLED_RECOVERY_KERNEL_TARGET
* Make it consistent with the rest of the targets

Signed-off-by: Jarl-Penguin <jarlpenguin@outlook.com>
Change-Id: I869d3d8570b4deb2f1e019efa975526a528ca3e7
2022-02-20 13:26:31 +01:00
Nolen Johnson
8e215b7200 lineage: products: lineage_x86{,_64}: Don't build kernel
* Results in an error.

Change-Id: Ifab94ca34bab75d8e55b317f69060fc02f068ecf
2022-02-15 19:44:19 +01:00
Nolen Johnson
d8bdaefb4f lineage: products: lineage_x86{,_64}: Don't include SDK addon
* This doesn't work, and just errors out similar to arm/arm64.

Change-Id: I53a2261095f1e2acab3b7da20d3f092ccc83e8ab
2022-02-15 19:41:41 +01:00
Tom Pratt
5a35edd014 Rename automotive emulator targets
Matches the upstream separation of gsi and emulator targets.

Change-Id: I07947727c39b87d2bd1ee6bf2809a7f40ff380ba
2022-02-13 11:03:28 +01:00
Bruno Martins
43c8f40ba9 envsetup: Fix long time broken path to sh
Change-Id: Ia76d14e10571dd6f3ac9f4adf288effae851ffe3
2022-02-08 23:09:21 +01:00
Michael W
a28fa6de34 envsetup: dopush: Correct paths
* In order to automatically restart the system when pushing SystemUI, the
  path must actually be correct
* Since android 10 it's in system/*product*/priv-app and 11 will move
  it again, so just match it anywhere
* Make framework also location independent

Change-Id: I4a9eb1edbbb21ab8abe17815c606921f7a538b7f
2022-02-08 22:59:55 +01:00
TheScarastic
af717a279c soong: Rename fod to udfps
* now flag is changed to TARGET_SURFACEFLINGER_UDFPS_LIB from TARGET_SURFACEFLINGER_FOD_LIB

Change-Id: I499b31d00a053b865ceaa3b34a9762f980bbf14e
2022-01-26 22:56:32 +01:00
Alexander Koskovich
e220ca2625
lineage: tasks: Support copying kernel modules out to /vendor_dlkm.
Change-Id: I84993ba5e0190d310c326da7806e82f627e37a58
2022-01-22 22:39:21 -07:00
Chirayu Desai
d91d695664 kernel: Implement build time LTO choice
Change-Id: I898eb50fadb6bde5beebf46f443c5de7e6acc907
2022-01-13 14:40:31 +01:00
Alessandro Astone
174ee28d0f Revert "Revert "kernel: fix KERNEL_TOOLCHAIN_PATH_gcc and usage""
The fix was correct...

This reverts commit 168fd231b6.

Change-Id: If550fd44f32b801553b8ac23cb2a91d3f29df557
2022-01-06 16:41:05 +01:00
Alessandro Astone
8ace32e27d build: Define QC_OPEN_PATH
All references in sm7250 repos point to the correct location
if we simply define QC_OPEN_PATH as vendor/qcom/opensource

Change-Id: Ibb580230212a08c73a251c88630217b192979eb4
2021-12-10 22:42:52 +01:00
Michael Bestas
a427f43848
build: Enable mainline checking for GSI/emulator targets
* This is originally done in build/make but it checks against aosp_* targets
* Enable it for all of our lineage_* targets

Change-Id: I9fa62c8f709bd649d114f24f241d42d471489ae5
2021-11-28 23:53:13 +02:00
Tom Pratt
33384ced53 Use sdk_{arch}.mk as base for automotive emulator targets
It no longer boots using aosp_{arch}.mk and aosp targets all
use sdk_{arch}.mk now.

Change-Id: I2f6c644353966a58299fbdfa42c7fd3b0d5dea90
2021-11-23 12:53:24 +01:00
Michael Bestas
baab5a81f5
build: Remove legacy GSI targets
* Support for these targets is no longer present in build/make

Change-Id: I2b07ca52c3040f8b1592dd9760ca2357105e082d
2021-11-14 20:20:52 +02:00
SagarMakhar
5a4a0c748e
Rework rule building in lineage_generator
Signed-off-by: SagarMakhar <sagarmakhar@gmail.com>
Co-authored-by: Arian <arian.kulmer@web.de>
Change-Id: I05c36b8660e51a18ac70a6712b2d03edfc561156
2021-10-15 15:09:42 +02:00
Michael Bestas
253f90404d
build: Add x86/x86_64 emulator targets
Change-Id: Ic8789ad2072b9ebda91f9b4a7c288a5a9bcec3fd
2021-10-12 17:52:12 +03:00
Michael Bestas
c63ee5cc9c
Don't copy privapp-permissions-goldfish.xml for GSI targets
* It is already copied to product partition through AOSP makefiles

Change-Id: I9d877728decc712ce6ae5cc285b1b6a7a4903daf
2021-10-12 17:52:11 +03:00
Michael Bestas
d0b4f9894a
Revert "soong: Export bootloader_message_offset to dependencies"
* Fix build, revert when/if this is needed again.

This reverts commit 1b4ecdcb1c.

Change-Id: I14ec026d8be7297319564340b84ceb164dccfdd5
2021-10-11 23:49:18 +03:00
Michael Bestas
85da432b7b build: Replace obsolete ADDITIONAL_BUILD_PROPERTIES
Fixes:
error: ADDITIONAL_BUILD_PROPERTIES is obsolete.  Please use ADDITIONAL_SYSTEM_PROPERTIES.
Change-Id: I7eb3c47d9fd705aa8f8d39e10563e47ffbf2d560
2021-10-07 19:57:29 +02:00
Julian Veit
cb30d255fb bacon: switch to sha256 checksum
As md5 is not considered as secure since some time, and sha256 is
industry standard, lets switch over here too.

Change-Id: I22015be20126a4348affa5ef97e2c28fbd7b4717
2021-10-07 11:39:17 +02:00
marcost2
fad4142e6e Add support for separate kernels for boot and recovery [1/2]
* Either as prebuilts, or with separate defconfigs

Change-Id: Iad877a5fbef095e3e5d792aebb240c230a829552
2021-09-08 17:16:01 +02:00
Timi Rautamäki
882e97e4ad roomservice: add repo to syncable repo list if dir doesn't exist
breakfast may get stuck if the first breakfast for a target is
interrupted before cloning but after adding repositories to local
manifest. Re-doing breakfast skips syncing the repositories if
they're added to the manifest even if not cloned.

Change-Id: Ifefd08fa6da8785c1d5de0b27ac1a08a782f21d6
2021-07-29 21:14:02 +02:00
Tom Pratt
de83dffc34 Add generic targets for automotive
Makefiles combining core lineage and automotive packages.
Can be included by devices to turn them into Automotive builds.
Emulator targets demonstrate using these makefiles and form a basis for Automotive GSIs.
Change-Id: Ib5d35dfe4de8c459e4e14a7ba6f0b0e682e0d912
2021-07-23 17:57:27 +02:00
Sebastiano Barezzi
4ccc17d333 soong: Add TARGET_CAMERA_BOOTTIME_TIMESTAMP conditional
Change-Id: Ic48acda208fc9990fc5c9159ad06518d48f21477
2021-07-19 11:24:57 +02:00
Tim Schumacher
cec409ecf8 kernel: Fix the check for official builds
The check for official builds now only affects the case where a prebuilt
kernel was actually used, not the case where a device builds a kernel
from source as normal.

The check has also been turned around so that it only fails the build if
it's actually an official build, not an unofficial one.

Change-Id: I1280b16b90589742c2abe7f3f6f5975a3aaeea03
2021-06-27 11:49:48 +02:00
Sebastiano Barezzi
c86a1a8128 kernel: Add TARGET_FORCE_PREBUILT_KERNEL flag
* TARGET_FORCE_PREBUILT_KERNEL should be useful when you don't have ready kernel sources (OEM releasing broken sources or releasing them lately)
* It lets you use kernel sources for userspace generated headers (generated_kernel_headers) while keeping using prebuilt kernel
* Keep in mind that generated kernel headers may not align with the ABI of kernel you're including
* This commit also partially revert commit a836d79, where TARGET_KERNEL_SOURCE would have been unset if TARGET_PREBUILT_KERNEL was defined (we already check in kernel.mk if kernel sources are present anyway)

Change-Id: I84acae890dabb5b9dbd48143ad58f6420c0cef75
2021-06-24 11:50:07 +02:00
Bruno Martins
e741d463e9 Revert "soong: Add TARGET_QTI_USB_SUPPORTS_{AUDIO,DEBUG}_ACCESSORY flags"
This reverts commit ba8e075ed4.
It is no longer necessary.

Change-Id: I5d9656ffb686e939f006d5fb1effaba835f93ed2
2021-06-14 14:48:36 +01:00
LuK1337
cae10f81b0 kernel: Pass absolute path for KCONFIG_ALLCONFIG
It fails to read relative one, at least on QCOM 4.19 kernel base.

Change-Id: Iacbcadfabfcebb80a7f5934825123fdfa913c63c
2021-06-12 21:16:15 +02:00
JamieHoSzeYui
902f4474ba qcom: add lahaina platform
lahaina = Snapdragon 888

Signed-off-by: Aryan Sinha <sinha.aryan03@gmail.com>
Change-Id: Iaad90031451a9d1d3c8cbe8b61c1cf19717df4ee
2021-05-31 22:51:36 +02:00
LuK1337
12d252b8b8 generated_kernel_headers: Also add usr/include/audio to include path
Needed for QGKI 5.4.

Change-Id: I44c77167828fdc3577cfd1eb548c8ceb7c418cbb
2021-05-28 11:08:33 +02:00
LuK1337
8137c7c3bf roomservice: Set exit status if we fail to fetch data from github
Change-Id: I6f69f1df1ba7d28e68c5961b405a54e209643db3
2021-05-10 10:32:45 +02:00
Bruno Martins
9b70f838e9 envsetup: Make dopush() /system_ext aware
Change-Id: Iee4b1fea656f2fd0262cde4f5a634ec95dd6dab8
2021-05-01 11:20:57 +02:00
Dhina17
4280154049 envsetup: replace __detect_shell with basename $SHELL
- __detect_shell is dead long ago.
  $SHELL is a global env var in all shells.

Change-Id: Ie6bd4bbc9d52832a6d42933993c4bc6d0d058633
2021-04-26 20:31:46 +05:30
Dhina17
5c1d8be8c2 envsetup: fix lineagegerrit push for zsh
- fixes:
  error: src refspec HEADefs/for/lineage-18.1 does not match any
  In zsh, :r is a modifier.

Change-Id: Ie6a2a079a96f13c8eb6732a796bab2c2700d7276
2021-04-26 20:30:41 +05:30
LuK1337
3bd9a6607a lineage: Handle build type suffixes properly
This gets rid of grep error code when running breakfast.

Change-Id: I7a8eb86b6068ae1973a96a929129da9eaa84865c
2021-04-13 19:40:01 +02:00
LuK1337
ba8e075ed4 soong: Add TARGET_QTI_USB_SUPPORTS_{AUDIO,DEBUG}_ACCESSORY flags
Change-Id: I18a93fa12bf3d911919a80996d41d52714ee42bf
2021-04-10 18:53:40 +02:00
Nolen Johnson
db313846b1 lineage: targets: x86{,_64}_ab: Don't explicitly include SDK addon
* This resolves some build warnings on these targets, as it's
  being declared elsewhere.

Change-Id: If142b7435d8f4b81f8477516545bb54462518487
2021-03-09 22:17:49 +01:00
Nolen Johnson
52be5fcb10 lineage: targets: Add support for Legacy GSIs
* This is needed for VNDK27, and other older,
  hackier Treble implementations.

* We can't include `legacy_gsi_release.mk` as it's included
  in the `aosp_${ARCH}_ab` targets themselves, unlike the standard
  `aosp_${ARCH}` targets which guard `gsi_release.mk`'s inclusion
   with `aosp_${ARCH}` product guards.

Change-Id: I16c5983c18110b24eef84e382e0ae6852efb03c3
2021-03-09 21:04:44 +01:00
Nolen Johnson
7c428141bc soong: Add TARGET_LEGACY_HW_DISK_ENCRYPTION conditional
Change-Id: I2c67fe632d415353273839493a86cdd75bd93b23
2021-02-22 20:28:23 +01:00
Alessandro Astone
b9aa311d5a kernel: Support pixel style vendor_boot modules
Mini documentation:
List the names of boot modules in BOOT_KERNEL_MODULES to add them
to vendor_boot.

All modules still end up in their primary location (normally
vendor/lib/modules). Boot modules will be kept here as duplicates.

The list of boot modules is then depmod'ed and copied to the
vendor ramdisk.

The file modules.load is created from
BOARD_$(IMAGE)_KERNEL_MODULES_LOAD as the ordered list of modules
to be loaded form that location, either parsed by a modprobe script
or by init itself (only boot modules)
When using vendor_boot modules, vendor/lib/modules/modules.load
should list all modules but boot modules.

Also don't clear the output directory, because one might want to
push a modules.blocklist there.

Change-Id: I89a4aad42a6585a572812f1d7e89f5d78931e1e6
2021-02-17 20:21:04 +01:00
TheMalachite
ec016fd19b qcom: Add bengal platform
Signed-off-by: TheMalachite <eliasgheeraert@gmail.com>
Change-Id: Ia9f602a1d6f109554c6462eaa02214c43b9295dd
2021-02-02 16:47:05 +01:00
Nolen Johnson
c2d63c642e lineage: targets: Add support for ATV GSI builds
Change-Id: I1faf83e21af5db1b29b98af72a4f74666c05f775
2021-01-19 23:15:52 +01:00
Alessandro Astone
9f160e6e5f lineage: Commonize display_intf_headers for QSSI supported platforms
Change-Id: I7224c10295c4123222d81b92f7829502e3cc2d61
2021-01-07 11:21:54 +01:00
Michael Bestas
151e17118c build: Relocate extract utils to tools/extract-utils
Change-Id: I13489b54298ebc2410c38ca9e16aa7121a28f997
2021-01-03 03:33:59 +01:00
Sebastiano Barezzi
85359e5b65
fixup! extract_utils: implement patchelf
* Move $PATCHELF exporting from oat2dex to setup_vendor
* Since it requires $HOST to be set, let's make it global, so oat2dex can also use it

Change-Id: I4556a3c19cd01c9b3a68d358d19a361217d9c3c1
2020-12-23 16:51:06 +01:00
Alessandro Astone
46b6e3a454 extract_utils: generate_prop_list: Ignore vdex/odex files too
Change-Id: Ibe77e8b93466a71d4d0c48ca8f4ff2e00c6e40af
(cherry picked from commit ee669788bc86330215f2444b3beb1f3870329c9e)
2020-12-15 19:22:12 +01:00
Jan Altensen
2855e94574 soong: add TARGET_HAS_MEMFD_BACKPORT conditional
Change-Id: I71b3a86c96bfe53e93e99c071bc8f3a8c56c77b7
2020-12-14 10:28:31 +01:00
Arne Coucheron
ca94a9791c soong: Add flag for disabling postrender cleanup
Some legacy devices experiences bad lag unless this is disabled.

Disable it with:
TARGET_DISABLE_POSTRENDER_CLEANUP := true

Change-Id: I2b40dc4cbcab06fb293d1f407321af2fae846a51
2020-12-03 20:09:54 +01:00
Volodymyr Zhdanov
a039a46b0d extract_utils: implement patchelf
Change-Id: I406f70ef1ce9ec7a0998f77439b7d3fa3ec4e62a
2020-11-26 20:40:02 +01:00
LuK1337
a574c010d2 repopick: Use project revision if available
* Fixes repopicking from repos synced under multiple paths + branches.

Change-Id: Icb165f3d9df67f1b11304e8d7ed955464dcb57bc
2020-11-23 10:55:24 +01:00
Michael Bestas
e26ac59843 kernel: Make system/vendor images depend on modules
* We're having a race with the kernel module build and vendor.img
  generation, and sometimes when vendor.img wins it won't include
  any modules in the image, which leads to all sorts of breakage

Change-Id: I2cdde96530aa8e47351cace76352788cde631058
2020-11-22 23:35:38 +01:00
Michael Bestas
d9dd942eee build: Remove hardware/qcom-caf/thermal pathmap
* Thermal HAL was converted to HIDL service and .mk to .bp,
  devices can override it by using a different named service

Change-Id: Ia3e0d86e791555992e7889f33f7d55f224b9a582
2020-11-22 23:35:38 +01:00
Michael Bestas
571bed5e3f Remove build/core/clear_vars.mk
LOCAL_IGNORE_SUBDIR has been deprecated since 16.0

Change-Id: I3d27034a070977acef32c3b9b654badce1506359
2020-11-13 18:45:04 +01:00
LuK1337
beb10414d2 lineage: Add data-ipa-cfg-mgr to soong namespace in BoardConfigQcom
Before:
  $ breakfast capricorn && m ipacm
  FAILED: ninja: unknown target 'ipacm', did you mean 'lpadd'?

After:
  $ breakfast capricorn && m ipacm
  * happily compiles *

Change-Id: Ib68978d4f287dcdea45fc21382af05b1890caca4
2020-11-01 11:29:01 +01:00
Aayush Gupta
48d0111db6 lineage: Don't enforce specifying image name on prebuilt kernel
- The goal of specifying kernel image name was to whether kernel needs
  appended dtb or not, which is not something required if the kernel is
  prebuilt

Ref:
[0]: Commit edc1cebc2f

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I6b43756a2eac59729a67b5f80dac112f8b6bcc5b
2020-10-28 10:25:37 +01:00
razorloves
23591a8530 Declare vendor/qcom/opensource/data-ipa-cfg-mgr as soong namespace
The mk files in vendor/qcom/opensource/data-ipa-cfg-mgr were
converted to bp, so this is needed to avoid duplicate module
build errors on devices that use a different data-ipa-cfg-mgr hal.

Co-authored-by: Christian Oder <myself5@carbonrom.org>
Change-Id: Ib4d566e43145745afac0259c95c0a563779fa3bd
2020-10-27 13:16:23 +05:30
Aayush Gupta
445136f111 fixup! soong: Add lineage soong config variables
error: system/netd/server/Android.bp:162:1: module "netd" variant "android_arm64_armv8-a_cfi": cppflags: Flag DIGNORES_FTP_PPTP_CONNTRACK_FAILURE must start with -

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I24b89f13425cf586e6ff50d83e71fb1a052bf4ed
2020-10-21 16:29:53 +05:30
Alessandro Astone
1b4ecdcb1c soong: Export bootloader_message_offset to dependencies
Change-Id: I5b81d4a58406b1b521297a217dc33086e70259d0
2020-10-18 20:04:23 +02:00
Pig
a98d12f8e3 soong: Add lineage soong config variables
Ref: https://android.googlesource.com/platform/build/soong/+/refs/tags/android-11.0.0_r4#soong-config-variables

Change-Id: Icaf35b65b63d4245c92e39ce628bb8d6ffd0d4bb
2020-10-16 14:47:33 +01:00
Pig
92388f84ea Revert lineage soong product variables changes
* This reverts commits 7ef0e170 and 4ed4605 and removes relevant flags
   to prepare for using Soong config variables as per Google's docs

Change-Id: Ib6ae5a8a922104d37f8d0e08242b428eb129785c
2020-10-16 12:46:42 +01:00
Bruno Martins
1460ac1c8f Revert "soong_config: Add flag for msm8974 1440p EGL workaround"
This reverts commit f3f7eb2d87.

Support for this in fw/native has been ported in the previous branch
and is very unlikely that will be done or even needed for R.

Change-Id: I9c9709e323d6a27f3c9196887af7ab0ffa1819e9
2020-10-16 09:05:10 +02:00
Bruno Martins
a78e5b2aab Revert "lineage: Add flag for skipping EV_REL input in recovery"
This reverts commit fd27bb4912.
Should have never been added. This time should be done with a prop.

Change-Id: I72a4563834447d4dbeda66dfb232b0541727cb55
2020-10-15 16:13:06 +01:00
Pig
8f6c870ac7 soong: Run bpfix
Change-Id: Id528c99180d34129862c67ef92a00a5ef0fdf61e
2020-10-15 16:01:15 +01:00
LuK1337
abb6597d30 extract_utils: Set filename_from_src: true for CLASS=ETC targets
Change-Id: I881f6a67d84d8de0a4bef17bf3c9eac049679c38
2020-10-06 19:29:53 +02:00
Alessandro Astone
08b2846646 kernel: Import function to install kernel modules from Q
* The new refactored function doesn't work with shell expanded
   variables, like our $$modules.

 * This is the _easy_ fix.
   A proper fix would imply generating the module list into a make variable
   from the shell variable, but with kati that looks unfeasable (to me...)

Change-Id: I8198c62fa93ad94d4b9bf7175fe5eea452c243ea
2020-09-25 21:04:31 +02:00
Bruno Martins
c3ad8b5c54 lineage: Use $(HOST_PREBUILT_TAG) where possible
Change-Id: If211d23ce72b3404368cd723cbb9ea801e61802c
2020-09-24 11:56:08 +01:00
dianlujitao
37e088a2c9 extract_utils: Disable ELF check for shared library
* This is indeed a nice feature, but it's absolutely a bad idea to
   hardcode dependencies of prebuilt modules in proprietary-files.txt.

Change-Id: I8c2d75ff62c0c7862f40e777bcbad4d9cebc074c
2020-09-20 14:56:47 +01:00
LuK1337
22f5c43939 lineage: Switch generic targets to common_full_phone.mk
Change-Id: Ib998fb9a5d604761d0ddf9b2c25cab444c7a5b80
2020-09-18 22:37:47 +02:00
LuK1337
d034c3f7bb lineage: Disable inline kernel building for generic {arm,arm64} targets
Change-Id: I766779a2babc170481174899aaf610cbfeb8d754
2020-09-18 22:37:47 +02:00
LuK1337
41ded0c93e lineage: Manually include gsi_release.mk for generic lineage targets
* AOSP wrapped these around aosp_{arm,arm64,x86,x86_64} checks
  thus we need to have them here instead.

Change-Id: Ia3e1e37361330c4b28759f07a3fef6c78565e958
2020-09-18 22:37:47 +02:00
LuK1337
9b0a82264e lineage: Disable SDK addon for generic arm/arm64 targets
* Android Studio SDK addon is currently broken for generic arm/arm64 targets
  and besides it only makes sense for x86 targets

Change-Id: I6832cc99e0dcefb60c9fb187811821ab1b40e7e0
2020-09-18 22:37:47 +02:00
Alexander Koskovich
411066c311 extract_utils: Fix system_ext framework blueprint generation.
Change-Id: I20e44be6ea48b9bd5b05055d3cf465f63c908463
2020-09-17 10:00:17 +02:00
Jan Altensen
560ac4a965 bacon: switch to toybox md5sum
* fixes "error: MD5SUM is obsolete."

Change-Id: I38e167e24e9eb5596a1e8e2f2d915f648bc1283c
2020-09-15 13:17:38 +02:00
nebrassy
e7501b2499 vendor: BuildOsVariant > BuildOSTarget
Fixes the following build error:

   vendor/lineage/build/soong/generator/generator.go:125:26: ctx.Config().BuildOsVariant undefined (type android.Config has no field or method BuildOsVariant)

Change-Id: I3385941b2931e5be8010d31f80f3aa033d0d3727
2020-09-14 11:18:52 +02:00
Luca Stefani
0409f23119 extract_utils: Add support for system_ext
Change-Id: I0760cdd9bec1a0a0551aa68a60c34f9c00932668
2020-09-09 20:17:37 +02:00
Luca Stefani
e30626da11 Revert "kernel: prevent additional config from being always rebuilt"
This reverts commit 70d5cc42e0.

Reason for revert: Mismatch module/kernel 

Change-Id: I2ae2df476f6cc06c8732336f325822cc2214ef79
2020-09-04 13:31:08 +02:00
Adrian DC
70d5cc42e0 kernel: prevent additional config from being always rebuilt
* A simple "make kernel" or incremental system build
   always triggers a complete kernel recompilation,
   even though the kernel sources were unchanged

 * The reason is because .additional_config is always
   considered new and invalidates the .config file,
   forcing the kernel to rebuild itself every time

 * Instead, prevent the /dev/null and KERNEL_OBJ dependencies
   having irrelevant timestamp changes with an empty variable

 * Command "make kernel" takes 3 seconds versus 40s before

Change-Id: I3b583077b7ef5873eebde3e4b0e790f5d7587ed3
Signed-off-by: Adrian DC <radian.dc@gmail.com>
2020-08-30 17:43:42 +02:00
Aayush Gupta
1de3b3019f vendor: kernel: Add back support for custom dtboimg makefile
It was removed accidentally in commit fe00ea9.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: Icadd7b17b3a732fc2c8aa14f1e4dbd4bc66eb7f9
2020-08-25 14:08:50 +00:00
Weikai Kong
8431a67c0c Revert "kernel: Set full path to DTC"
This reverts commit 5061962d73.

Reason for revert: breaks build with upstreamed dtc >

Change-Id: Idcbb7b95bd54bb6ecfe30f3d55ee90bd57708995
2020-08-25 00:54:30 +02:00
Luca Stefani
05ce3dc8c0 kernel: Add support for mkdtimg cfg_create
Change-Id: If761bb034c175a03a10e5f70753db3a3ded496a8
2020-08-22 20:27:04 +02:00
Luca Stefani
16ea81423c kernel: Switch to mkdtboimg.py
Change-Id: I6f444a3e2265f163e84eaf00d054697dbcf0f803
2020-08-22 20:26:54 +02:00
Luca Stefani
fe00ea90c9 kernel: Rework how DTB/DTBO are built
* Remove the separate dtbo.mk task and merge it
  in kernel.mk
* Merge in-kernel and separated DTBO image generation

Change-Id: I2cae84095cbd3d68abbe1899a9cae34c8a1e5fc9
2020-08-22 20:26:13 +02:00
Chirayu Desai
5061962d73 kernel: Set full path to DTC
* This makes it use the latest source built dtc instead of the prebuilt,
  which is too old for coral/4.14
* Would be best to have it use the in-kernel DTC though,
  as that should always work for that particular kernel.
* When OUT_DIR_COMMON_BASE isn't set, this path is relative (i.e. out/),
  so append $(KERNEL_BUILD_OUT_PREFIX) to account for that.

Change-Id: I6ffe72a2fb061ee81b385f31f4acf682876b27c8
2020-08-16 18:09:30 +02:00
Rashed Abdel-Tawab
e523884e31 kernel: Make dtb.img depend on dtc and dtbo.img on mkdtimg
Change-Id: Id079861b43862881f6a00ec70a585d98d42c4687
2020-08-16 18:09:30 +02:00
Aayush Gupta
d395aa21eb repopick: Address PEP8 warnings regarding indentations and variable naming
- Format variables into snake case
- Add spacing between # and text
- Space after ','
- Test for membership with "not in" instead
- Remove too many empty lines

Ref:
[0]: https://www.python.org/dev/peps/pep-0008/#function-and-variable-names
[1]: https://www.python.org/dev/peps/pep-0008/#block-comments
[2]: http://pep8online.com/

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I16dedf465674056571782921983eb3ec4276a1f8
2020-08-08 21:23:41 +02:00
Aayush Gupta
5fd8e2b1ee repopick: Use empty metavar parameter to fix help's indentation
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
Change-Id: I05329c3e5d234846a65f230f69d6b36aa3cc6fa1
2020-08-08 21:23:27 +02:00
Luca Stefani
fb58f7805c kernel: Bail-out if kernel config isn't set
* And remove stale info comment

Change-Id: I0cdd5ff54ed316858045f4c4ada4d78e593667cd
2020-08-06 17:29:39 +02:00
Luca Stefani
4b7a0a0756 kernel: Add support for module aliases
* On devices using vendor_overlay it could be useful
  to be able to re-name the installed modules to
  match the ones in vendor
  -> An example is QCOM techpack where default module
     name in kernel doesn't match installed module
     name

Change-Id: If9458bca06218aeb8c91283057c083d909bf5104
2020-08-06 17:29:39 +02:00
Luca Stefani
edc2e0c2eb kernel: Allow installing modules on vendor_overlay
* This allows to easily overlay kernel vendor modules
  on devices with prebuilt vendor.img

Change-Id: Ie870f0c486043b57e4b8b10696830331540ae010
2020-08-06 17:29:38 +02:00
Aaron Kling
7d6601cf02 repopick: Use upstream instead of revision to determine branch
This is to allow repopick to determine a branch even on a
revision locked manifest. If upstream is not set, it falls
back to revision.

Per the repo manifest documentation:
Attribute upstream: Name of the Git ref in which a sha1 can be
found. Used when syncing a revision locked manifest in -c mode to
avoid having to sync the entire ref space. Project elements not
setting their own upstream will inherit this value.

Change-Id: I12876f7e3b440f9eab6d1b96eba9b18a13cff2e0
2020-07-20 19:23:05 +02:00
Aaron Kling
d97bfec63f repopick: Fallback to name when project path is empty
When a manifest project path and project name is identical, the
repo manifest parser returns None for the project path. Since
both name and path are required, fall back to using name for path
when path is None.

Change-Id: I2fb3cc0cc643808a3049171804742f249d737679
2020-06-28 18:38:47 +02:00
dianlujitao
83d2fa4198 Export CAF msm-4.14 audio headers
Change-Id: Idc7def38ad90abf4a62e30b3cec97bcb76696a6d
2020-06-28 22:16:44 +08:00
LuK1337
b82776e2a4 qcom: Add UM 4.19 platforms
Change-Id: Ida4861b95b0b9748ef3848674b7121010126dd3d
2020-06-25 20:17:38 +02:00
TheHitMan7
eb18aa6af9 qcom: Add atoll platform
Signed-off-by: TheHitMan7 <krtik.vrma@gmail.com>
Change-Id: Idc74d064620649e7423a2fee076da8bd43e1cbd3
2020-06-25 20:16:52 +02:00