Commit graph

21754 commits

Author SHA1 Message Date
Ying Wang
cd7dfdb4bf Merge "Cleanups." 2015-07-21 23:45:42 +00:00
Ying Wang
83568a6d88 Merge "Create OUT_DIR before writing build_number.txt." 2015-07-21 23:44:45 +00:00
Ying Wang
06332732a4 Create OUT_DIR before writing build_number.txt.
Change-Id: I6a84ec59194c48f4291480cb0c94db0da488518c
2015-07-21 16:39:46 -07:00
Ying Wang
bbd4755647 Cleanups.
- Deleted unused functions in definitions.mk.
- lint is never fully functional in the platform source tree.
- Retire LOCAL_DIST_BUNDLED_BINARIES: now the build system/framework
  supports JNI embedded in apk.

Change-Id: I6314cb20d1544c704ccbc4c1f9cccb9c54fb5a51
2015-07-21 16:03:19 -07:00
Ying Wang
65259743e4 Merge "Split [CC|CXX]_WRAPPER from [TARGET|HOST]_[CC|CXX]" 2015-07-21 21:09:23 +00:00
Ying Wang
57d9060ffd Split [CC|CXX]_WRAPPER from [TARGET|HOST]_[CC|CXX]
- Don't overwrite [TARGET|HOST]_[CC|CXX] with the [CC|CXX]_WRAPPER prefix,
  so that we can disable the wrapper per module.
- Disable ccache on a module when FDO is enabled.

Bug: 22612634
Change-Id: Ibc04a4742d589955066c7eceb43a0da9a2b893bc
(cherry-pick from commit c671a7cf5c)
2015-07-21 14:07:50 -07:00
Colin Cross
1d0f6eb115 Merge "Read BUILD_NUMBER from file in rules" 2015-07-21 19:20:37 +00:00
Evgenii Stepanov
db38e7b5d4 Merge "Disable relocation packer in SANITIZE_TARGET mode." 2015-07-21 17:30:03 +00:00
Tao Bao
dd68e68fdd Merge "Override properties that point to out/ directory." 2015-07-21 05:01:49 +00:00
Shinichiro Hamaji
b097c41630 Merge "Do not update previous_XXX.mk when there is no change" 2015-07-21 01:32:41 +00:00
Shinichiro Hamaji
14da1424e0 Do not update previous_XXX.mk when there is no change
I'm adding a rule which regenerates ninja files to kati:

8666cfba20

With this regeneration rule, unnecessary re-generation will happen
when these .mk files are updated even if there are no changes in
their contents. With this patch, these .mk files are updated only
when the contents will be actually changed.

Change-Id: I4c796f9454502f6bb25019b3806ca577ea5258c1
2015-07-21 09:40:02 +09:00
Ying Wang
b74823e2ff Merge "Auto-clean host tools when switching between apps_only and platform build." 2015-07-21 00:32:35 +00:00
Ying Wang
d37b540a39 Auto-clean host tools when switching between apps_only and platform build.
For apps_only (also PDK build) we use prebuilt host tools in
prebuilts/sdk/tools; For platform build we use tools built from source.
Auto-clean intermediate files of these tools when build type change is
detected.

Bug: 20213206
Change-Id: I9173af322684c017fdb91a3abfbe39ecfe5650e9
(cherry-pick from commit 036b53b6de)
2015-07-20 17:31:08 -07:00
Evgenii Stepanov
4b396e47eb Disable relocation packer in SANITIZE_TARGET mode.
Workaround for
https://code.google.com/p/address-sanitizer/issues/detail?id=387.

Change-Id: I151c3f0eb7e2a4c92a64192a0b43ac17646eab5c
2015-07-20 16:32:53 -07:00
Dan Albert
f4ffafb1a3 Merge "Revert "Revert "Hide unwinder symbols in each binary.""" 2015-07-20 23:11:59 +00:00
Tao Bao
84e7568b1f Override properties that point to out/ directory.
A few properties are stored as links to the files in the out/
directory, which are no longer available when (re)packing from
target_files zip. Redirect those properties to the actual files in
the unzipped directory when repacking.

Change-Id: I18e930cbea224ab9c6db8d4e721b1c266a671db6
2015-07-19 08:48:09 -07:00
Colin Cross
f37b455858 Read BUILD_NUMBER from file in rules
Using $(BUILD_NUMBER) inside a rule causes odd behavior, as the rule
is different every time make is run, but since make doesn't depend
on the command line it only ends up being built with the new value
if some other dependency has changed.

To allow ninja, which does depend on the command line, to provide the
same behavior, store the build number in out/build_number.txt, and
use a shell expansion to cat the file in rules that use it.  This will
cause the rule command to stay identical between builds, while still
getting the new build number if the rule is rerun for a dependency.

Also use the same trick for BUILD_FINGERPRINT, and the date in
droiddoc rules.

Change-Id: I6c5e6b6b3ef4c613563d7f5604df0e401575ba5f
2015-07-18 12:15:04 -07:00
Colin Cross
03e74d66c7 Merge "Move @echo to first command in rules" 2015-07-17 23:01:59 +00:00
Colin Cross
b6da589f60 Move @echo to first command in rules
Move the @echo command that prints the rule description to be the
first command in each rule so that the kati tool can find it to
use as a ninja rule description.

Change-Id: I90f27c35bb719d327a7f2109f8d00d3589082f19
2015-07-16 17:14:27 -07:00
Nick Kralevich
a972891f44 Merge "file_contexts: Label /dev/ttyS2 as console_device" 2015-07-16 18:47:56 +00:00
Miodrag Dinic
df2620ada4 file_contexts: Label /dev/ttyS2 as console_device
This fixes the issue with the emulator "-shell" option.
Init tries to open the console which is passed through
the kernel androidboot.console property, but fails to
open it because "avc" denies it. Init only has permissions
to open console_device in rw mode. This ensures that
/dev/ttyS2 is properly labeled as console_device.

Replaced tabs with spaces.

Change-Id: I9ef94576799bb724fc22f6be54f12de10ed56768
2015-07-16 20:36:07 +02:00
Tao Bao
f737a12098 Merge "Enable verbose output for add_img_to_target_files." 2015-07-15 23:54:28 +00:00
Nick Kralevich
a521a37da9 Merge "mgrep: add output to environment commands" 2015-07-15 19:54:04 +00:00
Evgenii Stepanov
2d0ec89357 Merge "Use a different linker for ASan binaries." 2015-07-15 19:34:06 +00:00
Tao Bao
7055791db5 Enable verbose output for add_img_to_target_files.
Change-Id: I7246c59c79ccf6a7589c884391d0f690746fc129
2015-07-15 11:53:39 -07:00
Tao Bao
ecb7b37be2 Merge "Assert the stash size when generating OTAs." 2015-07-14 20:37:50 +00:00
Tao Bao
8dcf738234 Assert the stash size when generating OTAs.
With block-based OTA v2 and v3, it requires stash space on the /cache
partition to back up blocks during an update. We need to ensure that
it doesn't exceed the partition size. Since there might be other files
on /cache as well, we use cache_size * threshold as the maximum allowed
size. The threshold defaults to 0.8, which can be overridden by command
line option '--stash_threshold'.

Change-Id: I5c2e353ea4716328d6cdc6a7f758520de8d88b8e
(cherry picked from commit 23ac404212)
2015-07-14 13:36:50 -07:00
Evgenii Stepanov
8f5e67a98c Use a different linker for ASan binaries.
Another change in bionic/linker adds linker_asan/linker_asan64 that
know where to find ASan shared libraries.
Also, include linker_asan to the required packages list when building
for ASan.

Change-Id: I8ebe7c0091bbeb0c135708a891d33d9844373d37
2015-07-14 11:10:40 -07:00
Evgenii Stepanov
832fa5d714 Merge "Disable detection of bugs on global variables." 2015-07-14 18:03:03 +00:00
Evgenii Stepanov
ff7a781512 Disable detection of bugs on global variables.
This is a temporary change pending code cleanup.

We are already disabling detection of ODR violations. As it turns out,
an ODR between an ASan-instrumented library and a non-instrumented library
may actually crash ASan, and there is no obvious way out, and one of those
prevents us from booting a SANITIZE_TARGET image right now.

Bug: 21951850
Change-Id: I49508242ec96089a3d4d8b7e45f36323d62f2be9
2015-07-13 20:03:02 -07:00
William Roberts
23a298b190 mgrep: add output to environment commands
Change-Id: I7a97e00c7ef5ac179333303d89511c2f72cbd100
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2015-07-13 09:29:52 -07:00
Tao Bao
2e4dd9ab26 Merge "Fix the permission in common.ZipWriteStr()." 2015-07-11 00:58:32 +00:00
Tao Bao
2a410587e8 Fix the permission in common.ZipWriteStr().
common.ZipWriteStr() should set a default file permission to 0o100644
instead of 0o644.

Change-Id: I8c89d8442b095b56ad3a0d47afdfa73ce55ad0c8
2015-07-10 17:45:09 -07:00
Tao Bao
c881249354 Merge "Pack file_contexts into target_files zip." 2015-07-10 21:21:54 +00:00
Tao Bao
2c15d9eefe Pack file_contexts into target_files zip.
file_contexts (specified by SELINUX_FC) is needed both when building
and (re)packaging. We used to use the copy in out/ when building, and
looked for the copy in BOOT/RAMDISK/ when packaging from target_files
zip. With system_root_image enabled, the file_contexts needed for
building and packaging might be different from the one on device. So
we explicitly pack the file as META/file_contexts in target_files zip.

Also refactor out the overriding of selinux_fc property into
common.LoadInfoDict().

Change-Id: I94f9ea6671b3792c12c1c21573840743d63da39a
(cherry picked from commit aa7318c384)
2015-07-10 14:21:16 -07:00
Tao Bao
da724f7a63 Merge "Zero out blocks that may be touched by dm-verity." 2015-07-10 20:51:34 +00:00
Tao Bao
e9b619108d Zero out blocks that may be touched by dm-verity.
dm-verity may touch some blocks that are not in the care_map due to
block device read-ahead. It will fail if such blocks contain
non-zeroes. As a workaround, we mark them as extended blocks and
zero out explicitly to avoid dm-verity failures.

Bug: 20881595
Change-Id: Id097138bfd065c84eac088b3ad49758010b2927b
(cherry picked from commit 2fd2c9bfd6)
2015-07-10 13:50:24 -07:00
Elliott Hughes
76eaa96875 Merge "Remove HAVE_WIN32_IPC." 2015-07-09 17:30:16 +00:00
Elliott Hughes
ba2f676410 Remove HAVE_WIN32_IPC.
Change-Id: I6c01ed5b059c230d7382dc6158103f31d4bf9dbb
2015-07-09 10:20:13 -07:00
Elliott Hughes
60dda9c44d Merge "Remove mkbootimg from the pathmap." 2015-07-08 23:13:32 +00:00
Elliott Hughes
fd5692b32c Merge "Stop polluting the namespace with HAVE_MALLOC_H in AndroidConfig.h." 2015-07-08 23:11:18 +00:00
Elliott Hughes
3d949bbabc Remove mkbootimg from the pathmap.
It's only ever referred to directly. (Should probably move to
system/core/include, but that's orthogonal to this change.)

Change-Id: I353afff031a29206aaa5a0991fe0ccb39e4731e2
2015-07-08 16:05:17 -07:00
Elliott Hughes
8f548f35d6 Merge "Remove pathmap.mk entries for libc." 2015-07-08 21:19:59 +00:00
Elliott Hughes
b248bf85ae Remove pathmap.mk entries for libc.
Change-Id: I9f4ce70696dd7df5922b3c80501fac9c7d4b7149
2015-07-08 14:10:23 -07:00
Elliott Hughes
5dbf4eab72 Stop polluting the namespace with HAVE_MALLOC_H in AndroidConfig.h.
Change-Id: If1cd88ee14bf9cbb4a0a1f608b0d015c9181c2c2
2015-07-08 13:12:38 -07:00
Tao Bao
e246964b8f Merge "Scan all init.*.rc files for flash_recovery service." 2015-07-08 17:22:36 +00:00
Tao Bao
9f0c8dfaf1 Scan all init.*.rc files for flash_recovery service.
Clockwork builds may rename init.rc to init.core.rc. Change the OTA
script to scan all init.*.rc files to determine the proper location for
install-recovery.sh.

Bug: 22128990
Change-Id: Icad3497d1663e074b938919b40fc239c84fbeb2b
(cherry picked from commit 610754e5ad)
2015-07-08 10:20:39 -07:00
Tao Bao
a00210263e Merge "fix up ota_from_target_files symlink detection." 2015-07-07 16:48:51 +00:00
Ying Wang
2ffb3147bc fix up ota_from_target_files symlink detection.
Change-Id: I10b668096d4e61e75473dd805f96387049f29b79
2015-07-06 14:02:01 -07:00
Tao Bao
48a27bcbb1 Merge "Fix OTA scripts to generate incremental BBOTA with OEM property." 2015-07-06 16:31:51 +00:00