The gcc tools are deprecated; replace with the llvm equivalent.
Bug: 158484106
Merged-In: I9c3717bde281667eec82cc21dc63dc7fd5592a46
Change-Id: I9c3717bde281667eec82cc21dc63dc7fd5592a46
The extension for the generated vendor ramdisk should be updated based
on the compression scheme used.
Bug: 158433703
Change-Id: I25fff0b8a7879f6aa6d6fe2fce9f5a53f90eb636
system_other is relevant partition to system over vendor.
so move notice files from system_other from vendor to system
Bug: 159189171
Test: m nothing && check ninja dependency
Change-Id: Ib69bd3faae03f174671d5db8366a59b7d28a9d9d
Multiple boot images can be generated based on BOARD_KERNEL_BINARIES
but vbmeta would capture the image descriptor of only the first boot
image specified in BUILT_BOOTIMAGE_TARGET.
Bug : 158213759
Test: Compile multiple boot images and check if vbmeta.img
includes image descriptor of only the first boot image
specified in BUILT_BOOTIMAGE_TARGET
Change-Id: Ib70f65d98546a436da82656bc5c911d437618bb5
Merged-In: Ib70f65d98546a436da82656bc5c911d437618bb5
Instead of copying the logic (which led to divergences), use the
same list of dependencies for both users of build-recoveryimage-target
Bug: 158774198
Test: treehugger
Test: build-coral.ninja is the same before/after
Change-Id: I8f8c006432f3b8120df1f39c98009155fdff32ad
Merged-In: I8f8c006432f3b8120df1f39c98009155fdff32ad
(cherry picked from commit d120ac68fa)
Instead of copying the logic (which led to divergences), use the
same list of dependencies for both users of build-recoveryimage-target
Change-Id: I8f8c006432f3b8120df1f39c98009155fdff32ad
Test: treehugger
The core android build platform has changed to add support for LZ4
compression for ramdisks, but the release tools were not. Fix this.
Bug: 156129966
Merged-In: I39680b91930d2d3cbd0cd565beb78e1ee699397e
Change-Id: I39680b91930d2d3cbd0cd565beb78e1ee699397e
Setting this flag enables unbundled building, i.e. without support for
building the system image and other platform targets. This
functionality was previously enabled by TARGET_BUILD_APPS, and setting
that still implies TARGET_BUILD_UNBUNDLED.
This helps unbundled builds that aren't apps, e.g. ART runtest builds.
Specifically, with the topic of the child CL
https://r.android.com/1324517 TARGET_BUILD_UNBUNDLED does not imply
disabling dexpreopting, unlike TARGET_BUILD_APPS.
TODO: There may still be app-specific conditions that are incorrectly
controlled by TARGET_BUILD_UNBUNDLED, in particular on the Soong side
through config.UnbundledBuild().
Test: Flash & boot
Test: TH, in particular builds green on ub-launcher3-master
Bug: 157549171
Change-Id: Ic09fc879117ee06cab5444edfc280ed2b52d2870
The core android build platform has changed to add support for LZ4
compression for ramdisks, but the release tools were not. Fix this.
Bug: 156129966
Change-Id: I39680b91930d2d3cbd0cd565beb78e1ee699397e
Multiple boot images can be generated based on BOARD_KERNEL_BINARIES
but vbmeta would capture the image descriptor of only the first boot
image specified in BUILT_BOOTIMAGE_TARGET.
Bug : 158213759
Test: Compile multiple boot images and check if vbmeta.img
includes image descriptor of only the first boot image
specified in BUILT_BOOTIMAGE_TARGET
Change-Id: Ib70f65d98546a436da82656bc5c911d437618bb5
Like other <partition>/build.prop files, the build rule for
system/build.prop is also created using the build-properties macro.
system/build.prop has a few number of auto-generate properties that the
macro doesn't create. Those properties are emitted to intermediate files
using manually crafted rules, the paths to the files are fed to the
macro, where their contents are copied to system/build.prop.
This change also refactors the code fragment that defines BUILD_*
variables that identifes the given build.
Bug: 117892318
Test: m
Change-Id: Ic218283b40fedeaddacb3fda93167edbec86094c
When kernel modules are being put directly into lib/modules/ (as opposed
to lib/modules/<subdir>/), the empty part of the destination path causes
a target containing a redundant /. If the target is also added elsewhere
in the build without the redundant /, then rule merging will miss it,
and a build error will occur.
Bug: 158158635
Change-Id: I797addce760f4886166efa283302a53783581625
Merged-In: I797addce760f4886166efa283302a53783581625
When kernel modules are being put directly into lib/modules/ (as opposed
to lib/modules/<subdir>/), the empty part of the destination path causes
a target containing a redundant /. If the target is also added elsewhere
in the build without the redundant /, then rule merging will miss it,
and a build error will occur.
Bug: 158158635
Change-Id: I797addce760f4886166efa283302a53783581625
Modify add_img_to_target_files.py to use the BUILDING_*_IMAGE flags when
deciding whether to create and add a given image to a target files
archive.
To do this, the BUILDING_*_IMAGE flags are now dumped to misc_info.txt.
The origin of this change was to use the BUILDING_USERDATA_IMAGE and
BUILDING_CACHE_IMAGE flags in add_img_to_target_files.py so that we
could reliably turn off the generation of the userdata and cache images.
The other image flags were added for symmetry.
Bug: 130307439
Test: m -j out/target/product/bonito/misc_info.txt
Test: m -j droid dist
Change-Id: I32d5a8d6c9ebb5f329d856030084d698ee8d271d
allow to also skip the stripping of the modules present in vendor
ramdisk when the BOARD configuration is set to skip the strip step.
there is also a shortcoming of this functionality: it currently assumes
the modules to strip are all created equal against the same arch in
particular, however this does not work for kernel modules which are
for mixed mode platforms, as example {kernel,android} == {aarch64,armv7}
because it will select the "android" mode strip which is unaware of the
kernel mode architecture.
Bug: 156395749
Bug: 155193290
Change-Id: I35ef51845224e94e3e253acdeb6bb14b990a401b
allow to also skip the stripping of the modules present in vendor
ramdisk when the BOARD configuration is set to skip the strip step.
there is also a shortcoming of this functionality: it currently assumes
the modules to strip are all created equal against the same arch in
particular, however this does not work for kernel modules which are
for mixed mode platforms, as example {kernel,android} == {aarch64,armv7}
because it will select the "android" mode strip which is unaware of the
kernel mode architecture.
Bug: 156395749
Bug: 155193290
Change-Id: I35ef51845224e94e3e253acdeb6bb14b990a401b
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
Refactor the build support for kernel modules. This refactoring is
leveraged to add support for directories of kernel modules in each
partition. To add a directory of kernel modules, define
BOARD_KERNEL_MODULE_DIRS to include the directory name, for example:
BOARD_KERNEL_MODULE_DIRS := 5.4
The build will then check all the usual kernel module related macros
with an extension of _5.4, for example you can define
BOARD_VENDOR_KERNEL_MODULES_5.4 := <modules to copy>
BOARD_VENDOR_KERNEL_MODULES_ARCHIVE_5.4 = <path to archive file>
BOARD_VENDOR_KERNEL_MODULES_LOAD_5.4 := <modules for load list>
Bug: 157645635
Change-Id: I1687d0ec85c1dcf21350350623b4689aba3f6717
Merged-In: I1687d0ec85c1dcf21350350623b4689aba3f6717
Moving this makes each of the partition's kernel module Makefile
generation more similar, enabling a forthcoming cleanup/refactoring.
If recovery-is-boot and there are kernel modules defined in
BOARD_GENERIC_RAMDISK_KERNEL_MODULES, those kernel modules will
now be included in the default assignment to
BOARD_RECOVERY_KERNEL_MODULES_LOAD. If this is not desired then
BOARD_RECOVERY_KERNEL_MODULES_LOAD may simply be set to
BOARD_RECOVERY_KERNEL_MODULES (or a custom list of recovery kernel
modules to load).
Bug: 157645635
Change-Id: Ia1392b7d20d07cee75420edd95dcee1dc825516e
Merged-In: Ia1392b7d20d07cee75420edd95dcee1dc825516e
Currently the two special-case calls to create just a module load list
(as opposed to copying a set of modules and creating a module load list)
are inside checks that the related board macro for the module set is not
empty.
While it would be incorrect to create a non-empty module load list with
an empty set of modules, this error would quickly surface at runtime.
More importantly, moving these out will permit refactoring this code to
clean it up.
Bug: 157645635
Change-Id: I199788d49072d4c59737b3ef2c75546852cf3e36
Merged-In: I199788d49072d4c59737b3ef2c75546852cf3e36
This check is meant to initialize BOARD_ODM_KERNEL_MODULES_LOAD to
BOARD_ODM_KERNEL_MODULES if BOARD_ODM_KERNEL_MODULES_LOAD is empty.
Bug: 157645635
Change-Id: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
Merged-In: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
Refactor the build support for kernel modules. This refactoring is
leveraged to add support for directories of kernel modules in each
partition. To add a directory of kernel modules, define
BOARD_KERNEL_MODULE_DIRS to include the directory name, for example:
BOARD_KERNEL_MODULE_DIRS := 5.4
The build will then check all the usual kernel module related macros
with an extension of _5.4, for example you can define
BOARD_VENDOR_KERNEL_MODULES_5.4 := <modules to copy>
BOARD_VENDOR_KERNEL_MODULES_ARCHIVE_5.4 = <path to archive file>
BOARD_VENDOR_KERNEL_MODULES_LOAD_5.4 := <modules for load list>
Bug: 157645635
Change-Id: I1687d0ec85c1dcf21350350623b4689aba3f6717
Moving this makes each of the partition's kernel module Makefile
generation more similar, enabling a forthcoming cleanup/refactoring.
If recovery-is-boot and there are kernel modules defined in
BOARD_GENERIC_RAMDISK_KERNEL_MODULES, those kernel modules will
now be included in the default assignment to
BOARD_RECOVERY_KERNEL_MODULES_LOAD. If this is not desired then
BOARD_RECOVERY_KERNEL_MODULES_LOAD may simply be set to
BOARD_RECOVERY_KERNEL_MODULES (or a custom list of recovery kernel
modules to load).
Bug: 157645635
Change-Id: Ia1392b7d20d07cee75420edd95dcee1dc825516e
Currently the two special-case calls to create just a module load list
(as opposed to copying a set of modules and creating a module load list)
are inside checks that the related board macro for the module set is not
empty.
While it would be incorrect to create a non-empty module load list with
an empty set of modules, this error would quickly surface at runtime.
More importantly, moving these out will permit refactoring this code to
clean it up.
Bug: 157645635
Change-Id: I199788d49072d4c59737b3ef2c75546852cf3e36
This check is meant to initialize BOARD_ODM_KERNEL_MODULES_LOAD to
BOARD_ODM_KERNEL_MODULES if BOARD_ODM_KERNEL_MODULES_LOAD is empty.
Bug: 157645635
Change-Id: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
Ramdisks are currently compressed using gzip, which is generally
smaller, but slower to decompress than lz4. Provide an option for an
lz4 scheme to reduce the time taken to unpack initramfs during boot.
Bug: 156129966
Signed-off-by: J. Avila <elavila@google.com>
Merged-In: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
Change-Id: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
The module-load-list-copy-paths fn takes five parameters.
Merged-In: I7d1736da1599e265793173a741053d8a09f1622f
Change-Id: I9286c9e4ca81caf5392bc804dead718bd028b193
The size of the ramdisk has greatly increased, which can be a source of
boot time regressions. Strip the modules of debug symbols for the vendor
ramdisk and vendor partitions; vendor stripping can be skipped via BOARD
config.
Bug: 156395749
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: I7d1736da1599e265793173a741053d8a09f1622f
First, make it safer for incremental builds. We used to just be
depending on the bootable/recovery/tools/recovery_l10n/res dir as a
dependency, but that would only trigger a rebuild if a direct child
file/directory was added or removed (so essentially, when a translation
was addded or removed). If a translation was updated, it wouldn't
re-trigger recovery_text_res.
So instead of depending on the directory, depend on the results from
running `find` to list all of the contents in that directory.
Next, move it out of PACKAGING. `m installclean`, which runs in between
incremental builds on our build servers, deletes the obj/PACKAGING
directory. So when recovery_text_res used that directory, we were having
to rebuild it on every incremental build, which isn't optimal when it
takes nearly 90s to build.
So with:
$ lunch aosp_coral-eng
$ m bootimage
$ m installclean
$ m bootimage
The second `m bootimage` went from executing 666 actions in 93s to
executing 658 actions in 6s.
Finally, remove the last uses of $(call include-path-for,recovery),
since they were all in this file (and they weren't using it for include
paths...). We'd like to remove all of these and switch them to header
libraries or other use cases, but in this case, it's just shorter to use
the real path.
Test: treehugger
Test: m bootimage;
touch bootable/recovery/tools/recovery_l10n/res/values/strings.xml
m bootimage
Test: m bootimage; m installclean; m bootimage
Change-Id: I005592e49443aab45ed039a2f0c63f7a69035565
Ramdisks are currently compressed using gzip, which is generally
smaller, but slower to decompress than lz4. Provide an option for an
lz4 scheme to reduce the time taken to unpack initramfs during boot.
Bug: 156129966
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
If the BoardConfig defined BOARD_VENDOR_RAMDISK_MODULES_LOAD and
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD, generate both a
modules.load and modules.load.recovery respectively on the vendor
ramdisk. BOARD_VENDOR_RAMDISK_MODULES must be the set, or super set,
of all the modules represented in both of *_LOAD BOARD variables.
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: build, confirm, fastboot flashall, boot with split.
Merged-In: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
Change-Id: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
The size of the ramdisk has greatly increased, which can be a source of
boot time regressions. Strip the modules of debug symbols for the vendor
ramdisk and vendor partitions; vendor stripping can be skipped via BOARD
config.
Bug: 156395749
Signed-off-by: J. Avila <elavila@google.com>
Merged-In: I248d4e2097992f00975b344b5da41aa5d8016812
Change-Id: I248d4e2097992f00975b344b5da41aa5d8016812
The size of the ramdisk has greatly increased, which can be a source of
boot time regressions. Strip the modules of debug symbols for the vendor
ramdisk and vendor partitions; vendor stripping can be skipped via BOARD
config.
Bug: 156395749
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: I248d4e2097992f00975b344b5da41aa5d8016812
GSI do not build product partition, and contains the product
contents under /system/product/. Original logic do not generate
the product build props on this case.
The patch fixes the logic for product build props generation to
align the other partitions.
Bug: 157191627
Test: build aosp_arm64-userdebug
Test: check /system/product/build.prop in out folder
Change-Id: I350bbf8c024f747c86c6c54065d690f6b46f30c6
Merged-In: Ia88c8efecb18db9c27baa466e492bfd898b581d3
The custom images are any images owned by OEMs and SoCs, oem images
mounted on /oem is an example. The oem images can be used to customize
devices for different carriers, like wallpaper, ringtones, and
carrier-specific apks. OEMs can generate multiple oem images, like
oem.img, oem-carrier1.img and oem-carrier2.img and flash different oem
images for different carriers. The oem images are only one case, OEMs
and SoCs can add more custom images and mount them to custom partitions.
This change enables custom images to be vbmeta.img chained partitions.
The following configuration in BoardConfig.mk is an exmaple. It has two
custom partitions: oem and test. They will be signed by different keys.
And they will be chained by vbmeta.img. The custom images here are
prebuilts, which can be built by `make custom_images` separately.
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST should include all custom images
to apply AVB signing. And to every custom partition, one image whose
name is partition name must be added in its
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST.
BOARD_CUSTOMIMAGES_PARTITION_LIST := oem test
BOARD_AVB_OEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_OEM_ALGORITHM := SHA256_RSA4096
BOARD_AVB_OEM_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_OEM_ROLLBACK_INDEX_LOCATION := 1
BOARD_AVB_OEM_PARTITION_SIZE := 5242880
BOARD_AVB_OEM_IMAGE_LIST := \
device/xxxx/yyyy/oem/oem.img \
device/xxxx/yyyy/oem/oem1.img
BOARD_AVB_TEST_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_TEST_ALGORITHM := SHA256_RSA2048
BOARD_AVB_TEST_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_TEST_ROLLBACK_INDEX_LOCATION := 2
BOARD_AVB_TEST_PARTITION_SIZE := 10485760
BOARD_AVB_TEST_IMAGE_LIST := \
device/xxxx/yyyy/test/test.img \
device/xxxx/yyyy/test/test1.img
To resign the custom images in the target zip file, the
avb_extra_custom_image_key, avb_extra_custom_image_algorithms and
avb_extra_custom_image_extra_args options are added to the
sign_target_files_apks tool too. The following test cases list some
examples about how to use them.
BUG: 154171021
Test: 1) "atest --host releasetools_test releasetools_py3_test -c"
2) Build images by 'make dist', sign and validate target files.
a) Test on dist w/ chained vbmeta_system and ome custom images
sign_target_files_apks -d certs \
--avb_extra_custom_image_key oem=oem_rsa4096.pem \
--avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
xxx-target_xxx.zip signed.zip
validate_target_files.py signed.zip
Flash image and boot up.
Verify the oem images and vbmeta images in OUT and target zips by
avbtool.
b) Test on dist w/ chained vbmeta_system and oem and test custom images
sign_target_files_apks -d certs \
--avb_extra_custom_image_key oem=oem_rsa4096.pem \
--avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
--avb_extra_custom_image_extra_args oem=--do_not_generate_fec \
--avb_extra_custom_image_key test=test_rsa4096.pem \
--avb_extra_custom_image_algorithm test=SHA256_RSA4096 \
xxx-target_xxx.zip signed.zip
validate_target_files.py signed.zip
Verify the oem, test images and vbmeta images in OUT and target zips
by avbtool.
c) Test on dist w/o chained partition.
sign_target_files_apks -d certs xxx-target_xxx.zip signed.zip
validate_target_files.py signed.zip
Flash image and boot up.
Verify the vbmeta images in OUT and target zips by avbtool.
Change-Id: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
Merged-In: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
If the BoardConfig defined BOARD_VENDOR_RAMDISK_MODULES_LOAD and
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD, generate both a
modules.load and modules.load.recovery respectively on the vendor
ramdisk. BOARD_VENDOR_RAMDISK_MODULES must be the set, or super set,
of all the modules represented in both of *_LOAD BOARD variables.
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: build, confirm, fastboot flashall, boot with split.
Change-Id: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
The custom images are any images owned by OEMs and SoCs, oem images
mounted on /oem is an example. The oem images can be used to customize
devices for different carriers, like wallpaper, ringtones, and
carrier-specific apks. OEMs can generate multiple oem images, like
oem.img, oem-carrier1.img and oem-carrier2.img and flash different oem
images for different carriers. The oem images are only one case, OEMs
and SoCs can add more custom images and mount them to custom partitions.
This change enables custom images to be vbmeta.img chained partitions.
The following configuration in BoardConfig.mk is an exmaple. It has two
custom partitions: oem and test. They will be signed by different keys.
And they will be chained by vbmeta.img. The custom images here are
prebuilts, which can be built by `make custom_images` separately.
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST should include all custom images
to apply AVB signing. And to every custom partition, one image whose
name is partition name must be added in its
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST.
BOARD_CUSTOMIMAGES_PARTITION_LIST := oem test
BOARD_AVB_OEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_OEM_ALGORITHM := SHA256_RSA4096
BOARD_AVB_OEM_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_OEM_ROLLBACK_INDEX_LOCATION := 1
BOARD_AVB_OEM_PARTITION_SIZE := 5242880
BOARD_AVB_OEM_IMAGE_LIST := \
device/xxxx/yyyy/oem/oem.img \
device/xxxx/yyyy/oem/oem1.img
BOARD_AVB_TEST_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_TEST_ALGORITHM := SHA256_RSA2048
BOARD_AVB_TEST_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_TEST_ROLLBACK_INDEX_LOCATION := 2
BOARD_AVB_TEST_PARTITION_SIZE := 10485760
BOARD_AVB_TEST_IMAGE_LIST := \
device/xxxx/yyyy/test/test.img \
device/xxxx/yyyy/test/test1.img
To resign the custom images in the target zip file, the
avb_extra_custom_image_key, avb_extra_custom_image_algorithms and
avb_extra_custom_image_extra_args options are added to the
sign_target_files_apks tool too. The following test cases list some
examples about how to use them.
BUG: 154171021
Test: 1) "atest --host releasetools_test releasetools_py3_test -c"
2) Build images by 'make dist', sign and validate target files.
a) Test on dist w/ chained vbmeta_system and ome custom images
sign_target_files_apks -d certs \
--avb_extra_custom_image_key oem=oem_rsa4096.pem \
--avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
xxx-target_xxx.zip signed.zip
validate_target_files.py signed.zip
Flash image and boot up.
Verify the oem images and vbmeta images in OUT and target zips by
avbtool.
b) Test on dist w/ chained vbmeta_system and oem and test custom images
sign_target_files_apks -d certs \
--avb_extra_custom_image_key oem=oem_rsa4096.pem \
--avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
--avb_extra_custom_image_extra_args oem=--do_not_generate_fec \
--avb_extra_custom_image_key test=test_rsa4096.pem \
--avb_extra_custom_image_algorithm test=SHA256_RSA4096 \
xxx-target_xxx.zip signed.zip
validate_target_files.py signed.zip
Verify the oem, test images and vbmeta images in OUT and target zips
by avbtool.
c) Test on dist w/o chained partition.
sign_target_files_apks -d certs xxx-target_xxx.zip signed.zip
validate_target_files.py signed.zip
Flash image and boot up.
Verify the vbmeta images in OUT and target zips by avbtool.
Change-Id: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
Force generate a non-A/B update package when requested.
Bug: 154344887
Test: ota_from_target_files.py --force_non_ab ...
Test: apply it as well
Change-Id: I5e81eb161722e07ef50081b6a16685cbc9963ae2
(cherry picked from commit 7169f754cc)
Merged-In: I5e81eb161722e07ef50081b6a16685cbc9963ae2
The different boot images in aosp_arm64 have different partition size
requirements. Add support for defining a partition size associated with
each boot image variant.
This support is limited to aosp_arm64 currently, which is built with
recovery-as-boot.
A previous version of this change did not update the boot-debug image
AVB logic with the required macro for multiple boot partition size
support. This is now required because the aosp-arm64 boot.img is
configured as a chained AVB partition.
Bug: 156036850
Bug: 155049180
Change-Id: I66b57de91042bfd56ba54a3659843d8cf7873955
Merged-In: I66b57de91042bfd56ba54a3659843d8cf7873955
There is no change in functionality. This change just changes the
location of the code.
Bug: 117892318
Test: m
Change-Id: I0935f611069aeae867edefe8ca61bddb2aae4c78
This is a partial cherry-pick of Iaeefb35137de01c6ea57115d8830dd9bc30eccba
to prevent merge conflicts that are expected with the upcoming major
refactoring around sysprops.
The addition of the variable here doesn't cause any side effect because
it is simply ignored by the buildinfo.sh tool.
Bug: 117892318
Test: m
Change-Id: Ia805cb47ae07c40e91ede16bb6e5c4291de619b4
Merged-In: Iaeefb35137de01c6ea57115d8830dd9bc30eccba
The different boot images in aosp_arm64 have different partition size
requirements. Add support for defining a partition size associated with
each boot image variant.
This support is limited to aosp_arm64 currently, which is built with
recovery-as-boot.
A previous version of this change did not update the boot-debug image
AVB logic with the required macro for multiple boot partition size
support. This is now required because the aosp-arm64 boot.img is
configured as a chained AVB partition.
Bug: 156036850
Bug: 155049180
Change-Id: I66b57de91042bfd56ba54a3659843d8cf7873955
It was kept for non-Treble devices, but now /system/build.prop is used
instead by having both system-configured sysprops and vendor-configured
sysprops. To summarize:
* For Treble compliant devices
- /system/build.prop has
ADDITIONAL_DEFAULT_PROPERTIES
PRODUCT_SYSTEM_DEFAULT_PROPERTIES
props generated from buildinfo_common.sh
props generated from buildinfo.sh
props read from TARGET_SYSTEM_PROP file
ADDITIONAL_BUILD_PROPERTIES
- /vendor/build.prop has
PRODUCT_DEFAULT_PROPERTY_OVERRIDES
props generated from buildinfo_common.sh
props read from TARGET_VENDOR_PROP
PRODUCT_PROPERTY_OVERRIDES
* For non-Treble devices,
PRODUCT_DEFAULT_PROPERTY_OVERRIDES moves from /vendor/build.prop to
/system/build.prop (just after PRODUCT_SYSTEM_DEFAULT_PROPERTIES).
Other props in /vendor/build.prop remain there but they are not used
because it's a symlink for /system/vendor/build.prop and init does not
follow symlink. Especially, PRODUCT_PROPERTY_OVERRIDES is ignored.
Someone might think this as a bug, which actually is, but this change
doesn't attempt to fix that, because 1) that's out of scope of this
change, and 2) we will anyway merge PRODUCT_PROPERTY_OVERRIDES and
PRODUCT_DEFAULT_PROPERTY_OVERRIDES into one.
Bug: 117892318
Test: TH passes
Change-Id: I867f3615ef8c06650ab2ee96642bac4f6d8ca820
Contents that were in /system/etc/prop.default are now in
/system/build.prop.
The content is placed at the top of build.prop to keep the existing
order between the two files.
Caveat: /prop.default still remains for non-Treble devices.
Bug: 117892318
Test: TH passes
Test: inspect /system/build.prop and check if it has contents from
the old /system/etc/prop.default file
Change-Id: Ibc74edb88904f953a1e5e6ceef44c461f381c9cf
Contents that were in /vendor/default.prop are now in /vendor/build.prop
The content is placed at the top of build.prop to keep the existing
order between default.prop and builld.prop.
Bug: 117892318
Test: TH passes
Test: inspect /vendor/build.prop and check if it has contents from
the old /vendor/default.prop file
Change-Id: Ifa1f1dca3b4f4a5fa87d26b8ee058ee706dc54bb
Enables signing for them so we can verify that the boot partition
contains a valid generic boot image during the compliance test.
This change also adds the chained partition descriptor of
boot partition into vbmeta.img, which contains the corresponding
public key used to verify the boot partition.
Bug: 151094943
Test: lunch aosp_arm64-user, `make` and use `avbtool info_image`
to check that GKI images are properly signed.
Test: `make dist` and checks that GKI images in the image zip file
are properly signed.
Change-Id: I2fd69964f9dc62526a813875fa9193913aa4935b
Merged-In: I2fd69964f9dc62526a813875fa9193913aa4935b
(cherry picked from commit 0f95ac7e8c)
PRODUCT_PACKAGES contains "simple module name" and "bitness suffix".
Call `resolve-bitness-for-modules` to resolve module bitness before
using PRODUCT_PACKAGES.
Bug: 155869107
Test: TH presubmit build_test
Test: check the value of event_log_tags_src
Change-Id: I95fcd833990b3401892c2f7859c83acd90f9e920
The different boot images in aosp_arm64 have different partition size
requirements. Add support for defining a partition size associated with
each boot image variant.
This support is limited to aosp_arm64 currently, which is built with
recovery-as-boot.
Bug: 156036850
Bug: 155049180
Change-Id: I73b70a4d52c2662c3015899632bb8a2b424108d5
'os_version' and 'os_patch_level' are not defined in vendor boot image header,
so remove INTERNAL_MKBOOTIMG_VERSION_ARGS to avoid confusion
Test: lunch aosp_cf_x86_64_phone-userdebug; m vendorbootimage
Change-Id: I19c82846c9669bbd5475605e8b2457744040390d
Enables signing for them so we can verify that the boot partition
contains a valid generic boot image during the compliance test.
This change also adds the chained partition descriptor of
boot partition into vbmeta.img, which contains the corresponding
public key used to verify the boot partition.
Bug: 151094943
Test: lunch aosp_arm64-user, `make` and use `avbtool info_image`
to check that GKI images are properly signed.
Test: `make dist` and checks that GKI images in the image zip file
are properly signed.
Change-Id: I2fd69964f9dc62526a813875fa9193913aa4935b
Force generate a non-A/B update package when requested.
Bug: 154344887
Test: ota_from_target_files.py --force_non_ab ...
Test: apply it as well
Change-Id: I5e81eb161722e07ef50081b6a16685cbc9963ae2
_apkcerts_write_line has assumed that the stem name of a package is the
same as the module of it. That assumption however breaks for
APK-in-APEX, in which case the stem name is Foo while the module name is
Foo.com.android.bar (where com.android.bar is the name of the APEX where
the APK is in).
Fixing the issue by recording the stem name and use it.
Bug: 155440232
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m apkcerts-list
and check the generat4ed apkcerts txt file to see that it has
Tethering.apk instead of Tethering.com.android.tethering.apex
Exempt-From-Owner-Approval: cherry-pick from AOSP
Merged-In: I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
(cherry picked from commit f58fd52b14)
Change-Id: I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
BUG: 149826779
Test: Build x86, x86_64, armv7 and arm64
make sure x86/64 boot to home screen;
armv7/arm64 can pass disk mounting stage
Change-Id: I258b69bd0cdc4fb0a99b1a04567051e8d32c389a
Merged-In: I258b69bd0cdc4fb0a99b1a04567051e8d32c389a
_apkcerts_write_line has assumed that the stem name of a package is the
same as the module of it. That assumption however breaks for
APK-in-APEX, in which case the stem name is Foo while the module name is
Foo.com.android.bar (where com.android.bar is the name of the APEX where
the APK is in).
Fixing the issue by recording the stem name and use it.
Bug: 155440232
Test: OVERRIDE_TARGET_FLATTEN_APEX=true m apkcerts-list
and check the generat4ed apkcerts txt file to see that it has
Tethering.apk instead of Tethering.com.android.tethering.apex
Change-Id: I56bc55e2231eb946617a9d6f97d55c9b61f3bff7
RECOVERY_FROM_BOOT_PATCH has been moved to vendor as per b/68319577. Hence,
the reserved size should be moved from system to vendor as well.
Bug: 68319577
Bug: 153581609
Test: m target-files-package for non-A/B devices
Change-Id: I2fd3fea10ec6dd06f19c5be753d63ddff1ec01f7
(cherry picked from commit 9a3cad95a9)
Merged-In: I2fd3fea10ec6dd06f19c5be753d63ddff1ec01f7
RECOVERY_FROM_BOOT_PATCH has been moved to vendor as per b/68319577. Hence,
the reserved size should be moved from system to vendor as well.
Bug: 68319577
Bug: 153581609
Test: m target-files-package for non-A/B devices
Change-Id: I2fd3fea10ec6dd06f19c5be753d63ddff1ec01f7
There were still two places where we weren't using it. There may be
more, but these are the ones that come up with aosp_cf_x86_phone.
Test: m out/target/product/vsoc_x86/root/default.prop
Test: m out/target/product/vsoc_x86/obj/NOTICE_VENDOR.txt
Change-Id: I17671ca2ed60332aed2bf76aa00e42a92661b58a
* changes:
generate multiple boot.img files in aosp_arm64
create emulator_arm64 device for sdk_phone_arm64 to use
support multiple boot.img files in release tools
multi boot.img support cleanups
Generate boot.img variants with different schemes for kernel compression
(gzip, lz4, none).
The boot image is removed from vbmeta for aosp_arm64 since it is
not possible currently to store the hashes of multiple variants of a
particular image. The GKI will be verified via VTS anyway.
Also remove some emulator-specific stuff from aosp_arm64.
Bug: 151094943
Change-Id: I465ea6c98d52e839284d51b246203f6b8dfb5566
Merged-In: I465ea6c98d52e839284d51b246203f6b8dfb5566
Support for generating multiple boot.img files is required in the
release tools to enable GKI distribution/signing.
Bug: 151094943
Change-Id: I536a286d3123f35918106a52c49b1148d746370f
Merged-In: I536a286d3123f35918106a52c49b1148d746370f
The kernel should not be specified in INTERNAL_RECOVERYIMAGE_ARGS, since
it is already given to mkbootimg directly.
The MKBOOTIMG_KERNEL_ARG macro is unused.
Bug: 151094943
Change-Id: Ie16a7bf7d77c0436d933abbb02c6dcb9202d5fe7
Merged-In: Ie16a7bf7d77c0436d933abbb02c6dcb9202d5fe7
This tool must match the one used to compile the source code for
compatibility.
Bug: 143977934
Test: m CLANG_COVERAGE=true dist
Merged-In: I71e0e7afb05dedd5f6a09d5e4099387c6262387f
Change-Id: I71e0e7afb05dedd5f6a09d5e4099387c6262387f
(cherry picked from commit b02f7dbaa4)
Generate boot.img variants with different schemes for kernel compression
(gzip, lz4, none).
The boot image is removed from vbmeta for aosp_arm64 since it is
not possible currently to store the hashes of multiple variants of a
particular image. The GKI will be verified via VTS anyway.
Also remove some emulator-specific stuff from aosp_arm64.
Bug: 151094943
Change-Id: I465ea6c98d52e839284d51b246203f6b8dfb5566
Support for generating multiple boot.img files is required in the
release tools to enable GKI distribution/signing.
Bug: 151094943
Change-Id: I536a286d3123f35918106a52c49b1148d746370f
The kernel should not be specified in INTERNAL_RECOVERYIMAGE_ARGS, since
it is already given to mkbootimg directly.
The MKBOOTIMG_KERNEL_ARG macro is unused.
Bug: 151094943
Change-Id: Ie16a7bf7d77c0436d933abbb02c6dcb9202d5fe7
Add support for building a non-v3 recovery image along with a
v3 boot.img and vendor_boot image.
Bug: 150825361
Change-Id: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
Merged-In: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
Add support for building a non-v3 recovery image along with a
v3 boot.img and vendor_boot image.
Bug: 150825361
Change-Id: I80d4e71ff09b83dd1c7f9accb4de99a30f95f4bf
ELF prebuilts in PRODUCT_COPY_FILES are an build error.
Define prebuilt modules and add them to PRODUCT_PACKAGES instead.
To triage any build break caused by this change, temporarily opt out
this check by setting
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true in BoardConfig.mk.
Bug: 140560012
Test: build_test & verify that either PRODUCT_COPY_FILES has no ELF \
prebuilt or BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES is true
Change-Id: I9dcbe7b68c38fc23dac91fe5751cbc478105656e
Add a check to ban ELF prebuilts in PRODUCT_COPY_FILES.
ELF prebuilts should be defined properly by cc_prebuilt_library_shared
and cc_prebuilt_binary so that the build system can keep track of the
file dependencies.
To opt in this check, set this option in BoardConfig.mk:
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := false
After all devices that have ELF prebuilts in PRODUCT_COPY_FILES are
tagged with BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true flip
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES to default false.
After a device is cleaned up, remove its
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true setting.
Bug: 140560012
Test: Set BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := false
Test: m # Should report any ELF prebuilt error in PRODUCT_COPY_FILES
Change-Id: Id75dac9417aed9baa7c5e9388430ff9369cf9b4f
BUG: 149826779
Test: Build x86, x86_64, armv7 and arm64
make sure x86/64 boot to home screen;
armv7/arm64 can pass disk mounting stage
Change-Id: I258b69bd0cdc4fb0a99b1a04567051e8d32c389a
The recently added support for multiple kernels and boot.img files
missed the boot-test-harness.img.
Bug: 152464066
Change-Id: I6e146a0702bc933e0b62f36dc34aba913e57316f
Merged-In: I6e146a0702bc933e0b62f36dc34aba913e57316f
In order to enable the delivery of multiple kernel variants with
a platform build, add support for generating boot.img files from
multiple kernels.
The BOARD_KERNEL_BINARIES macro may be defined as a list of kernel
binaries to be used (if not, the original behavior and assumption of a
single kernel binary is preserved). Each kernel binary filename
must begin with "kernel". Any extra text in the filename is appended
to the boot.img name, so "kernel-gz" would generate "boot-gz.img".
Bug: 151094943
Change-Id: Icbbf227e9561f4aa11ce10db8d7aa81c7a81eb5b
Merged-In: Icbbf227e9561f4aa11ce10db8d7aa81c7a81eb5b
The recently added support for multiple kernels and boot.img files
missed the boot-test-harness.img.
Bug: 152464066
Change-Id: I6e146a0702bc933e0b62f36dc34aba913e57316f
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.
Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
Merged-In: Ic3226728e97dae84d38ec230ccc86d1b124bea94
Before:
cat build.prop
\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh
After
cat build.prop
\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh
Change-Id: I8365bb59ad22a3bd9fc1dc904ff2026ddd7abe06
Test: m
This reverts commit 96a79c6f65.
Reason for revert: b/152899887
original cl leads to build.prop getting longer and longer
from 60+ to 1k+ lines and keep increasing
Exempt-From-Owner-Approval:
BUG: 152899887
Change-Id: I83ed1702009278014c77d7e7a7305756041564de
Propagate partition tag data to apexkeys.txt and
apkcerts.txt so that merge_target_files.py can build
merged versions of these files by filtering the
framework files for framework partitions and filtering
the vendor files for vendor partitions.
Bug: 138942268
Change-Id: Ic3226728e97dae84d38ec230ccc86d1b124bea94
Before:
cat build.prop
\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh
After
cat build.prop
\# begin common build properties
\# autogenerated by build/make/tools/buildinfo_common.sh
Change-Id: I55a9cdc9a93e2d72ba4db97fef4c5e8c67421026
Test: m
In order to enable the delivery of multiple kernel variants with
a platform build, add support for generating boot.img files from
multiple kernels.
The BOARD_KERNEL_BINARIES macro may be defined as a list of kernel
binaries to be used (if not, the original behavior and assumption of a
single kernel binary is preserved). Each kernel binary filename
must begin with "kernel". Any extra text in the filename is appended
to the boot.img name, so "kernel-gz" would generate "boot-gz.img".
Bug: 151094943
Change-Id: Icbbf227e9561f4aa11ce10db8d7aa81c7a81eb5b
This dependency is now defined in ALL_SDK_FILES.
Test: lunch sdk; make sdk
Bug: 151160048
Change-Id: Ia740466e493d745d83039ba9991547a6c2d3bd2c
Merged-in: Ia740466e493d745d83039ba9991547a6c2d3bd2c
In the case when both ODM_MANIFEST_SKUS and ODM_MANIFEST_FILE are
both empty, also checks VINTF compatibility for empty SKU case.
Same for device manifest. Although right now, DEVICE_MANIFEST_FILE and
DEVICE_MANIFEST_SKUS cannot be both empty (because libvintf requires
vendor manifest exists barring manifest fragments), let libvintf throws
an error for this case. In the build system, simply handle vendor manifest
the same way as ODM manifest.
Fixes: 148601741
Test: manual
Change-Id: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
Merged-In: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
The otatools should talk to the aftl server and append the inclusion
proofs when building the vbmeta image. We should only do this during the
signing process when the network is always available.
Also the inclusion proof doesn't impact the final vbmeta image size on
coral, where the final size is 8192 after padding. This is below the
physical image of 65536.
Bug: 147870995
Test: unit tests pass, run sign_target_file_apks
Change-Id: If84c6bf5198c9b05f5e0c16ae6335971915f47e3
In the case when both ODM_MANIFEST_SKUS and ODM_MANIFEST_FILE are
both empty, also checks VINTF compatibility for empty SKU case.
Same for device manifest. Although right now, DEVICE_MANIFEST_FILE and
DEVICE_MANIFEST_SKUS cannot be both empty (because libvintf requires
vendor manifest exists barring manifest fragments), let libvintf throws
an error for this case. In the build system, simply handle vendor manifest
the same way as ODM manifest.
Bug: 148601741
Test: manual
Change-Id: Ia0655fd4d37f6286b164a3221ec4b2716f29147d
If DEVICE_MANIFEST_FILE / ODM_MANIFEST_FILES is set, also include check
for empty vendor / odm SKU, respectively. Then, do cross product of
vendor SKUs and ODM skus, and check each possible combination.
Test: build with and without vendor skus
Test: m check-vintf-all
Bug: 148601741
Change-Id: I23cc81998e7afc36c43540bf6d615b4d4b288447
Merged-In: I23cc81998e7afc36c43540bf6d615b4d4b288447
If DEVICE_MANIFEST_FILE / ODM_MANIFEST_FILES is set, also include check
for empty vendor / odm SKU, respectively. Then, do cross product of
vendor SKUs and ODM skus, and check each possible combination.
Test: build with and without vendor skus
Test: m check-vintf-all
Bug: 148601741
Change-Id: I23cc81998e7afc36c43540bf6d615b4d4b288447
This tool must match the one used to compile the source code for
compatibility.
Bug: 143977934
Test: m CLANG_COVERAGE=true dist
Change-Id: I71e0e7afb05dedd5f6a09d5e4099387c6262387f
This had caused the nodeps targets to break when I added the
auto-cleanup feature, as we wrote out smaller lists of what was
installed. The functionality of dont_bother_goals is also being fixed in
https://android-review.googlesource.com/c/platform/build/+/1250929/
But there's also no reason to have all of these targets in
dont_bother_goals, as they can just re-use the cached kati build graph.
Bug: 149460609
Test: m systemimage && m snod <did not delete everything>
Test: m snod <still see warning>
Test: codesearch for uses of MAKECMDGOALS and these targets
Change-Id: Ib8e7ba67e5ad980be4bdcf521c5156eea7941f97
Partition the targets into those appearing in system images, those
appearing somewhere unreadable by the Settings UI, whose notices
must appear in a readable system image, and those not appearing
on the device thus not needing notices. Assert no other targets
appear under $(PRODUCT_OUT).
Test: manually built and tested phone image
Change-Id: If82cb36f98f8e6066d1c67bb4d15976be433d403
When using an archive to provide kernel modules, the archive is directly
expanded into the output directory. The output directory is currently
removed prior to that to ensure no stale modules are present if they
were removed as part of a change in an incremental build.
Unfortunately if kernel modules are also provided via the regular
BOARD_*_KERNEL_MODULES macros, the removal of the output kernel module
directory will race with the copying of kernel modules in
BOARD_*_KERNEL_MODULES, resulting in some of those kernel modules not
being present in the output.
Kernel modules removed from BOARD_*_KERNEL_MODULES do not currently get
removed from the output directory in an incremental build anyway. So in
order to support using BOARD_*_KERNEL_MODULES and
BOARD_*_KERNEL_MODULES_ARCHIVE conurrently, take out the removal of the
output directory prior to archive expansion.
Bug: 149866863
Change-Id: Ib373650ddcb0fb5782a13d68a8869a9117e42ccc
Commit I30137c3caef91805d9143d404e5e4d06c0fccc30 adds boot-debug.img
to allow adb root with an user build GSI image.
https://source.android.com/compatibility/vts/vts-on-gsi
Another commit I5b005097b73f59857c3a2f92d693b3e67ee8424e adds
vendor_boot.img to pair with a generic kernel image, the GKI boot.img.
To allow adb root for devices using a GKI, vendor_boot-debug.img is
introduced. The image combination used in VTS will be:
Old devices without GKI:
GSI system.img + boot-debug.img + vendor.img, etc.
New devices with GKI:
GSI system.img + GKI boot.img + vendor_boot-debug.img + vendor.img, etc.
Note that boot-debug.img still can be used on new devices for
non-compliance scenario.
Bug: 147849477
Test: lunch aosp_cf_x86_64_phone-userdebug; make vendorbootimage_debug
Test: `make dist`, checks that both vendor_boot-debug.img and
vendor-ramdisk-debug.cpio.gz are in $OUT/ and out/dist.
Test: `make dist`, checks that installed-files-vendor-ramdisk-debug.{json,txt} are
in $OUT/ and out/dist.
Change-Id: I66b662d8b1e5c619ed7bb81e40233fe9df363b27
This CL adds a new make target for line coverage, That is, by running
`make haiku-line-coverage` you can get a set of all profile (*.gcno) files
for all fuzz targets and for all critical components of Android,
packed into a zip called `line_coverage_profiles.zip`. Furthermore the set of
all fuzz targets are instrumented with line coverage and packed into
another zip called `line_coverage_fuzz_targets.zip`
To properly run the make target enable NATIVE_LINE_COVERAGE first:
NATIVE_LINE_COVERAGE=true NATIVE_COVERAGE=true COVERAGE_PATHS=* make haiku-line-coverage
Bug: b/148234755
Test: Make target buils successfully on master/aosp. Binaries tested on taimen
devices.
Change-Id: I6a1e11068119337628c2ae5ee3baf2fc394add05
If EMMA_INSTRUMENT is turned on but no APKs were built the rule to
collect jacoco-report-classes.jar would error with missing directories
and an empty zip file. Switch to soong_zip, which doesn't error
on empty zip files, and hide the errors if $(TARGET_COMMON_OUT_ROOT)
or $(HOST_COMMON_OUT_ROOT) don't exist.
Test: m EMMA_INSTRUMENT=true TARGET_BUILD_APPS=Camera2
Change-Id: I09e30e37dc38f32f55b3f91bfc4d12c9e753083f
The public platform version no longer can be a codename, it is
always the most recently released platform. A new build property
and API provides either the offical version or the current codename
as appropriate. This will avoid breaking apps that look at the
platform version while development is under a codename.
Changes from the original version:
- Logic for emitting system properties has also been added to
buildinfo_common.sh to make sure that ro.${partition}.build.*
are consistent with ro.build.*.
- We also use PLATFORM_VERSION_LAST_STABLE as the value set in the
boot image os_version header / hash tree additional headers to
ensure they match with the ro.build.version.release system property.
This is hopefully a temporary workaround while we stop using the
system property for this purpose.
Bug: 143175463
Test: manual
Change-Id: Iaeefb35137de01c6ea57115d8830dd9bc30eccba
Regardless of the value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE
"use_dynamic_partition_size=true" is passed to build_image.sh.
Pass the value of PRODUCT_USE_DYNAMIC_PARTITION_SIZE just like it is
done for other properties.
Test: 1. build a target with fixed partition sizes and
"PRODUCT_USE_DYNAMIC_PARTITION_SIZE := false".
2. check the value of "use_dynamic_partition_size" in the
corresponding system_image_info.txt.
3. repeat steps 1 and 2 with this fix and see the difference.
Change-Id: Ia121d3d67f554f8ae4e211ad4e2c381a43409f01
Currently no different from "release". Will be updated to differ
in a follow up change, once all related issues have been resolved.
Bug: 143175463
Test: manual
Change-Id: I2e7de023d49cb1dcb83637e2c9af5a3e48e46f7d
This replicates the longtime existing handling of system.prop,
as well as the recently added handling of product.prop.
Change-Id: I8ab2b29bd0b5f0f2bcc0928d6a2a871c40582d3f
Since it's under soong/out/host, we need to explicitly copy it into the
otatools.zip
Bug: 146508800
Test: build and check otatools.zip
Change-Id: I83e201601cf03b6eb01ead912a78f22f750aa4be
This adds the ability to format f2fs and ext4 in a way that supports
casefolding and project quotas. Project quotas require wider inodes, and
thus cannot be enable apart from at build time. Casefolding can be
configured with f2fs.fsck/tune2fs later.
Both features are enabled via inheriting emulated_storage.mk in the
device.mk
Bug: 138322712
Bug: 138321217
Test: Enable on device with related patches, view fs configuration on /data
Change-Id: Ib1ab0589006ff1b3fb7478b7e9b0a8aad71e4b09
We need them to extract and repack the apex file when signing
the apex.
Bug: 146508800
Test: build
Change-Id: Ib38055eac24f28ac59610d03275de05b77d3eeb0
VINTF metadata must be checked by defining
DEVICE_MANIFEST_FILE and friends, instead of being
copied with PRODUCT_COPY_FILES directly.
This can be worked arond with BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES.
Test: Add the following and see errors:
PRODUCT_COPY_FILES += \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/manifest.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/manifest/foo.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/vintf/compatibility_matrix.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/manifest.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/manifest/foo.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/vintf/compatibility_matrix.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/etc/vintf/manifest.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/manifest.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/etc/vintf/compatibility_matrix.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_VENDOR)/compatibility_matrix.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_ODM)/etc/manifest.xml \
device/XXX/manifest.xml:$(TARGET_COPY_OUT_ODM)/etc/vintf/manifest.xml \
Test: test again with BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES := true
Bug: 147506249
Change-Id: Id75a9690b3c71fdc9a4e1b4e9be2caa63183cf7c
Do not check VINTF integrity / compatibility if
no files are built to /system/etc/vintf/* or /vendor/etc/vintf/*.
Test: m check-vintf-all on gsi_gms_arm64
Test: m check-vintf-all on coral
Fixes: 147749718
Fixes: 148007775
Change-Id: I874d1558e0b891b9d307eec536b1071d382a43f5
They are moved into check-vintf-all, which is more
accurate and do not require building full OS images.
Also move kernel check code down to check_vintf_compatible. There
is no assembled manifest to put kernel configs now, but they are still
required for build time OTA VINTF checks.
Test: builds
Test: change a vintf_fragment file to cause a conflict with main manifest file
(add health@2.0 to boot@1.1.xml), and check_vintf_vendor_log fails
Change-Id: I9791abc440a40e1537b4387eb67575ff2e22df08
Add target that checks VINTF compatibility of the current build
(in $PRODUCT_OUT) properly. The target:
- Doesn't require a full build
- Won't run for system-only AOSP targets
A verbose log is printed if `m check-vintf-compatible` is executed,
but it won't show up if `m` is executed.
(After this patch, adding product / system_ext matrices is as simple
as defining a vintf_compatibility_matrix in Soong, and VINTF
compatibility is properly checked.)
Test: m check-vintf-all
Test: delete */etc/vintf and m check-vintf-all
Test: m
Test: m check-vintf-all on device with vendor/odm and ODM SKU-specific
manifests
Test: change manifest.xml to be incompatible and m check-vintf-all fails
Bug: 140280874
Bug: 140360109
Change-Id: I6ee79910d745d29cfc9b05b1435e26f91b7c10f7
unpack_bootimg in conjunction with mkbootimg can be used to re-create
boot.img with a different kernel image and ramdisk.
Change-Id: I9615facc9335885989772a0dd7f08217e2143a45
Dist ramdisk-recovery.img and misc_info.txt. This is useful for
re-creating boot.img without having to download a huge target_files zip
file.
Change-Id: I2e1c1d547c95ca3433f89c68428c0c98fa4d19cd
The check is implemented in Soong via the apex_available property.
For a module that should be in the APEX named "foo" and shouldn't be in
any other APEX and also in the platform (the non-updatable part), the
property can be set to "foo" (without "//apex_available:platform")
to express the restriction and then Soong will enforce it.
Bug: 128708192
Test: m
Change-Id: Ia1aaaacd685f466447b61deae2849cb0aa83def3
So that soong_ui can remove obsolete headers that have been removed.
Test: cat out/target/product/crosshatch/.copied_headers_list
Test: cat out/target/product/generic/.copied_headers_list
Change-Id: I7df8029c1f2ed630d35c357f94e5dfb668e5824f
Bug: 143513520
Test: `make vbmetaimage-nodeps` then checks the value of
PRIVATE_AVB_VBMETA_SIGNING_ARGS appears in ./out/verbose.log.gz
Change-Id: I2eac2b2d319a46f3c3ecb56df8c6b56925a4d596
An A/B system that has a recovery image should not generate the recovery patch.
This change gates the creation of the recovery patch such that we create it
only when the recovery image exists and only for non-A/B systems.
Test: Build A/B system, verify that recovery patch is not present.
Bug: 144104493
Change-Id: Ib570c21b73912c4e4b7a964b192abc15fde9a753
It may be the case that the list of kernel modules to be copied into
various partitions is not known at the time the build is invoked. To
support this configuration, create a set of make variables, each of
which can be set to the path of a zip archive of kernel modules to be
used.
Bug: 144317186
Bug: 144844424
Test: build and verify *.ko in vendor, repackage prebuilt
kernel modules into zip, build and verify *.ko in vendor
Change-Id: Ie6f7e2c72efa11d39be341920dd46e4ed6678fe1
Additional context (for Googlers): go/android-fuzzing-shared
This patch adds the Make support for automatically installing sanitized
dependent shared libraries. 'make $module' will find all the shared
library dependencies in soong, and create the rules to install them. We
simply need to add the <install sanitized shared library> rule that's
made by Soong as a dependency of the module's phony.
We also now change 'm fuzz' to not just build the fuzz packages, but to
build all fuzz targets into the respective
$ANDROID_PRODUCT_OUT/data/fuzz and $ANDROID_HOST_OUT/fuzz directories.
Bug: N/A
Test: Build fuzz target with shared libs, note the contents of
$ANDROID_PRODUCT_OUT/data/fuzz/lib and out/soong/fuzz-target-*.zip now
has shared libraries.
Change-Id: I74def02fee663ef788ee25ec0d5106faf474c2a6
There is no reason for these scripts to continue to exist in /, when
they are better suited for /system/etc. There are problems keeping
them at / as well, particularly that they cannot be updated with
overlayfs.
Bug: 131087886
Bug: 140313207
Test: build/boot
Merged-In: I5aa0332e7f0e3fb6840b60e3d099c2b28d38b7ea
Change-Id: I5aa0332e7f0e3fb6840b60e3d099c2b28d38b7ea
Don't contaminate the build log.
Test: m check-all-partition-sizes -j (verbose logs stored to file)
Test: m check-all-partition-sizes-nodeps -j (see verbose logs)
Test: manually run the script with[out] -v and with[out] --logfile
Change-Id: I345a340deab3e29bb9cb05d4970a55d8758607a7