Build/make support for "hwaddress".
* HWASan supports static binaries, unlike ASan.
* It will be used to build libc. Since static libraries get a .hwasan
suffix in soong, the logic that moves libc-and-friends to the end
of the link command line has to be updated.
Bug: 112438058
Test: manual, part of a bigger patch set
Change-Id: I3b52336841012622771a88ba161916bc33071dfe
Attempting to reduce the number of different spellings we have for
"product services" partition in the codebase.
Bug: 112431447
Test: m
Change-Id: I6debd3f5f5abc4bd1e22f2ef11c5fe131915976c
Merged-In: I6debd3f5f5abc4bd1e22f2ef11c5fe131915976c
Call the host binary care_map_generator to generate the care_map in
protobuf format. The parsing part of proto messages has already been
supported in the update_verifier.
Bug: 77867897
Test: unittests pass; run add_image_to_target_files
Change-Id: I40d3184b4b5c48a6dd55203afc84cca73d5765e9
Attempting to reduce the number of different spellings we have for
"product-services" in the codebase.
Bug: 112431447
Test: m
Change-Id: Iec531122297cf4b86ff8601732d4ab7ccf5c2183
Test: on internal device that has warnings, test with
BUILD_BROKEN_DUP_COPY_HEADERS true and unset.
Test: build_test on downstream branches
Change-Id: I2cebd99b10f13fb75167dc8370ba762f94c41c2a
This reverts commit 60a47827cb to reland
the change that generates installed-files-recovery.{txt,json}.
This CL addresses the previous issue by explicitly depending on
INSTALLED_BOOTIMAGE_TARGET or INSTALLED_RECOVERYIMAGE_TARGET. This
avoids the race condition between INSTALLED_{BOOT,RECOVERY}IMAGE_TARGET
and INSTALLED_FILES_FILE_RECOVERY. As a result, it will also give a
complete list of files that are installed to recovery ramdisk image.
Bug: 30414428
Test: `m dist` with aosp_taimen-userdebug. Check the generated files of
$OUT/installed-files-recovery.{txt,json}.
Change-Id: I8bde0dafda7d8ed9c4113dc82553c4edc7f79548
This also fixes the emulator build issue with `BOARFD_AVB_ENABLE := true`.
Bug: 78113934
Test: `m dist` with emulator builds.
Test: `m dist` with aosp_taimen-userdebug
Change-Id: I2089e0ab15885b4cfc16d4a7e8be3dd0b60ef46f
The file is optional, and we already ignore the cp result.
cp: cannot stat 'out/target/product/taimen/root/init.recovery.*.rc': No such file or directory
Test: `m -j bootimage` with aosp_taimen-userdebug. No more warning.
Change-Id: I815c6e0ff8d432123066cf4a44a8638dc94c96d5
This adds a new super_empty.img output to the build when
PRODUCT_USE_LOGICAL_PARTITIONS is true and a super partition size is
set. This will be used by fastboot flashall in fastbootd, since it needs
a record of the partition layout in case the super partition is corrupt
or not yet flashed.
The full super.img (which contains embedded partition data) is still
available via "make dist".
Bug: 78793464
Test: super_empty.img generated when PRODUCT_USE_LOGICAL_PARTITIONS is
true
Change-Id: I9f00b07e5b685a3230803fa1a5a569544d0ab625
We're putting more files into recovery image since adding the support
for using shared libraries in recovery. This CL generates the list of
files to help understand the exact files installed there and their
sizes.
Bug: 112494634
Test: `m dist` with aosp_marlin-userdebug. Check the generated file at
out/dist/installed-files-recovery.{txt,json}.
Change-Id: I7a9e05da52f95059a7d7adc85c74e888125ee66e
This was missed by [1], which changed the rules for writing recovery
build prop file.
[1] commit 139c727036
Bug: 110380063
Bug: 112247573
Test: `m bootimage` with aosp_marlin-userdebug. Check the generated
recovery build prop file against the one before [1].
Change-Id: Ib5829b01a63eee8e8a09486dd68063ba297b7443
This reverts commit 132748cb80.
Reason for revert: The e2fsck issue, b/112062612, that caused the
revert of the original CL has been fixed in aosp/725259.
Change-Id: I5c919aedcc5b1c4823f565ea2bbe0e6ea81bc3b0
The add_img_to_target_files.py script uses upper() to determine
the name of sub-directory under target_files_intermediates. The
name of the image is product-services.img but the sub-directory
name was PRODUCT_SERVICES. Change it to PRODUCT-SERVICES so that
'm dist' works.
Test: m dist
Change-Id: I8cad841c674b5d62c1d803d0383fc3aee14f272a
... so that its requirements does not fallback
on the overridden USE_LOGICAL_PARTITIONS, but
PRODUCT_USE_LOGICAL_PARTITIONS.
Test: m superimage -j
Change-Id: Ib14aaf83cc8bd4336125d503d11c69a60566530e
This reverts commit bc0248f211.
Reason for revert: Triggered preexisting issue with e2fsck and ASAN
Bug: 112062612
Change-Id: I7b52fe539252ab1bb7229d32accb7abd6417f470
We used to consume target-specific recovery UI variables at build time,
by passing them as macros, which prevents from building recovery with
Soong. This CL writes these vars as build properties, which can be
queried by recovery at runtime.
With this CL (and the change to recovery), it also allows customizing
these properties at boot time, e.g. by init based on the device SKU.
Bug: 110380063
Test: `m bootimage` with aosp_taimen-userdebug. Check that recovery build
property file ($OUT/recovery/root/prop.default) has
`ro.recovery.ui.margin_height=105`.
Change-Id: I53409593779e604b8d8c727d522d9eb76e14508a
Split the flag into PRODUCT_USE_DYNAMIC_PARTITION_SIZE
and PRODUCT_BUILD_SUPER_PARTITION. More sub-flags can be
added with the same way.
Also change some checks with USE_LOGICAL_PARTITIONS with
the appropriate sub-flags.
This allows easier device bring-up to fulfill the requirements
separately.
This also enables dynamic partition size without logical patition.
Originally, to enable BOARD_*_PARTITION_RESERVED_SIZE must also
enable PRODUCT_USE_LOGICAL_PARTITIONS. The patch fix the rule to
let dynamic partition size is able to be used independently.
Fixes: 111966003
Test: make superimage with PRODUCT_USE_LOGICAL_PARTITIONS
Change-Id: I45b29c87bf94356d8416bbd58a14c8982039c222
This commit changes the delimiters from space characters to newline
characters so that lsdump_paths.txt can be easily read and parsed by
human.
Bug: 111814844
Test: m vndk findlsdumps -j18
Change-Id: I5c50934a0f035244cff71351d9f4be4203222590
... for bootstrapping / initializing the device.
Image is built to $(PRODUCT_OUT)/super.img when running
`m dist`. For A/B devices, the image contains other
partitions in the _a slot.
Change-Id: I1459d62f02b95f142dfb3b7608f88ec6801dbf37
Fixes: 111758129
Test: m superimage -j
After aosp/719235 is merged, mk_qemu_image.sh now accepts
images in both raw and sparse formats. So We can build GSIs
(system images of aosp_$arch products) in sparse format, which,
historically, is expected by users of GSIs.
Bug: 111775319
Test: The system images below are all in sparse format:
$ lunch aosp_x86-userdebug; $m -j; emulator
$ lunch aosp_x86_64-userdebug; $m -j; emulator
$ lunch aosp_arm-userdebug; $m -j; emulator
$ lunch aosp_arm64-userdebug; $m -j; emulator
Change-Id: I4cb8df0908c4618376117249b61c853fac947e47
Make names consistent.
Some things that does not change:
- productservicesimage target and intermediates
Test: build product services image
Bug: 111609632
Change-Id: I4c2b975e194577aad3d51b908b103880625deb5e
This will add ro.vendor.build.security_patch to /vendor/build.prop on
device
Bug: 76428542
Test: ro.vendor.build.security_patch entry shows up under
/vendor/build.prop
Change-Id: I3d3ec2d0e76fc5e62cd283ed4bce3894423cabdd
Merged-In: I4f783e996cb425a49c2b12ae4f364e12c6ca7784
(cherry picked from 56d444b98f)
metalava-api-stubs-docs_annotations.zip needs to be added as part of
sdk.atree dependencies.
Bug: b/78245848
Test: make -j80 PRODUCT-sdk_x86-sdk sdk_repo; and check ninja file.
Change-Id: I6be5d59c6f91a519f8d16ff273daa35c349d18aa
The original code doesn't use the size of images that
is calculated at build time, but instead use BOARD_*IMAGE_PARTITION_SIZE
variables. Update the logic to use the actual size of the images at
build time.
Test: builds with a device defining the value and
BOARD_SUPER_PARTITION_PARTITION_LIST := system vendor product productservices
Bug: 79106666
Change-Id: I07b3ee466482bd8f5cf709e13e16a7f187099aaf
This property indicates the path to the root directory (i.e.
TARGET_ROOT_OUT at build time, or ROOT/ in a target_files.zip).
build_image.py will only use this property when building a target using
system_root_image. Under such a configuration, files under this dir
never land into a ramdisk, but as part of system.img. This CL renames
the property name to avoid confusion.
Note that with this change releasetools keeps working with older
target_files zips that contain 'ramdisk_dir'. Because common.py doesn't
read the value of that property, but sets it to ROOT/ directly.
Test: `m dist` on aosp_marlin-userdebug.
Test: `m dist` on aosp_angler-userdebug.
Test: Run add_img_to_target_files.py with a new target_files.zip and an
old target_files.zip respectively.
Change-Id: Ie9e19dd17d8c2abb4c4a97449e436774d5dd2a36
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432
It adds the following variables:
- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*
Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.
Leave the declaration in Makefile for now.
Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
Merged-In: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
Prior to this change the product-installed-files macro didn't include
PRODUCT_COPY_FILES, which is a problem for the artifact path
enforcements. Fix this by moving the dep on PCF into main.mk.
Leave the declaration in Makefile for now.
Test: diff modules_to_install before and after
Bug: 80410283
Change-Id: Ie7ecd5a963aedd2c573f4fe46d327829908aec03
When using BOARD_BUILD_SYSTEM_ROOT_IMAGE, there is no direct dependency
on the files that get typically added to the ramdisk.img apart from the
NOTICE.html dependency that some files have. This change explicitly adds
the ramdisk/root files as a dependencies of system.img so that the image
is recreated any time a file in the ramdisk changes. It also creates the
installed-files-root.txt file.
Bug: 62387674
Test: /init.rc is present in system.img's dependencies
Change-Id: I234cb8d8a648f8963610be519de1b70b7efe1fd7
Test: `make vendorimage`
Test: `make vendorimage` with the following:
- install a large file to vendor image
fails as expected (because _PARTITION_SIZE is exceeded)
Test: `make vendorimage` with the following:
- set PRODUCT_USE_LOGICAL_PARTITIONS to true
- set BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
fails as expected (BOARD_VENDORIMAGE_PARTITION_SIZE needs
to be undefined)
Test: `make vendorimage` with the following:
- install a large file to vendor image
- set PRODUCT_USE_LOGICAL_PARTIIONS to true
- add a small BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
- remove BOARD_VENDORIMAGE_PARTITION_SIZE
build succeeds.
Bug: 79106666
Change-Id: Ica8fdce64e8f37d91e66e3d49c0c74fadd15a832
- Copy "use_logical_partitions" to *_image_info.txt before sending
it to build_image.py, so that the script can use this variable.
- build_image.py emits an additional properties file to inform
the build system about the system image size.
Test: `make systemimage`
Test: `make systemimage` with the following:
- install a large file to system image
fails as expected (because _PARTITION_SIZE is exceeded)
Test: `make systemimage` with the following:
- set PRODUCT_USE_LOGICAL_PARTITIONS to true
- set BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
fails as expected (BOARD_SYSTEMIMAGE_PARTITION_SIZE needs
to be undefined)
Test: `make systemimage` with the following:
- install a large file to system image
- set PRODUCT_USE_LOGICAL_PARTIIONS to true
- add a small BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
- remove BOARD_SYSTEMIMAGE_PARTITION_SIZE
build succeeds.
Test: same for systemotherimage
Bug: 79106666
Change-Id: I574062882acd1ecd633ac38c5a8c5351b90a32d8
Relanding with change to not run on the darwin build since host init
verifier is not possible there.
Bug: 36970783
Bug: 110477913
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
PRODUCT_COPY_FILES, or TARGET_PREBUILT
Change-Id: Iae93705a9320159ed97328e615eaa3bc150e6442