Commit Graph

23346 Commits

Author SHA1 Message Date
Steve Muckle c1e13a0c17 move BOARD_RECOVERY_KERNEL_MODULES_LOAD default am: 7576d5e131
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712420

Change-Id: I2798509d3783814bf1750843ed59de055e78a3a4
2020-06-03 21:12:45 +00:00
Steve Muckle 4f896eb316 move module list creation outside conditionals am: 2319129a88
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712419

Change-Id: Ie24174afaee97fded24cc866e53af98b8caf6bfd
2020-06-03 21:12:42 +00:00
Steve Muckle 7bdda3e64f fix reference to BOARD_ODM_MODULES_LOAD am: 708435b557
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/11712418

Change-Id: Ice6671a88e21e40cb4e3204e1826f4504486294b
2020-06-03 21:12:40 +00:00
Steve Muckle 7576d5e131 move BOARD_RECOVERY_KERNEL_MODULES_LOAD default
Moving this makes each of the partition's kernel module Makefile
generation more similar, enabling a forthcoming cleanup/refactoring.

If recovery-is-boot and there are kernel modules defined in
BOARD_GENERIC_RAMDISK_KERNEL_MODULES, those kernel modules will
now be included in the default assignment to
BOARD_RECOVERY_KERNEL_MODULES_LOAD. If this is not desired then
BOARD_RECOVERY_KERNEL_MODULES_LOAD may simply be set to
BOARD_RECOVERY_KERNEL_MODULES (or a custom list of recovery kernel
modules to load).

Bug: 157645635
Change-Id: Ia1392b7d20d07cee75420edd95dcee1dc825516e
Merged-In: Ia1392b7d20d07cee75420edd95dcee1dc825516e
2020-06-03 11:17:32 -07:00
Steve Muckle 2319129a88 move module list creation outside conditionals
Currently the two special-case calls to create just a module load list
(as opposed to copying a set of modules and creating a module load list)
are inside checks that the related board macro for the module set is not
empty.

While it would be incorrect to create a non-empty module load list with
an empty set of modules, this error would quickly surface at runtime.
More importantly, moving these out will permit refactoring this code to
clean it up.

Bug: 157645635
Change-Id: I199788d49072d4c59737b3ef2c75546852cf3e36
Merged-In: I199788d49072d4c59737b3ef2c75546852cf3e36
2020-06-03 11:16:31 -07:00
Steve Muckle 708435b557 fix reference to BOARD_ODM_MODULES_LOAD
This check is meant to initialize BOARD_ODM_KERNEL_MODULES_LOAD to
BOARD_ODM_KERNEL_MODULES if BOARD_ODM_KERNEL_MODULES_LOAD is empty.

Bug: 157645635
Change-Id: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
Merged-In: I9c8ac0e64bb002e926d15b446a63801d7cfa9911
2020-06-03 11:15:52 -07:00
J. Avila d25813d072 Merge "Add build support for LZ4 ramdisks" into rvc-dev am: 5ea1cf103f
Change-Id: I4dc97dfc9c356fa02a7854df90b89caffe3f1422
2020-05-31 16:04:52 +00:00
J. Avila 5ea1cf103f Merge "Add build support for LZ4 ramdisks" into rvc-dev 2020-05-31 15:55:08 +00:00
Baligh Uddin a5bc1ecacd Add apksigner to otatools.zip am: 1325034c81
Change-Id: I21a1e23dfd701e89b9b0608d2e1c1697ecd338dd
2020-05-30 05:54:48 +00:00
J. Avila 9600ace371 Add build support for LZ4 ramdisks
Ramdisks are currently compressed using gzip, which is generally
smaller, but slower to decompress than lz4. Provide an option for an
lz4 scheme to reduce the time taken to unpack initramfs during boot.

Bug: 156129966
Signed-off-by: J. Avila <elavila@google.com>
Merged-In: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
Change-Id: Iac9538e6ee6ec51e6b487de2101f53bb5d9c54c8
2020-05-29 22:46:31 +00:00
Baligh Uddin 1325034c81 Add apksigner to otatools.zip
BUG: 157735036
Test: Local build.
Change-Id: I3778021f94236b0ac09a33149f2872fb5f740be2
Merged-In: I95c7001ad520d6b4a415d21ffdef55152b0e82b2
2020-05-29 21:49:39 +00:00
TreeHugger Robot 6644514e97 Merge "Update auto-gen test config template with PARAMETERIZED_STRINGS placeholder" into rvc-dev am: 20daf73fd9
Change-Id: Icccc8896ccc4a78d0fdd400aaae71ecabbca0e99
2020-05-28 06:27:21 +00:00
TreeHugger Robot 20daf73fd9 Merge "Update auto-gen test config template with PARAMETERIZED_STRINGS placeholder" into rvc-dev 2020-05-28 06:12:35 +00:00
Mark Salyzyn 6ded8f2c8e depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD am: d702af1ef1
Change-Id: I15144046efd3c81694d369e2f41f4758ab9b1736
2020-05-27 18:05:45 +00:00
Mark Salyzyn d702af1ef1 depmod: pair in a modules.load.recovery on BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD
If the BoardConfig defined BOARD_VENDOR_RAMDISK_MODULES_LOAD and
BOARD_VENDOR_RAMDISK_RECOVERY_KERNEL_MODULES_LOAD, generate both a
modules.load and modules.load.recovery respectively on the vendor
ramdisk.  BOARD_VENDOR_RAMDISK_MODULES must be the set, or super set,
of all the modules represented in both of *_LOAD BOARD variables.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151950334
Test: build, confirm, fastboot flashall, boot with split.
Merged-In: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
Change-Id: Ib2925aec6ea7a2a01a554c808d6697d8c85f9fc0
2020-05-27 13:26:00 +00:00
TreeHugger Robot 91ffe41134 Merge "Generate product build props always" into rvc-dev am: 0e5c584ba8
Change-Id: I08cf28a1048dcf8841ba8f7c031d025e023b098b
2020-05-27 04:59:21 +00:00
TreeHugger Robot 0e5c584ba8 Merge "Generate product build props always" into rvc-dev 2020-05-27 04:46:06 +00:00
J. Avila 8aa3efe2ca Strip debug symbols from modules am: 43872f0eb7
Change-Id: I9d849158e6f8d2c448d03e85e53d95d123af98b3
2020-05-26 21:56:26 +00:00
J. Avila 43872f0eb7 Strip debug symbols from modules
The size of the ramdisk has greatly increased, which can be a source of
boot time regressions. Strip the modules of debug symbols for the vendor
ramdisk and vendor partitions; vendor stripping can be skipped via BOARD
config.

Bug: 156395749
Signed-off-by: J. Avila <elavila@google.com>
Change-Id: I248d4e2097992f00975b344b5da41aa5d8016812
2020-05-26 14:38:43 +00:00
SzuWei Lin 509cd70f42 Generate product build props always
GSI do not build product partition, and contains the product
contents under /system/product/. Original logic do not generate
the product build props on this case.

The patch fixes the logic for product build props generation to
align the other partitions.

Bug: 157191627
Test: build aosp_arm64-userdebug
Test: check /system/product/build.prop in out folder
Change-Id: I350bbf8c024f747c86c6c54065d690f6b46f30c6
Merged-In: Ia88c8efecb18db9c27baa466e492bfd898b581d3
2020-05-25 05:46:53 +00:00
Hongguang Chen da5d0463b0 Add options to sign the prebuilt custom images. am: d9edddd64d
Change-Id: I0fb400a0997d84a9e599ece52d5073fdb84132d0
2020-05-21 23:43:22 +00:00
Hongguang Chen d9edddd64d Add options to sign the prebuilt custom images.
The custom images are any images owned by OEMs and SoCs, oem images
mounted on /oem is an example. The oem images can be used to customize
devices for different carriers, like wallpaper, ringtones, and
carrier-specific apks. OEMs can generate multiple oem images, like
oem.img, oem-carrier1.img and oem-carrier2.img and flash different oem
images for different carriers. The oem images are only one case, OEMs
and SoCs can add more custom images and mount them to custom partitions.

This change enables custom images to be vbmeta.img chained partitions.
The following configuration in BoardConfig.mk is an exmaple. It has two
custom partitions: oem and test. They will be signed by different keys.
And they will be chained by vbmeta.img. The custom images here are
prebuilts, which can be built by `make custom_images` separately.
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST should include all custom images
to apply AVB signing. And to every custom partition, one image whose
name is partition name must be added in its
BOARD_AVB_<CUSTOM_PARTITION>_IMAGE_LIST.

BOARD_CUSTOMIMAGES_PARTITION_LIST := oem test

BOARD_AVB_OEM_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem
BOARD_AVB_OEM_ALGORITHM := SHA256_RSA4096
BOARD_AVB_OEM_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_OEM_ROLLBACK_INDEX_LOCATION := 1
BOARD_AVB_OEM_PARTITION_SIZE := 5242880
BOARD_AVB_OEM_IMAGE_LIST := \
    device/xxxx/yyyy/oem/oem.img \
    device/xxxx/yyyy/oem/oem1.img

BOARD_AVB_TEST_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_TEST_ALGORITHM := SHA256_RSA2048
BOARD_AVB_TEST_ADD_HASHTREE_FOOTER_ARGS :=
BOARD_AVB_TEST_ROLLBACK_INDEX_LOCATION := 2
BOARD_AVB_TEST_PARTITION_SIZE := 10485760
BOARD_AVB_TEST_IMAGE_LIST := \
    device/xxxx/yyyy/test/test.img \
    device/xxxx/yyyy/test/test1.img

To resign the custom images in the target zip file, the
avb_extra_custom_image_key, avb_extra_custom_image_algorithms and
avb_extra_custom_image_extra_args options are added to the
sign_target_files_apks tool too. The following test cases list some
examples about how to use them.

BUG: 154171021
Test: 1) "atest --host releasetools_test releasetools_py3_test -c"
  2) Build images by 'make dist', sign and validate target files.
   a) Test on dist w/ chained vbmeta_system and ome custom images
   sign_target_files_apks -d certs \
     --avb_extra_custom_image_key oem=oem_rsa4096.pem \
     --avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
     xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Flash image and boot up.
   Verify the oem images and vbmeta images in OUT and target zips by
   avbtool.

   b) Test on dist w/ chained vbmeta_system and oem and test custom images
   sign_target_files_apks -d certs \
     --avb_extra_custom_image_key oem=oem_rsa4096.pem \
     --avb_extra_custom_image_algorithm oem=SHA256_RSA4096 \
     --avb_extra_custom_image_extra_args oem=--do_not_generate_fec \
     --avb_extra_custom_image_key test=test_rsa4096.pem \
     --avb_extra_custom_image_algorithm test=SHA256_RSA4096 \
     xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Verify the oem, test images and vbmeta images in OUT and target zips
   by avbtool.

   c) Test on dist w/o chained partition.
   sign_target_files_apks -d certs xxx-target_xxx.zip signed.zip
   validate_target_files.py signed.zip
   Flash image and boot up.
   Verify the vbmeta images in OUT and target zips by avbtool.

Change-Id: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
Merged-In: Ifccfee5e8909697eef6ccda0cc352fa16a9f6db6
2020-05-21 22:22:19 +00:00
TreeHugger Robot f0dc29904f Merge "Update Security String to 2020-07-05" into qt-qpr1-dev am: e549d10438 am: d078cc9f78
Change-Id: I5af751e5b307cc792964b8ce7383d23cc067d916
2020-05-20 22:16:41 +00:00
TreeHugger Robot d078cc9f78 Merge "Update Security String to 2020-07-05" into qt-qpr1-dev am: e549d10438
Change-Id: If51535409877a076bbc636753cc0e357fea2520e
2020-05-20 22:05:03 +00:00
TreeHugger Robot e549d10438 Merge "Update Security String to 2020-07-05" into qt-qpr1-dev 2020-05-20 21:47:09 +00:00
TreeHugger Robot ec7083b79a Merge "Do not fail if unzip found no files to extract" into rvc-dev am: df865a9a17
Change-Id: I31ac397ef82e83d32282953fa13cc54844173856
2020-05-20 17:38:33 +00:00
TreeHugger Robot df865a9a17 Merge "Do not fail if unzip found no files to extract" into rvc-dev 2020-05-20 17:15:16 +00:00
Sasha Smundak 5761b525de Do not fail if unzip found no files to extract
Fixes: 157081961
Test: manual
Change-Id: Ib84c9fa1ceb45542ebcee14e048ecf2c1783c0c0
2020-05-20 04:56:05 +00:00
TreeHugger Robot 411dc700fd Merge "support different boot partition sizes in aosp_arm64" into rvc-dev am: 27e8474d57
Change-Id: I66ad0cdcdb2c2eb29009439fb27c0b9e73d7dab4
2020-05-20 03:49:47 +00:00
TreeHugger Robot 27e8474d57 Merge "support different boot partition sizes in aosp_arm64" into rvc-dev 2020-05-20 03:26:56 +00:00
Dan Shi ef71829133 Merge "Revert "Add vts related artifacts to vts-core package"" into rvc-dev am: e47836b0c6
Change-Id: Ic93c3cbd6f41a9acbb14268e687d186d47b50b9b
2020-05-19 22:44:07 +00:00
Dan Shi e47836b0c6 Merge "Revert "Add vts related artifacts to vts-core package"" into rvc-dev 2020-05-19 22:25:44 +00:00
Steve Muckle 53226684b9 support different boot partition sizes in aosp_arm64
The different boot images in aosp_arm64 have different partition size
requirements. Add support for defining a partition size associated with
each boot image variant.

This support is limited to aosp_arm64 currently, which is built with
recovery-as-boot.

A previous version of this change did not update the boot-debug image
AVB logic with the required macro for multiple boot partition size
support. This is now required because the aosp-arm64 boot.img is
configured as a chained AVB partition.

Bug: 156036850
Bug: 155049180
Change-Id: I66b57de91042bfd56ba54a3659843d8cf7873955
Merged-In: I66b57de91042bfd56ba54a3659843d8cf7873955
2020-05-19 14:37:40 -07:00
Dan Shi a1082fb046 Revert "Add vts related artifacts to vts-core package"
This reverts commit 5e06288e7c.

Bug: 149249068
Test: build

Change-Id: I8245f1b7a4a74e133c0b7958e0f2908e4e8efd05
Merged-In: I8245f1b7a4a74e133c0b7958e0f2908e4e8efd05
2020-05-19 13:24:59 -07:00
Roland Levillain 1dbb0c3d1e Introduce build variable `OVERRIDE_TARGET_FLATTEN_APEX`.
When `OVERRIDE_TARGET_FLATTEN_APEX` is defined (e.g. set in the
environment), `TARGET_FLATTEN_APEX` is forcibly assigned its value.

This is useful to enable/disable APEX flattening from the command
line (thus ignoring the product's default configuration), for testing
purposes.

Note: Previously it was possible to set `TARGET_FLATTEN_APEX` directly
and have the same effect, but recent changes in the build
configuration now prevent that option.

Test: Check that:
        export OVERRIDE_TARGET_FLATTEN_APEX=true \
          && . ./build/envsetup.sh \
          && lunch aosp_walleye-userdebug \
          && export OVERRIDE_TARGET_FLATTEN_APEX=true \
          && build/soong/soong_ui.bash --dumpvar-mode TARGET_FLATTEN_APEX
      returns:
        true
Bug: 121117762

Merged-In: Ib9ccae38430340de38e4758b4f55df2c65ea60d5
Change-Id: Ib9ccae38430340de38e4758b4f55df2c65ea60d5
(cherry picked from commit b3a503df7f)
2020-05-19 02:06:45 +00:00
TreeHugger Robot e5766f75a2 Merge "Enables signing for generic boot images" into rvc-dev am: 2fc5a393e0
Change-Id: I03be62b74631c13d75d014a3d20117bc1ec58dc0
2020-05-18 05:56:41 +00:00
TreeHugger Robot 2fc5a393e0 Merge "Enables signing for generic boot images" into rvc-dev 2020-05-18 05:32:35 +00:00
easoncylee 88936626cf Update auto-gen test config template with PARAMETERIZED_STRINGS
placeholder

Bug: 134509111
Test: add "test_mainline_modules: [some.apk]" to TetheringTests,
and build the modules, confirm the parameterized option is added
in the test config.

Change-Id: I0f4f837412075520153d21c9ca12cf5c3f555de7
Merged-In: I0f4f837412075520153d21c9ca12cf5c3f555de7
2020-05-18 09:58:18 +08:00
Paul Scovanner 902a6e18e0 Update Security String to 2020-07-05
Bug: 156652977
Change-Id: Ifee743bae79d21c096a95d608552fbb4260aff6c
2020-05-17 21:15:17 +00:00
TreeHugger Robot e878aa2261 Merge "Don't check link type of Soong app JNI libraries" into rvc-dev am: b1e99dd0a1
Change-Id: Icc372c3cfd52e357004bf8816b7461a734148423
2020-05-16 01:32:44 +00:00
TreeHugger Robot b1e99dd0a1 Merge "Don't check link type of Soong app JNI libraries" into rvc-dev 2020-05-16 01:15:56 +00:00
Paul Scovanner 04f95a1b08 Update Security String to 2020-07-01 am: 4a475b4740 am: 69d4b8de13
Change-Id: Ic0833a8e99c1ccdedeb4e831184ef3e9bcd333d6
2020-05-15 23:04:30 +00:00
Paul Scovanner 69d4b8de13 Update Security String to 2020-07-01 am: 4a475b4740
Change-Id: I6df8e4cb400ec1c08c5ac6e2b36bd55c2b8fb15a
2020-05-15 22:36:48 +00:00
Sasha Smundak cf2d07d7b3 Implement android_app_set module. am: 60d03bd7db
Change-Id: I4b779a3f2bfe42ef0b568feaba623e9f941fee74
2020-05-15 22:22:39 +00:00
Sasha Smundak 60d03bd7db Implement android_app_set module.
Bug: 152319766
Test: manual and builtin
Change-Id: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428
Merged-In: I66edc5b423898a11dbba1c3d9796c7bd4d6b4428
2020-05-15 10:47:05 -07:00
Colin Cross 41c3ad1f8b Don't check link type of Soong app JNI libraries
Link type checking is already done within Soong, and
SOONG_SDK_VARIANT_MODULES is not complete yet while parsing Soong
modules, skip JNI link type checking for Soong apps.

Bug: 156225490
Test: m checkbuild
Change-Id: I2f6824b180ccdd62c26497bdca527540ca22f0d7
Merged-In: I2f6824b180ccdd62c26497bdca527540ca22f0d7
(cherry picked from commit 1c8d81e5d9)
2020-05-15 10:09:57 -07:00
TreeHugger Robot 72824dfd27 Merge "package llvm-profdata in mainline_module_x86_coverage build target." into mainline-prod 2020-05-15 15:29:48 +00:00
Kun Niu d322d8d817 package llvm-profdata in mainline_module_x86_coverage build target.
Test: local build succeed.
Bug: 156165375
Change-Id: I903ca33a839ea25c39bef96f949ded78aacf5609
2020-05-14 16:32:29 -07:00
Paul Scovanner 4a475b4740 Update Security String to 2020-07-01
Bug: 156652977
Change-Id: I81539bf9bd96bdc2e0bca54b506d8a6061f0bfba
2020-05-14 19:56:33 +00:00
Bowgo Tsai d55fbd365a Enables signing for generic boot images
Enables signing for them so we can verify that the boot partition
contains a valid generic boot image during the compliance test.

This change also adds the chained partition descriptor of
boot partition into vbmeta.img, which contains the corresponding
public key used to verify the boot partition.

Bug: 151094943
Test: lunch aosp_arm64-user, `make` and use `avbtool info_image`
      to check that GKI images are properly signed.
Test: `make dist` and checks that GKI images in the image zip file
      are properly signed.
Change-Id: I2fd69964f9dc62526a813875fa9193913aa4935b
Merged-In: I2fd69964f9dc62526a813875fa9193913aa4935b
(cherry picked from commit 0f95ac7e8c)
2020-05-14 13:01:37 +08:00