This CL changes the condition for building super_empty.img from
PRODUCT_BUILD_SUPER_PARTITION to PRODUCT_USE_DYNAMIC_PARTITIONS, as a
follow-up to the change in [1].
With the CL in [1], it skips building super.img and super_empty.img both
when turning off PRODUCT_BUILD_SUPER_PARTITION. However, the latter
should be mandatory whenever dynamic partitions is enabled. Because
fastboot relies on this file to properly flash dynamic partitions. Plus,
the cost for building super_empty.img is much lower than the one for
super.img.
As part of the change, it'll write group info into target_files when
building with PRODUCT_BUILD_SUPER_PARTITION == false. It's the work for
target_files merging script to determine the values to be picked up. The
current logic in merge_target_files.py always uses the one from vendor
target_files. This CL adds a testcase to ensure the behavior.
[1] https://android-review.googlesource.com/c/platform/build/+/928756
Bug: 135752763
Test: `m dist` with a target that sets PRODUCT_BUILD_SUPER_PARTITION to
false. Check the built artifacts contain super_empty.img. Verify
that the build can be flashed properly.
Change-Id: I277f087eab45663a6c3b33333d16e9e576c1c25c
Merged-In: I277f087eab45663a6c3b33333d16e9e576c1c25c
(cherry picked from commit 48a2feb670)
Previously, setting PRODUCT_BUILD_SUPER_PARTITION to false for a partial
build (with PRODUCT_USE_DYNAMIC_PARTITIONS == true) would fail to
include necessary keys in misc_info.txt that are required when merging
two partial builds to create a dynamic-partition-enabled mixed build.
This change ensures these necessary keys are included even when
PRODUCT_BUILD_SUPER_PARTITION is false. Setting
PRODUCT_BUILD_SUPER_PARTITION to false causes partial builds to skip
building super.img and super_empty.img, instead relying on these images
to come from the final merged build.
Bug: 135752763
Bug: 134764140
Test: Building & booting a dynamic-partition-enabled mixed build, and
inspecting partial builds' logs / out folder to ensure that
super.img/super_empty.img were not created.
Change-Id: I99431a9a342e9b0617510e250597f3024ef39322
Merged-In: I99431a9a342e9b0617510e250597f3024ef39322
(cherry picked from commit 0bf940cace)
Should be in product_config.mk, before the variables are readonly'd, or
the default will fail to work.
(cherry picked from commit 269dd013a5)
Bug: 131576555
Test: set PRODUCT_SHIPPING_API_LEVEL := 29 in mainline_arm64.mk && lunch
Change-Id: I25faee7ec0a3fff17e1d08b834d868834effda36
Merged-In: I25faee7ec0a3fff17e1d08b834d868834effda36
This reverts commit 842119ab3a.
Reason for revert: Rolling forward for Q-Finalization
Bug: 129975435
Bug: 129943426
Test: Build
Change-Id: I651e3ec68a765d3867be5341751cd536ccbe604a
This reverts commit 5e0226b816.
Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th
Bug: 129975435
Change-Id: Ia3693b2a4907c4ca9be56cfe18fda35b8545abba
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
Merged-In: I30137c3caef91805d9143d404e5e4d06c0fccc30
(cherry picked from commit 0013f55ef4)
The standard target modules stopped working when restrictions in
soong were introduced to which binaries are allowed to be used during
builds.
Listing a very large amount of modules in columns does not make it
more readable and harder to work with in tools so just drop it.
Bug: 129800175
Test: make modules
(cherry picked from commit 7005d4f4cc)
Change-Id: I317f6eb4ba5ea633264939a9a58f716bdb36596e
Previously:
if (DAP && !BUILD_SUPER) error;
Now:
if (BUILD_SUPER && !DAP) error;
This allows DAP devices to disable building super partition when the OEM
doesn't want to. The ability to build super partition shouldn't be
a requirement of enabling DAP; rather, building super partition requires
DAP to be enabled.
To do this on a device, PRODUCT_BUILD_SUPER_PARTITION should be set
to false explicitly. If it is unset, it will use the value of
PRODUCT_USE_DYNAMIC_PARTITIONS.
Bug: 127687287
Test: set PRODUCT_BUILD_SUPER_PARTITION to false and build dist
Change-Id: I25f1866e61d73affb445c1aec042cf53aac93583
This reverts commit 224e103308.
Reason for revert: Build Breakage in git_pi-dev-plus-aosp/docs @5366136
make -j110 docs showcommands dist DIST_DIR=/buildbot/dist_dirs/git_pi-dev-plus-aosp-linux-docs/5366136 checkbuild
FAILED:
Dependencies in out found with no rule to create them:
out/target/product/generic/data/app/CtsVerifierTester/CtsVerifierTester.apk
out/target/product/generic/data/app/TradeFedTestApp/TradeFedTestApp.apk
out/target/product/generic/data/app/TradeFedUiTestApp/TradeFedUiTestApp.apk
15:53:46 stopping
and
make -j50 showcommands dist TARGET_PRODUCT=cf_x86_phone DIST_DIR=/buildbot/dist_dirs/git_master-linux-ndk_translation_all/5366149 ndk_translation_all
FAILED: ninja: 'out/target/product/vsoc_x86/data/nativetest/arm/arm_insn_tests_arm_static/arm_insn_tests_arm_static', needed by 'out/target/product/vsoc_x86/obj/PACKAGING/ndk_translation_tests_intermediates/arm_insn_tests_arm_static_result.xml', missing and no known rule to make it
15:55:38 ninja failed with: exit status 1
make: *** [run_soong_ui] Error 1
Return Code: 2
Change-Id: Idf95ef2e06526a0a31690420c923207db627605f
1. A test can add a runtime dependent test module by just setting
LOCAL_REQUIRED_MODULES or LOCAL_TARGET_REQUIRED_MODULES. Then the dependent test
module will be copied to testcase folder.
2. Do not install to $(TARGET_OUT_DATA) for testcase
BUG: 117224272
Test: 1. (a) vi cts/tests/tests/text/Android.mk
(b) add LOCAL_REQUIRED_MODULES := CtsPrintTestCases
(c) m -j CtsTextTestCases
(d) Then, CtsPrintTestCases should also be built to testcase folder like below.
./target/product/generic_arm64/testcases/CtsPrintTestCases
Change-Id: I24ea3783486c54a05cfa9d3d0375b977afc230f8
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
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
Specified in the BoardConfig, and default to the value of the non
_RUNTIME variants.
These flags do not modify build-time compilation, but get written to
system properties on /vendor and can be inspected at runtime to
run/compile code for the specified cpu.
Migrate the bionic and ART cpu variant flags to use the new variables,
but leave the ART preopting using the non-_RUNTIME variants.
Bug: 120773446
Test: boot downstream device specifying CPU_VARIANT_RUNTIME flags
Test: grep dalvik.vm vendor/default.prop
Change-Id: Idc81110172582f38f84cca87f2eff140c5b5f9ac
TARGET_FS_CONFIG_GEN has existed as the preferred mechanism for two
releases, so we finally deprecate TARGET_ANDROID_FILESYSTEM_CONFIG_H.
Test: build
Change-Id: I299a4d1d1d893ac16d6e6ce2ec4659bfcdc19095
Hiddenapi rules are now in build/soong/java/hiddenapi_singleton.go.
This effectively requires any module in PRODUCT_BOOT_JARS to be
defined in Soong.
Bug: 123645297
Test: m checkbuild
Change-Id: If72bd1c20b2014d0a3d400624d37fdb0a3052245
Add kernel configs / version to verified_assembled_vendor_manifest.xml
so that the kernel of the incoming package can be checked against
the framework. Previously, the running kernel was used instead.
Bug: 111125947
Test: test_extract_kernel
Test: manual OTA on Pixel 3 from build:
Android P (kernel version 4.9.96)
to ToT build:
device kernel version = (manually modified) framework requirement = latest,
PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS = true
Change-Id: Id524a58e94bdb6bba348ca461c9d33614ce451a9
Uses a new BUILD_BROKEN_ENG_DEBUG_TAGS variable that defaults to true
until we mark all of the broken targets, then we'll switch it to false.
These are fairly trivial to fix, so I don't expect to keep this flag
around for long.
Test: build_test on aosp and internal master; check logs
Change-Id: I6176fec265e78aecff965b7cf1636f831f68a140
The REMOVE_OAHL_FROM_BCP flag is always set to true and is no longer
necessary so this change removes any uses of the flag.
Bug: 18027885
Test: cts/tests/signature/runSignatureTest.sh
Change-Id: Ied8c3315b29094ad6acee539520af3e4c9e79839
This commit introduces a prebuilt ELF binaries checker. The checker
will check:
1. Whether all DT_NEEDED shared libraries are specified in
`shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES` (Android.mk).
2. Whether all undefined symbols in the prebuilt binary can be resolved
to defined symbols exported by its dependencies.
This ensures that prebuilt binaries won't silently become ABI
incompatible.
To check the prebuilt binaries, all of the dependencies must be
specified in `shared_libs` (Android.bp) or `LOCAL_SHARED_LIBRARIES`
(Android.mk).
If your prebuilt binaries cannot be checked for some reason, you may add
the following property to Android.bp:
check_elf_files: false,
Or, add the following setting to Android.mk:
LOCAL_CHECK_ELF_FILES := false
Bug: 119084334
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I523d3083f22fd4053c096d26f61f8375800281c8
`hiddenapi` is being refactored to work with a single CSV file as
opposued to a multitude of text files (one per flag). This patch
changes the singleton rule for listing public/private APIs from
stubs to expect a CSV as an output.
Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: If56c7ab8a4c3bbd33e447ef0dfd33f2c303a937c
These centralize the decisions on whether to build certain images or
not, and allow the product definition to override that choice.
There are a few use cases here:
* For GSI-like cases, we only want to build the system image. This
didn't really change, but it's somewhat simpler to configure, and
easier to understand the build logic.
* On the opposite side, when you're planning on using a GSI, the device
specific build can only build the vendor images (or some other set).
* Some cases (Fuchsia, etc) don't want to build any images, as they'll
be distributing the build artifacts in their own packaging.
I suspect in the future, TARGET_BUILD_APPS may be able to be refactored
into the third use case.
Test: treehugger
Test: Create a product definition that includes nothing, try to build it.
Test: compare build-aosp_crosshatch.ninja and build-crosshatch.ninja before/after
Change-Id: I685ab841be3718d3dd7052c28ccd764bb6f1991a
So that we can pass this into MAINDEXCLASSES.
Fixes: 122988865
Test: OUT_DIR=$HOME/out mmma frameworks/base/core/tests/hosttests/test-apps
Change-Id: I955d3de46d348e3573a6773f69149e7cabab8904
Perform hiddenapi CSV generation and dex encoding for Soong modules
in Soong. This fixes an issue where dexpreopting was happening on
a different jar than was being installed.
Bug: 122856783
Test: m checkbuild
Change-Id: I24a235c63ff62fed7e1af9f2fd17e55b0c1598a5
We used to build retrofit full OTA package as long as
PRODUCT_RETROFIT_DYNAMIC_PARTITIONS is true. This doesn't work with AOSP
targets that have the flag set but without any available vendor image.
This CL detects such a condition and uses a separate flag to guard the
retrofit OTA building as well as the split super images generation.
Bug: 120852744
Test: `m -j dist` on blueline (w/ vendor images) and aosp_blueline (w/o
vendor images).
Change-Id: I65726f24f8fc546be6802941a6a06590a3804c16
Apicheck seems to only be used for signature file
conversion and diffing at this point.
Test: make dist
Not Yet Merged In Ib8c09ba7f85fbb48526132ca8cc85856d63ca407
Change-Id: I5ca70a019ef4f7828f0a566f7745fc2dbf673b2e
Mainline modules are tightly coupled to the platform, and should
build against the current SDK from source and not prebuilts. Add
a flag UNBUNDLED_BUILD_SDKS_FROM_SOURCE to specify that a
TARGET_BUILD_APPS build should build the current SDK instead of
using the prebuilts.
Bug: 121194841
Bug: 121231426
Test: no change to out/build-aosp_sailfish.ninja
Test: forrest unbundled build
Test: forrest master apps build
Test: forrest mainline modules build
Change-Id: I9ebc08745409a817d831817cb282aba1de6d81bb
Move the dexpreopting logic into Soong. Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module. Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.
This relands I59b20c931ee3e5a8d35eb30da4148691c5095502,
I39d580999947ee54cfefe875b57a028be5333bd7,
Ie7daa94e107d53eff075ca58dbe721bd9d7fc8c2 and
Ica006a007d112c232311435aaac0c0e476232b67, with a minor
update to match the changes made to dexpreopt_gen arguments
and a fix to correctly keep dexpreopt disabled on mac builds.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: I25163e91886cea6941afa25cdb529ed053278dcb
Move the dexpreopting logic into Soong. Make modules will be
dexpreopted by executing the Soong logic in the standalone
dexpreopt_gen binary, which will generate scripts that will
perform dexpreopting for each module. Export global configuration
as JSON to $OUT/dexpreopt.config, which will be used by
dexpreopt_gen and Soong, and per-module JSON configuration that
will be used by dexpreopt_gen.
Bug: 119412419
Bug: 120273280
Test: no differences to dexpreopt outputs on aosp_sailfish system/,
only expected changes to dexpreopt outputs on system_other
(.vdex files for privileged Soong modules no longer incorrectly
contain .dex contents).
Change-Id: I59b20c931ee3e5a8d35eb30da4148691c5095502
For non-retrofit (launch) devices, super.img is used for factory, so
source images should be from target_files.
In this change, build-superimage-target procedure is converted to a
more flexible script so that it can be built.
Bug: 119322123
Test: build target files for device launch with dynamic partitions
Change-Id: I6ee0cc3e145357dfc74be248f81f5f8f4e51fc5c