Commit Graph

68668 Commits

Author SHA1 Message Date
Yifan Hong
b1627779fb Also extract kernel configs from boot image.
On devices with prebuilt generic boot image:
  TARGET_NO_KERNEL := true
  BOARD_PREBUILT_BOOTIMAGE is set
In this case, the process for extracting the kernel
config and version must also try extracting from the
prebuilt boot image.

Test: build on device with prebuilt boot image
Fixes: 193588301
Change-Id: I43dd8e206bcd1c9f3f5f51869f126791c50af01a
2021-07-15 12:57:47 -07:00
Martin Stjernholm
1b00d58d93 Merge "Document how APEXes are identified in the boot jar variables." 2021-07-15 18:57:00 +00:00
Martin Stjernholm
b2de2d6f0c Fix typo in MODULE_BUILD_FROM_SOURCE variable.
Cherry-picked from http://ag/15300830.

Test: env MODULE_BUILD_FROM_SOURCE=true \
        TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true
Test: env TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false
Bug: 191978129
Change-Id: I2056b198bc0b944a6736ff21077b902df13c1479
Merged-In: I2056b198bc0b944a6736ff21077b902df13c1479
2021-07-15 16:23:15 +01:00
Treehugger Robot
c26dc73d81 Merge "Update language to comply with Android's inclusive language guidance" 2021-07-15 08:34:47 +00:00
Treehugger Robot
187a693129 Merge "Including debug ramdisk files in base_vendor.mk" 2021-07-15 05:38:21 +00:00
Tianjie Xu
4772ec7583 Merge "Write the vbmeta digest to the output zipfile also" 2021-07-15 04:43:36 +00:00
Treehugger Robot
e01cfe4896 Merge "dexpreopt.config should be created even though unbundled image is built" 2021-07-15 03:41:30 +00:00
Tianjie
c3bf3d00a3 Write the vbmeta digest to the output zipfile also
During signing, we write the entry directly to the output zip, intead
of a temp directory. Add the logic to write vbmeta_digest.txt to output
zipfile too. So the digest file will show up in the signed target files.

Bug: 189926233
Test: add_img_to_target_files -a <target-files.zip>
Change-Id: Ibf28a8f97512bda8c8c695e06190e1fb6573c53e
2021-07-14 16:03:08 -07:00
Treehugger Robot
15f7075d78 Merge "Build the ART module from source if other Mainline modules are." 2021-07-14 21:07:34 +00:00
Martin Stjernholm
3a52c4f4fd Build the ART module from source if other Mainline modules are.
Cherry-picked from http://ag/15277370.

Test: env MODULES_BUILD_FROM_SOURCE=true \
        TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true
Test: env TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false
Bug: 191978129
Change-Id: I718d3878e9d5f5e710fa3d835a209184b633af48
Merged-In: I718d3878e9d5f5e710fa3d835a209184b633af48
2021-07-14 21:02:10 +01:00
David Gross
304da3988d Merge "Fix bitrot: RSTest_CompatLib[19] tests stopped building" 2021-07-14 18:34:58 +00:00
Kousik Kumar
660fdcd664 Merge "Add the ability to source RBE related scripts from envsetup.sh" 2021-07-14 18:01:13 +00:00
Kousik Kumar
721533e0d6 Add the ability to source RBE related scripts from envsetup.sh
This is so that developers don't have to remember to source a separate
script to source RBE related variables.
I'll modify the docs once this change is submitted.

Test:
Ran forrest build with fix for previous build failure - https://android-build.googleplex.com/builds/abtd/run/L72300000950316038

Bug: b/193407413
Change-Id: I16f057086e2ee4f5918816ea70dbb33d0f5e99ab
2021-07-14 11:31:54 -04:00
Jeongik Cha
b26bf58e12 dexpreopt.config should be created even though unbundled image is built
Bug: 188179858
Test: compare dexpreopt_config.zip files from
 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
 2. m dexpreopt_config_zip
(note that m clean should run between steps)

Change-Id: I92623b59e4fcac397c7fed3d7ab1070fe5281027
2021-07-14 18:52:01 +09:00
Bowgo Tsai
7472a1e6f9 Including debug ramdisk files in base_vendor.mk
Debug ramdisk files should exist for all devices.
Adding those debug ramdisk files in the base_vendor.mk.

  * https://source.android.com/compatibility/vts/vts-on-gsi

Bug: 193565271
Test: `lunch aosp_flame-userdebug`, `make bootimage_debug` then
      checks the output under $OUT/debug_ramdisk/.
Test: Performs the same check for `lunch aosp_bramble-userdebug`.
Change-Id: Id32a53da9a3d5b17ffd05449669c6aa17aec0dfa
2021-07-14 16:50:07 +08:00
Treehugger Robot
663d0ffdde Merge "fs_config reads headers from snapshots, if available" 2021-07-14 00:08:12 +00:00
Ahaan Ugale
203c72ee23 Merge "Revert "Add the ability to source RBE related scripts from envsetup.sh"" 2021-07-13 22:21:53 +00:00
Ahaan Ugale
678f26c1e7 Revert "Add the ability to source RBE related scripts from envsetup.sh"
This reverts commit 9aa9e47b8c.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_rvc-qpr-dev-plus-aosp&target=ndk&lkgb=7546337&lkbb=7546521&fkbb=7546426, bug https://buganizer.corp.google.com/issues/193566521

Fix: 193566521
Change-Id: I7196a00006499f729baa86a252b0df6535c6aeaa
2021-07-13 22:12:24 +00:00
Alexander Smundak
4b8d81b41c Merge "Add mkpatsubst" 2021-07-13 22:11:03 +00:00
Treehugger Robot
10935cf315 Merge "Add the ability to source RBE related scripts from envsetup.sh" 2021-07-13 19:16:15 +00:00
Treehugger Robot
818e6c0579 Merge "Remove pre-aidegen IDE support logic" 2021-07-13 16:32:16 +00:00
Sasha Smundak
3b25eb1c98 Add mkpatsubst
Bug: 181797530
Test: rbcrun build/make/tests/run.rbc
Change-Id: Id15daaf6e3ed68982e50cdc710563095ffcf57ba
2021-07-13 09:21:07 -07:00
Dan Willemsen
b349e4e04a Remove pre-aidegen IDE support logic
This has apparently been racy ever since
https://android-review.googlesource.com/c/platform/build/+/971925
and isn't generally useful anymore, as aidegen has taken over.

Bug: 193095826
Test: treehugger
Change-Id: I09b6b340b84d1476a574b302db520210561a4e5e
2021-07-12 21:57:33 -07:00
Justin Yun
9d3356b306 fs_config reads headers from snapshots, if available
fs_config requires the information from the header files in
system/core and bionic/libc. To build the vendor side fs_config,
use the header files in the vendor snashot if the required version
exists.

Bug: 187222756
Test: check ninja depedency with and without snasphots.
Change-Id: Ibf96eab4d9a129745be1a19b2aa2e4c8f57cf6bf
2021-07-13 11:42:18 +09:00
Bill Yi
827998ad08 Merge "Merge RQ3A.210705.001 to aosp-master - DO NOT MERGE" 2021-07-13 00:48:38 +00:00
Treehugger Robot
cfaa04b92a Merge "Add mksubst" 2021-07-12 23:20:59 +00:00
Sasha Smundak
9afdb1c92a Add mksubst
Bug: 181797530
Test: rbcrun build/make/tests/run.rbc
Change-Id: I196c69259b830b6466430f6c933afb49fa787948
2021-07-12 13:36:13 -07:00
Bill Yi
80ce9b7379 Merge RQ3A.210705.001 to aosp-master - DO NOT MERGE
Merged-In: I0e49d49a8bddfbe8eceaa6ec46a08fee2ca4f105
Merged-In: If961d5fbf795ad5ef4b2f4ac4707087c5021e53f
Merged-In: If961d5fbf795ad5ef4b2f4ac4707087c5021e53f
Change-Id: Ia06e2825a3a0f9ccec2666132732c80d07a9a5ea
2021-07-12 11:11:14 -07:00
Kousik Kumar
9aa9e47b8c Add the ability to source RBE related scripts from envsetup.sh
This is so that developers don't have to remember to source a separate
script to source RBE related variables.
I'll modify the docs once this change is submitted.

Test:
USE_RBE=true source build/envsetup.sh sources RBE variables.
USE_RBE=false source build/envsetup.sh does NOT source RBE variables.
source build/envsetup.sh does NOT source RBE variables.

Bug: b/193407413
Change-Id: Ib8abf4c307b02fbb0c63b8a62d7aeda8be42d0fb
2021-07-12 14:05:13 -04:00
Martin Stjernholm
37557784fd Merge changes I544a0cfc,I8990b726
* changes:
  Add special cases for builds that cannot switch to ART prebuilts.
  Force building ART from source for AOSP products.
2021-07-12 13:51:23 +00:00
Kelvin Zhang
f66caeec58 Add an option for VABC xor
Test: th
Change-Id: Ia6ec01a834280cbaada82012ed35dfeeff53eba6
2021-07-12 09:44:42 -04:00
Treehugger Robot
91bb0d9e33 Merge "Add mkstrip" 2021-07-09 23:09:57 +00:00
Martin Stjernholm
75b8f0a469 Add special cases for builds that cannot switch to ART prebuilts.
Cherry-picked from http://ag/15234811.

Test: env TARGET_PRODUCT=mainline_modules_x86_64 \
        build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=module_arm build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true with http://ag/15234812
Test: env TARGET_PRODUCT=cf_arm64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=cf_x86_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=bonito build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=aosp_flame build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true with http://ag/15234812
Bug: 172480615
Change-Id: I544a0cfc9dfe6d738f75e60b7fec6d57f2b51d22
Merged-In: I544a0cfc9dfe6d738f75e60b7fec6d57f2b51d22
2021-07-09 19:30:01 +01:00
Martin Stjernholm
a877393386 Force building ART from source for AOSP products.
This is a workaround for the problem that we cannot control from make
which APEX gets picked for deapexing.

Cherry-picked from http://ag/15107826.

Test: env TARGET_PRODUCT=aosp_cf_x86_64_phone \
          SOONG_CONFIG_art_module_source_build=false \
        build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  This shows true
Test: env TARGET_PRODUCT=cf_x86_64_phone \
          SOONG_CONFIG_art_module_source_build=false \
        build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  This shows false in internal
Bug: 192006406
Bug: 172480615
Change-Id: I8990b726affeb08eabf130d20be45129a7c1c58d
Merged-In: I8990b726affeb08eabf130d20be45129a7c1c58d
2021-07-09 19:29:48 +01:00
Sasha Smundak
be4ebca4ba Add mkstrip
Bug: 181797530
Test: rbcrun build/make/tests/run.rbc
Change-Id: I6b7ade400273cf5a4fd561322e8e9936bc9d8df6
2021-07-09 10:44:22 -07:00
Treehugger Robot
42b072f4a7 Merge "Imply ALLOW_MISSING_DEPENDENCIES for Mac builds" 2021-07-09 01:22:05 +00:00
David Gross
dd400c3af1 Fix bitrot: RSTest_CompatLib[19] tests stopped building
(1) Incorrect path to librsjni.so because of typo in earlier change;
    fixed by fixing typo.

(2) clang did not specify the target architecture (I don't know what
    changed so that this no longer works); fixed by specifying target
    architecture and changing from gcc linker to lld (gcc linker didn't
    understand the options it was being passed by clang).

Test: blueline-userdebug
Test: make -j FORCE_BUILD_RS_COMPAT=true ENABLE_RSTESTS=true \
        RSTestForward_21_1_2 RSTestForward_22_0_2 \
        RSTestForward_23_0_3 RSTestForward_24_0_3 RSTestForward_25_0_2 \
        RSTestBackward RSTestBackward19 RSTest RSTest_Compat RSTest_Compat19
Test: unzip -t ${PATH_TO_APK}
      # confirm that .so files are present in RSTest_Compat[19] but not
        for the other APKs
      # confirm that .bc files are present in RSTestBackward19 but not
        for the other APKs
Test: adb shell am instrument [--abi armeabi-v7a] \
        -w ${TEST_PACKAGE_NAME}/androidx.test.runner.AndroidJUnitRunner
      # Run four times:
      #   "--abi" argument present or absent; always omit for
      #     RSTest_Compat[19], which only support platform default ABI
      #   "adb shell setprop debug.rs.forcecompat 0" or "1"
      # Note that RSTestBackward19 only supports 32-bit ABI, so both
      #   runs (with and without "--abi" argument) are actually armeabi-v7a
Test: After run, check logcat for RenderScript_jni
      # (missing): not built against support library; expected for all
        tests except RSTest_Compat[19]
      # "RenderScript_jni: RS native mode"; expected for RSTest_Compat[19]
        when setprop debug.rs.forcecompat is 0
      # "RenderScript_jni: RS compat mode"; expected for RSTest_Compat[19]
        when setprop debug.rs.forcecompat is 1

Change-Id: Icfaa226f2e1bfa909cb3bcbbe960f2804c355d2a
2021-07-08 17:01:43 -07:00
Martin Stjernholm
743513c830 Document how APEXes are identified in the boot jar variables.
Test: n/a - comment changes only
Bug: 191269918
Change-Id: Ib82ee24be13274051590be5e207883e4fbc9e6ae
2021-07-08 23:24:09 +01:00
Dan Willemsen
fd224efb7f Imply ALLOW_MISSING_DEPENDENCIES for Mac builds
At least until the device builds are largely disabled and host builds
become opt-in rather than opt-out. Otherwise every host test that
depends on a linux-only library breaks the mac build, even if it won't
be used.

Bug: 187222815
Change-Id: Ic598f2b66a949b90e5b3fbebf463f28278e4834f
2021-07-08 14:26:03 -07:00
Po Hu
0e4403e846 Adjust some behaviors for --rebuild-sepolicy
1. system_ext or product may not be a standalone partition,
2. keep symbolic links in vendor image,
3. target-files package may not contain IMAGES folder.

Bug: 192422274
Change-Id: I77867408cc764abb975319a23c387ec63fcf87c3
2021-07-08 09:49:48 +08:00
Bill Peckham
61de59bc36 Merge "Break dependency from droid_targets to blueprint_tools" 2021-07-07 20:06:47 +00:00
Daniel Norman
f3e73d707e Merge "Regenerate odm or vendor using combined sepolicy if --rebuild-sepolicy." 2021-07-02 22:04:40 +00:00
Bill Peckham
cc2961f54a Break dependency from droid_targets to blueprint_tools
But only for a TARGET_BUILD_UNBUNDLED_IMAGE build. Since
the unbundled image build attempts to remove as many
framework sources as possible, we'd like to remove the
sources and dependencies of some blueprint_tools as
well.

Test: m nothing dist
Test: Verify graph is unchanged
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: Verify that graph no longer includes blueprint_tools
Bug: 192629969
Change-Id: Ibfb52b841379e20855d0a935a13ad047af2fe58d
2021-07-02 13:13:10 -07:00
Daniel Norman
571e182e9c Regenerate odm or vendor using combined sepolicy if --rebuild-sepolicy.
This allows merged devices to boot using a precompiled_sepolicy built
from merged sources, rather than recompiling this sepolicy at boot
time every boot.

Bug: 178727214
Test: Merge an R+S build using --rebuild-sepolicy and --vendor-otatools.
      Observe odm.img is rebuilt by the vendor otatools.zip
        when merging.
      Observe device boots using ODM's precompiled_sepolicy file.
Test: Same as above, for S+S.
Test: Merge an S+S build using --rebuild-sepolicy and *not*
        --vendor-otatools.
      Observe odm.img is rebuilt without using a separate otatools.zip.
      Observe device boots using ODM's precompiled_sepolicy file.
Change-Id: I9595b8a3296d6deec21db8f0c9bc5b7ec4debd57
2021-07-01 16:29:15 -07:00
Treehugger Robot
fb36e13147 Merge "Adding adb_debug.prop into generic_ramdisk.mk" 2021-07-01 12:47:47 +00:00
Bowgo Tsai
3c77151b46 Adding adb_debug.prop into generic_ramdisk.mk
After commit I59cd149e0021211b8fd59c44b93bbf18dc8637bf, init_first_stage
is no longer installed to the ramdisk when BOARD_USES_RECOVERY_AS_BOOT
is True (see b/190974433 for details and init/Android.mk in that commit).

adb_debug.prop, which is needed for boot-debug.img,
boot-test-harness.img, etc.,will be absent when
BOARD_USES_RECOVERY_AS_BOOT is true, because adb_debug.prop is
only required by the init_first_stage.

Adding adb_debug.prop into generic_ramdisk.mk to include it
unconditionally.

Bug: 192432810
Test: flash boot-debug.img on a user build, check `adb root` works
Change-Id: I234b3430af1b8b09aeb46aef928ca8e16ad452cc
2021-07-01 16:34:29 +08:00
Treehugger Robot
0427fb4a97 Merge "Include kernel-*-allsyms into boot-*-allsyms.img" 2021-06-30 08:49:08 +00:00
Tianjie Xu
8b92dab126 Merge "Add apex info to the streaming property file" 2021-06-29 23:58:47 +00:00
Treehugger Robot
389f5afb83 Merge "Removing AFTL integration from release tools." 2021-06-29 14:31:49 +00:00
Martin Stjernholm
ef79a64b34 Merge "Do not complain about unexpected lsdump files when building with prebuilt APEXes." 2021-06-29 12:50:12 +00:00