Compare commits

...

9 commits

Author SHA1 Message Date
Chirayu Desai
9061de7a60 Don't set PRODUCT_ENABLE_UFFD_GC by default
* Overriding this from devices doesn't work
* Using ?= here doesn't work either
* It still defaults to "default" based on other places
  and works the same, so let's just remove this

Change-Id: Ie9d732796a46770c11a7608e7c0990653d59fbd0
2024-09-07 22:14:27 +00:00
Michael Bestas
42ab2790f8 Remove non existent health 2.0 recovery package
Health 2.0 targets have been removed in change
I8e1eb743d978315ae9b5b516d3e2e9dc6151d2c2

Test: m, observe "includes non-existent modules in PRODUCT_PACKAGES"
      error is no longer present.
Change-Id: Idd910dfe7028cf0f39e11451a256807c24063061
2024-09-07 22:14:27 +00:00
Chirayu Desai
c8feb79c73 Revert "Add DeviceDiagnostics.apk"
This reverts commit 3cff79686f.

Reason: Not present in AOSP

Change-Id: If4a812327bc44d1fba880726b601971cc946147d
2024-09-07 22:14:27 +00:00
Aaron Kling
107c120b77 Allow passing makefile path to enforce-product-packages-exist
To allow enforcing at a product level

Change-Id: I75084246be885a163260bed42f2b13e0db388f85
2024-09-07 22:14:27 +00:00
LuK1337
d82693def7 Disable sparse images for A/B updater targets
In past, brillo_update_payload was unsparsing all images before putting
them in payload.bin, now we ought to unsparse them ourselves here.

Change-Id: I69baa71678f8116ed8e256bd629a1af9bad13ba8
2024-09-07 22:14:27 +00:00
Michael Bestas
51bd6dd955 envsetup: Automatically set INLINE_KERNEL_BUILDING for QCOM devices
Change-Id: I2404adf572bdafb91edc66a19a83a2696004b33f
2024-09-07 22:14:27 +00:00
Rashed Abdel-Tawab
e937a902a4 build: Automatically replace old-style kernel header includes with new header lib
This is a combination of 3 commits.
This is the 1st commit message:

build: add kernel header dependency if module uses kernel headers

Many of the QCOM components use kernel headers, but don't declare
the dependency on them.  This is fine in CAF because of the way they
build the boot.img before anything else.  In CM, we don't build the
boot.img the same, so we run into a race between the kernel build &
these modules... and the modules lose.

Warn about modules that have this missing dependency, and add it for
them so we don't have to modify each Android.mk.

Change-Id: I95f1e47b5ef440f6f5d8f64a0c3f38d9572e839e

============================================================================
This is the commit message #2:

build: Switch kernel header inclusion

The build is switching to the target INSTALLED_KERNEL_HEADERS to
declare dependencies on kernel headers.

Change-Id: I913e74681b02dfcf1eaed3d1e47ff4ab2300b12d

============================================================================
This is the commit message #3:

build: Automatically replace old-style kernel header includes with new header lib

Since we do this via soong and the result is a header library, just replace all
legacy include paths that point to the old header location with calls to the new
header library. Since we no longer have the legacy include, we can also remove
the additional dependency.

This reverts commit fa798218e5b7f96e12ab3acc9d47a3f26a140777.

Change-Id: I716955534e50831e6568ca01e480aa8b90075d92
2024-09-07 22:14:27 +00:00
Chirayu Desai
3c1a51f132 Add vendor_kernel_boot files to target-files-package
* This is a required dependency of target-files-package
so that it can be built from a clean build.

Test: rm -rf out/target/product && m target-files-package
Change-Id: I89e60f47e3e2cd6029a92b1aca505acd9cf4645b
2024-09-07 22:14:27 +00:00
Trevor Drake
6e20526569 Teach atree about absolute path and fix misleading error message
sdk build was failing when OUT_DIR_COMMON_BASE is an absolute path

Change-Id: Ie84b94a4de19a837a93d4a8338d4ef23f9a5ee4e
2024-09-07 22:14:27 +00:00
8 changed files with 50 additions and 14 deletions

View file

@ -2142,9 +2142,11 @@ $(if $(BOARD_$(_var)IMAGE_SQUASHFS_COMPRESSOR),$(hide) echo "$(1)_squashfs_compr
$(if $(BOARD_$(_var)IMAGE_SQUASHFS_COMPRESSOR_OPT),$(hide) echo "$(1)_squashfs_compressor_opt=$(BOARD_$(_var)IMAGE_SQUASHFS_COMPRESSOR_OPT)" >> $(2))
$(if $(BOARD_$(_var)IMAGE_SQUASHFS_DISABLE_4K_ALIGN),$(hide) echo "$(1)_squashfs_disable_4k_align=$(BOARD_$(_var)IMAGE_SQUASHFS_DISABLE_4K_ALIGN)" >> $(2))
$(if $(PRODUCT_$(_var)_BASE_FS_PATH),$(hide) echo "$(1)_base_fs_file=$(PRODUCT_$(_var)_BASE_FS_PATH)" >> $(2))
$(eval _size := $(BOARD_$(_var)IMAGE_PARTITION_SIZE))
$(eval _reserved := $(BOARD_$(_var)IMAGE_PARTITION_RESERVED_SIZE))
$(eval _headroom := $(PRODUCT_$(_var)_HEADROOM))
$(if $(filter true,$(AB_OTA_UPDATER)),,\
$(eval _size := $(BOARD_$(_var)IMAGE_PARTITION_SIZE))
$(eval _reserved := $(BOARD_$(_var)IMAGE_PARTITION_RESERVED_SIZE))
$(eval _headroom := $(PRODUCT_$(_var)_HEADROOM))
)
$(if $(or $(_size), $(_reserved), $(_headroom)),,
$(hide) echo "$(1)_disable_sparse=true" >> $(2))
$(call add-common-flags-to-image-props,$(1),$(2))
@ -6296,6 +6298,10 @@ ifdef BUILDING_VENDOR_BOOT_IMAGE
endif
endif
ifdef BUILDING_VENDOR_KERNEL_BOOT_IMAGE
$(BUILT_TARGET_FILES_DIR): $(INTERNAL_VENDOR_KERNEL_RAMDISK_FILES)
endif
ifdef BUILDING_RECOVERY_IMAGE
# TODO(b/30414428): Can't depend on INTERNAL_RECOVERYIMAGE_FILES alone like other
# BUILT_TARGET_FILES_PACKAGE dependencies because currently there're cp/rsync/rm

View file

@ -44,6 +44,26 @@ endif
my_soong_problems :=
# Automatically replace the old-style kernel header include with a dependency
# on the generated_kernel_headers header library
ifneq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include,$(LOCAL_C_INCLUDES)))
LOCAL_C_INCLUDES := $(patsubst $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include,,$(LOCAL_C_INCLUDES))
LOCAL_HEADER_LIBRARIES += generated_kernel_headers
endif
# Some qcom binaries use this weird -isystem include...
ifneq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include,$(LOCAL_CFLAGS)))
LOCAL_CFLAGS := $(patsubst -isystem $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include,,$(LOCAL_CFLAGS))
LOCAL_HEADER_LIBRARIES += generated_kernel_headers
endif
# Remove KERNEL_OBJ/usr from any LOCAL_ADDITIONAL_DEPENDENCIES, we will
# just include generated_kernel_headers which already has the proper
# dependency
ifneq (,$(findstring $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr,$(LOCAL_ADDITIONAL_DEPENDENCIES)))
LOCAL_ADDITIONAL_DEPENDENCIES := $(patsubst $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr,,$(LOCAL_ADDITIONAL_DEPENDENCIES))
endif
# The following LOCAL_ variables will be modified in this file.
# Because the same LOCAL_ variables may be used to define modules for both 1st arch and 2nd arch,
# we can't modify them in place.

View file

@ -550,12 +550,15 @@ endef
# Makes including non-existent modules in PRODUCT_PACKAGES an error.
# $(1): list of non-existent modules to allow.
define enforce-product-packages-exist-internal
$(eval PRODUCTS.$(1).PRODUCT_ENFORCE_PACKAGES_EXIST := true) \
$(eval PRODUCTS.$(1).PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST := $(2)) \
$(eval .KATI_READONLY := PRODUCTS.$(1).PRODUCT_ENFORCE_PACKAGES_EXIST) \
$(eval .KATI_READONLY := PRODUCTS.$(1).PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST)
endef
define enforce-product-packages-exist
$(eval current_mk := $(strip $(word 1,$(_include_stack)))) \
$(eval PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST := true) \
$(eval PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST := $(1)) \
$(eval .KATI_READONLY := PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST) \
$(eval .KATI_READONLY := PRODUCTS.$(current_mk).PRODUCT_ENFORCE_PACKAGES_EXIST_ALLOW_LIST)
$(enforce-product-packages-exist-internal,$(current_mk),$(1))
endef
#

View file

@ -522,6 +522,13 @@ function _lunch_meat()
# Note this is the string "release", not the value of the variable.
export TARGET_BUILD_TYPE=release
local uses_qcom_hardware=$(get_build_var BOARD_USES_QCOM_HARDWARE)
if [ "$uses_qcom_hardware" = true ]; then
export INLINE_KERNEL_BUILDING=true
else
unset INLINE_KERNEL_BUILDING
fi
[[ -n "${ANDROID_QUIET_BUILD:-}" ]] || echo
fixup_common_out_dir

View file

@ -17,7 +17,6 @@
# Base modules and settings for recovery.
PRODUCT_PACKAGES += \
adbd.recovery \
android.hardware.health@2.0-impl-default.recovery \
build_flag_vendor \
cgroups.recovery.json \
charger.recovery \

View file

@ -183,5 +183,3 @@ PRODUCT_SYSTEM_PROPERTIES += \
dalvik.vm.image-dex2oat-Xmx=64m \
dalvik.vm.dex2oat-Xms=64m \
dalvik.vm.dex2oat-Xmx=512m \
PRODUCT_ENABLE_UFFD_GC := default

View file

@ -45,7 +45,6 @@ PRODUCT_PACKAGES += \
CertInstaller \
CredentialManager \
DeviceAsWebcam \
DeviceDiagnostics \
DocumentsUI \
DownloadProviderUi \
EasterEgg \

View file

@ -339,11 +339,15 @@ locate(FileRecord* rec, const vector<string>& search)
}
int err;
string full;
for (vector<string>::const_iterator it=search.begin();
it!=search.end(); it++) {
string full = path_append(*it, rec->sourceName);
struct stat st;
if (rec->sourceName.length() != 0 && rec->sourceName[0] == '/')
full = rec->sourceName;
else
full = path_append(*it, rec->sourceName);
err = stat(full.c_str(), &st);
if (err == 0) {
rec->sourceBase = *it;
@ -356,7 +360,7 @@ locate(FileRecord* rec, const vector<string>& search)
}
fprintf(stderr, "%s:%d: couldn't locate source file: %s\n",
rec->listFile.c_str(), rec->listLine, rec->sourceName.c_str());
rec->listFile.c_str(), rec->listLine, full.c_str());
return 1;
}