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
This allows setting the variable READONLY after reading the BoardConfig.
This is safe to do because this flag is only set in BoardConfig.mk
files. The same is not true for many of the other default preopt flags,
like DEX_PREOPT_DEFAULT or WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
which are set in mixture of product / board config files.
Test: boot blueline
Change-Id: I961ba581f9790bcdc7cf6b36d8b53bcdb8861a92
The current modification of the variable within the build system
prohibits making the variable readonly.
Test: build_test
Test: boot blueline
Change-Id: Iec6058a163b5951db389d4adc0d9d0397431efb1
Move a few more variable stripping/sanity checking from
config.mk to board_config.mk
Test: build_test
Change-Id: I93fde7293de38398039dbb679b2399c8a68c190d
Similar to product_config.mk, this contains the logic for reading
BoardConfig.mk, and will be expanded to sanity-check variables
set in the BoardConfig etc.
Test: build_test
Change-Id: I4f8d7cfbf1506ae4268c82c9554680259958b313