Commit Graph

32338 Commits

Author SHA1 Message Date
Vikram Dattu 29e88b850e HOST_OUT_EXECUTABLES path is not needed in misc_info file
HOST_OUT_EXECUTABLES is already added to the PATH variable,
so it is not needed to add the path info for binaries in
misc_info.txt and <partition>_image_info.txt.

Earlier the mkuserimg item in the build_image dictionary is
hardcoded to "mkuserimg.sh", but now it is customized for
mkuserimg.sh and mkuserimg_mke2fs.sh, and maintained in
dictionary "ext_mkuserimg=$(MKEXTUSERIMG)" in misc_info.txt
and <partition>_image_info.txt, where it is used in the
build_image script while creating the images.

The problem here is the value for this key is set to build
path of the file mkuserimg file
$(HOST_OUT_EXECUTABLES)/mkuserimg.sh,
i.e. out/host/linux_x86/bin/mkuserimg.sh,
there by standalone signing the images using otatools is
not working as the executables are packed in bin folder.

Test: tools/releasetools/sign_target_files_apks
    -p <extracted ota-tools.zip folder>
    --extra_signapk_args=-f /etc/opt/cert_data.dat
    -v
    --replace_verity_private_key ~/build/target/product/security/verity
    --replace_verity_public_key ~/build/target/product/security/verity.x509.pem
    -k <key maping>
    <input target files zip>
    <output target files zip>

Change-Id: I57af1025ec38f3794f779c49faa0bf965afc6a5d
2016-12-20 13:55:06 +01:00
Tao Bao f967849693 Merge "blockimgdiff.py: Add a test case for ReviseStashSize()." 2016-12-19 21:15:18 +00:00
Tao Bao 304ee27e88 blockimgdiff.py: Add a test case for ReviseStashSize().
Bug: 33687949
Test: python -m unittest test_blockimgdiff
Change-Id: I31e42648d2c0e60b941908c098ce5ccc967861ca
2016-12-19 11:17:12 -08:00
Daniel Cashman cbdc0bd096 Merge "Revert "Add build dependencies for split sepolicy files."" 2016-12-17 00:59:43 +00:00
Daniel Cashman df1e2102c6 Revert "Add build dependencies for split sepolicy files."
This reverts commit 086189145c.

Change-Id: Idfd210d1f16eefcedda6154b0361611f53c5158f
2016-12-17 00:53:52 +00:00
Treehugger Robot 298f9b5925 Merge "Add build dependencies for split sepolicy files." 2016-12-17 00:17:13 +00:00
Tao Bao 9cc98767ad Merge "releasetools: Fix the computation in ReviseStashSize()." 2016-12-16 23:57:40 +00:00
dcashman 086189145c Add build dependencies for split sepolicy files.
Add build targets for split sepolicy files so they'll appear in the root dir for
on-device compilation.  nonplat_sepolicy will eventually be removed as it should
be provided by a different partition.  Also replace sepolicy.recovery with the
appropriate split components.

Bug: 31363362
Test: Policy builds on-device and boots.
Change-Id: I017dabe6940c3cd20de6c00bb5253274d5a9269b
2016-12-16 14:01:29 -08:00
Treehugger Robot 95f616b960 Merge "Add default NetworkRecommendation to core.mk" 2016-12-16 20:23:48 +00:00
Tao Bao e27acfdc41 releasetools: Fix the computation in ReviseStashSize().
We compute the max stashed_blocks in ReviseStashSize(), prior to calling
WriteTransfers(), to avoid running out of space due to stashing.

There is a bug when computing the to-be-freed stashed blocks, where we
wrongly free the space _before_ executing the transfer command. This leads
to a script failure where the max stash size violates the max allowed
size in WriteTransfers().

Note that this bug doesn't affect already generated packages. It's only
an underestimate in ReviseStashSize(). The check in WriteTransfers() has
been correct to ensure the max stash size.

Bug: 33687949
Test: Successfully generated incremental OTA which failed previously.
Change-Id: I4f4f043c6f521fce81ca5286e6156f22d99bf7f7
2016-12-16 11:26:05 -08:00
Joe LaPenna fa77432e6f Add default NetworkRecommendation to core.mk
This makes the apk avaiable on all devices and can be overridden on a
per-product basis using LOCAL_OVERRIDES_PACKAGES.

BUG: 33224286
Test: Verified with lunch aosp_bullhead-userdebug; make

Change-Id: Ib345193caa4431b6405294bd8759d93349335814
2016-12-16 10:48:47 -08:00
Alex Klyubin 3cfff7386f Merge "aapt no longer needed for signing APKs" 2016-12-16 17:21:13 +00:00
Alex Klyubin 5a1ba84c30 Merge "Remove unused get-package-min-sdk-version-int" 2016-12-16 17:20:23 +00:00
Vijay Venkatraman e4be608d2f Merge "Revert "Extends VNDK support in Make by setting LOCAL_USE_VNDK for modules going into vendor partition, except when they already have LOCAL_SDK_VERSION set."" 2016-12-16 02:11:12 +00:00
Vijay Venkatraman 823172e209 Revert "Extends VNDK support in Make by setting LOCAL_USE_VNDK for modules going into vendor partition, except when they already have LOCAL_SDK_VERSION set."
This reverts commit 2b6c204c73.

Change-Id: I60a042f2ed0c767ec3a45c31ee1b99d43891efaa
2016-12-16 02:08:18 +00:00
Alex Klyubin 664cc31fd8 Remove unused get-package-min-sdk-version-int
The only user of get-package-min-sdk-version-int was signapk. signapk
no longer needs to be provided with the APK's minSdkVersion though.

(cherry picked from commit e185da21ca)
Test: make clean && make

Change-Id: I6867a004aec0f3752cbbc99cc30e02ca5404b3c4
2016-12-15 16:37:37 -08:00
Alex Klyubin 1b391c002d aapt no longer needed for signing APKs
signapk now auto-detects the APK's minSdkVersion, removing the need to
run aapt dump badging during APK signing.

Test: make clean && make
Change-Id: Ifc74292a9900443d053e437b50b540c8d0b33dbd
2016-12-15 16:37:21 -08:00
Vijay Venkatraman b777f169f8 Merge "Extends VNDK support in Make by setting LOCAL_USE_VNDK for modules going into vendor partition, except when they already have LOCAL_SDK_VERSION set." 2016-12-15 21:26:16 +00:00
Treehugger Robot b8888197c6 Merge "Split mac_permissions.xml into plat and non-plat components." 2016-12-15 20:13:29 +00:00
dcashman 15171f641e Split mac_permissions.xml into plat and non-plat components.
Bug: 31363362
Test: Bullhead and Sailfish both build and boot w/out new denials.
Change-Id: Id7e29ec09510741c4e925231401a6de81704fbf0
2016-12-15 10:04:25 -08:00
Treehugger Robot f61205d5c7 Merge "Remove variables exported by Soong" 2016-12-15 07:19:03 +00:00
Treehugger Robot e9c4079e91 Merge "Don't clean generated java sources when AIDL list changes" 2016-12-15 07:01:13 +00:00
Dan Willemsen 3c6bba0af0 Don't clean generated java sources when AIDL list changes
AIDL doesn't generate into the intermediate src directory, we pass exact
aidl->java files to the compiler. So there is no need to clean the
intermediate src directory when the aidl file list changes for a module.

Test: None, just code inspection
Change-Id: I01feff7cc399ac5b88b83333a1ac86928d0a81e6
2016-12-14 19:53:54 -08:00
Dan Willemsen d3cc4950f8 Merge "Identify non-local EXPORT_C_INCLUDE_DIRS in soong_to_convert" 2016-12-15 00:30:04 +00:00
Dan Willemsen 56c6a9d1ff Remove variables exported by Soong
LLVM_RELEASE_VERSION is unused from envsetup.sh and during product
config loading.  LLVM_PREBUILTS_VERSION is still used in envsetup.sh, so
needs to stay.

Delay reading core/clang/config.mk until after Soong's variables are
read so that we don't need a copy of LLVM_PREBUILTS_BASE.

Test: Compare build-aosp_flounder.ninja
Change-Id: I85b5836a2230838c8f3766fb19c6108fc5c9ca50
2016-12-14 16:27:08 -08:00
Alex Klyubin 620686f3c6 Merge "Faster auto-detection of APK's minSdkVersion" 2016-12-14 23:42:13 +00:00
Alex Klyubin 9b75e272b6 Faster auto-detection of APK's minSdkVersion
Prior to this change, when signing APKs, the build system invoked
'aapt dump badging' on each APK, to detect the value to pass into
signapk as --min-sdk-version. Now that signapk uses the apksig
library, it can auto-detect that value on its own, thus avoiding the
need to invoke 'aapt dump badging' and thus speeding up the build
process.

The semantics of signapk's --min-sdk-version flag is changed by this
commit from having the default value of 0 to having the default value
of "auto-detect from APK".

P.S. The get-package-min-sdk-version-int is not removed from
core/definitions.mk in this commnit, because this function is used in
another project's .mk file and thus that .mk file needs to be modified
first.

Test: rm -Rf out/ && make
Change-Id: I0972fcf0abbde9cbf6794e6c05c743c77c8a78f9
2016-12-14 12:53:44 -08:00
Treehugger Robot a282ceeb73 Merge "releasetools: Add prefix when dumping fingerprints." 2016-12-14 20:53:02 +00:00
Tao Bao f9023856ad releasetools: Add prefix when dumping fingerprints.
We used to dump "Source: <fingerprint>" in update logs. The "Source: "
prefix was unintentionally dropped out.

Test: Check the generated incremental BBOTA script.
Change-Id: I4de62333aa38e3fb09a76df0e769b62af48e0313
2016-12-14 11:53:38 -08:00
Treehugger Robot dd0e69d47f Merge "Implement LOCAL_TEST_DATA to ship data with tests" 2016-12-14 03:52:31 +00:00
Dan Willemsen 0be6907b2b Identify non-local EXPORT_C_INCLUDE_DIRS in soong_to_convert
Soong only supports exporting include directories under the current
directory. So bring non-local directories up as a potential problem in
soong_to_convert.txt

Test: m -j $OUT/soong_to_convert.txt, inspect
Change-Id: I7a15b92e10a1d8b8d3496c6f0529a0d0824f301e
2016-12-13 18:29:59 -08:00
Dan Willemsen d07ba4e2a6 Implement LOCAL_TEST_DATA to ship data with tests
This can be used to ship source data as test artifacts next to native
tests. It works for both local builds and the test bundles using
package_modules.mk.

You just specify a file list relative to the local directory, and those
files will be copied next to the executable under
/data/nativetest*/<module>/...:

  LOCAL_MODULE := mytest
  LOCAL_TEST_DATA := data/file1 file2

  /data/nativetest/mytest/mytest
  /data/nativetest/mytest/data/file1
  /data/nativetest/mytest/file2

If the data is in another directory, you may also specify a different
prefix for the source files:

  LOCAL_TEST_DATA := external/skia:resources/f.xml

  /data/nativetest/skia_test/resources/f.xml

And there's a new convenience macro to find a list of files in this
format:

  LOCAL_TEST_DATA := $(call find-test-data-in-subdirs,external/skia,"*.xml",resources)

I'll expand this to native benchmarks and fuzz tests in a later change,
since they don't have their own module classes yet.

Bug: 30564705
Test: m -j minikin_tests; ls $OUT/data/nativetest*/minikin_tests
Test: m -j continuous_native_tests dist; zipinfo -1 out/dist/*continuous_native_tests*.zip
Change-Id: Ic76a7b62e7f567f259c4ab1510ee97d26600ba9a
2016-12-13 17:18:36 -08:00
Dan Willemsen e26036ad5e Merge "Sort and reorganize clear_vars.mk to make merges easier" 2016-12-13 22:22:59 +00:00
Dan Willemsen d78d6c9fc0 Sort and reorganize clear_vars.mk to make merges easier
Moved common variables from other sections back to the common section,
then sort each section.

Test: build-aosp_angler.ninja is identical before/after
Change-Id: Ibb75935205aa80aaa392c358f8d0599ba624f90d
Merged-In: Ibb75935205aa80aaa392c358f8d0599ba624f90d
2016-12-13 21:14:25 +00:00
Paul Duffin e28eb9ff0e Merge "Use legacy-test instead of core-junit" 2016-12-13 09:34:17 +00:00
Elliott Hughes 95cee3b0e6 Merge "Revert "Merge changes from topic 'fsconfig-2'"" 2016-12-13 04:23:50 +00:00
Elliott Hughes fad4b4b715 Revert "Merge changes from topic 'fsconfig-2'"
This reverts commit 1b2de51881, reversing
changes made to 77ea32f378.
2016-12-12 17:28:44 -08:00
Treehugger Robot d1b10b20f6 Merge "Fix PDK dupbuild issues" 2016-12-10 07:14:12 +00:00
Dan Willemsen e0bba6fa12 Fix PDK dupbuild issues
The PDK uses pattern rules in order to install files from the PDK. When
those files already have build rules, the explicit rules override the
pattern rules, and everything works. But because Make (and Kati) doesn't
attempt to clean the file paths, if one of the rules has a redundant /,
we'll export two ninja rules, and ninja will error out with a dupbuild
error.

The PDK pattern rules are clean, but the explicit notice file creation
was not, it was always adding a double // in between NOTICE_FILES/src
and the module path.

Some modules were also setting a LOCAL_MODULE_PATH with a trailing /,
which is redundant, and also hits the above problem. Instead of fixing
all of the modules, just strip a trailing / from my_module_path.

Bug: 33451638
Test: Build with a PDK
Change-Id: Iff3e98fd191ea90626b9b89f179537e8a75f5ef2
2016-12-09 21:15:41 -08:00
Elliott Hughes 1b2de51881 Merge changes from topic 'fsconfig-2'
* changes:
  fs_config: add unit tests
  fs_config: drop fs_config_files/dirs PRODUCT_PACKAGES requirement
  fs_config: add group to build
  fs_config: introduce group generator
  fs_config: add passwd to build
  fs_config: introduce passwd generator
  fs_config: generate friendly in AID class
  fs_config: limit characters for AID_<name> sections
  fs_config: generate oem AID header file
  fs_config: android_id header generator
  fs_config: support parsing android_filesystem_config.h
  fs_config: modularize fs_config_generator
2016-12-10 00:13:05 +00:00
Treehugger Robot 77ea32f378 Merge "Add more module targets for host, host-cross, host32, host64" 2016-12-09 22:55:00 +00:00
Colin Cross d76e2e63ae Add more module targets for host, host-cross, host32, host64
Previously, clang-host would build the clang module for 32-bit and
64-bit for the host and for windows.  Make clang-host only compile
for host, and add clang-host-cross for windows.  Also add targets
that only build 32-bit or 64-bit: clang-host32, clang-host64,
clang-host-cross32, clang-host-cross64, clang-target32, and
clang-target64.

Test: inspect build.ninja
Change-Id: I7676f9497dfc852f2a0255dda8da06c88eec0db8
2016-12-09 13:08:27 -08:00
Paul Duffin 5bf0587461 Use legacy-test instead of core-junit
The core-junit library has been replaced with the legacy-test
library. The latter included everything that was in core-junit
plus some android.test classes that were in frameworks.

Bug: 30188076
Test: make checkbuild
Change-Id: Id2ba827705dbd2c27a1183e1153b03c11a8a4074
2016-12-09 15:21:45 +00:00
Colin Cross b39165d5df Merge "Pass eng product varible to soong" 2016-12-08 23:42:17 +00:00
Colin Cross 3753e8a335 Pass eng product varible to soong
Test: mmma -j frameworks/compile/libbcc
Change-Id: I79a903528948b728f730385a9de5e431617ff257
2016-12-08 10:05:55 -08:00
Treehugger Robot 6d4123aeb8 Merge "Build: Skip JNI lib symlink in second-stage build" 2016-12-07 17:35:53 +00:00
Pat Tjin c5fd94f2c3 Merge "build_image: add support for specifying number of inodes" 2016-12-07 07:07:26 +00:00
Patrick Tjin a1900841bb build_image: add support for specifying number of inodes
Add support for specifying number of inodes when creating
system, vendor, oem partitions.  These are all read-only
and have no use for extra inodes.  Removing extra inodes
saves a lot of space.

Bug: 32246383
Change-Id: I13f1d4614b64a4abc752c42a1c65d3d151481c21
(cherry picked from commit b59eca3586)
2016-12-06 21:07:23 -08:00
Treehugger Robot 52897d4ecb Merge "custom_image: fix build break" 2016-12-07 03:20:13 +00:00
Andreas Gampe 445553f4e7 Build: Skip JNI lib symlink in second-stage build
When creating a sanitized image, skip creating JNI library
symlinks in the second round.

Bug: 33279120
Test: m && m SANITIZE_TARGET=address & ls -l $OUT/system/app/NfcNci/lib/*
Change-Id: Ib5eace9a49eb8b693603ba5cc59e392d575c44e3
2016-12-06 17:56:29 -08:00