Commit Graph

66240 Commits

Author SHA1 Message Date
Yifan Hong ef7a971ded Do not build recovery-resource.dat if move_recovery_res_to_vendor_boot
If recovery resources are moved to vendor_boot, it also means
there's no recovery image to install. Don't build
recovery-resource.dat in this case.

Test: builds with cuttlefish with GKI
Bug: 156098440
Change-Id: I86db08d2dede6af644afadac54ff8beb853f4933
2020-10-20 13:18:04 -07:00
Treehugger Robot fd8dae609f Merge "Revert "Remove env-var-allowlist"" 2020-10-20 19:58:46 +00:00
Oleh Cherpak e555ab1848 sign_target_files_apks: Fix password encrypted keys handle
This patch restores the possibility of using password encrypted
keys for build signing.

Bug: 171221825
Test: 1. Generate password encrypted keys (write non empty passwords):
        $ subject='/C=US/ST=California/L=Mountain View/O=Android/OU=Android/CN=Android/emailAddress=android@android.com'
        $ mkdir ~/.android-certs
        $ for x in releasekey platform shared media; do \
            ./development/tools/make_key ~/.android-certs/$x \
            "$subject"; \
          done
      2. Create a file with passwords:
        Example of passwd file:
            [[[ 12345678 ]]] /home/user/.android-certs/releasekey
            [[[ 12345678 ]]] /home/user/.android-certs/platform
            [[[ 12345678 ]]] /home/user/.android-certs/shared
            [[[ 12345678 ]]] /home/user/.android-certs/media
            [[[ 12345678 ]]] /home/user/.android-certs/networkstack
      3. Tell system where to find passwords:
        $ export ANDROID_PW_FILE=/path/to/file/with/passwords
      4. Generate a release image:
        $ make dist
        $ sign_target_files_apks \
        -o --default_key_mappings ~/.android-certs \
        out/dist/*-target_files-*.zip \
        signed-target_files.zip

Signed-off-by: Oleh Cherpak <oleh.cherpak@globallogic.com>
Change-Id: I3e9d5318f69a2c3ac6eec64b36163b6544d49c90
2020-10-20 18:29:35 +00:00
Daniel Norman 140548db2c Merge "Removes usage of TARGET_NO_VENDOR_BOOT." am: 6a93af91dc
Original change: https://android-review.googlesource.com/c/platform/build/+/1457443

Change-Id: I6f1b0ffc0bc5b2de647c05bec09c4952c88970a2
2020-10-20 17:52:37 +00:00
Daniel Norman 6a93af91dc Merge "Removes usage of TARGET_NO_VENDOR_BOOT." 2020-10-20 17:18:01 +00:00
Yifan Hong 7a157b0319 Reland "Check system manifest against frozen data."
This reverts commit 8197702d73.

Test: lunch cf_x86_auto && m check-vintf-all 

Reason for revert: auto targets fixed in the same topic

Change-Id: I193416a4d0718e5790eb54e5c0674edc2d975632
2020-10-20 17:08:11 +00:00
Kousik Kumar 92f32615ed Revert "Remove env-var-allowlist"
Revert "Add -fdebug-compilation-dir option"

Revert submission 1461902-debug-compilation-dir

Reason for revert: "-Xclang" isn't being uniformly respected everywhere. For example, in ".S" compilations, when I pass `-Xclang -fdebug-compilation-dir=.", the assembler seems to be ignoring it and then inserting the `pwd` into the command, however when I pass "-fdebug-compilation-dir=.", it strips out the path to the current working directory.
This indicates that we need to update re-client's input processor so that we can pass -fdebug-compilation-dir=. without "-Xclang" and then remove `PWD` setting.
For now, I'll update this patch to pass both "-fdebug-compilation-dir=." and `PWD` and when RBE side fix is done, I'll remove `PWD` in a separate CL.

Reverted Changes:
Ib0f271e55:Add -fdebug-compilation-dir option
Ifa0592af5:Remove env-var-allowlist

Change-Id: I7c690b3e00d37dbcc8fbaa66dda49f39032be3ab
2020-10-20 05:52:49 +00:00
Yifan Hong d62891451d Merge "Revert "Check system manifest against frozen data."" am: d7c6f4f966
Original change: https://android-review.googlesource.com/c/platform/build/+/1467028

Change-Id: I305b453d2d07fc8dc5c9262492462d87cb051fe6
2020-10-20 03:40:10 +00:00
Yifan Hong 05f36ecf89 Merge "Add BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT" am: ace5d21b67
Original change: https://android-review.googlesource.com/c/platform/build/+/1457441

Change-Id: Ice25a64963b114d7489bae74b3344fd70ab4d3b2
2020-10-20 03:39:36 +00:00
Yifan Hong d7c6f4f966 Merge "Revert "Check system manifest against frozen data."" 2020-10-20 03:10:15 +00:00
Yifan Hong ace5d21b67 Merge "Add BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT" 2020-10-20 01:51:11 +00:00
Yifan Hong 8197702d73 Revert "Check system manifest against frozen data."
This reverts commit 843240c81a.

Reason for revert: breaks devices with cameraserver

Change-Id: Idedad49276fb928346cee68133e643602b79cd7a
Fixes: 171262706
2020-10-20 01:07:24 +00:00
android-build-team Robot 55ddfd84d3 Version bump to RQ1A.201205.004 [core/build_id.mk]
Change-Id: I95da9acd43b6ed9c2dbdad7a29e7b7477df409d0
2020-10-19 22:27:13 +00:00
Yifan Hong 947c5fd8c7 Merge "Check system manifest against frozen data." am: fe386d15f8
Original change: https://android-review.googlesource.com/c/platform/build/+/1461542

Change-Id: Id0c2ac884484ad2927b8de0bd9bb1cc46b86c227
2020-10-19 21:58:16 +00:00
Yifan Hong fe386d15f8 Merge "Check system manifest against frozen data." 2020-10-19 21:24:29 +00:00
Steven Moreland 40a9f49ced Update VNDK version for common graphics HALs.
We are adding things to them, and in order for core libraries like libui
to use them, the newer versions need to be in the VNDK.

Bug: 170435409
Test: build
Change-Id: I18495d303ae8bd68f35631b2be2dc9dcf915e991
Merged-In: I18495d303ae8bd68f35631b2be2dc9dcf915e991
2020-10-19 21:04:21 +00:00
Tianjie Xu 14f917b6b7 Merge "Add ota script support to generate partial updates" am: d53d6f7169
Original change: https://android-review.googlesource.com/c/platform/build/+/1462546

Change-Id: Id19f72d7236c2d987dd1081fe6df2d911e389ece
2020-10-19 19:07:20 +00:00
Tianjie Xu d53d6f7169 Merge "Add ota script support to generate partial updates" 2020-10-19 18:47:12 +00:00
Inseob Kim 9d281d9271 Add BUILD_BROKEN_ENFORCE_SYSPROP_OWNER
In terms of sepolicy rules, every property should have an apporpriate
owner attribute, which can be one of: system_property_type,
product_property_type, or vendor_property_type. This will be enforced
for devices launching with S or later. Devices launching with R or
eariler can relax this by setting following under BoardConfig.mk:

BUILD_BROKEN_ENFORCE_SYSPROP_OWNER := true

See system/sepolicy/public/te_macros for more details.

Bug: 131162102
Test: system/sepolicy/tools/build_policies.sh
Change-Id: Iee05fc15beac1ccf61da4ea901a85b9d4068e0ca
2020-10-19 13:31:58 +09:00
Treehugger Robot f658fdce18 Merge changes from topic "split_ramdisk" am: 6a2135b6e6
Original change: https://android-review.googlesource.com/c/platform/build/+/1455953

Change-Id: If43ff58693007af47bf0c96e934be8224dbe5065
2020-10-17 01:12:30 +00:00
Treehugger Robot 6a2135b6e6 Merge changes from topic "split_ramdisk"
* changes:
  Exclude board cmdline/dtb/pagesize/base in generic boot image
  Add BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT.
  Add BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE.
  Add GKI global variable.
2020-10-17 00:40:54 +00:00
Tianjie Xu 75aa3ff51f Merge "Update ota script to match init's logic" am: 11e5f33e2c
Original change: https://android-review.googlesource.com/c/platform/build/+/1462694

Change-Id: Ice1e11ba6cdb39c3be6ed4289766e1cea24011f2
2020-10-17 00:03:24 +00:00
Tianjie Xu fd99aae2a4 Merge "Make the ro.build.version.release consistent between device build prop & partition build prop" am: 4df8556158
Original change: https://android-review.googlesource.com/c/platform/build/+/1462693

Change-Id: I6e584ac6d0a1817d486dea7d21d9ccf3f21ba37e
2020-10-17 00:02:50 +00:00
Tianjie Xu 11e5f33e2c Merge "Update ota script to match init's logic" 2020-10-16 23:10:37 +00:00
Tianjie Xu 4df8556158 Merge "Make the ro.build.version.release consistent between device build prop & partition build prop" 2020-10-16 23:10:37 +00:00
Daniel Norman ad6293c098 Removes usage of TARGET_NO_VENDOR_BOOT.
- true -> PRODUCT_BUILD_VENDOR_BOOT_IMAGE=false
- false -> (removed, uses default option which builds vendor-boot.img
            if BOARD_BOOT_HEADER_VERSION>=3)

Bug: 170423509
Test: Inspect build artifacts from treehugger.
Change-Id: Id16fbda7fdfc70d62db389d6efb5201cb0d6d4e3
2020-10-16 15:10:21 -07:00
David Anderson 607800d615 Add snapuserd to VABC product and base_system.mk.
Bug: 168259959
Test: builds
Change-Id: I289f84e293c84b12f5f33f8940643bac43ff5d35
2020-10-16 15:07:52 -07:00
Julien Desprez 0afe7d66f3 Merge "Update location of some files while moving them" am: 5fefac293d
Original change: https://android-review.googlesource.com/c/platform/build/+/1462690

Change-Id: If4b5abfaff97af4fcbbe96d03ee3509d8a742e34
2020-10-16 20:06:01 +00:00
Treehugger Robot 2a3ab163bd Merge "Enable uploading ramdisk to target img.zip" am: 07445235a8
Original change: https://android-review.googlesource.com/c/platform/build/+/1464383

Change-Id: Ie9eefd9d72ed298168c62fa4fac9140d308f69e5
2020-10-16 20:04:35 +00:00
Julien Desprez 5fefac293d Merge "Update location of some files while moving them" 2020-10-16 20:00:22 +00:00
Treehugger Robot 07445235a8 Merge "Enable uploading ramdisk to target img.zip" 2020-10-16 19:48:22 +00:00
Tianjie b37c5be8cc Update ota script to match init's logic
In aosp/1459042, init has updated it's logic to use
ro.build.version.release_or_codename for fingerprint calculation.
The ota script needs the same update for ota targeting to work
correctly.

As a best effort to support pre-S dev stage builds, use
ro.build.version.release for sdk version < 30.

Bug: 170968068
Bug: 158483506
Test: unit tests, generate an OTA for S build
Change-Id: I01ca8a3b7b8b58f94b10f90ed0d27e688a72b866
2020-10-16 11:46:03 -07:00
Enrico Granata 1605938e8c Enable uploading ramdisk to target img.zip
For some devices, the img.zip package needs to contain the ramdisk
in order to enable device-specific flashing to work properly

This change adds a new flag BOARD_IMG_USE_RAMDISK to the possible
device Makefile configuration. If set to true, the build process
will insert ramdisk.img in the target-files.zip and img.zip
build outputs of "m dist". No change will occur for builds
that do not use this flag, or set it to a non-true value.

Bug: 168642807
Test: lunch trout_arm64-userdebug, m dist with and w/out
      BOARD_IMG_USE_RAMDISK added to Makefile;
      lunch aosp_cf_arm64-phone-userdebug, m dist
Change-Id: Id29408551cd41c11b96157248e238324a327043d
Merged-In: Id29408551cd41c11b96157248e238324a327043d
2020-10-16 10:02:02 -06:00
Makoto Onuki 282b6fce49 Merge "Remove unneed jar files from the system partition" am: e1faea86f9
Original change: https://android-review.googlesource.com/c/platform/build/+/1462688

Change-Id: I6f79ad56e0dee9215225b611195d6d76fb90df50
2020-10-16 15:55:38 +00:00
Makoto Onuki e1faea86f9 Merge "Remove unneed jar files from the system partition" 2020-10-16 15:41:16 +00:00
Jaegeuk Kim 1c643cb365 Merge "Add build property to enable fscompression" am: bea507259c
Original change: https://android-review.googlesource.com/c/platform/build/+/1462547

Change-Id: I68c3a77dc9ebf4296ea10c47c56449cf2b700143
2020-10-16 06:09:56 +00:00
Kousik Kumar c2c28f9941 Merge "Remove env-var-allowlist" am: 3a7a960a86
Original change: https://android-review.googlesource.com/c/platform/build/+/1461902

Change-Id: If81d9da73547a768c10f86a26c045cce2abb0a90
2020-10-16 06:08:28 +00:00
Jaegeuk Kim bea507259c Merge "Add build property to enable fscompression" 2020-10-16 06:06:14 +00:00
Kousik Kumar 3a7a960a86 Merge "Remove env-var-allowlist" 2020-10-16 05:52:51 +00:00
Tianjie e88ac677c5 Make the ro.build.version.release consistent between device build prop & partition build prop
The ro.build.version.release has updated to use the last stable platform
version in go/ab/10260813. But the logic for per-partition build prop
has never been updated. This mismatch eventually reflects in the
device's build fingerprints and cause confusion. This cl updates the
partition build props to match the behavior of the top level build props.

Also the device's fingerprints is heavily used in static analysis, e.g.
ota targeting, the change to its computation may cause unexpected effects.

Bug: 170968068
Bug: 158483506
Test: build system image for coral, check the build prop
Change-Id: Icf741c915f2eba970258979efc274e424187ac69
2020-10-15 18:31:00 -07:00
Jaegeuk Kim ed754fb339 Add build property to enable fscompression
Bug: 162253911
Bug: 110272315
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I3cb7d0a055a7f83c9d0321d2b16f11f40a74f7aa
Merged-In: I3cb7d0a055a7f83c9d0321d2b16f11f40a74f7aa
2020-10-15 17:10:25 -07:00
Yifan Hong 38ab4d81ed Add ota script support to generate partial updates
Allow the ota generation script to take a list of partitions;
and thus generating a partial ota update package. This allow the
testing of partial update functionality, e.g. system-only updates.

Bug: 170921953
Test: unit tests, generate and apply a partial update on coral with system, system_ext, vbmeta_system
Change-Id: I0d8f93806dfbf7b781ea911117b02fc5c0971434
2020-10-15 16:30:13 -07:00
Yifan Hong 82b113d9c7 Add BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT
BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT controls whether GSI AVB keys are built
to vendor_boot. On devices without a dedicated recovery partition, GSI AVB
keys used to be built in boot. They are device-specific, so they should be
moved to vendor_boot.

Test: pass
Bug: 156098440
Change-Id: I0a5eaa1b39e88fcca9837c7aa3f475be47d5b0f2
2020-10-15 14:58:34 -07:00
Yifan Hong aad34e5b7e Exclude board cmdline/dtb/pagesize/base in generic boot image
When building with BOARD_USES_GENERIC_KERNEL_IMAGE, even if BUILDING_VENDOR_BOOT_IMAGE
is not set, do not include board-specific cmdline, dtb, page size, and base in the
generic boot image.

This change drops buildvariant=* in the cmdline of the generic boot
image

Bug: 156098440
Test: manual. Deliberately set BOARD_KERNEL_CMDLINE for aosp_arm64 and
      ensure it doesn't go into the boot image.
Change-Id: I846f600058a4a9b349d55c9773d6dd81bbe49312
2020-10-15 14:58:34 -07:00
Yifan Hong 881df39d23 Add BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT.
This variable indicates whether recovery resources are moved to
vendor_boot. If true:

- $OUT/recovery.img will not be built
- $OUT/recovery/root will be included in vendor_boot ramdisk

Bug: 156098440
Test: set to true and check output
Test: `m target-files-package` and manually inspect output
Change-Id: I56dda56bab7def1540f4fb506323e3e605620cd4
2020-10-15 14:58:34 -07:00
Yifan Hong 63c5ca19ab Add BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE.
BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE removes kernel from the
recovery image.

Test: build recovery image and unpack_bootimg
Test: build target files and unpack_bootimg IMAGES/recovery.img
      on device with GKI and dedicated recovery partition.

Bug: 156098440

Change-Id: I5f37d74ed954b26fe3dd778708b6ab9cfdc51f1e
2020-10-15 14:58:34 -07:00
Yifan Hong d381f7336a Add GKI global variable.
Add BOARD_USES_GENERIC_KERNEL_IMAGE to be the global variable to
indicate the device uses GKI image.

Test: pass

Bug: 156098440

Change-Id: Ica553bbdb791e25dfa9bafb524ab2de5e3f8720d
2020-10-15 14:58:34 -07:00
Julien Desprez 79af9880ec Update location of some files while moving them
Test: make cts
Bug: 170967708
Change-Id: Icd7fa608eb7488574456e9409e0efefa909c92ea
2020-10-15 14:09:39 -07:00
Makoto Onuki 90ac5ae188 Remove unneed jar files from the system partition
Fix: 170967644
Test: boot
Test: Make sure the following jar files are removed
$OUT/system/framework/service-blobstore.jar
$OUT/system/framework/service-jobscheduler.jar

Change-Id: Ia5351d9d3b1dda7bf96e95bbaad171cd8c3b49fc
Merged-in: Ia5351d9d3b1dda7bf96e95bbaad171cd8c3b49fc
2020-10-15 13:06:58 -07:00
Kousik Kumar 405847ac19 Remove env-var-allowlist
We no longer need to set PWD variable with the introduction of
`-fdebug-compilation-dir`, so removing env var allowlist of PWD variable
to RBE.

Change-Id: Ifa0592af519b6cc4364ee653f1a2174fd680bac1
2020-10-15 15:53:13 -04:00