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
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
The GKI boot.img should be generated alongside the GSI. To make this
possible, define a flag (TARGET_NO_VENDOR_BOOT) that can be used to
disable the generation of the vendor_boot image.
Bug: 138323550
Merged-In: I91181853b26815e68a2fa2216b68579780d034dc
Change-Id: I91181853b26815e68a2fa2216b68579780d034dc
This switches:
BUILD_COPY_HEADERS / LOCAL_COPY_HEADERS
BUILD_HOST_EXECUTABLE
BUILD_HOST_SHARED_LIBRARY
BUILD_HOST_STATIC_LIBRARY
to errors by default. Devices can set
BUILD_BROKEN_USES_BUILD_HOST_EXECUTABLE (etc) to turn these errors back
to warnings. I've done that for all of our internal devices.
Bug: 130719878
Bug: 130696912
Bug: 130722971
Bug: 130723227
Test: remove the BUILD_BROKEN_USES_* lines from a device, see errors
Change-Id: I1aecf97f64e281df3682ff0a0fb3ac4283790acd
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
We've considered these deprecated for a while, and have reduced where
they may be used, but let's actually throw warnings and call them out
specifically now.
Bug: 130719878
Test: lunch aosp_arm; m nothing [see no warnings]
Test: lunch aosp_crosshatch; m nothing [see LOCAL_COPY_HEADERS warnings]
Test: lunch aosp_taimen; m nothing [see BUILD_COPY_HEADERS warnings]
Change-Id: I8c12012366d84667de0d223bbde38d8b90419e36
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
This allows BOARD_VNDK_VERSION to be set to old versions. With VNDK
snapshot and vendor snapshot installed, newer system and older vendor
image can be built in the same time.
Bug: 65377115
Test: 1) VNDK_SNAPSHOT_BUILD_ARTIFACTS=true m dist vndk vendor-snapshot
Test: 2) install snapshot under source tree
Test: 3) set BOARD_VNDK_VERSION and boot cuttlefish
Change-Id: Ic5fefc8bcb866584b27f021a429cb6670a2e3048
See the Changes.md and the paired soong change for more information.
Test: Add BUILD_BROKEN_NINJA_USES_ENV_VARS := OLDPWD
ALLOW_NINJA_ENV=false m nothing; check out/soong.log
Change-Id: I2167eac52166b513318bc48feb71c9d0b80e5fd4
When setting target out path at root(/product, /system_ext), either file
system type or prebuilt image must be set. If not, we'd rather raise an
error.
Without raising an error, the artifacts in these directory are not
included in any image.
And also, extract these logics into function, and check product, odm, system_ext
For now, exempt vendor image because of some targets with prebuilt
vendor image.
Bug: 137169253
Test: set TARGET_COPY_OUT_PRODUCT := product
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE :=
BOARD_PREBUILT_PRODUCTIMAGE :=
and then check if it causes an error.
Test: set TARGET_COPY_OUT_PRODUCT := system/product
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 or
BOARD_PREBUILT_PRODUCTIMAGE := someimage.img
and then check if it causes an error.
Change-Id: Ibf0f7838111075ba3649e198e5649aa7e8e29d7c
See the Changes.md addition for more details.
Test: treehugger (build_test on downstream branches)
Change-Id: I6ad6b454a6fccf93772fda26cfc7dd6bbfc07c40
BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW is meant to be set depending on
targets, not devices. This allows that value to be set outside
BoardConfig.mk.
Bug: 131162102
Bug: 142684203
Test: m sepolicy_tests
Change-Id: I14f7cd06dcbaf1b5354c648079a815d7b6cc6f3a
A new sysprop neverallow rules are mandatory only for devices launching
with R or later. For devices already launched, neverallow rules can be
relaxed with adding following line to BoardConfig.mk:
BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW := true
Bug: 131162102
Test: Set PRODUCT_SHIPPING_API_LEVEL := 30 and try building with
changing some system_public_prop to system_internal_prop
Test: m cts sepolicy_tests
Change-Id: I44a83af19b18b4116f83a3d5dc929f28bb8870ce
Merged-In: I44a83af19b18b4116f83a3d5dc929f28bb8870ce
(cherry picked from commit 06fb4554f4)
In commit I30137c3caef91805d9143d404e5e4d06c0fccc30, we added
a boot-debug.img to allow adb root when using an user build GSI image.
However, to run automated tests, it requires additional properties,
which are not needed for GSI compliance:
ro.audio.silent=1
ro.test_harness=1
This CL adds an additional boot-test-harness.img for automated tests,
and keeps the original boot-debug.img for GSI compliance.
Note: boot-test-harness.img won't be built by default, it needs
explicit `make bootimage_test_harness`.
Bug: 140036184
Test: `m bootimage_test_harness`, flashes boot-test-harness.img and checks
adb root works and test harness props are set.
Test: `m bootimage_test_harness dist -j32`, checks both
boot-test-harness.img and ramdisk-test-harness.img are under ./out/dist/.
Test: `system/tools/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-test-harness.img --out ramdisk-test-harness`,
checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
$OUT/boot-test-harness.img and $OUT/boot-debug.img, respectively.
Then compare the root dirs of both, e.g.,
`diff -rq --no-dereference ./ramdisk-test-harness ./ramdisk-debug`
Test: `m ramdisk_test_harness-nodeps` and `m bootimage_test_harness-nodeps`
Change-Id: Iadea0b5c933c3b7fa10dcf3d9e85596916b3333d
When `OVERRIDE_TARGET_FLATTEN_APEX` is defined (e.g. set in the
environment), `TARGET_FLATTEN_APEX` is forcibly assigned its value.
This is useful to enable/disable APEX flattening from the command
line (thus ignoring the product's default configuration), for testing
purposes.
Note: Previously it was possible to set `TARGET_FLATTEN_APEX` directly
and have the same effect, but recent changes in the build
configuration now prevent that option.
Test: Check that:
export OVERRIDE_TARGET_FLATTEN_APEX=true \
&& . ./build/envsetup.sh \
&& lunch aosp_walleye-userdebug \
&& export OVERRIDE_TARGET_FLATTEN_APEX=true \
&& build/soong/soong_ui.bash --dumpvar-mode TARGET_FLATTEN_APEX
returns:
true
Bug: 121117762
Change-Id: Ib9ccae38430340de38e4758b4f55df2c65ea60d5
The vendor_boot partition is generated by mkbootimg and contains all the
device-specific information that used to reside in the boot partition.
Bug: 137297791
Change-Id: I5b005097b73f59857c3a2f92d693b3e67ee8424e
With this commit, the build system always checks ELF files when
`check-elf-files` is one of the make goals regardless
`PRODUCT_CHECK_ELF_FILES` is specified or not.
This commit also adds `BUILD_BROKEN_PREBUILT_ELF_FILES` for targets that
haven't been cleared.
If this commit breaks your target (usually breaks the targets running
`make checkbuild`), you may triage the breakage by adding the following
setting to your `BoardConfig.mk`:
BUILD_BROKEN_PREBUILT_ELF_FILES := true
Bug: 141176116
Test: lunch aosp_crosshatch-userdebug && make check-elf-files
Change-Id: Ibe65c977a4ab3d40ba35892ed177eca62c837c35
In line with the existing PRODUCT_BUILD_*_IMAGE variables, add a flag to
control whether vbmeta is generated.
Bug: 139328573
Test: manual
Change-Id: Id71026f9b0de9019e82e8ef594e718a4b0f3628f
All users have been removed.
Test: treehugger
Change-Id: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
Merged-In: I2cfe720bef88cc5485e90746d85a7e0a5d068ef7
The current solution expects BOARD_PREBUILT_DTBIMAGE_DIR to
contain prebuilt DTB files that are concatenated by the build system
to create $OUT/dtb.img. In order to accommodate devices that build
the dtb image locally, make boot.img creation depend on $OUT/dtb.img
only when BOARD_PREBUILT_DTBIMAGE_DIR is undefined.
Bug: 133161451
Test: Build with BOARD_PREBUILT_DTBIMAGE_DIR undefined and verify
using unpack_bootimg.py that $OUT/dtb.img was included in boot.img.
Change-Id: Iae2c634ccdc1d83589b26d382882f75fb8565a31
This has been a warning for a long time. Make it an error instead.
Once this has been verified to not cause any problems, it can
likely be changed to instead default to setting
TARGET_SUPPORTS_64_BIT_APPS := true.
Test: build_test
Change-Id: I0d03fed2085009c64880a594d5a3aadf72187e60
TARGET_FLATTEN_APEX and ro.apex.updatable cannot be independently set.
For a device where updating APEXes is not supported, ro.apex.updatable
should not be set (or set to false) and TARGET_FLATTEN_APEX should be
set to true. For APEX-supporting devices, it is the opposite;
ro.apex.updatable == true and TARGET_FLATTEN_APEX is false (or not set).
To ensure this relationship, TARGET_FLATTEN_APEX is by default set to
true, and overridden to false when updatable_apex.mk is inherited.
Bug: 130623080
Test: choosecombo to Pixels 2 and later; get_build_var
TARGET_FLATTEN_APEX returns false.
choosecombo to the original Pixel and other non-Pixel targets;
get_build_var TARGET_FLATTEN_APEX returns true.
choosecombo to the cuttlefish; get_build_var TARGET_FLATTEN_APEX
returns false
Merged-In: Id73a594dd9838457e68e2793122592c11a84fc83
Change-Id: Id73a594dd9838457e68e2793122592c11a84fc83
(cherry picked from commit 18411a42f0)
Bug: 123428770
Test: Built system-only image and checked that no boot.img or
recovery.img files where created. Booted the resulting merged build on
device.
Change-Id: I760476502775e68125907c39e66b8665e789a798
The two new debugging images adds additional files based on
boot.img and ramdisk.img/ramdisk-recovery.img, respectively.
File /force_debuggable is to trigger special logic in /init to load an
userdebug version of sepolicy and an additional property file from this
ramdisk to allow adb root, if the device is unlocked.
It's intentional to skip signing for boot-debug.img, as it can
only be used if the device is unlocked, where verification error
is allowed.
Those debugging images allows adb root on user build
system.img, vendor.img, product.img, etc. This can facilitate more
automated testings on user builds and is helpful to narrow down the
delta between what's being tested v.s. what's being shipped.
Bug: 126493225
Test: `make dist`, checks both boot-debug.img and ramdisk-debug.img
are in $OUT/ and out/dist.
Test: `make dist`, checks installed-files-ramdisk-debug.{json,txt} are
in out/dist.
Test: `system/core/mkbootimg/unpack_bootimg.py --boot_img $OUT/boot-debug.img`,
checks the extracted out/ramdisk is as expected
Test: Run `gunzip -c ramdisk | cpio -idm` for the ramdisk extracted from
$OUT/boot-debug.img and $OUT/boot.img, respectively.
Then compare the root dirs of both, e.g.,
`diff -rq --no-dereference ./ramdisk ./ramdisk-debug`
Test: `make ramdisk_debug-nodeps` and `make bootimage_debug-nodeps`
Change-Id: I30137c3caef91805d9143d404e5e4d06c0fccc30
Also start the deprecation for BUILD_HOST_TEST_CONFIG and
BUILD_TARGET_TEST_CONFIG, which have no users.
Bug: 130720555
Bug: 130723115
Bug: 130734993
Test: treehugger
Test: Add entries to DEFAULT_ERROR / OBSOLETE to manually test behavior
Change-Id: Icfdff43a29b6512494d44b9be11d178333505010
We already have targets that build generic system images, which can be
applied (flashed) onto matching devices to replace their target-specific
system images. This CL adds PRODUCT_BUILD_GENERIC_OTA_PACKAGE that
allows building generic OTA packages to be installed over-the-air.
Since A/B and non-A/B OTAs have different package formats, currently the
support is limited to targets that use A/B OTAs. Note that this CL only
allows _building_ the package - will need additional changes for the
actual package install as well as targeting matching devices.
Bug: 122851610
Test: `m otapackage` on a target that sets
`PRODUCT_BUILD_GENERIC_OTA_PACKAGE := true`.
Test: TreeHugger
Change-Id: If6fd2da15d24c5aaee09618efe94514c6d83292d
Some people apparently still talk to the network during their build.
Allow this temporarily with a BUILD_BROKEN_USES_NETWORK check.
Bug: 129992021
Test: attempt to talk to the network during the build with and without
this flag
Change-Id: I45612ad6165f92f123847b4057338c0dfc3424ee
This moves the BoardConfig READONLY marking being product.mk's
responsibility to board_config.mk.
Also unify it with the BUILD_BROKEN_* setting handling, and
READONLY a few additional variables.
Test: build_test
Change-Id: Ifcfef588aa459223d6d7f017413d1681f341297f
These files may be setting variables usually defined in the
BoardConfig. This moves that setting into board_config.mk so
that the relevant variables can be made readonly.
Test: build_test
Test: diff presubmit target_files vs base cl
Change-Id: I4dab09fa67c0f2e88a8ce1402a35b4ef5f8a0560