Commit graph

1497 commits

Author SHA1 Message Date
Tao Bao
d14c2f88df Use the installed vboot_signer.
Bug: 34738751
Test: Set `PRODUCT_SUPPORTS_VBOOT := true` and `m -j otatools-package`.
      Check the packed tools.
Test: Set `PRODUCT_SUPPORTS_VBOOT := true` and `m -j bootimage`.
Change-Id: Ia2ea475e3dc03cada1da524a299a21b8ad7ed536
2019-05-06 20:03:24 -07:00
Tao Bao
d5ab10eed4 Update the references to verity tools.
Test: `m -j dist` with aosp_marlin-userdebug
Test: `atest releasetools_test`
Test: Run signing with otatools.
Test: TreeHugger
Change-Id: I60d5bad4435d588c5f97b2245ca67ed3d55299b7
2019-05-02 18:32:11 -07:00
Ian Pedowitz
842119ab3a Revert "RESTRICT AUTOMERGE Updating the platform sdk version for Q"
This reverts commit 5e0226b816.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: Ia3693b2a4907c4ca9be56cfe18fda35b8545abba
2019-05-02 00:55:38 +00:00
Suprabh Shukla
5e0226b816 RESTRICT AUTOMERGE Updating the platform sdk version for Q
Test: Builds, boots.

Bug: 129975435
Change-Id: I98d35b36c540a258e17d18210eb4e93717abacc6
2019-04-30 00:48:01 +00:00
Bowgo Tsai
d82a1549f1 Adding boot-debug.img and ramdisk-debug.img
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)
2019-04-23 21:03:00 +08:00
Bowgo Tsai
0013f55ef4 Adding boot-debug.img and ramdisk-debug.img
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
2019-04-22 21:50:07 +08:00
Dan Willemsen
1d4a56f1a0 Obsolete BUILD_BROKEN_DUP_COPY_HEADERS
There are no remaining users.

Test: treehugger
Change-Id: I1fd5b933372e3ea391c121d265f41c35b832b206
2019-04-19 18:28:53 +00:00
Dan Willemsen
407ca587be Obsolete BUILD_BROKEN_PHONY_TARGETS
There are no remaining users.

Test: treehugger
Change-Id: Ice6f25a59265305e7e5d3dd041b16cd04674dd1e
2019-04-19 11:26:14 -07:00
Dan Willemsen
c1a836bab0 Merge changes from topic "make_deprecation"
* changes:
  Add infrastructure for deprecating module types
  Mark BUILD_* as readonly
2019-04-18 17:44:19 +00:00
Dan Willemsen
695849ec88 Add infrastructure for deprecating module types
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
2019-04-17 17:02:20 -07:00
Dan Willemsen
bed1918841 Mark BUILD_* as readonly
Test: treehugger (build_test)
Change-Id: I2fddd43ebeaffd48246ab2fa289a19131094a1ac
2019-04-17 12:35:41 -07:00
Tom Cherry
6b28af30fb Remove TARGET_ROOT_OUT_SBIN / TARGET_ROOT_OUT_SBIN_UNSTRIPPED
/sbin was traditionally used for static binaries on the ramdisk for
Android, but now everything is a shared binary, so this directory is
empty and we do not want to encourage creation of new libraries in
this directory.

Bug: 73660730
Test: build
Change-Id: Ia82d892adfffb6fa325d0c570ae7999e7bb28dc2
2019-04-17 11:12:32 -07:00
Dan Willemsen
0ab1be6fe2 Stop using build/target -> build/make/target symlink
Instead, fully specify build/make/target/... everywhere

Test: treehugger
Change-Id: Idf89b2e6a0b777adbfb6370ea34f35faee6d4965
2019-04-09 21:35:37 -07:00
Johan Harvyl
ca1dbcc809 Remove 'column' from modules target
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
2019-04-04 13:19:51 -07:00
Elliott Hughes
24e47858f2 Merge "Remove 'column' from modules target" 2019-04-04 20:17:05 +00:00
David Sehr
976c3c3651 Remove dalvik/dexdump and rename dexdump2
Complete the migration to use art/dexdump.

Bug: 22322814
Test: make -j 50 checkbuild test-art-host-dexdump
Change-Id: Ie69bed375dff79f66add5bdb6a8b1b7e14d8a173
2019-04-03 09:30:06 -07:00
Johan Harvyl
7005d4f4cc Remove 'column' from modules target
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
Change-Id: I26040479a03916161fb5d072de1af640d8080c7f
2019-04-03 07:41:43 -07:00
Sasha Smundak
da25b691d3 Eliminate ENABLE_DEFAULT_TEST_LOCATION as it is always true
Bug: 117224272
Test: treehugger
Change-Id: Idd47ead31fcd89dbf728f140dc3353e5013ba352
2019-03-25 13:26:03 -07:00
Yifan Hong
889b1f7c0c Allow disabling building super partition for DAP devices
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
2019-03-18 11:48:03 -07:00
Nelson Li
1f8357fe7d Revert "Revert "Build System: Solve dependency problem for test""
This reverts commit 6fe7f194b9.

Reason for revert: Fixed all build break.

Change-Id: I0a4842df1225399752515a4cd7a7c14173a5bf7b
2019-03-14 01:05:36 +00:00
Nelson Li
6fe7f194b9 Revert "Build System: Solve dependency problem for test"
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
2019-03-11 16:48:29 +00:00
nelsonli
224e103308 Build System: Solve dependency problem for test
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
2019-03-07 14:08:35 +08:00
Anton Hansson
d488d2d7d7 Move BoardConfig strip / READONLY marking
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
2019-03-01 10:04:18 +00:00
Anton Hansson
192798513e Move combo makefile parsing
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
2019-03-01 09:54:33 +00:00
Anton Hansson
72e36f0278 Modify INTERNAL_KERNEL_CMDLINE instead of BOARD_ variant
The current modification of the variable within the build system
prohibits making the variable readonly.

Test: build_test
Test: boot blueline
Change-Id: Iec6058a163b5951db389d4adc0d9d0397431efb1
2019-02-27 14:29:01 +00:00
Anton Hansson
b9544694a5 Consolidate some BoardConfig variable checks
Move a few more variable stripping/sanity checking from
config.mk to board_config.mk

Test: build_test
Change-Id: I93fde7293de38398039dbb679b2399c8a68c190d
2019-02-27 14:07:43 +00:00
Anton Hansson
71b7f7fbd0 Add support for *_CPU_VARIANT_RUNTIME flags
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
2019-02-21 14:32:13 +00:00
Treehugger Robot
bee89836c7 Merge "DAP: system_as_root can't be true." 2019-02-14 02:09:20 +00:00
Yifan Hong
f84c7e5c8f DAP: system_as_root can't be true.
Test: builds
Change-Id: I3e47e9717c983703494abc8417526caf5955d2e4
Fixes: 124274480
2019-02-13 15:08:33 -08:00
Tom Cherry
e0f3ed5cd0 Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H
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
2019-02-11 13:45:01 -08:00
Colin Cross
485c9cd400 Move hiddenapi singleton rules to Soong
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
2019-02-05 21:38:55 -08:00
Yifan Hong
5cc9230914 Merge "Add kernel info to compatibility.zip" 2019-01-31 19:06:19 +00:00
Dan Willemsen
a734907705 Merge "Deprecate LOCAL_MODULE_TAGS := eng/debug" 2019-01-31 18:32:16 +00:00
Yifan Hong
770ab053b0 Add kernel info to compatibility.zip
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
2019-01-30 13:28:03 -08:00
Paul Duffin
22efcc114e Merge "Remove REMOVE_OAHL_FROM_BCP flag" 2019-01-24 16:01:40 +00:00
Logan Chien
f42823aa7c Merge "Add prebuilt ELF binaries checker" 2019-01-23 07:21:17 +00:00
Dan Willemsen
9569ddd478 Deprecate LOCAL_MODULE_TAGS := eng/debug
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
2019-01-22 20:08:12 -08:00
Paul Duffin
fd24c9fe1f Remove REMOVE_OAHL_FROM_BCP flag
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
2019-01-22 14:16:12 +00:00
Logan Chien
0e53d887d6 Add prebuilt ELF binaries checker
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
2019-01-21 21:35:01 +08:00
David Brazdil
fc274bab4d Replace hiddenapi-{public,private}-list.txt with a CSV file
`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
2019-01-19 15:57:35 +00:00
Treehugger Robot
215e2c828c Merge changes I685ab841,I6ab7e488
* changes:
  Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
  Always package ext filesystem tools
2019-01-19 00:18:02 +00:00
Dan Willemsen
674952098b Add PRODUCT_BUILD_*_IMAGE, BUILDING_*_IMAGE to control building of images
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
2019-01-18 13:11:34 -08:00
Dan Willemsen
4a9a24481d Add PROGUARD_HOME and PROGUARD_DEPS
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
2019-01-17 23:04:27 -08:00
Colin Cross
49adea3bd8 Move hiddenapi to Soong
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
2019-01-17 10:23:10 -08:00
Treehugger Robot
d148d61ccf Merge "Deprecate USER in favor of BUILD_USERNAME" 2019-01-11 22:32:57 +00:00
Tao Bao
519d18286e Don't build retrofit OTA package if vendor.img is unavailable.
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
2019-01-07 12:22:48 -08:00
Yifan Hong
b3f5918890 Merge "Allow devices launched with DAP to override super partition name." 2019-01-07 18:26:17 +00:00
Yifan Hong
035c0ea0d4 Allow devices launched with DAP to override super partition name.
Test: on cuttlefish
Bug: 111801737
Change-Id: Ibb9b7132898d3c871186ded01432de4419809e7c
2019-01-04 16:03:50 -08:00
Dan Willemsen
0636428d43 Deprecate USER in favor of BUILD_USERNAME
Bug: 122270019
Test: treehugger, codesearch
2019-01-02 14:33:29 -08:00
Tor Norbye
cb58fa13df Switch apicheck over from doclava to metalava
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
2019-01-01 13:18:04 -08:00
Colin Cross
8e0ff1c370 Add a flag to allow unbundled builds to build SDKs from source
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
2018-12-18 22:43:16 -08:00
Colin Cross
6db5b0ea9a Move dexpreopting to Soong
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
2018-12-17 13:46:17 -08:00
Colin Cross
b8901d7fb8 Revert "Move dexpreopting to Soong"
This reverts commit e736c58043.

Test: none
Bug: 119412419
2018-12-14 11:49:55 -08:00
Colin Cross
e736c58043 Move dexpreopting to Soong
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
2018-12-12 17:21:22 -08:00
Yifan Hong
5df29604b9 Merge changes from topic "super_target_files"
* changes:
  add_img_to_target_files uses build_super_image
  Build super_empty with build_super_image.py
  Build super.img from images in target_files
2018-12-04 23:20:21 +00:00
Yifan Hong
2b891ac024 Build super.img from images in target_files
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
2018-12-03 11:33:44 -08:00
David Brazdil
8d8d4584f8 Merge "Replace hidden API lists with a single CSV" 2018-11-30 10:01:02 +00:00
Treehugger Robot
4681fc3803 Merge "Add ODM in valid_super_partition_list" 2018-11-30 00:39:51 +00:00
David Brazdil
59b6fd541d Replace hidden API lists with a single CSV
Combine existing hiddenapi-* txt files into a single CSV containing
a list of all class members and their corresponding flags.

Test: m, phone boots
Change-Id: I67f1b5f331b262e9b681d9a3c78c9e4cbb5ea082
2018-11-29 15:48:56 +00:00
Yifan Hong
e5d879a193 Allow space in BOARD_*_SIZE variables for dynamic partitions
Allow instances like:
BOARD_SUPER_PARTITION_SIZE := 4294967296 # 4GiB

Test: add trailing space to BOARD_SUPER_PARTITION_SIZE,
BOARD_(group)_SIZE, BOARD_*IMAGE_PARTITION_RESERVED_SIZE,
BOARD_SUPER_PARTITION_(device)_DEVICE_SIZE, build passes.

Fixes: 120042457
Change-Id: Ib7244e3fd2f782657c84cdb74e601ac96176571d
2018-11-28 15:33:17 -08:00
Yifan Hong
9b743fa997 Add ODM in valid_super_partition_list
ODM can already be built with dynamic sizes (in that
build_image.py builds it correctly). Add it to the list of
valid dynamic partitions.

Test: builds
Change-Id: Ib5d1348530d2120e3af7dbe422ac3ebe6149b4fb
Fixes: 120047099
2018-11-28 12:42:36 -08:00
Treehugger Robot
b906ebb313 Merge "PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS: allow inheritance" 2018-11-21 00:41:44 +00:00
Yifan Hong
452d9267fc PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS: allow inheritance
Test: with this is true, build
     `verified_assembled_system_matrix.xml`;
      file includes kernel requirements
Change-Id: I833b4fefabefb2f0457171055afe5722981e3589
2018-11-20 11:50:52 -08:00
Yifan Hong
c767f7cbfc Add split super images to target_files.
Test: build target files package
Bug: 118506262
Change-Id: Iee6143987c9bfa6f2d287e20c06ea5ef25e82985
2018-11-20 11:17:39 -08:00
Yifan Hong
426e029980 Remove androidboot.logical_partitions kernel cmdline
Flag is not used anymore.
Fixes: 119286600
Test: boots

Change-Id: I47370369ccde6d504ea0c936a179c4a325302f8b
2018-11-19 22:38:35 +00:00
Yifan Hong
b7ea9d3870 Merge changes from topic "dp_retrofit"
* changes:
  Add build flags for spanning the super partition across multiple block devices.
  logical partitions -> dynamic partitions
2018-11-13 20:29:18 +00:00
David Anderson
619fe2da5a Add build flags for spanning the super partition across multiple block devices.
This adds BOARD_SUPER_PARTITION_BLOCK_DEVICES, which must contain a list
of the (non-A/B suffixed) partitions that will comprise the super
partition. It is only intended for devices which cannot have a partition
named "super". For each entry, there must be a
BOARD_SUPER_PARTITION_x_DEVICE_SIZE variable defined with the exact size
of that partition (not its image size). The sum of these sizes must be
equal to BOARD_SUPER_PARTITION_SIZE.

Bug: 116802789
Test: device with BOARD_SUPER_PARTITION_BLOCK_DEVICES builds
Change-Id: I1a79c2e08ca99ce7e42207893ef3285caffecf44
2018-11-12 16:12:51 -08:00
Yifan Hong
c5c0124e7d logical partitions -> dynamic partitions
Reflect a name change.

* PRODUCT_USE_LOGICAL_PARTITIONS is deprecated and
will be removed in the future.

* ro.boot.dynamic_partitions is created. ro.boot.logical_partitions
will be removed once all the usage is removed.

Bug: 119286600
Test: builds

Change-Id: I5cb8bb1f5ebcee893fbef3a0f047c32de8773830
2018-11-09 16:02:59 -08:00
Dan Willemsen
9b7c1e4393 Fix pre-extracted PDKs
The PDK unzip logic does not place all the files in the same directory
it would place a zipfile, but instead inside a directory of the same
name:

  a/b/platform.zip!pdk.mk

turns into:

  a/b/platform/pdk.mk

So fix the PDK_FUISON_PLATFORM_DIR autodetection to take this into
account. Also don't create touch rules for the pre-extracted java files.

Bug: 118776469
Test: try building the PDK with PDK_FUSION_PLATFORM_ZIP set, and files extracted
Change-Id: Ib27d12aba773a5e6bd41fcbe8945a0bc31b8c281
2018-11-05 10:57:24 -08:00
Paul Duffin
79d8bf25ea Allow UnsupportedAppUsage annotations to be in separate target
Previously, all the UnsupportedAppUsage annotations were assumed to be
in the same target as was used at runtime. e.g. frameworks,
core-libart, etc. This change allows separate targets to be specified
in the EXTRA_HIDDENAPI_JARS. It is needed to avoid maintaining local
patches for those annotations in the libcore/ojluni/src/main/java code
which comes from upstream OpenJDK.

This was tested by making and then manually checking that the generated
out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the
same (after sorting) before and after this change.

Test: see above
Bug: 117818301
Change-Id: Icfadbe52601371f6a4cabef106750b16f6c6d4c8
2018-10-31 10:33:38 +00:00
Yifan Hong
a50b5e34a4 BOARD_{GROUP}_SIZE must not be empty.
Otherwise, OTA generation will fail.
Test: OTA generation
Test: do not define it, build error

Change-Id: I63da80bd35d1982db0510428560727c759212771
2018-10-25 16:23:42 -07:00
Dan Willemsen
3e8eb377db Stop passing DIST_DIR to Soong
Test: m dist
Change-Id: I812606595703299f5e333d4e62bc1abeaad15c05
2018-10-20 21:37:44 -07:00
Dan Willemsen
78c40be560 Create a new kati packaging step; move dist
Instead of looking at `dist` and DIST_DIR directly in the Kati Build
step, always write out information about every call to dist, then create
the rules in another ckati run.

So instead of having:

  dist:    <goal> -> <dist> -> <output>
                \______________↑

  nodist:  <goal> -----------> <output>

Always use another phony target in the Kati Build step:

   <goal> ---> <output>
        \----> _dist_<goal>

Then in the packaging step (which is much faster), choose between dist
and no dist:

  dist:   _dist_<goal> -> <dist> -> <output>

  nodist: _dist_<goal>

Bug: 117463001
Test: m dist
Change-Id: Ic96bb6356740300dd3113f6ed699e6a619360c40
2018-10-20 21:44:44 +00:00
Dan Willemsen
7ddc50a066 Refactor common makefile fragments
In preparation for setting up another Kati stage, move some common
settings and tools into a common folder. This way it's a bit easier to
see that they're safe to use, and that they shouldn't depend on anything
outside of the common folder.

Bug: 117463001
Test: build-aosp_arm.ninja is the same before and after
Change-Id: Ief4b75a4dbe45b73ffd03bf32c60695c816d979d
2018-10-20 14:43:58 -07:00
Treehugger Robot
d3e8e5321f Merge "Clean up DIST_DIR usages, move to dist-for-goals" 2018-10-17 15:26:38 +00:00
Mathew Inwood
c948d1a101 Merge "Write greylist annotation metadata to a csv file." 2018-10-17 09:20:04 +00:00
Dan Willemsen
7537fd050f Clean up DIST_DIR usages, move to dist-for-goals
soong_ui now guarantees DIST_DIR is set in the environment, so remove
the default.

Use dist-for-goals instead of writing directly into DIST_DIR.

When building the system image, use DIST_DIR from the environment
instead of from make. This will eventually stop working, but this will
work for now.

Bug: 117463001
Test: m dist  (check gpl_source.tgz, logs/product_copy_files_ignored.txt)
Test: m out/target/product/generic/product_copy_files_ignored.txt
Change-Id: Ice557e0a148602cb8eb154efb747d416f0d0db59
2018-10-16 23:37:51 -07:00
Yifan Hong
422790ca3d Remove PRODUCT_USE_FASTBOOTD flag.
It is not used.
Test: builds

Change-Id: Iff5fbae524945cebd9c8911762e7fc7fb8ac19aa
2018-10-16 13:34:18 -07:00
Mathew Inwood
8c96298a92 Write greylist annotation metadata to a csv file.
Also add support for merging these into a single file elsewhere in the
build.

Test: m, inspect generated greylist.csv
Bug: 117314178
Change-Id: If28110fc1ed090222e55c274e8363110753d10f1
2018-10-16 12:06:02 +01:00
Dan Willemsen
7a5c5d730f Update for flags passed from Soong
Obsolete more GCC-specific flags, TARGET_(arm|thumb)_CFLAGS now contains
pre-filtered clang flags, and GLOBAL_CLANG_CFLAGS_NO_OVERRIDE now
contains all flags instead of just the clang additional flags.

Test: m
Change-Id: I068f155041e681068d38e1a5b6b04d354b85ccee
2018-10-07 19:43:23 -07:00
Yifan Hong
3f0d1ad451 Merge "Support "updatable groups"." 2018-10-04 22:21:57 +00:00
Yifan Hong
b43012f0ad Support "updatable groups".
* 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
2018-10-04 13:08:56 -07:00
David Anderson
b954afec0b Remove uuidgen.py and update lpmake parameters.
Bug: 117229984
Test: device builds with PRODUCT_USE_LOGICAL_PARTITIONS=true
Change-Id: Ib39d19726861dd79d90923163f9e594ed91da4ca
2018-10-03 14:24:34 -07:00
Dan Willemsen
95e91f8e39 Remove obsolete make settings
We turn off the default implicit and suffix rules with
--no_builtin_rules.

DELETE_ON_ERROR has no effect, ninja just keeps track of whether we've
successfully built it or not.

Test: build-aosp_arm.ninja is the same before/after
Change-Id: I2e407d4a12dd3a2af3e923fe3e1a3f7a6e2a463c
2018-09-28 10:27:48 -07:00
Yifan Hong
c49bddfb67 to-upper and to-lower move to strings.mk
So that config.mk can use these functions.
Test: builds

Change-Id: I6634226cbed56c34977803ff9c75b8d481c21c34
2018-09-24 14:45:41 -07:00
Nan Zhang
e06305123b Delete apidiff.mk
Also remove the msg.mk files used for old apicheck.

And export jdiff-doc.zip generated by Soong.

Test: api-stubs-docs-diff
Bug: b/78245848
Change-Id: I329aa375623a7b7a121d58314dab694a326c9f0f
2018-09-17 15:33:13 -07:00
Steven Moreland
c2e80afb28 Disallow accessing Treble _OVERRIDE reqs.
If something needs to distinguish between _OVERRIDE and non-_OVERRIDE,
it is a hack (these should be the same property).

Bug: 114488870
Test: m nothing (exercises this)
Test: searching all of these reqs in the code.
Change-Id: Idc22150a3179d025d7d95beafad39e8b07946ef8
2018-09-13 16:57:51 -07:00
Colin Cross
830eed81ab Use build/soong/scripts/strip.sh for Make modules
Replace the complicated rules in Make with calls the same strip.sh
script that Soong uses.

Bug: 113936524
Test: m checkbuild
Change-Id: If7beeb8381b5a9bc6e9ba15d443a834eb43fc0d4
2018-09-10 11:05:32 -07:00
Treehugger Robot
860f9d11a8 Merge "Use the new executable for mkuserimg_mke2fs" 2018-09-08 03:50:32 +00:00
Dan Willemsen
f063839de9 Remove GCC support from Make
Test: out/build-aosp_arm64.ninja is the same before/after
Test: build_test on downstream branches
Change-Id: If7f8c12f2f288b1e589689361f9457acae634882
2018-09-06 15:40:00 -07:00
Tianjie Xu
573322279a Use the new executable for mkuserimg_mke2fs
This is in line with the change of mkuserimg_mke2fs.sh to python binary.

Bug: 112555072
Bug: 63866463
Test: unittests pass
Change-Id: I82c0be1e5bbc685edc15120da73aa43fdc9f2f05
2018-09-05 20:52:47 +00:00
Treehugger Robot
48a575c029 Merge "Remove droiddoc.mk from Make!" 2018-09-05 17:48:43 +00:00
Nan Zhang
2132fbc7a8 Remove droiddoc.mk from Make!
Test: m -j
Bug: b/70351683, b/78245848
Change-Id: I3348461d742c45d5dae105d26a5c3e8680a08029
2018-09-04 10:54:11 -07:00
David Anderson
1ef03e2b79 Add super_empty.img to target-files and the update package.
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
2018-08-30 16:02:23 -07:00
Tom Cherry
04552fed3b Merge "Support a first stage ramdisk via TARGET_RAMDISK_OUT" 2018-08-29 17:05:40 +00:00
Tom Cherry
d14b895665 Support a first stage ramdisk via TARGET_RAMDISK_OUT
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
2018-08-28 12:42:41 -07:00
David Brazdil
b67402ecce Support hidden API whitelist generated by class2greylist
Libcore has support for annotating a virtual method which is known
to change its return type in a future release. This annotation is
recognized by the dexer and a future-proof bridge method is created.
This patch integrates changes in class2greylist to support this
annotation into the build system and generation of hidden API lists.

Calling class2greylist on each boot classpath module now produces two
text files instead of one: signatures for greylisting and now also
whitelisting. They are passed on to the hidden API list generating rules
in frameworks/base.

Bug: 112186571
Test: m appcompat, diff public-list.txt whitelist.txt
Change-Id: I9861203e6e07a17d50850892ec13880971457d11
2018-08-23 10:38:03 +01:00
Yu Shan
10be65dbc1 Use prebuilt nanopb_generator.py.
Use prebuilt nanopb_generator.py to avoid using the incompatible
version of libprotobuf-python on host.

Test: Local build tests.
Bug: 111798740
Change-Id: Iabca07eb13dbab183fbf85cb0dfe04ce33aa660c
(cherry picked from commit fa47daa47d)
2018-08-16 16:07:05 -07:00
Treehugger Robot
c272a99b5c Merge "Add support for /odm partition" 2018-08-16 03:37:36 +00:00
Treehugger Robot
72150c147e Merge "Remove proguard support" 2018-08-15 01:14:45 +00:00
Colin Cross
e3a4df80c8 Allow Soong to autogenerate test configs
Move the configuration for autogenerating test configs into Soong,
and add LOCAL_FULL_TEST_CONFIG so that Soong can specify the full
path to a generated test config.

Also add a java junit test config template.

Bug: 70770641
Test: m checkbuild
Test: atest CtsUiRenderingTestCases
Test: atest junit-params-test
Change-Id: I2e64bc33c949ab7b342be518f94a81a186fe9c07
2018-08-14 15:39:32 -07:00
yangbill
976c80ae86 ATest: Host native test config auto-gen support.
Autogenerate HostGTest test config for better user
experience of hostside native tests.

BUG: 80298359

Test: . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j
      . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j hello_world_test
      . build/envsetup.sh ; lunch aosp_x86_64-eng ; make -j CtsLiblogTestCases_list

Change-Id: Iee1db17f8957d3c1cd80c9aae1996a72b48413d9
2018-08-14 14:53:14 -07:00
Colin Cross
de684e84fb Merge "Remove TARGET_USES_MKE2FS" 2018-08-14 20:55:51 +00:00
Colin Cross
a110579e31 Remove TARGET_USES_MKE2FS
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
2018-08-13 17:40:26 +00:00
Bowgo Tsai
e4e3018bf6 Adding constraints for first shipping API level >= 29
Do not allow setting BOARD_OTA_FRAMEWORK_VBMETA_VERSION_OVERRIDE when
first shipping API level >= 29.

Bug: 112291283
Test: Checks it can cause build error when the condition is met

Change-Id: I3983bea89625f5ece303432b32bea277aee21a2b
2018-08-14 00:17:50 +08:00
Bowgo Tsai
d624fa63d5 Add support for /odm partition
This CL is largely an adaptation of Change-Id
I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d

tools/vendor_buildinfo.sh is also renamed to tools/device_buildinfo.sh.
The caller then can invoke device_buildinfo.sh "vendor" | "odm" to
generate properties for vendor.img and odm.img, respectively.

It adds the following variables:

- BOARD_AVB_ODM_KEY_PATH
- BOARD_AVB_ODM_ALGORITHM
- BOARD_AVB_ODM_ROLLBACK_INDEX_LOCATION
- BOARD_ODMIMAGE_FILE_SYSTEM_TYPE
- BOARD_ODMIMAGE_EXTFS_INODE_COUNT
- BOARD_ODMIMAGE_EXTFS_RSV_PCT
- BOARD_ODMIMAGE_PARTITION_SIZE
- BOARD_ODMIMAGE_JOURNAL_SIZE
- BOARD_ODMIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_ODMIMAGE_SQUASHFS_COMPRESSOR
- BOARD_ODMIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_ODMIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_ODMIMAGE
- BOARD_USES_ODMIMAGE
- LOCAL_ODM_MODULE
- PRODUCT_ODM_BASE_FS_PATH
- PRODUCT_ODM_VERITY_PARTITION
- PRODUCT_ODM_PROPERTIES
- TARGET_COPY_OUT_ODM
- TARGET_OUT_ODM
- TARGET_OUT_ODM_*

Bug: 64195575
Test: boot a Taimen with existing images

Test: `make odmimage` with
      - BOARD_AVB_ENABLE := true
      - BOARD_ODMIMAGE_PARTITION_SIZE := 62914560
      - BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
      - TARGET_COPY_OUT_ODM := odm
      - PRODUCT_ODM_PROPERTIES += odm.test.build=success

Test: `make odmimage` with
      - BOARD_ODMIMAGE_PARTITION_RESERVED_SIZE := 10485760
      - BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
      - BOARD_AVB_ENABLE := true
      - TARGET_COPY_OUT_ODM := odm
      - PRODUCT_ODM_PROPERTIES += odm.test.build=success
      - PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true

Change-Id: I4dea7b567ec49a766c7a4683decaf81c7e921d55
2018-08-08 18:59:44 +08:00
Colin Cross
3ebfe7309f Remove proguard support
R8 is always used now.

Bug: 111885749
Test: m checkbuild
Change-Id: I9ae586c6360f2e3050422090b4e08f27ae167758
2018-08-07 11:22:17 -07:00
Yifan Hong
d55225f8d6 Merge "Remove USE_LOGICAL_PARTITIONS override"
am: c0213682b3

Change-Id: I75667dfc3596cda7b8b640540f48964081107eb2
2018-08-01 11:40:43 -07:00
Yifan Hong
9a7d525849 Merge "Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags."
am: d1c308bf40

Change-Id: I834e75dcfc04af0dd8655027bfc251c3d0162815
2018-08-01 11:39:59 -07:00
Yifan Hong
a42e5f976d Remove USE_LOGICAL_PARTITIONS override
... so that its requirements does not fallback
on the overridden USE_LOGICAL_PARTITIONS, but
PRODUCT_USE_LOGICAL_PARTITIONS.

Test: m superimage -j
Change-Id: Ib14aaf83cc8bd4336125d503d11c69a60566530e
2018-08-01 18:29:44 +00:00
Yifan Hong
2dae5721d4 Split PRODUCT_USE_LOGICAL_PARTITIONS into sub-flags.
Split the flag into PRODUCT_USE_DYNAMIC_PARTITION_SIZE
and PRODUCT_BUILD_SUPER_PARTITION. More sub-flags can be
added with the same way.

Also change some checks with USE_LOGICAL_PARTITIONS with
the appropriate sub-flags.

This allows easier device bring-up to fulfill the requirements
separately.

This also enables dynamic partition size without logical patition.
Originally, to enable BOARD_*_PARTITION_RESERVED_SIZE must also
enable PRODUCT_USE_LOGICAL_PARTITIONS. The patch fix the rule to
let dynamic partition size is able to be used independently.

Fixes: 111966003

Test: make superimage with PRODUCT_USE_LOGICAL_PARTITIONS
Change-Id: I45b29c87bf94356d8416bbd58a14c8982039c222
2018-08-01 00:39:13 +00:00
Yifan Hong
8883a739b3 Merge changes I1459d62f,I4c2b975e
am: bb937a6b69

Change-Id: Ifdedee1b0251bc9c2a8baf30d28b5d315b5c9e20
2018-07-30 11:35:33 -07:00
Yifan Hong
bb937a6b69 Merge changes I1459d62f,I4c2b975e
* changes:
  Build image for super partition
  productservices => product_services
2018-07-30 18:23:38 +00:00
Yifan Hong
09e4e23a2f Merge "Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS."
am: 4f85bace12

Change-Id: I01718232aa2de09b46785d029bdd70ff59b8d9d6
2018-07-30 10:38:33 -07:00
Yifan Hong
37c0c7c82d Build image for super partition
... for bootstrapping / initializing the device.
Image is built to $(PRODUCT_OUT)/super.img when running
`m dist`. For A/B devices, the image contains other
partitions in the _a slot.

Change-Id: I1459d62f02b95f142dfb3b7608f88ec6801dbf37
Fixes: 111758129
Test: m superimage -j
2018-07-27 13:45:43 -07:00
Yifan Hong
0c3eb63eb3 Add PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS.
When it is true, all kernel requirements are enforced during OTA.
Otherwise:
- Kernel minor revision is not enforced.
- Kernel configs are not enforced.

Bug: 111840577
Test: `m dist` and inspect system_matrix.xml in OTA zip

Change-Id: I965ee5ef59ff48b600ebfab858ecf0909397fe6b
2018-07-27 12:42:11 -07:00
Yifan Hong
ebc041af56 productservices => product_services
Make names consistent.
Some things that does not change:
- productservicesimage target and intermediates

Test: build product services image
Bug: 111609632
Change-Id: I4c2b975e194577aad3d51b908b103880625deb5e
2018-07-26 17:19:02 -07:00
Yifan Hong
2843e2e16f Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk"
am: df899f64d0

Change-Id: Icdf456afba7d366373311b292b1675c3cce6bf4c
2018-07-26 15:09:53 -07:00
Treehugger Robot
df899f64d0 Merge "BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk" 2018-07-26 21:44:05 +00:00
Yifan Hong
78ae26132d BOARD_SUPER_PARTITION_PARTITION_LIST check moved to config.mk
... because variable checks should go there.

Test: pass
Change-Id: I484f928d848fd4f3b3936d1c7fd03976ee64feb2
2018-07-26 10:50:45 -07:00
Mathew Inwood
50f59655ba Merge "Build rules to derive greylists from annotations."
am: 48a7929962

Change-Id: I029776a9e31923b87e125ab0054b398d9c935bce
2018-07-26 01:37:29 -07:00
Mathew Inwood
48a7929962 Merge "Build rules to derive greylists from annotations." 2018-07-26 07:37:29 +00:00
Mathew Inwood
04c58dea0b Build rules to derive greylists from annotations.
Uses the new class2greylist tool to extract API descriptors from .class
files.

Also add these generated greylist.txt files as dependencies of
INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST so they can be merged later in
the build.

Bug: 110868826
Test: m
Change-Id: I406587732b537f9b56768ad9909039dfab34c334
2018-07-24 15:48:42 +01:00
Yifan Hong
fe421ed263 Merge changes from topic "board_partition_reserved_size"
am: 2d90c246a9

Change-Id: I460ea917b47a61acb0cbb0f17a867d15f61c7d6d
2018-07-23 11:58:52 -07:00
Yifan Hong
9c35a022e1 build_image.py recognize BOARD_PRODUCT_SERVICESIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I00c1a96c09cf7bd9274b65ac0afc47462686171d
2018-07-20 16:51:26 -07:00
Yifan Hong
56a6c3bb34 build_image.py recognize BOARD_PRODUCTIMAGE_PARTITION_RESERVED_SIZE
Test: builds
Bug: 79106666
Change-Id: I26aba694fd3d6a2feed7601524dde52569ba41e2
2018-07-20 16:51:26 -07:00
Dario Freni
5f9ddc95a2 Merge "Add support for /product-services partition"
am: 3cf03b775a

Change-Id: I1b0b3628d1b96967e569093b93b12fbc5acd7ad5
2018-07-20 02:09:37 -07:00
Dario Freni
3cf03b775a Merge "Add support for /product-services partition" 2018-07-20 09:00:25 +00:00
Tri Vo
60b687383d Merge "Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS"
am: 3e583e0b3d

Change-Id: I297a53cd1acd73250967c6a9669f876d68694354
2018-07-19 18:02:51 -07:00
Dario Freni
5f681e1dd7 Add support for /product-services partition
This CL is largely an adaptation of Change-Id
I774e6a38003734421591e51bed103802ff84f432

It adds the following variables:

- BOARD_AVB_PRODUCT_SERVICES_KEY_PATH
- BOARD_AVB_PRODUCT_SERVICES_ALGORITHM
- BOARD_AVB_PRODUCT_SERVICES_ROLLBACK_INDEX_LOCATION
- BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCT_SERVICESIMAGE_EXTFS_RSV_PCT
- BOARD_PRODUCT_SERVICESIMAGE_PARTITION_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_JOURNAL_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCT_SERVICESIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_PREBUILT_PRODUCT_SERVICESIMAGE
- BOARD_USES_PRODUCT_SERVICESIMAGE
- LOCAL_PRODUCT_SERVICES_MODULE
- PRODUCT_PRODUCT_SERVICES_BASE_FS_PATH
- PRODUCT_PRODUCT_SERVICES_VERITY_PARTITION
- PRODUCT_PRODUCT_SERVICES_PROPERTIES
- TARGET_COPY_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES
- TARGET_OUT_PRODUCT_SERVICES_*

Bug: 80741439
Test: Successfully built product-services.img with one module in it, and flashed
on device. Also successfully built image with /system/product-services directory
and no /product-services partition.
Change-Id: I5d229f6ac729ea6df9ff1f14cee2e28972cd9b4d
2018-07-19 11:15:11 +01:00
Tri Vo
047c4d544c Add 28.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 72458734
Test: m selinux_policy
Change-Id: I5104c14bcc45067723080c229895c9a7771b2651
2018-07-18 13:24:43 -07:00
David Brazdil
467a10c261 Add singleton rule for hiddenapi list generation
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.

This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.

Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
2018-07-13 00:52:05 +00:00
David Brazdil
dc39f73d5b Merge "Add singleton rule for hiddenapi list generation" 2018-07-12 21:34:54 +00:00
David Brazdil
ab501e0d8b Add singleton rule for hiddenapi list generation
The lists of public/private APIs used for non-SDK API restriction
enforcement used to be generated by Doclava. In Q we're switching
to resolving android.jar (and other SDK stub JARs) against the boot
class path directly to avoid lowering Doclava's high-level view of
the framework and issues related to it.

This patch adds a new build rule which invokes `hiddenapi` on all
boot class path dex files simultaneously. The tool generates two
text files - one with public and one with private APIs.

Bug: 79409988
Test: m out/target/common/obj/PACKAGING/hiddenapi-private-list.txt
Merged-In: I826d8ac513a41a1d6d5e29a8300073158cff5acf
Change-Id: I826d8ac513a41a1d6d5e29a8300073158cff5acf
(cherry picked from commit a39db48511)
2018-07-12 08:58:14 +00:00
Colin Cross
5bcb2fc9a9 Move manifest merger config to Soong
Bug: 110848854
Test: m checkbuild
Change-Id: Id9a8b4c02ade275eefc32bf72710430e889cd554
Merged-In: Id9a8b4c02ade275eefc32bf72710430e889cd554
Merged-In: Ib20aa4849978283f1da1ce601b28199fc0183e05
2018-07-11 09:43:04 -07:00
Colin Cross
4871e77f0a Move manifest merger config to Soong
Bug: 110848854
Test: m checkbuild
Change-Id: Id9a8b4c02ade275eefc32bf72710430e889cd554
2018-07-10 22:49:15 -07:00
Colin Cross
357bed2f65 Merge "Make USE_D8 and USE_R8 read-only"
am: 670dd68705

Change-Id: I04e82b076c3669fa3a3ce73e2012c9c430ce47eb
2018-07-10 09:51:05 -07:00
Treehugger Robot
670dd68705 Merge "Make USE_D8 and USE_R8 read-only" 2018-07-10 16:38:44 +00:00
Anton Hansson
bfc78def01 Merge "Warn when defining a 32-bit product on a 64-bit device."
am: 4788f5b094

Change-Id: I705ee5fb954c156e7e57dda684ce5d45b23ffb97
2018-07-09 23:39:11 -07:00
Anton Hansson
133fcb2550 Warn when defining a 32-bit product on a 64-bit device.
Building a 32-bit-app-only product on a 64-bit capable device is likely
to be unintentional. Print a warning if this is done implicitly,
e.g. via forgetting to define the TARGET_SUPPORTS_64_BIT_APPS variable.

Also change existing references to only treat 'true' as a positive
value, rather than all non-empty ones.

Bug: 110918674
Test: lunched 64-bit-device product that does and doesn't set this var
Change-Id: I021157c94ec3ac1c690547c8992768e58c89c287
2018-07-09 13:17:52 +01:00
Colin Cross
bbbcf1c01e Merge "Disable standalone relocation packer"
am: effbc370dc

Change-Id: Ie72c24415f13f0960413f61d515b793ab780125a
2018-06-26 10:50:11 -07:00
Colin Cross
979f9f9b18 Disable standalone relocation packer
We only support relocation packing inside lld now, remove calls to
the standalone relocation packer.  Any shared library built with
LOCAL_USE_CLANG_LLD := false will no longer have relocation packing.

This will also prevent relocation packing on prebuilt shared
libraries.

Also enables relocation packing on Darwin since lld will work on
Darwin.

Bug: 110715614
Test: m checkbuild
Change-Id: Ib4d4bc86f164d05dd78455c8e7605d4b4f5a2a77
2018-06-26 00:35:46 +00:00
Colin Cross
e9381754b4 Make USE_D8 and USE_R8 read-only
Confusion between LOCAL_USE_R8 and USE_R8 caused USE_R8 := false
to be set in an Android.mk file, which changed the behavior of
half of the build.  Make USE_R8 and USE_D8 read-only to prevent
it from happening again.

Test: m checkbuild
Bug: 110033958
Change-Id: I09a8fbf3d7f8e4b3f0cb3de538870f925d5d0abe
2018-06-25 14:18:42 -07:00
Yifan Hong
bb42f7d655 Merge changes from topic "board_partition_reserved_size"
am: 3967e0eb99

Change-Id: I767967f1086ec303c63199d0e38ec02dedf09152
2018-06-22 13:25:18 -07:00
Treehugger Robot
3967e0eb99 Merge changes from topic "board_partition_reserved_size"
* changes:
  build_image.py recognize BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
  build_image.py recognize BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
2018-06-22 20:10:47 +00:00
Yifan Hong
749062d379 build_image.py recognize BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
Test: `make vendorimage`

Test: `make vendorimage` with the following:
    - install a large file to vendor image
    fails as expected (because _PARTITION_SIZE is exceeded)

Test: `make vendorimage` with the following:
    - set PRODUCT_USE_LOGICAL_PARTITIONS to true
    - set BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
    fails as expected (BOARD_VENDORIMAGE_PARTITION_SIZE needs
    to be undefined)

Test: `make vendorimage` with the following:
    - install a large file to vendor image
    - set PRODUCT_USE_LOGICAL_PARTIIONS to true
    - add a small BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE
    - remove BOARD_VENDORIMAGE_PARTITION_SIZE
    build succeeds.

Bug: 79106666

Change-Id: Ica8fdce64e8f37d91e66e3d49c0c74fadd15a832
2018-06-22 10:25:54 -07:00
Yifan Hong
bbcba1e353 build_image.py recognize BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
- Copy "use_logical_partitions" to *_image_info.txt before sending
  it to build_image.py, so that the script can use this variable.

- build_image.py emits an additional properties file to inform
  the build system about the system image size.

Test: `make systemimage`

Test: `make systemimage` with the following:
    - install a large file to system image
    fails as expected (because _PARTITION_SIZE is exceeded)

Test: `make systemimage` with the following:
    - set PRODUCT_USE_LOGICAL_PARTITIONS to true
    - set BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
    fails as expected (BOARD_SYSTEMIMAGE_PARTITION_SIZE needs
    to be undefined)

Test: `make systemimage` with the following:
    - install a large file to system image
    - set PRODUCT_USE_LOGICAL_PARTIIONS to true
    - add a small BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE
    - remove BOARD_SYSTEMIMAGE_PARTITION_SIZE
    build succeeds.

Test: same for systemotherimage

Bug: 79106666

Change-Id: I574062882acd1ecd633ac38c5a8c5351b90a32d8
2018-06-22 10:25:54 -07:00
Colin Cross
c0071808da Merge "Always use OpenJDK9 for building"
am: 12eafb61b0

Change-Id: Iec1529983659c3c966b32c384c337d6db5144766
2018-06-21 14:56:35 -07:00
Colin Cross
12eafb61b0 Merge "Always use OpenJDK9 for building" 2018-06-21 21:27:16 +00:00
Colin Cross
2e51d73d2b Merge "Run ErrorProne in OpenJDK9"
am: 264bc07791

Change-Id: I3ce7202cdcfd3e86fbccb359f56ca59581855a04
2018-06-21 13:57:20 -07:00
Colin Cross
264bc07791 Merge "Run ErrorProne in OpenJDK9" 2018-06-21 20:47:41 +00:00
Tom Cherry
281d343dfb Merge "Reland: Verify init scripts for correctness during build"
am: bdaaab2e39

Change-Id: Ia0cdc6067e357e97ab88b1dd2690358ead4edd18
2018-06-21 13:12:54 -07:00
Treehugger Robot
bdaaab2e39 Merge "Reland: Verify init scripts for correctness during build" 2018-06-21 20:01:50 +00:00
Dan Willemsen
a6e1fadea5 Merge changes from topics "deprecate_export", "add_build_broken"
am: 08015aa03b

Change-Id: I3f22f431acdcd233ddd73a248eb510d55a9a194e
2018-06-21 12:32:14 -07:00
Colin Cross
1588c0ee57 Always use OpenJDK9 for building
Remove support for compiling with javac from OpenJDK8.
We still target 1.8 by default, and OpenJDK8 prebuilts are still
required for the bootclasspath and running robolectric.

Bug: 38418220
Test: m java
Change-Id: I6f178f73b42331494fadcc25a62a5475656b873e
2018-06-21 12:22:37 -07:00
Tom Cherry
fc97764dd5 Reland: Verify init scripts for correctness during build
Relanding with change to not run on the darwin build since host init
verifier is not possible there.

Bug: 36970783
Bug: 110477913
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
      PRODUCT_COPY_FILES, or TARGET_PREBUILT

Change-Id: Iae93705a9320159ed97328e615eaa3bc150e6442
2018-06-21 11:16:25 -07:00
Dan Willemsen
8b9c3cc54b Mark export/unexport as deprecated
Make it so that `export`/`unexport` are deprecated during product
configuration, but obsolete during Android.mk parsing (and later in the
build, since we can't un-obsolete it).

Remove some ccache / goma exports, those don't need to be exports, since
soong_ui asks about them explicitly. They also only run doing the
initial project configuration, so we don't run anything with that
environment.

Bug: 73959648
Test: m nothing
Test: build_test on all downstream branches
Change-Id: I55a749f46775660439ae57e881a02c914e83de16
2018-06-21 10:12:23 -07:00
Dan Willemsen
94bff7ae22 Add more BUILD_BROKEN_* logic
Make the values tristate, so that we can differentiate set vs not in
scripts that parse the logs.

Also add some placeholders for warnings that I expect to turn into
errors.

Test: Set BUILD_BROKEN_PHONY_TARGETS to "foo"
Change-Id: I3f7e1e0f85dcef84d6461fc40bdd83dc5bf75ff7
2018-06-21 10:12:23 -07:00
Colin Cross
e46727a2ba Run ErrorProne in OpenJDK9
Run ErrorProne as a processor in javac from OpenJDK9.

Bug: 69485063
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I2dde597430b47c440df22d248809233a6ade1625
2018-06-20 18:49:50 -07:00
Yifan Hong
d76c44b72f Merge "Revert "Verify init scripts for correctness during build""
am: 560890b29f

Change-Id: I5f69d68b9b604ba76a5bf4fa0a9fd453f62ccde6
2018-06-20 16:03:47 -07:00
Yifan Hong
560890b29f Merge "Revert "Verify init scripts for correctness during build"" 2018-06-20 22:56:39 +00:00
Tom Cherry
d15e50022f Revert "Verify init scripts for correctness during build"
This reverts commit 03303f97be.

Reason for revert: Mac build

Change-Id: Iadd76491307534fde81d3d917876c603a0658fb9
2018-06-20 22:45:14 +00:00
Tom Cherry
cd7535c00d Merge "Verify init scripts for correctness during build"
am: 8075746865

Change-Id: I96b7f88a3e568e147c3e3f68709e4c7eb3b525c6
2018-06-20 10:09:01 -07:00
Tom Cherry
8075746865 Merge "Verify init scripts for correctness during build" 2018-06-20 17:06:11 +00:00
Tom Cherry
03303f97be Verify init scripts for correctness during build
Bug: 36970783
Test: builds pass without failures
Test: builds fail with failures in init files used via LOCAL_INIT_RC,
      PRODUCT_COPY_FILES, or TARGET_PREBUILT

Change-Id: Ia98793776b365733ca8f0174dc228326a6edf041
2018-06-14 14:21:06 -07:00
Colin Cross
b71570fc8c Merge "Revert "Revert "Remove desugar support""" am: 50ad8c97ac
am: 9f0e4a430f

Change-Id: I8ef7ec33394af7fd7afab4455f79a932ee774b92
2018-06-07 15:49:03 -07:00
Colin Cross
8bd764fc7a Merge "Revert "Remove desugar support"" am: bc965aa7a9
am: d175a15e0e

Change-Id: Ie7b75adc17b93d7a5dd6c288dcb3e7adc4b676df
2018-06-06 16:26:07 -07:00
Colin Cross
f44ef3af81 Merge "Remove desugar support" am: 541782f2b4
am: 2d744245a6

Change-Id: I62911d24463cf9c508eee0c5ffca1ebd6b4386f0
2018-06-06 15:25:22 -07:00
Colin Cross
cf010858b6 Revert "Revert "Remove desugar support""
This reverts commit cf7407ed61.

Reason for revert: includes art veridex fix this time

Change-Id: I970b51e6a6c6f377cfe793f029d9674e7ee0ed15
2018-06-06 21:46:25 +00:00
Colin Cross
cf7407ed61 Revert "Remove desugar support"
This reverts commit bfad2c070c.

Reason for revert: broke art veridex build

Change-Id: I0dcc34102ee18b054c2247ae0e2698aca645c667
2018-06-06 21:42:21 +00:00
Colin Cross
bfad2c070c Remove desugar support
Desugaring is always handled by d8 now.

Test: m checkbuild
Change-Id: I8af88522fb1280854ebb4e4957faf70ab59a74f4
2018-06-06 10:06:07 -07:00
Dan Willemsen
7b3a44440d Merge "Darwin: Use nm/otool from Soong instead of PATH" am: 506e00fa6a
am: 8f40cbe2fc

Change-Id: I28c86e1050cacca8c2fa4a5db6392e67b7e0753f
2018-06-04 18:36:36 -07:00
Dan Willemsen
0c31654ae4 Darwin: Use nm/otool from Soong instead of PATH
Soong now exposes the proper paths to NM & OTOOL so that we don't need
to assume that they're in $PATH.

Test: `m PRODUCT-sdk-sdk` on Mac
Change-Id: If0d963832154841d00ced7a6cfa9de5a014af084
2018-06-03 16:20:08 -07:00
Dan Willemsen
b90a1f2e2c Merge "Mark more common variables and paths as readonly" am: 297db2d011
am: df09ace764

Change-Id: I30e0ef6ee6b9b207659a8d474de9ce96fe637d23
2018-06-01 15:21:56 -07:00
Treehugger Robot
297db2d011 Merge "Mark more common variables and paths as readonly" 2018-06-01 21:58:14 +00:00
Yifan Hong
a2a190dd9d Merge "androidboot.lrap => logical_partitions" am: a873417a23
am: 5fae822fa3

Change-Id: I8b2b430f70afc3385603a888cd0326a3b3928843
2018-05-31 18:12:53 -07:00
Yifan Hong
dfaa860073 androidboot.lrap => logical_partitions
Test: boots with prototype
Bug: 79885414
Change-Id: I63c4d7a4b69d84809700cc71eee8ece33c365e9e
2018-05-31 13:08:11 -07:00
Dan Willemsen
c025213c15 Merge "Fix path to flex and bison with SANITIZE_HOST" am: 80ebd01032
am: f82669cc5d

Change-Id: I6f93126962d210e2896592bcd3f4a6f570dfc69f
2018-05-25 18:46:39 -07:00
Dan Willemsen
3de78fdf35 Fix path to flex and bison with SANITIZE_HOST
We don't have sanitized versions of flex and bison currently.

Test: forrest on aosp_x86_64-eng
Change-Id: I536885a715c162e36b69282099784abd16a5300c
2018-05-25 16:13:52 -07:00
Dan Willemsen
5db3299b9c Merge "Use new flex binary" am: 6fe15a380d
am: e3cca7657a

Change-Id: Ie148b4361d3f9b7e0d4b175234c18fdbe34b1949
2018-05-25 16:02:05 -07:00
Dan Willemsen
11677ed983 Mark more common variables and paths as readonly
We've had a report of Android.mk files changing one of these paths,
leading to very strange issues. Nobody should be writing to these
variables after they're set.

Bug: 76424357
Test: diff build-aosp_arm.ninja
Change-Id: I66a9740d89feae342af13341ee3a630a20d62b64
2018-05-25 21:45:57 +00:00
Dan Willemsen
6535dd9891 Use new flex binary
Test: treehugger
Change-Id: Iee21114ae863eb50d26ee9562879a97f956274ab
2018-05-24 16:04:58 -07:00
Colin Cross
c45949b4db Merge "Fix missing class in manifest merger" am: 7f706cabac
am: df267c25e9

Change-Id: Iec8c8f60b7dbd59e23b8ef87b646854b2abe47dd
2018-05-24 10:44:00 -07:00
Yifan Hong
03f31c6625 Merge "Add PRODUCT_USE_LOGICAL_PARTITIONS" am: fecdb5db65
am: 725e94ea24

Change-Id: I64fb594c1493e804ec1dff1fe84976b574ff67bb
2018-05-24 10:43:25 -07:00
Treehugger Robot
7f706cabac Merge "Fix missing class in manifest merger" 2018-05-24 01:15:54 +00:00
Treehugger Robot
fecdb5db65 Merge "Add PRODUCT_USE_LOGICAL_PARTITIONS" 2018-05-23 23:50:32 +00:00
Colin Cross
0084dc8e2f Fix missing class in manifest merger
If manifest merger sees a manifest with an sdk codename instead
of a number it fails with:
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/sdklib/SdkVersionInfo
	at com.android.manifmerger.XmlDocument.getApiLevelFromAttribute(XmlDocument.java:384)
	at com.android.manifmerger.XmlDocument.addImplicitElements(XmlDocument.java:418)
	at com.android.manifmerger.XmlDocument.merge(XmlDocument.java:161)
	at com.android.manifmerger.ManifestMerger2.merge(ManifestMerger2.java:909)
	at com.android.manifmerger.ManifestMerger2.merge(ManifestMerger2.java:263)
	at com.android.manifmerger.ManifestMerger2.access$600(ManifestMerger2.java:61)
	at com.android.manifmerger.ManifestMerger2$Invoker.merge(ManifestMerger2.java:1530)
	at com.android.manifmerger.Merger.process(Merger.java:153)
	at com.android.manifmerger.Merger.main(Merger.java:42)
Caused by: java.lang.ClassNotFoundException: com.android.sdklib.SdkVersionInfo
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
	... 9 more

Add sdklib to the classpath to fix it.

Test: m java
Bug: 77569197
Change-Id: I54fd9edb36aca32cff507340a76eee5e367529e6
2018-05-23 16:35:40 -07:00
Yifan Hong
ef4cd71ebf Add PRODUCT_USE_LOGICAL_PARTITIONS
Test: Set a device with PRODUCT_USE_LOGICAL_PARTITIONS,
      boot, examine /proc/cmdline
Test: build with USE_LOGICAL_PARTITIONS=true

Fixes: 79885414

Change-Id: I593b457786f3cf1bc50dedbc9b603e5408461bcc
2018-05-23 15:10:17 -07:00
Dario Freni
c8b3742f35 Merge "Use manifest-merger 26.1.0 for builds." am: 3b801ca7fb
am: b826fe65fb

Change-Id: Iebb45d1b586b5d9c72f646d7e943100a32a0a6f8
2018-05-23 13:15:36 -07:00
Treehugger Robot
3b801ca7fb Merge "Use manifest-merger 26.1.0 for builds." 2018-05-23 20:03:08 +00:00
Jiyong Park
6cb36a5d6c Merge "Convert apicheck tool build to Soong." am: 5e2056b906
am: 90525df267

Change-Id: Ia8242a167369f545c24f76911d315cf7e2b30d4c
2018-05-15 00:05:58 -07:00
Jiyong Park
5e2056b906 Merge "Convert apicheck tool build to Soong." 2018-05-15 05:30:41 +00:00
Jiyong Park
1c671fd7dd Convert apicheck tool build to Soong.
Bug: b/78034256
Test: m clean && m checkapi
Change-Id: Iaced7335714138730349bbea8a993705f197ae77
2018-05-15 11:38:44 +09:00
Anton Hansson
b2c2be9eca Merge "Remove two stale variables." am: fa682fb47a
am: fdbce7be8e

Change-Id: Ia685b6c7205f9b6bb7493a4c10970aaafee0fee1
2018-05-14 10:53:58 -07:00
Anton Hansson
2c37d704b4 Remove two stale variables.
These two variables are unused, and point to non-existing directories,
so delete them.

Test: make
Change-Id: I5f7577c86847146a7eea827ace74cf8022e19f71
2018-05-14 16:23:51 +01:00
Mathieu Chartier
d022b65c98 Add support for preopt with uses-libraries
Required libraries are specified with LOCAL_USES_LIBRARIES
Optional libraries are specified with LOCAL_OPTIONAL_USES_LIBRARIES

The make rule cross references the libraries against what's stored
in the manifest.

Verification is enabled if LOCAL_ENFORCE_USES_LIBRARIES is true. This
defaults to true if either of LOCAL_USES_LIBRARIES or
LOCAL_OPTIONAL_USES_LIBRARIES are specified.

Bug: 70934104
Bug: 67345922
Test: manual

(cherry picked from commit 09f3b97f4b)

Merged-In: Ifca7d1a993620e9d0e42dc497a4a5d7a6c3f4172
Change-Id: I670431f938c31115a7812c1857c31b9f71675632
2018-05-10 11:52:26 -07:00
Mathieu Chartier
00b42e8c6e Merge "Add support for preopt with uses-libraries" into pi-dev
am: 110d18d73c

Change-Id: Ia861e8d9bb2570ccb10c101e81e83eb372ef41f7
2018-05-10 11:47:48 -07:00
Mathieu Chartier
09f3b97f4b Add support for preopt with uses-libraries
Required libraries are specified with LOCAL_USES_LIBRARIES
Optional libraries are specified with LOCAL_OPTIONAL_USES_LIBRARIES

The make rule cross references the libraries against what's stored
in the manifest.

Verification is enabled if LOCAL_ENFORCE_USES_LIBRARIES is true. This
defaults to true if either of LOCAL_USES_LIBRARIES or
LOCAL_OPTIONAL_USES_LIBRARIES are specified.

Bug: 70934104
Bug: 67345922
Test: manual

Change-Id: Ifca7d1a993620e9d0e42dc497a4a5d7a6c3f4172
2018-05-09 16:52:10 -07:00
Alan Viverette
8ead03bde1 Allow projects to define their own globally-available variables
Bug: 73178261
Test: make checkbuild
Change-Id: I53ee0f1d3ec072e19f4893cca44e16ef672fabfe
Merged-In: I53ee0f1d3ec072e19f4893cca44e16ef672fabfe
(cherry picked from commit fa0184fae9)
2018-05-03 16:47:11 -07:00
Dario Freni
6ae46daaec Use manifest-merger 26.1.0 for builds.
Bug: 71775741
Test: m -j
Change-Id: I6d9c7878e5b1f03b9630290859a6eff04cd55317
2018-05-03 21:14:58 +00:00