There are a couple of use cases where we don't want sparse image:
1. `DynamicSystemInstallationService` in Q framework doesn't support
sparse images.
2. Super image manipulation tools (like `lpadd`) doesn't play nice with
sparse images.
Force non-sparse GSI so we don't break backwards compatibility (1) and
we don't need to write `simg2img` everywhere (2).
Bug: 167695592
Test: Prepare a device flashed with Q framework
Test: Build system.img and create system.img.zip; the image is non-sparsed
Test: m tradefed-all && \
tradefed.sh run commandAndExit template/atest_local_min \
--template:map preparers=template/preparers/dsu-preparer \
--extra-file system-img.zip=out/.../system.img.zip \
--dynamic-system-update:disable-tear-down
Change-Id: Ib7667165ce53e87eb86bc7d3f56c80a418123a62
This partially reverts commit 1785816ca1
so that the hash tree at the end of GSI is properly signed by AVB.
Bug: 161503491
Test: 'm dist' and check that vbmeta_system.im is gone
Test: boot GSI on android10 CF
Test: 'avbtool info_image --image system.img' and check AVB signing
Change-Id: I9f488380c0c410fdbd02c3c0803b6dc06cf7faab
Properties for <partition>/build.prop are now added via
PRODUCT_<PARTITION>_PROPERTIES.
PRODUCT_SYSTEM_PROPERTIES is added. PRODUCT_SYSTEM_DEFAULT_PROPERTIES
will be deprecated.
PRODUCT_VENDOR_PROPERTIES is added. PRODUCT_PROPERTY_OVERRIDES and
PRODUCT_DEFAULT_PROPERTY_OVERRIDES will be deprecated in favor of the new
variable.
For other partitions (odm, system_ext, product), there is no change.
Exempt-From-Owner-Approval: cherry-pick from internal master
Bug: 117892318
Test: m
Merged-In: I98f3b5d0da661b3ad75260a23754e655103b7a44
(cherry picked from commit ad810b6dae)
Change-Id: I98f3b5d0da661b3ad75260a23754e655103b7a44
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
GSI targets require enabling chain partition signing, which put the
GSI signing in system.ing directly instead of in vbmeta.img.
Some GSI targets inherit from BoardConfigGsiCommon.mk only, ex.
gsi_arm64-user, do not enable chain partition signing. The patch
add these settings back.
On the other hand, the emulator makefiles still requires the
settings at this time. Hence, we keep these settings in
BoardConfigEmuCommon.mk.
Bug: 150179516
Test: make gsi_arm64-user
Test: make aosp_arm64-user
Change-Id: Id188e4c6a31ce0cf9b134ebae36cbd5bfae19942
Merged-In: Id188e4c6a31ce0cf9b134ebae36cbd5bfae19942
(cherry picked from commit f77e364de0)
After applying the patch, the contents in system/product align
to the mainline_system/aosp_product.
aosp_x86_arm is not releaseded for GSI. The patch also inherits
from BoardConfigMainlineCommon.mk instead of
BoardConfigGsiCommon.mk. But keeps output system_ext and product
files to /system/system_ext/ and /system/product/.
Bug: 136616665
Test: Compare the product out folder with/without the patch
Change-Id: I2aefbd2d3e71e26219508e53161fa8a3cc2fd652
We're now adding a core CSI system.img that is common across different
targets. So GSI-specific things should be moved to /system_ext.
Also renaming various generic*/system.prop to generic*/system_ext.prop.
This is to put the customization into /system_ext/build.prop instead of
/system/build.prop.
Bug: 137711197
Test: boot a GSI on crosshatch, and checks the value of those properties
Change-Id: Id344124280d5f4a6c10d390a9e8a4a50cc7f28fb
mainline_system.mk is inherited by not only Pixels but also products
like GSI and sdk_gphone where kernel isn't capable of supporting
updatable APEX.
Stop inheriting updatable_apex.mk from mainline_system.mk and let each
product to decide whether or not to inherit updatable_apex.mk.
Also, TARGET_FLATTEN_APEX is not set to true for GSI as it is the
default setting.
Bug: 132664085
Test: choosecombo 1 aosp_arm64 userdebug; get_build_var
TARGET_FLATTEN_APEX shows true
choosecombo 1 sdk_gphone userdebug; get_build_var TARGET_FLATTEN_APEX
shows true
Change-Id: I3c4e1e4b2bbebd675904d148dd18acb57ecbdfe9
Merged-In: I3c4e1e4b2bbebd675904d148dd18acb57ecbdfe9
(cherry picked from commit 5fd45bbeb0)
Pure GSI build targets has no vendor partition, such as
aosp_$arch_ab and gsi_$arch. The system properties defined by
PRODUCT_PROPERTY_OVERRIDES will be in /system/build.prop.
The patch defined a fake BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE to
let these system properties flow to vendor and won't pollute the
system.img.
The bug also move some properties to /product/build.prop.
Bug: 135508595
Bug: 131162245
Bug: 134781120
Test: check the /system/build.prop do not have "ro.carrier=unknown"
Test: adb remount on GSI Q on P
Change-Id: Ib200d66cf98fea572c26338e058bce29eb5e0cd7
With the support of enabling AVB on standalone partitions in libfs_avb,
devices can boot GSI with dm-verity. No need to disable AVB anymore.
Devices still can use the following command to disable AVB on
device-specific vbmeta.img if needed:
`fastboot flash --disable-verification vbmeta vbmeta.img`
Bug: 130595457
Test: Tree Hugger
Change-Id: I067dcda15f14f04428e0b60ce1f49227d61e4349
Currently, emulator system image is the non-legasy GSI, which is in sparse
format. Several internal clients don't support sparse format, and other
internal/external clients usually support both. The reason to choose sparse
format for GSI may not be valid any more. See bug for detail.
Bug: 130341962
Test: Checked the header of system.img to see if it's unsparse.
Boot emulator aosp_x86 successfully.
Boot mixed GSI and CF x86 successfully.
Change-Id: I839f49809429227607b2e876a4a3628df43a97b4
Move a couple of variables out of BoardConfigMainlineCommon
because they vary either by device or by how they build in
AOSP vs internal.
Bug: 80410283
Test: presubmit
Change-Id: Ia42df91ad8c8d8fc4618be375a17ea23896f4352
This setting moves the PRODUCT_PROPERTY_OVERRIDES to
the vendor partition.
Bug: 80410283
Test: tail system/build.prop | grep ro.carrier=
(empty)
Change-Id: I30d564fbd2dd3b56763ccff77979b223857f1c2f
This config was in a weird state where it sets the OUT
directory for these partitions but not the file system
type. Within the build system, both of these variables
are used interchangeably to check whether these partitions
are expected to be present.
A typical mainline device is expected to /vendor and
/product, so just add these.
Bug: 120974093
Test: make
Change-Id: I803d7afdcadc37e4384ae80f08bc1c8db535d2f4
The major purpose of vbmeta.img built on GSI targets (e.g., aosp_arm,
aosp_arm64, etc) is to disable AVB. We should also set the rollback
index to zero, to prevent the device bootloader from updating the
last seen rollback index in the tamper-evident storage.
Bug: 122583908
Test: build aosp_arm64, then `avbtool info_image --image $OUT/vbmeta.img`
Change-Id: I48a49957f8dd3169003b9507fe80e519f301d5b5
GSI doesn't include gsi_system.prop on user build, and cause some
devices cannot boot GSI with user build. Some properies in
gsi_system.prop do not suitable for user build, the patch create
a new gsi_system_user.prop for GSI user build.
Bug: 124479721
Test: boot aosp_arm64-user on a blueline device.
Change-Id: Ide2bdc8e8733817afb832b50b28807768e22f011
Regular (non-flattened) APEX may require changes to the kernel, which is
against the Treble promise. For maximum compatibility, APEXes are
flattened for GSI so that APEXes can be activated by legacy kernels.
Bug: 124159875
Test: N/A
Change-Id: Iea5701d3b917ebf8657d3ce38131c1838b51677e
* avbtool expect extra flags to be passed with the --flags argument
but currently we're missing an 's'.
Luckily this isn't an issue as python argparse matches
--flag as an alias to --flags ( python... )
Test: m vbmetaimage; check vbmeta header
Change-Id: I42d833c61c9b313dc067b1e519bae36395d09824
This product variable is used to generate the loader config (to use
either /system/product or /product), and the vendor one is likely
used in similar ways. Having these partitions is required for mainline
devices, so set it in the shared BoardConfig.
Bug: 80410283
Test: make
Change-Id: I6f2d94ff43572a28df54ea8c60f2d838a3b9216c
Legacy GSI had been changed to include BoardConfigGsiCommon.mk
instead of treble_common*.mk. However, some default settings are
different than the original. This patch fixes
BOARD_BUILD_SYSTEM_ROOT_IMAGE in Legacy GSI makefiles.
The patch also removes redundant settings and fix some comments.
Bug: 122282239
Test: make
Change-Id: Ie4eb8cf410bfd2edc74648c0e5ee81028242a1b7
This flag turns on 64-bit mediadrmserver for mainline. Keep the default
value for GSI for now.
Bug: 80410283
Test: make
Change-Id: Ie09b258f140b56121e4b531775b2a052b4dc6c15
The patch modifies the Legacy GSI to use BoardConfigGsiCommon.mk
instead of board config treble-common*.mk, and delete these
treble-common*.mk files.
After the patch, the GSI common board configs are in single file
BoardConfigGsiCommon.mk
The patch also includes:
- Moving `TARGET_COPY_OUT_VENDOR := vendor` to
BoardConfigGsiCommon.mk, because GSI always contains no vendor
contents.
- Configure the binder interface bitness explicitly.
- Unify the structure of each BoardConfig.mk.
Bug: 122282239
Test: compare the out folder between with and without the patch
Test: output files are all the same
Change-Id: Ie5901446920dda317dea848e6d5a7bbcf10a32cf
Partial rollback of Id5d114bde8b93800fe52c791ccc47cdffd86f382.
It is likely mainline also wants some of the BOARD_AVB_SYSTEM.. flags,
but I'm not entirely sure which ones.
Test: run build_mixed with this patch
Change-Id: I6ef3c01f6c74e6d93cf798b26b8c7a4785bbefb4
Make the mainline board config only import a subset of the GSI
options. The current set of attributes is the minimal set to
keep mainline_system_arm64 building, as well as not producing
any diffs in the current set of files in /system. It's possible
we'll need to move a few more over, but we'll do that on a
case-by-case basis.
Make the GSI config inherit the mainline one. The only diff for GSI
should be the addition of BOARD_USES_SYSTEM_OTHER_ODEX.
Bug: 119911662
Test: build mainline_system_arm64
Change-Id: Id5d114bde8b93800fe52c791ccc47cdffd86f382
The existing 'generic' targets are emulator devices, and targeting
it has the side-effect of including emulator-specific artifacts.
Create a mainline device instead, which is really generic. This also
allows specifying tweaks unsuitable for the emulator.
Include BoardConfigGsiCommon for now, even though it includes a few
things we likely won't want in the future.
Bug: 80410283
Bug: 111538404
Test: lunch mainline_arm64; m
Change-Id: I15e7cb41fcbd3c0592a091ba7a8575ddf10bda71
Increases BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE to 128MB to fix
the build break. This is because we enabled AVB signing in the following
CL. And verified boot metadata will consume the reserved size in current
build system.
https://android-review.googlesource.com/c/platform/build/+/745691
Bug: None
Test: build sdk_gphone_x86_64-userdebug
Change-Id: If1f44dccbc3a69b1b38a23e979f50c2c52401a25
In current GSI builds, AVB signing is not allowed.
We should allow signing GSI image, while building a vbmeta.img with
AVB_VBMETA_IMAGE_FLAGS_VERIFICATION_DISABLED (flag 2).
When need to disable AVB, use the vbmeta.img above together with the
GSI. When need enable AVB on GSI, include the GSI public key into the
device-specific vbmeta.img. Note that GSI is a chain partition so the
keys used to sign GSI and vbmeta.img are different.
Bug: 112293933
Test: build aosp_arm64-userdebug, checks flag 2 is set in vbmeta.img
and there is AVB HASHTREE in system.img
`avbtool info_image --image $OUT/system.img`
`avbtool info_image --image $OUT/vbmeta.img`
Change-Id: If1eff317621882994e7dcbf37cd35f5bfa16b69a
Nothing reads TARGET_USES_MKE2FS any more, mke2fs is always used.
Remove the requirement that TARGET_USES_MKE2FS is set, and remove
the places it is set.
Bug: 112241651
Test: m checkbuild
Change-Id: Ibdca062bbe7dcd19ba8f7ee7f8291ce746b74e65
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 original size number of GSI are fixed size. Change to give
size by the content with appending 64M bytes space.
Bug: 71970853
Test: `make systemimage` and check the out system.img
Change-Id: I345f5e22c2fee7b553fc3337e9bff0ba28f579e1
Merged-In: I345f5e22c2fee7b553fc3337e9bff0ba28f579e1
This reverts commit bc0248f211.
Reason for revert: Triggered preexisting issue with e2fsck and ASAN
Bug: 112062612
Change-Id: I7b52fe539252ab1bb7229d32accb7abd6417f470
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
Move the settings which effect the system image to the file
BoardConfigGsiCommon.mk
Bug: 80117040
Test: build aosp_arm64-userdebug and pass
Change-Id: I42b14a124992c21b2da0e9e6197b1c38c6e58ce3
Merged-In: I42b14a124992c21b2da0e9e6197b1c38c6e58ce3
USE_XML_AUDIO_POLICY_CONF is must for Treble device, so it is
also must on GSI. The settings is missed when creating GSI
aosp_$arch, add it back by this patch.
Bug: 110988359
Bug: 111053290
Test: build aosp_arm64 and build pass
Change-Id: I95f096e58350233fdcc8de115cc1691360070445
The majority of the contents in BoardConfig.mk of emulator products
are the same. The common part is factored out as EmuConfig.mk so it's
easier to maintain these closely related products going forward.
Bug: 80117040
Test: Following products have been built and booted to homescreen:
$ lunch aosp_x86-userdebug; m -j; emulator
$ lunch aosp_x86_64-userdebug; m -j; emulator
Change-Id: I5392e0e88865d4908906a67c29939c23af84baf0
Merged-In: I5392e0e88865d4908906a67c29939c23af84baf0
(cherry picked from commit 510b76d8ff)