Commit graph

48960 commits

Author SHA1 Message Date
Vic Yang
841ab06af1 Skip checking ELF files for uninstallable soong modules
If a module is uninstallable, the shared library dependencies are not
set up and thus the ELF file check may fail incorrectly.  In this case,
there is no need to check ELF files anyway.

Test: Build walleye with no-vendor-variant VNDK enabled and does not
      see erroneous failure anymore.

Change-Id: Icd115fc82daedf11795800de5cbe87c87073586a
2019-04-02 14:06:22 -07:00
Anton Hansson
072795054a Merge "Make mainline device enable property split" 2019-03-25 18:23:26 +00:00
Anton Hansson
018bd137b7 Make mainline device enable property split
This setting moves the PRODUCT_PROPERTY_OVERRIDES to
the vendor partition.

Bug: 80410283
Test: tail system/build.prop | grep ro.carrier=
      (empty)

Change-Id: I30d564fbd2dd3b56763ccff77979b223857f1c2f
2019-03-25 10:53:07 +00:00
Anton Hansson
94fa0e75cb Merge "Put DEVICE/PRODUCT overlays in different partitions" 2019-03-25 09:25:47 +00:00
Anton Hansson
9274688574 Merge "Set file system types for mainline_arm64 partitions" 2019-03-25 09:24:16 +00:00
Anton Hansson
115292896a Merge "Make mainline_system_arm64 build only /system" 2019-03-25 09:23:30 +00:00
Anton Hansson
30355b60f7 Merge "Enable AB_OTA_UPDATER for mainline" 2019-03-25 09:20:32 +00:00
Tao Bao
9a5093e5f9 Merge changes I91bd3dce,I2e941fd9
* changes:
  releasetools: Fix alignment issue when signing APEXes.
  releasetools: Fix an issue in handling PRESIGNED APEX keys.
2019-03-24 17:31:55 +00:00
Tao Bao
ffc9a30946 releasetools: Fix alignment issue when signing APEXes.
Previously it was following a wrong order by doing `zipalign` after
calling SignApk, which effectively compromised the signature. This CL
corrects the logic, and follows the same flow as in build system:
 - Pack APEX file;
 - `zipalign -f 4096`;
 - Call SignApk to sign the container with `-a 4096` flag.

Bug: 129148142
Test: Run sign_target_files_apks.py on taimen target_files.zip. Boot the
      image after signing.
Change-Id: I91bd3dce4f45c1891c5e122212a699f4808618fa
(cherry picked from commit 0e06cb0a8b)
2019-03-23 10:27:43 -07:00
Tao Bao
1e4cbfaf5c releasetools: Fix an issue in handling PRESIGNED APEX keys.
For PRESIGNED APEXes, we should keep carrying the matching public keys
at /system/etc/security/apex.

Bug: 129148142
Test: Run sign_target_files_apks.py on a target_files.zip with presigned
      APEXes. Check the output zip.
Change-Id: I2e941fd9b10e99d2db9df1e5308cbbe8c760177b
(cherry picked from commit bf3fb024cd)
2019-03-22 14:11:24 -07:00
Anton Hansson
1683198010 Set file system types for mainline_arm64 partitions
This config was in a weird state where it sets the OUT
directory for these partitions but not the file system
type. Within the build system, both of these variables
are used interchangeably to check whether these partitions
are expected to be present.

A typical mainline device is expected to /vendor and
/product, so just add these.

Bug: 120974093
Test: make
Change-Id: I803d7afdcadc37e4384ae80f08bc1c8db535d2f4
2019-03-22 17:25:43 +00:00
Martin Stjernholm
c62e31242d Merge "Exclude libdexfile_external.so to fix aosp_marlin-userdebug builds." 2019-03-22 15:35:09 +00:00
Martin Stjernholm
d185bb29ce Exclude libdexfile_external.so to fix aosp_marlin-userdebug builds.
Test: m systemimage
Bug: 124293228
Change-Id: I7a4744457396084ef9fd78d9c2f1efdabe0f981d
2019-03-22 14:24:08 +00:00
Anton Hansson
07fa9b13b4 Make mainline_system_arm64 build only /system
Configure this product not to build any of the other partitions.

Note that the only partition that currently has artifacts produced
is system_other, and this change doesn't appear to prevent odex/vdex
files from being created there anyway. However, it does allow
configuring the target device (mainline_arm64) to have more partitions
in a followup change.

Bug: 111533333
Test: make
Change-Id: Ib115cb03bc99b9b61e0d6f1b622784e7ad5fcea0
2019-03-22 14:07:49 +00:00
Anton Hansson
cb8276fa93 Put DEVICE/PRODUCT overlays in different partitions
This change changes auto-generated RROs from DEVICE_PACKAGE_OVERLAYS
to be generated in the vendor partition, as opposed to /product where
they were generated in the past.

Note that PRODUCT_PACKAGE_OVERLAYS continue generating RRO packages
to /product, which means that a single app can be overlayed from
different partitions. These RROs have been given module and package
names based on their location.

Bug: 127758779
Test: verify noop on presubmit targets
Change-Id: I5cee70e28e3969e67b2d83eaf25d9c6e3a11102d
2019-03-22 13:25:20 +00:00
Treehugger Robot
9da9c32e80 Merge "Adding adb_debug.prop" 2019-03-22 13:08:24 +00:00
Treehugger Robot
02699e40ea Merge "Check that Runtime APEX libraries don't end up in /system/${LIB}." 2019-03-22 12:34:05 +00:00
Bowgo Tsai
a280a66b5a Adding adb_debug.prop
The adb_debug.prop will be loaded by init when the file
/force_debuggable is present in the first-stage ramdisk, and the device
is unlocked. This file has the highest priority to override other system
properties, thus can override ro.debuggable to 1 to allow adb root.

Bug: 126493225
Test: boot a device with /force_debuggable in ramdisk, checks
      adb_debug.prop is loaded

Change-Id: I75d661bb04178f584d8b6f5eba26ae35ccb01239
2019-03-22 11:43:33 +08:00
Treehugger Robot
1d38fe98d1 Merge "Follow symlink when creating symbols.zip" 2019-03-21 22:19:49 +00:00
Martin Stjernholm
f1e7c7159b Check that Runtime APEX libraries don't end up in /system/${LIB}.
This is a stop-gap measure for a proper fix enforcing library "ownership" in
Soong: b/128708192

Test: m systemimage (with and without libs that exist in /system/lib)
Test: Check that this fails:
  m systemimage
  m out/target/product/taimen/system/lib/libjdwp.so
  m systemimage-nodeps
Bug: 124293228
Change-Id: Iac0d0cec7d9e216028a0caccfbb76838514d4a7b
2019-03-21 17:52:35 +00:00
Tao Bao
c62b9a2347 Merge changes I662aab3d,I5e741c27
* changes:
  Revert^2 "releasetools: check_target_files_signatures.py checks APEXes."
  releasetools: common.UnzipTemp() filters out non-matching patterns.
2019-03-21 16:38:04 +00:00
Anton Hansson
571fab0610 Enable AB_OTA_UPDATER for mainline
The file $(TARGET_OUT_ETC)/update_engine/update-payload-key.pub.pem
is installed conditionally based on this variable, and was found
to differ between mainline_system and the intended device targets.

Also move the variable from gsi_common.mk as GSI inherits the mainline
boardconfig. The variable is not a PRODUCT flag (and not inherited as
such), so fits better in the BoardConfig I think.

Bug: 80410283
Test: presubmit
Change-Id: Ida6fa923fd01b062ff3b93e7737e1e6edf7e4fa1
2019-03-21 14:54:43 +00:00
Anton Hansson
cece1e03af Merge "Read product/device RRO dirs separately from soong" 2019-03-21 11:28:19 +00:00
Jiyong Park
88e0980ddf Follow symlink when creating symbols.zip
Due to the runtime APEX, the symbols directory now contains a symlink;
./apex/com.android.runtime -> com.android.runtime.debug (or .release).

Previously, this symlink itself was included in the symbols.zip file.
And this is causing problem to the online stack tool which does not
follow the symlink in the zip file. Instead of fixing the problem in the
stack tool side, this change let the packaging routine to follow the
symlink and copy the files behind the symlink as if they were under a
directory that isn't a symlink. (i.e.
./apex/com.android.runtime/bin/dex2oat is added)

Bug: 120846816
Test: m dist with marlin (flattened) and blueline (non-flattened)
examine symbols.zip file and check that unstripped shared libraries are
found under /apex/com.android.runtime directory
Change-Id: I1d1c787a2e8ab7209410dfa2cff749a7042e21b0
2019-03-21 18:48:16 +09:00
Logan Chien
81589605fd Merge "Update check_elf_file.py for clang-r353983" 2019-03-21 08:05:16 +00:00
Bowgo Tsai
dce018769f Merge "Only build system_other.avbpubkey when AVB is enabled" 2019-03-21 07:01:53 +00:00
Bowgo Tsai
8802b7119d Only build system_other.avbpubkey when AVB is enabled
/product/etc/security/avb/system_other.avbpubkey is only needed
when BOARD_AVB_ENABLE is true. This fixes the build error of
Marlin/Sailfish.

Bug: 123611926
Bug: 129029207
Test: make
Change-Id: I73f948d84f91cd6fbe49a2de7bf12e46eebe6ede
2019-03-21 14:26:33 +08:00
Vic Yang
30dda1da5e Merge changes from topic "vndk-no-vendor-variant"
* changes:
  Add support for no-vendor-variant VNDK
  Add module-target-built-files function
2019-03-21 04:30:47 +00:00
Treehugger Robot
7e87c72fb0 Merge "Moving system_other key into product.img" 2019-03-21 04:26:21 +00:00
Tao Bao
359862db12 Revert^2 "releasetools: check_target_files_signatures.py checks APEXes."
This reverts commit 5516d37f41.

The previous issue in unzipping non-matching files has been addressed
with commit a49054ca2f2959f50f3188914ec0faebc90ebcbe. This CL rolls
forward to allow dumping container certifcates for APEXes.

Bug: 128848294
Test: Run check_target_files_signatures.py on target_files.zips w/ and
      w/o APEX files.
Change-Id: I662aab3d96fc40ac8e5e206e32b73ac763220b70
2019-03-20 12:40:34 -07:00
Tao Bao
0ff15de32a releasetools: common.UnzipTemp() filters out non-matching patterns.
common.UnzipTemp() calls `unzip` to do the unzipping, which will
complain if there's non-existent names in the given list. Prior to this
CL, callers had to do the work to remove non-existent entries. This CL
filters out the given patterns in common.UnzipTemp()/common.UnzipToDir()
to make callers' works easier.

Bug: 128848294
Test: `m dist` with aosp_taimen-userdebug (which calls
      ota_from_target_files.py on a target_files.zip that doesn't
      contain RADIO/*).
Test: `python -m unittest test_common.CommonZipTest`
Change-Id: I5e741c27ea8d0b8126c398a7e1b56a8deb4a3d7f
2019-03-20 12:38:09 -07:00
Treehugger Robot
299d782ecd Merge "Remove protobuf-cpp-full-rtti from mainline" 2019-03-20 17:47:43 +00:00
Anton Hansson
2cad3f68c2 Merge "Fix the product-graph target" 2019-03-20 17:31:41 +00:00
Vic Yang
51512c558c Add support for no-vendor-variant VNDK
When TARGET_VNDK_USE_CORE_VARIANT is set to true, the vendor variant of
VNDK libraries are by default not installed.  Instead, the core variant
will be used by vendor binaries at runtime.

To ensure the core variant of VNDK libraries are installed, we also add
a flag LOCAL_VNDK_DEPEND_ON_CORE_VARIANT to indicate that the vendor
variant module depends on the core variant module.  This flag should be
set by Soong for all VNDK libraries without the vendor variant
installed.  When the flag is set, the vendor variant binary is also
compared against the core variant binary to ensure they are
functionally identical.

As we are merging the two variants for some libraries, we need a new
link type to denote a module is usable as both native:vndk and
native:platform.  We add native:platform_vndk for this.

Bug: 119423884
Test: With the corresponding Soong change, build with
      TARGET_VNDK_USE_CORE_VARIANT set to true.
Test: Add a dummy VNDK library and a dummy vendor binary that depends
      on it.  Build with no-vendor-variant VNDK and check the core
      variant is installed.
Test: Add conditional compilation based on __ANDROID_VNDK__ in the
      dummy VNDK library and check build fails.

Change-Id: I40000f2728e8193212113c1ee950e9d697f2d40d
2019-03-20 10:23:04 -07:00
Vic Yang
1b83413b5a Add module-target-built-files function
This is similar to module-built-files, except that it only returns
files built for the target, not the host.

Bug: 119423884
Test: Build with the no-vendor-variant VNDK change that uses this
      function.

Change-Id: I2a3d99003b05999eae01c0b90bb62b5263d65592
2019-03-20 10:22:21 -07:00
Anton Hansson
bec4aa868a Merge "Refactor generate_enforce_rro" 2019-03-20 15:18:19 +00:00
Anton Hansson
7c718f37f9 Merge "Refactor and further simplify the RRO logic" 2019-03-20 14:35:25 +00:00
Anton Hansson
fce4d099c3 Merge "Add comments and slight refactor auto-RRO logic" 2019-03-20 13:19:56 +00:00
Anton Hansson
3e69a4a52d Remove protobuf-cpp-full-rtti from mainline
It used to be depended on by something on /product, but this
is no longer the case.

Bug: 119619080
Test: build downstream users of mainline_system
Change-Id: Iabe1dbb45499b25295f741a62336cb86e4565d60
2019-03-20 13:03:42 +00:00
Anton Hansson
4ea6474e95 Merge "System-specific product sysprops" 2019-03-20 12:40:44 +00:00
Anton Hansson
627cf057f9 Fix the product-graph target
Skips the step that invokes dot from the build, and instead
prints suitable commands to convert to image formats.

Bug: 114729998
Test: m product-graph
Change-Id: I172e1a792c32c2685d2f439f414dc66267ed6b83
2019-03-20 11:03:59 +00:00
Anton Hansson
c371f19e89 Merge "Rename DEVICE arg in common buildprops script" 2019-03-20 10:25:01 +00:00
Anton Hansson
f9b6cd6593 Merge "Fix missing modules check for dont_bother goals" 2019-03-20 10:11:50 +00:00
Bowgo Tsai
e4544b1c02 Moving system_other key into product.img
Currently system_other AVB public key is placed in system.img.
However, this makes it's harder to have a *generic* system.img
across different product configs. Moving the key to /product
partition to allow more product-specific AVB keys.

Device board config can add /product/etc/fstab.postinstall,
to mount system_other with this key in /product. It can specify
different mount options, file systems, verity settings, etc., in
this product-specific fstab as well.

Bug: 123611926
Test: `make productimage` checks the following is generated.
      $OUT/product/etc/security/avb/system_other.avbpubkey
      Also checks it's included in $OUT/installed-files-product.{json, txt}

Test: run the following command and checks that
      PRODUCT/etc/security/avb/system_other.avbpubkey is updated:
      ./build/tools/releasetools/sign_target_files_apks \
        --avb_system_other_algorithm SHA256_RSA2048 \
        --avb_system_other_key external/avb/test/data/testkey_rsa2048.pem \
        out/dist/*-target_files-*.zip signed-target_files.zip

Change-Id: I6804f29941bec54375d80bd68a5aedb5c23b842e
2019-03-20 16:18:11 +08:00
Logan Chien
99cdf5385d Update check_elf_file.py for clang-r353983
This commit updates how `check_elf_file.py` parses the symbol name
because the `llvm-readobj` (from clang-r353983) does not print "@" if
the symbol is not versioned.

See also. https://reviews.llvm.org/D56319

Bug: 128959554
Test: CHECK_ELF_FILES=true make check-elf-files
Change-Id: I0dee5e505225e57750a2c86cf0d25a151c218eb1
2019-03-20 15:24:00 +08:00
Colin Cross
88e38f01ba Merge "Add x86 AVX2 and AVX512 supported architectures" 2019-03-20 06:22:22 +00:00
Treehugger Robot
995c632cdc Merge "Add LOCAL_SOONG_SYMBOL_PATH" 2019-03-20 03:01:40 +00:00
Treehugger Robot
71ec795e47 Merge "Build: Ensuring test runtime dependencies are installed." 2019-03-20 01:17:17 +00:00
Jaewoong Jung
71638acad7 Merge "Split out app_prebuilt_internal.mk." 2019-03-20 00:51:45 +00:00
Daniel Norman
a4ab1d8490 Merge "Validates the config lists used by the script." 2019-03-19 23:56:25 +00:00