Commit Graph

66240 Commits

Author SHA1 Message Date
Yo Chiang 336883a64f Add phony target to check all PCF ELF prebuilts
Add phony target check-elf-prebuilt-product-copy-files that asserts
PRODUCT_COPY_FILES doesn't have ELF prebuilts.
This helps triage PCF ELF errors by providing a convenient target to
check / list all errors.

Bug: 140560012
Bug: 156534160
Test: lunch aosp_cf_x86_phone
Test: m USE_NDK_TRANSLATION_BINARY=true \
  check-elf-prebuilt-product-copy-files -k
Change-Id: Ic7fa43c10b0c30b3b1d9b7c2fae75cc6ea4a3513
2020-10-31 06:46:31 +00:00
android-build-team Robot 3f95724bcb Version bump to RQ1A.201205.008 [core/build_id.mk]
Change-Id: I6c6daca45f2fde2eb8fcb7718dc98df23e3ee793
2020-10-31 00:26:00 +00:00
Kelvin Zhang a59bb27754 Fix partition timestamps for secondary payload
When generating secondary payload, we exclude many partitions. These
partitions should be excluded from partition timestamps as well.

Bug: 172022126
Test: ota_from_target_files --include_secondary
Change-Id: Ia3121919154181dc882c4694ad2591dcb81e719f
2020-10-30 14:54:40 -04:00
Yifan Hong e5b97b4714 Merge changes I7bd61f74,Ia84e604a,I75e13b92,I0db2af20,I4feac435 am: d2ae9989cd
Original change: https://android-review.googlesource.com/c/platform/build/+/1478502

Change-Id: Ibb7d27d04c2fdd5e552a331f578a2143a8498618
2020-10-30 17:24:41 +00:00
Yifan Hong d2ae9989cd Merge changes I7bd61f74,Ia84e604a,I75e13b92,I0db2af20,I4feac435
* changes:
  Mount generic ramdisk as readwrite.
  Do not put GENERIC_KERNEL_CMDLINE in recovery image.
  Move common code out of the conditional.
  Remove device-specific bits if recovery_as_boot
  Do not assume GKI just with vendor_boot.
2020-10-30 16:52:28 +00:00
Paul Duffin 69fb86458c Merge "Move boot jars package check to Soong" am: 58d6758ea1
Original change: https://android-review.googlesource.com/c/platform/build/+/1478737

Change-Id: I97d1b738571af736ddda4d12758fe0d6c0afc410
2020-10-30 10:41:52 +00:00
Paul Duffin 58d6758ea1 Merge "Move boot jars package check to Soong" 2020-10-30 10:06:46 +00:00
Alistair Delva b3d45c1db1 Merge "Allow flashing erofs system imgs" am: 38d49ca61a
Original change: https://android-review.googlesource.com/c/platform/build/+/1353441

Change-Id: I1c5f74ec24e271f14964cff4194e5707ccc2f1eb
2020-10-30 07:02:53 +00:00
Alistair Delva 38d49ca61a Merge "Allow flashing erofs system imgs" 2020-10-30 06:41:25 +00:00
android-build-team Robot 22c21c1d7d Version bump to RQ1A.201205.007 [core/build_id.mk]
Change-Id: I1e30f275e0165ababa3db85859f3e1c8700d689e
2020-10-30 01:46:56 +00:00
yawanng 522710f378 Add a rule to get numbers greater or equal to a minimum number.
Cherry-pick from b235859ac0

Bug: 171217392
Test: Make
Change-Id: I04df72f813f892f0b6dec8b48e2a113af4545148
Merged-In: I04df72f813f892f0b6dec8b48e2a113af4545148
2020-10-29 22:29:27 +00:00
Daniel Norman b8d52a2fdc Finds APK shared UID violations when merging target files.
This involved moving the find-shareduid-violation.py script to
releasetools to simplify the cross-tool usage. This new location aligns
this script with other similar python host tools.

In a future change this violation file will be used to check for
shared UID violations across the input build partition boundary.

Bug: 171431774
Test: test_merge_target_files
Test: Use merge_target_files.py to merge two partial builds,
      observe shared UID violations file contents in the result.
Test: m dist out/dist/shareduid_violation_modules.json
      (Checking that existing behavior in core/tasks is presereved)
Change-Id: I7deecbe019379c71bfdbedce56edac55e7b27b41
2020-10-29 09:33:26 -07:00
Paul Duffin bbd4fae4d7 Move boot jars package check to Soong
Passes the SKIP_BOOT_JARS_CHECK property through to Soong and removes
the boot jars check. Moves the check_boot_jars directory containing the
script and data file into build/soong/scripts.

Test: m check-boot-jars - for failing and passing cases
      verified manually that apart from path differences the same
      files (same check sum) were checked in both old make checks and
      the new Soong ones
Bug: 171479578
Change-Id: I61c128806065befce239bbdd5491567827e1b2f5
2020-10-29 11:07:55 +00:00
Joseph Murphy 51a8b2b3bd Merge "Changes Robolectric test suite tag to its own value to enable filtering these in ATP." am: 67e1341100
Original change: https://android-review.googlesource.com/c/platform/build/+/1477422

Change-Id: I1e46e151657b2aaae14cbe456320a11446a90ff8
2020-10-29 10:52:22 +00:00
Yo Chiang e73c5a074d Fix missing required dependency caused by circular dependency
Fix a bug where if module A requires module B, and for whatever reason
module A and B have some common installed files, then all required
dependencies of the common files would be lost.

For example:
```
 # A requires B
ALL_MODULES.A.INSTALLED := a
ALL_MODULES.B.INSTALLED := a b
```

Right now the build system wouldn't generate any dependency for `a`.
However the correct behavior should be: `a` has a order-only dependency
on `b`.

Bug: 157444528
Test: Check generated build-*.ninja
Change-Id: Iec60231f6597ec46077393d1defa109b9c07b208
2020-10-29 10:48:17 +00:00
Joseph Murphy 67e1341100 Merge "Changes Robolectric test suite tag to its own value to enable filtering these in ATP." 2020-10-29 10:35:17 +00:00
Janis Danisevskis 95799b056e Add keystore2 to PLATFORM_PACKAGES
Add keystore 2 to the PLATFORM_PACKAGES in anticipation for the Keystore
2.0 migration. This builds and installs keystore2 on the device, but it
does not get started yet. Staring keystore2 is currently controlled with
the platform property ro.android.security.keystore2.enable=true.

Bug: 171305684
Test: keystore2 builds and is present on the device but does not start
      unconditionally.
Change-Id: Id92cb2aa38022516067853d89d6c3210db1100a8
2020-10-28 19:40:51 -07:00
Yifan Hong 78b55b2244 Mount generic ramdisk as readwrite.
With this change, first stage init can prepare and move
resources to accomodate devices with and without a dedicated
recovery partition.

Test: build with and without recovery partition, and manually inspect
Bug: 171512004

Change-Id: I7bd61f74c16ee77f3f05dc208e0f3cfe81e302b0
2020-10-28 17:05:18 -07:00
Yifan Hong 78860164d0 Do not put GENERIC_KERNEL_CMDLINE in recovery image.
The GENERIC_KERNEL_CMDLINE should only be in the generic boot image.
If device uses recovery-as-boot, it never uses generic boot image
because on devices with generic boot image, recovery resources are
moved to vendor_boot instead.

Bug: 171512004
Test: builds

Change-Id: Ia84e604a8ded28af39c7f1861ff5d3b3af55849f
2020-10-28 17:05:18 -07:00
Yifan Hong c56931c173 Move common code out of the conditional.
Test: builds
Change-Id: I75e13b929dbdb31785a59898579ed14bcc3eef60
2020-10-28 17:05:18 -07:00
Yifan Hong 3941a876de Remove device-specific bits if recovery_as_boot
On legacy devices (launched with R and below), if device:
- has a vendor_boot partition, and
- uses recovery_as_boot

Then, when building the recovery/boot partition, the
device-specific bits, including dtb/kernel base/pagesize should
be moved to vendor_boot.

Previously, it is incorrectly assumed that A/B => recovery_as_boot.
In reality, we do have A/B devices with a dedicated recovery partition.

Note that for devices that uses GKI (BOARD_USES_GENERIC_KERNEL_IMAGE),
recovery_as_boot is never set to true. Instead, recovery resources
are moved to vendor_boot. On these devices, the conditional
'vendor_boot && recovery-as-boot' is always false. Hence:

- If the device has a dedicated recovery partition, it should use V3 header,
  and dtb/base/pagesize won't be in recovery header.
- If device does not have a dedicated recovery partition, the recovery
  image won't be built.

Test: builds
Change-Id: I0db2af20470cbe8a21044a984cccf264590aaccf
2020-10-28 17:05:18 -07:00
Yifan Hong 46aff099d2 Do not assume GKI just with vendor_boot.
This change ensures changes to GENERIC_KERNEL_CMDLINE only affects
devices that explicitly says it uses GKI/generic boot image.

In details, if the device has vendor_boot, but does not explicitly
specify that it uses GKI/generic boot image, do not include
GENERIC_KERNEL_CMDLINE in boot. boot cmdline is left empty
in this case.

The old logic:
- If device uses GKI *OR* has vendor_boot:
  boot uses GENERIC_KERNEL_CMDLINE, and do not include kernel base
  and pagesize.
  - If device has vendor_boot, INTERNAL_KERNEL_CMDLINE, kernel base
    and pagesize goes in vendor_boot.
- If device does not use GKI nor have vendor_boot:
  boot uses INTERNAL_KERNEL_CMDLINE, and includes kernel base and
  pagesize.

The new logic:
- If using GKI, boot uses GENERIC_KERNEL_CMDLINE. Remove kernel base
   and pagesize because they are device-specific.
- If not using GKI:
  - If building vendor_boot, INTERNAL_KERNEL_CMDLINE, base and
    pagesize goes in vendor_boot; boot does not have cmdline, base or
    pagesize.
  - Otherwise, put them in boot

Comparison of the code before and after:
- If device uses GKI,
  - For boot partition:
    - cmdline continues to be GENERIC_KERNEL_CMDLINE
    - kernel base and pagesize continues to be excluded
  - For vendor_boot partition:
    - cmdline continues to be INTERNAL_KERNEL_CMDLINE
    - kernel base and pagesize continues to be included
- If device does not use GKI:
  - If device has a vendor_boot partition:
    - For boot partition:
      * cmdline changes from GENERIC_KERNEL_CMDLINE to empty
      - kernel base and pagesize continues to be excluded
    - For vendor_boot partition:
      - cmdline continues to be INTERNAL_KERNEL_CMDLINE
      - kernel base and pagesize continues to be included
  - If device does not have a vendor_boot partition:
    - For boot partition:
      - cmdline continues to be INTERNAL_KERNEL_CMDLINE
      - kernel base and pagesize continues to be included

Test: builds
Bug: 171512004

Change-Id: I4feac435698f43ac299b430bff66147057865a62
2020-10-28 17:05:18 -07:00
Chema Gonzalez f8b158b312 build: make fs_config_generator.py python2 explicitly
Test: run script in Fedora 31 with (default) python3 interpreter.

```
$ env python --version
Python 3.7.9
```

Change-Id: Ib4e68c5df54b092380e9fca473cd0dbbc0c18db7
2020-10-28 10:52:14 -07:00
Baligh Uddin c392ed4271 Merge "Move {libbacktrace,libunwindstack} from system/core -> system/unwinding/" am: 865b6605ca
Original change: https://android-review.googlesource.com/c/platform/build/+/1477496

Change-Id: Ic9f84f92b928c25c235e9a06ccdab7f04fd4dfbc
2020-10-28 05:47:10 +00:00
Baligh Uddin 865b6605ca Merge "Move {libbacktrace,libunwindstack} from system/core -> system/unwinding/" 2020-10-28 05:16:46 +00:00
Joseph Murphy 77c15cb2d4 Changes Robolectric test suite tag to its own value to enable filtering these in ATP.
Bug: b/157635117
Change-Id: I7748ccbef3dd44d1a4a79e9ded5182607c83a20b
2020-10-28 01:09:18 +00:00
Baligh Uddin 4dc00c60da Move {libbacktrace,libunwindstack} from system/core -> system/unwinding/
BUG: 170465278
Test: TH
Change-Id: I7f0d7b1254e7a28a55599aa4ee6bb6f2ac789b60
2020-10-27 19:44:34 +00:00
Gao Xiang 961041ac80 Allow flashing erofs system imgs
Bug: 158339527
Test: build & boot
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Change-Id: Ie74db8ebcd7214ffbec49d42b305b2f3ac2e8c9d
2020-10-28 01:24:39 +08:00
Anton Hansson c1853e581e Merge "build: allow refreshmod with external out directory" am: b979b79bd9
Original change: https://android-review.googlesource.com/c/platform/build/+/1307113

Change-Id: I25d468c405be508cc586e58ec330e94921acbc1c
2020-10-27 17:05:27 +00:00
Anton Hansson b979b79bd9 Merge "build: allow refreshmod with external out directory" 2020-10-27 17:01:31 +00:00
Treehugger Robot 7479ab83a7 Merge "Let genrule have the entrance depend on signapk" am: 76e225f9ad
Original change: https://android-review.googlesource.com/c/platform/build/+/1476658

Change-Id: I5b1e185dd9dcac732812721ea343021c0cd5fbfb
2020-10-27 16:59:57 +00:00
Treehugger Robot 76e225f9ad Merge "Let genrule have the entrance depend on signapk" 2020-10-27 16:30:55 +00:00
Felka Chang b511e7f33a Let genrule have the entrance depend on signapk
Currently, it may be a good idea to let genrule module depend on
java_library_host by changing soong. To change signapk module type from
java_library_host to java_binary_host makes the genrule can depend on the
signapk module directly and generate the signapk.jar at the same time.

Test: for i in `seq 1 10` ; \
        do\
            make clean; \
            make -j64 apexer_test_host_tools; \
        done
Bug: 160632228
Bug: 157878202
Change-Id: I63ae661b9b419ddc6e69ccfc9a29fd28b116c0b5
Merged-In: I63ae661b9b419ddc6e69ccfc9a29fd28b116c0b5
(cherry picked from commit d8442b4c88)
2020-10-27 14:50:39 +00:00
Alessandro Astone c8771bef56 build: allow refreshmod with external out directory
Get a relative path to out by using $(get_build_var PRODUCT_OUT)
instead of hardcoding it to out/target/product/$TARGET_DEVICE.
That will correctly return the path to the out directory
when setting an external OUT_DIR_COMMON_BASE.

Change-Id: I8a990b710222bc72755c6b6b88fd0c9e80711e14
2020-10-27 13:39:59 +01:00
Joanne Chung 95a80e50d0 Merge "Revert "Refactor zipalign to allow unit tests"" am: 2c892f8700
Original change: https://android-review.googlesource.com/c/platform/build/+/1475757

Change-Id: I04c7c37c327ccbb214d0c6bdff867b1e0d3e5036
2020-10-27 04:48:53 +00:00
Joanne Chung 2c892f8700 Merge "Revert "Refactor zipalign to allow unit tests"" 2020-10-27 04:32:43 +00:00
Treehugger Robot 71d086d0ca Merge "Cleanup references to system/core/liblog -> system/logging/liblog" am: 89dccb3cf9
Original change: https://android-review.googlesource.com/c/platform/build/+/1473818

Change-Id: I5be978217b6bb85998136a28185192d2b89d230b
2020-10-27 03:45:46 +00:00
Treehugger Robot 89dccb3cf9 Merge "Cleanup references to system/core/liblog -> system/logging/liblog" 2020-10-27 03:33:37 +00:00
Joanne Chung 2736c6f046 Revert "Refactor zipalign to allow unit tests"
This reverts commit d4f71a97bd.

Reason for revert: Looks to have broken apsp master b/171754371

Change-Id: I17ec7ab20834f6b0dbdf49668c41d3e76c0c1e41
2020-10-27 03:22:02 +00:00
Treehugger Robot 8c5f323e4e Merge "Rename abazel() to bazel(), give a warning if clobbering an existing Bazel, and have it call tools/bazel (aka build/bazel/bazel.sh) to start Bazel." am: d6bcec35ba
Original change: https://android-review.googlesource.com/c/platform/build/+/1473018

Change-Id: I4fb2b96b82a6c71d068b387ba0e605da39b1c406
2020-10-27 01:59:12 +00:00
Treehugger Robot d6bcec35ba Merge "Rename abazel() to bazel(), give a warning if clobbering an existing Bazel, and have it call tools/bazel (aka build/bazel/bazel.sh) to start Bazel." 2020-10-27 01:09:48 +00:00
Treehugger Robot 9e22721d11 Merge "Refactor zipalign to allow unit tests" am: 454e099c65
Original change: https://android-review.googlesource.com/c/platform/build/+/1471462

Change-Id: Icb32ccc17e7e143671e1a4c083245e572084ad95
2020-10-27 00:22:32 +00:00
Treehugger Robot 454e099c65 Merge "Refactor zipalign to allow unit tests" 2020-10-26 23:42:01 +00:00
Fabien Sanglard d4f71a97bd Refactor zipalign to allow unit tests
Test: Self-tested
Bug: NA
Change-Id: If5e42735853e1508fbeb9fb420a9a9f129c2218f
2020-10-26 12:31:03 -07:00
Jaewoong Jung 1cafb2e586 Merge "Remove duplicate quotation marks in apkcerts list." am: 3b27e9104b
Original change: https://android-review.googlesource.com/c/platform/build/+/1472645

Change-Id: I4c88e2b1289dc64f23932ea849ed5234f6538b9a
2020-10-26 19:17:44 +00:00
Jaewoong Jung 3b27e9104b Merge "Remove duplicate quotation marks in apkcerts list." 2020-10-26 19:05:00 +00:00
Baligh Uddin 84280dfa4c Cleanup references to system/core/liblog -> system/logging/liblog
BUG: 170387172
Test: TH
Change-Id: I206a8c43ba914381771826518f369bad328cc257
2020-10-26 14:34:45 +00:00
Rupert Shuttleworth 5d60d02454 Rename abazel() to bazel(), give a warning if clobbering an existing Bazel, and have it call tools/bazel (aka build/bazel/bazel.sh) to start Bazel.
Test: Manually.
Change-Id: I5605571147db33c6b6a008cedbf279bb909ecdee
2020-10-26 09:21:55 +00:00
Baligh Uddin 78dc335fab Merge "Cleanup references to system/core/base -> system/libbase" am: fabc1f6757
Original change: https://android-review.googlesource.com/c/platform/build/+/1472362

Change-Id: I9eccdcbe9f44450401b8e6eaeb3f2c48cc206698
2020-10-24 02:04:50 +00:00
Baligh Uddin fabc1f6757 Merge "Cleanup references to system/core/base -> system/libbase" 2020-10-24 01:40:48 +00:00