otatools.zip is required to sign GSI.
Bug: 112293933
Test: lunch aosp_arm64-userdebug && make otatools-package
Test: lunch aosp_arm64-userdebug && make otapackage will fail
Change-Id: Iae9f9af5cc8b98c05a66219779ce35592d3321bd
* BOARD_SUPER_PARTITION_GROUPS defines a list of "updatable groups". Each
updatable group is a group of partitions that share the same pool of free
spaces.
* For each group in BOARD_SUPER_PARTITION_GROUPS, a BOARD_{GROUP}_SIZE and
BOARD_{GROUP}_PARTITION_PARTITION_LIST may be defined.
- BOARD_{GROUP}_SIZE: The maximum sum of sizes of all
partitions in the group.
If empty, no limit is enforced on the sum of sizes for this group.
- BOARD_{GROUP}_PARTITION_PARTITION_LIST: the list of partitions that
belongs to this group.
If empty, no partitions belong to this group, and the sum of sizes is
effectively 0.
* BOARD_SUPER_PARTITION_PARTITION_LIST should not be defined
by the device. It is now computed from all
BOARD_{GROUP}_PARTITION_PARTITION_LIST.
* Each 'updatable group' has its own pool of space for its
partitions to grow into. Enforce the following:
* sum(all partitions) <= super partition (/ 2 for A/B)
* For each group, sum(partitions in group) <= group size
* sum(all group sizes) <= super partition (/ 2 for A/B)
Test: builds
Bug: 111610495
Change-Id: I072b011714ec31a1d8813cc75edd27da3c6ff39a
Merged-In: I072b011714ec31a1d8813cc75edd27da3c6ff39a
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.
This partially reapplies I2eca2f7618e06c0b5893ff54c79261921fe051d6
with fixes for 64-bit only builds and directories that are changing
during zipping.
Bug: 69500920
Test: m checkbuild
Test: m checkbuild platform
Test: lunch hikey64_only && m platform
Test: contents of zips is unchanged
Change-Id: Iac5c43276f7ae700d4d13d0ef27003d09c1c87e0
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.
This partially reapplies I2eca2f7618e06c0b5893ff54c79261921fe051d6.
Bug: 69500920
Test: m checkbuild
Test: contents of zips is unchanged
Change-Id: Idf6fbc94e257dc34af4f5b115d740b7cb9bac015
$OUT/obj/APPS/SystemUI_intermediates/package.dex.apk was not being
written after being converted to Soong. Add a copy rule for it
to soong_app_prebuilt.mk, add it as an implicit output to the Make
rules that create it, and add it as a real dependency to the
platform.zip rules.
Test: m platform
Change-Id: I96f58d3d80b764a51a6acb87e92498589cfe5c18
The recovery image already contains a copy of first stage init, so we
can boot unconditionally to the recovery image and instruct first
stage init whether or not to boot to Android or to recovery. In this
case, we need neither the kernel to mount /system as / nor a separate
partition for recovery, so this change modifies the build scripts to
allow this combination.
Bug: 114062208
Test: Boot pixel from recovery to Android with BOARD_USES_RECOVERY_AS_BOOT
But without BOARD_BUILD_SYSTEM_ROOT_IMAGE
Change-Id: Icd047afb7f22d2724b3bcaca1aa0c837426dcce7
For example, if BOARD_SUPER_PARTITION_SIZE is
10GiB, then the sum of sizes of all dynamic partitions must
be within 5GiB.
Fixes: 115920069
Test: make
Change-Id: I800faff28e8483c92a1c0cf5e0b3bae4d638f86d
When the system partition is a dynamic partition, the device will be
using an initial ramdisk and should not have a root device specified on
the kernel command-line.
Bug: 115939310
Test: device boots when BOARD_SUPER_PARTITION_PARTITION_LIST contains
super and AVB is enabled.
Change-Id: I5c4b2304bf1ab6a59443c43c354845bf8a3949f0
Missing that doesn't seem to affect correctness, but it upsets the
syntax parsing in my editor.
Test: `m -j out/target/product/marlin/recovery/root/prop.default` with
aosp_marlin-userdebug.
Change-Id: I272f6a6e4fe67b3ef316aa38896a0df0b42228d0
soong_zip produces more reproducible zip files that are not
affected by umask values or timestamps.
Bug: 69500920
Test: m checkbuild
Test: contents of zips is unchanged
Change-Id: I2eca2f7618e06c0b5893ff54c79261921fe051d6
Bug: 112007947
Test: `m dist` with aosp_taimen-userdebug.
Test: Set up a target that uses chained VBMeta images of
`vbmeta_mainline` and `vbmeta_vendor`. `m dist` and check the
build log, as well as outputs from
`avbtool info_image --image vbmeta.img`,
`avbtool info_image --image vbmeta_mainline.img`,
`avbtool info_image --image vbmeta_vendor.img`.
Change-Id: Ib1d4e97f583b65245703eae15d211adcd9e83741
TARGET_RECOVERY_DEFAULT_ROTATION, TARGET_RECOVERY_OVERSCAN_PERCENT and
TARGET_RECOVERY_PIXEL_FORMAT are vendor-specific properties used by
libminui. So they are needed by both of recovery and charger modes.
We used to pass them to libminui as build-time flags (pre-Q), and
switched them to runtime properties recently (available to recovery
only). Since /sbin/charger lives on system image, the values should be
still passed as runtime properties, but need to be additionally
available under charger mode, and overridable by vendor-init.
This CL writes these variables as vendor default properties (i.e.
/vendor/default.prop if property_overrides_split_enabled is true,
otherwise into /default.prop). Note that writing them as vendor build
properties doesn't work, as init doesn't load /vendor/build.prop under
charger mode.
Bug: 113567255
Test: Build along with other CLs in the topic (for sepolicy and
libminui changes). Boot into charger mode.
Test: Boot into recovery. Run graphics test.
Change-Id: Iccc4de0fbff508d489fc93b45c2ecfd0fb96053c
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
Also removing the requirement of BOARD_BOOTIMAGE_PARTITION_SIZE when
BOARD_AVB_ENABLE is set. Some targets (e.g., emulator) doesn't build
boot.img when AVB is enabled.
Bug: 112293933
Test: build a failure case and checks the error output is expected
Change-Id: I290c707719193ddaedcd9fd0b31de566ad17078c
This is in line with the change of mkuserimg_mke2fs.sh to python binary.
Bug: 112555072
Bug: 63866463
Test: unittests pass
Change-Id: I82c0be1e5bbc685edc15120da73aa43fdc9f2f05
This solves the missing host executable when calling
add_img_to_target_files.py.
Bug: 113877667
Test: make target-files-package for aosp_sailfish
Change-Id: I133064ef86a1f9c5b4ec6d27345fb49c61a729e5
super_empty.img is needed for "fastboot update" to work, as such, it
must be included in the update package. This change adds lpmake
parameters to misc_info.txt for add_img_to_target_files.py, and ensures
that lpmake is packaged with otatools.zip.
The build-superimage-target macro is now split into two functions - one
to generate the device-specific arguments, and another to build the full
command-line for convenience. The former is used to pass arguments
directly to add_img_to_target_files.
Bug: 113524256
Test: make updatepackage builds and includes super_empty.img
make otatools includes lpmake
Change-Id: I25091c964b036beeea2a8b8f738e2c18937c1eb4
When choosing the density for recovery resources, the code used to
handle primary density values only, i.e. mdpi, hdpi, xhdpi, 400dpi,
xxhdpi, 560dpi and xxxhdpi. Unlisted values, such as 500dpi, will be
categorized as xhdpi, but with tiny font size selected for recovery.
This CL improves the handling of numeric dpi values. It allows targets
using numeric values in PRODUCT_AAPT_PREF_CONFIG, and maps that to a
proper density bucket. Targets can still specify the density bucket
directly, which will take priority.
Bug: 111559919
Test: `m -j bootimage` with marlin/sailfish/walleye/taimen respectively.
Check the chosen density bucket for recovery resources
(xxxhdpi/xxhdpi/xxhdpi/xxxhdpi).
Test: Set PRODUCT_AAPT_PREF_CONFIG to 279/280/281/500/559/560/640. Check
the computed bucket and the selected recovery font file.
Change-Id: Ia40fcdec5a2752c08172716bcc622a36a2a83cea
Support a first stage ramdisk which will include the targets placed
into TARGET_RAMDISK_OUT. This replaces the existing ramdisk on
existing devices.
All system images are now built to be mounted as the root dir.
Devices with a first stage ramdisk will switch root to the system
partition.
BOARD_BUILD_SYSTEM_ROOT_IMAGE remains and is used to specify if the
system partition is going to be directly used as rootfs without the
ramdisk.
Bug: 79173823
Bug: 79758715
Test: hikey boots, sailfish boots
Test: OTA walleye from P to master
Change-Id: Idbb2dccc6340b0235a4bef03e11e420a9ed154b6
Bug: 111179267
Test: flashed a module with NOTICE file on a devices and checked the
Legal information webview.
Change-Id: I6e52dee0ea23f05ea73d7cc747c2db1c1525f4b2
This adds a set of standard build properties that are shared
between the system, vendor, odm, product, product_services and
bootimage partitions. The following properties are added:
ro.X.build.date
ro.X.build.date.utc
ro.X.build.fingerprint
ro.X.build.id
ro.X.build.tags
ro.X.build.type
ro.X.build.version.incremental
ro.X.build.version.release
ro.X.build.version.sdk
ro.product.X.brand
ro.product.X.device
ro.product.X.manufacturer
ro.product.X.model
ro.product.X.name
vendor and odm already had all of these, but bootimage, product
and product_services only had a subset and system didn't have
any.
Bug: 78359442
Bug: 111491184
Test: m out/target/product/hikey64/system/build.prop and inspect
Change-Id: Ia346d61aec331ed1b9fea12e6a50f1b79147473d
This CL intends to be a no-op change to functionality. It prepares for
the upcoming changes that support creating chained VBMeta images.
Bug: 112007947
Test: `m dist` with aosp_taimen-userdebug
Change-Id: Iaac45bde7971b056e17a6e7b0c89336ed206916e
Bug: 80741439
Test: `m -j vbmetaimage` for a target that uses product_services image
(i.e. `BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE := ext4`).
Verify that the generated `vbmeta.img` includes the descriptor for
`product_services.img`.
Change-Id: Ia2d64523319c3313803acbc63dd56154a0426334
During OTA, update_engine expects both slots in super,
so that it doesn't have to create the missing slot. Thus,
UUIDs of all logical partitions are consistent. Values
are the result of `uuidgen.py {name}_{slot}` for A/B and
`uuidgen.py {name}` for non-A/B).
Test: adb shell lpdump /dev/block/by-name/super
Bug: 110717529
Change-Id: Ibb90d4dbe1a56bf314d4a02d7aa2f2be18d04855
Combine INSTALLED_SUPERIMAGE_TARGET with INSTALLED_SUPERIMAGE_EMPTY_TARGET.
Also fixes inconsistent UUIDs for super_empty.img
because PRIVATE_SUPER_PARTITION_SUFFIX is not defined.
Test: flash and inspect device mapper
Change-Id: I7f00c4e21ebdd21e94fa387c6e2fbea06a6e75b7
Test: Use a target that defines `BOARD_INCLUDE_RECOVERY_DTBO := true`
and BOARD_PREBUILT_DTBOIMAGE. Touching a prebuilt dtbo file
triggers rebuilding of recovery image.
Change-Id: Icf44032fb29542c6836a401c79fb85345ad6cc3c
it's better to use the original $(BOARD_PREBUILT_DTBOIMAGE) instead
of AVB-padded $(INSTALLED_DTBOIMAGE_TARGET), the latter will be padded
to the size of /dtbo partition
Test: `make target-files-package` target file RECOVERY/recovery_dtbo is
the original BOARD_PREBUILT_DTBOIMAGE
Test: `make otapackage` build pass and OTA file works fine
Change-Id: Iec8524d3a0544ddca89481dc613f076b36aeed25
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.
Unlike the full super.img, super_empty.img is not a sparse image. It
contains the minimal data sequence needed to format the super partition.
It also does not contain partition sizes, since flashing is responsible
for choosing the correct partition size.
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.
mmm system/extras/partition_tools && lpdump super_empty.img works
Change-Id: I34e915a1fead806287dde554d190474785e52500
This gives a consistent mapping between partition names and the image
targets (i.e. partition => INSTALLED_PARTITIONIMAGE_TARGET). This CL
also creates an alias for the old name so that device-specific Makefiles
that refer to INSTALLED_SYSTEMIMAGE would keep working.
This CL renames image-for-partitions to images-for-partitions, and
returns INSTALLED_SYSTEMIMAGE_TARGET for system. It doesn't change the
actual functionality, but allows substantially simplifying the rule.
Test: `m dist` with aosp_taimen-userdebug
Test: `m dist` with a target that uses super partition
Change-Id: I2954ee5d855c1652a33c640ee615649588d5bc04
They used to be installed under recovery/root/etc. This CL moves the
files to the new location and creates a symlink from /etc to /system/etc
(done by the rule in system/core/rootdir). This gives similar layout
between normal boot and recovery, and allows installing prebuilt_etc
files with Soong (`recovery_available: true`).
As part of the change, we no longer need the whitelisting rule for
mke2fs.conf.
Bug: 112780007
Test: Build with other changes in the topic (aosp_taimen-userdebug).
Check the generated files under recovery (/etc being a symlink to
/system/etc).
Test: Boot into recovery. Verify basic functionalities (`adb shell` and
`adb sideload`, factory reset).
Test: `build/soong/build_test.bash --dist`
Change-Id: Ibb6dea6f179a339f0c2d0fd8ba05ec0085b79a12