Commit graph

447 commits

Author SHA1 Message Date
Jeff Gaston
8228d37ac4 Fix sdk-addon build on build servers
they don't source envsetup.sh

Bug: 65286453
Test: m -j OUT_DIR=/tmp/abs PRODUCT-sdk_gphone_x86-sdk_addon /tmp/abs/host/linux-x86/sdk_addon/google_phone_x86-eng.$(whoami)-linux-x86.zip

Change-Id: Id396203b500e70cfa2b1e1eb5241d88fae88fc36
Merged-In: Id396203b500e70cfa2b1e1eb5241d88fae88fc36
(cherry picked from commit 25210ce70b)
2017-09-18 19:13:49 -07:00
Jeff Gaston
43f3457329 Fix sdk-addon for absolute OUT_DIR
Bug: 65286453
Test: m -j OUT_DIR=/tmp/abs PRODUCT-sdk_gphone_x86-sdk_addon /tmp/abs/host/linux-x86/sdk_addon/google_phone_x86-eng.jeffrygaston-linux-x86.zip
Change-Id: Id2d18fe41de5d533baf1f082292d70d946386249
2017-09-13 15:23:38 -07:00
bohu
7b5e1abacb emulator: squash misc modifications from oc-emu-dev
Change-Id: I7380292cd4dc851a987683bdf61d511dbf74aff6
Merged-In: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-08-30 17:13:47 -07:00
Bowgo Tsai
480dc7c19d Support signing custom_images with AVB
Current AVB signing for custom images is enabled by either of the
following build variables:
  CUSTOM_IMAGE_AVB_HASH_ENABLE := true
  CUSTOM_IMAGE_AVB_HASHTREE_ENABLE := true

A previous change to support chain partition replaced avb_signing_args
with avb_key_path and avb_algorithm. This change updates the
corresponding change for custom_images.

To sign a custom_image as a chain partition, it needs:
  CUSTOM_IMAGE_AVB_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
  CUSTOM_IMAGE_AVB_ALGORITHM := SHA256_RSA2048
  CUSTOM_IMAGE_AVB_ROLLBACK_INDEX := 1

Note that it doesn't support include metadata of custom images into
vbmeta.img. Because custom_images is designed to build multiple files
(e.g., custom1.img, custom2.img, custom3.img, etc) and a device can only
use/mount one of them. The vbmeta.img needs to be generated per each
combination.

Bug:36701014
Test: sign custom image with AVB HASH descriptor (non-chain)
Test: sign custom image with AVB HASH descriptor as chain partition
Test: sign custom image with AVB HASHTREE descriptor (non-chain)
Test: sign custom image with AVB HASHTREE descriptor as chain partition
Change-Id: I492e2ce768e7caec22228b776b2c13a2d37a5b89
2017-08-25 13:28:57 +08:00
Bo Hu
abd33cdba6 Merge "Revert "Revert "emulator: create qemu images for system,vendor"""
am: 5af2027e34

Change-Id: I61b9598d6b69d74a42ad0dc445c866e3034ff638
2017-08-01 23:22:17 +00:00
Bo Hu
f0d50bbef0 Revert "Revert "emulator: create qemu images for system,vendor""
This reverts commit 9b99ddc8a5.
and add syste-qemu.img to the dependency list of sdk target

Test: build sdk target successfully

Change-Id: Idb0bee56275f3bfe33ba7d29463e4b8e0699ec33
2017-08-01 13:00:53 -07:00
Bo Hu
b7e5cf8b6d Merge "Revert "emulator: create qemu images for system,vendor""
am: a2ea9626e5

Change-Id: I0118d5355aa3ffcd728b22e964609f02561df2db
2017-08-01 07:00:06 +00:00
Bo Hu
a2ea9626e5 Merge "Revert "emulator: create qemu images for system,vendor"" 2017-08-01 06:52:44 +00:00
Bo Hu
9b99ddc8a5 Revert "emulator: create qemu images for system,vendor"
This reverts commit b5d0503758.

Change-Id: Ie46a3a3dd99dec42673b3e3bd5b9085ca0480a8d
2017-08-01 06:50:07 +00:00
Colin Cross
c1ed882bd8 Merge "Fix test suite zip generation on mac"
am: 94be321cae

Change-Id: Ied0e6233854db55e76498da2ca239ca6773ce59f
2017-08-01 04:01:37 +00:00
Treehugger Robot
94be321cae Merge "Fix test suite zip generation on mac" 2017-08-01 03:51:28 +00:00
bohu
dbbd3311ae Merge "emulator: create qemu images for system,vendor"
am: 571e5d47b7

Change-Id: Id80d452017384769146879bec205f39da79e37ae
2017-08-01 01:56:12 +00:00
Colin Cross
f3a4340435 Fix test suite zip generation on mac
Don't use sed -i, it requires an argument on mac and is eating the
-e parameter, which causes the command to not be applied.

Also clean up the temporary list files so they don't clutter up
$OUT.

Test: m -j device-tests
Bug: 64226094
Change-Id: Ie71820fc2d1cd812717bf0c156af011ca723e9f6
2017-08-01 01:51:30 +00:00
bohu
b5d0503758 emulator: create qemu images for system,vendor
For raw system.img and vendor.img do not have
partition table and init refuses to mount them
in first stage mounting.

For emulator build:
create partitioned system-qemu.img for system.img;
create partitioned vendor-qemu.img for vendor.img
if applicable.

Change-Id: I64fdcdafc303cf2f74a1e96653e7afe259f0af98
2017-07-31 16:28:40 -07:00
Bowgo Tsai
bd91ac7740 Merge "custom_images: support verity fec (forward error correction)"
am: abf553c9d3

Change-Id: I4b6e678859538ac91fc2548fc7195677660af37c
2017-07-14 23:58:45 +00:00
Bowgo Tsai
8ec2a1cb08 custom_images: support verity fec (forward error correction)
Bug: 63691195
Test: `make custom_images` with CUSTOM_IMAGE_SUPPORT_VERITY_FEC := true
Test: boot device with the custom image built above

Change-Id: I198fa1e0697cb00712bbfb6f1a717ec623703ede
2017-07-14 21:47:13 +08:00
Howard Chen
1b0da968a0 Merge "Support kernel modules in the odm image"
am: 95a8c7e83f

Change-Id: Ib34b1eb969b5fffba4040f40143ea1f3679d4913
2017-07-11 02:10:24 +00:00
Howard Chen
0c5f1e575d Support kernel modules in the odm image
This patch reuses the build-image-kernel-modules macro to build the
odm/lib/modules directory according to the BOARD_ODM_KERNEL_MODULES
which contains list of kernel module files.

Bug: 36012197
Test: android master build on pixel
Change-Id: I2c004132a89e7f230690b4d26c98c3d5b2769f11
2017-07-10 10:44:58 +08:00
Colin Cross
e885ccf0df Merge "Provide make variables for java binaries"
am: 5e19557eb9

Change-Id: Ib1be7da98214e3b6c27867b80005e18cc68a0d33
2017-07-01 01:36:14 +00:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Dan Willemsen
b2f7189479 Merge "Support custom my_copy_pairs in package-modules.mk" am: 5b91bd4ccb
am: 616764b247

Change-Id: I288d04b2e69c7f231f25905edcff19b31c6cf499
2017-06-21 03:00:30 +00:00
Dan Willemsen
f354b178b1 Support custom my_copy_pairs in package-modules.mk
To support extra files in package-modules.mk, allow the user to set
my_copy_pairs to a list of src:dest pairs that will be copied into the
zip file.

Test: build-aosp_arm.ninja is identical before/after
Test: codesearch says that these variables aren't otherwise used
Test: set my_copy_pairs, ensure that they exist in the zip.
Change-Id: Ia80cd136db8ad37a71010baf0552621b281c8bc3
2017-06-20 16:00:48 -07:00
Bowgo Tsai
b4c268eb7b Merge "Support signing custom images with AVB HASH or AVB HASHTREE" am: fe7aeb1de7 am: 16b64cbb58
am: 3989b738b8

Change-Id: I11393e1833db97301ffdd31ec3db0968e87c1a24
2017-05-31 03:38:24 +00:00
Bowgo Tsai
7ea994b21c Support signing custom images with AVB HASH or AVB HASHTREE
`make custom_images` supports to build different kinds of *non-droid* images,
e.g., odm.img. Adding the support of signing them with either AVB HASH footer
or AVB HASHTREE footer. The user can use HASH for small images and
HASHTREE for large images.

Sample signing configurations:
 * AVB HASH footer:
   - CUSTOM_IMAGE_AVB_HASH_ENABLE := true
   - CUSTOM_IMAGE_AVB_ADD_HASH_FOOTER_ARGS := --append_to_release_string my_odm_image

 * AVB HASHTREE footer:
   - CUSTOM_IMAGE_AVB_HASHTREE_ENABLE := true
   - CUSTOM_IMAGE_AVB_ADD_HASHTREE_FOOTER_ARGS := --fec_num_roots 8

 * Using custom signing key:
   - CUSTOM_IMAGE_AVB_ALGORITHM := SHA256_RSA2048
   - CUSTOM_IMAGE_AVB_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem

Bug: 36701014
Test: `make custom_images` with AVB HASH footer
Test: `make custom_images` with AVB HASHTREE footer
Test: `make droid` to check system.img is still properly signed with AVB HASHTREE
Test: `make droid` to check vendor.img is still properly signed with AVB HASHTREE

Change-Id: I8dc420e12e37e9a631345c0cd883339db05d489f
2017-05-24 14:21:03 +08:00
Sen Jiang
c5d5fdee22 Merge "Add support for avbtool in custom_images." am: 8a8ca3438b am: 7cdc14d8b0
am: c900a7cd48

Change-Id: I6612fc8c91ae83ff9da7fa7f78460f6d8249a687
2017-05-16 18:09:45 +00:00
Sen Jiang
5b0fe18feb Add support for avbtool in custom_images.
Set CUSTOM_IMAGE_AVB_ENABLE := true to enable avb, add_hashtree_footer
args can be added in CUSTOM_IMAGE_AVB_ADD_HASHTREE_FOOTER_ARGS.

Bug: 38319818
Test: m custom_images

Change-Id: Ia452dc5ce8b55bcbd3abba9e965b72e78fd8c104
2017-05-15 17:34:42 -07:00
Colin Cross
151cd4c75c Merge "Sort inputs to compatibility suite zip files" am: 328290459d am: a2b1052ae2
am: ba89e33a6c

Change-Id: I9831de58c41545dc1e0e40edadd96a83df3b70a1
2017-05-03 02:52:18 +00:00
Colin Cross
30c33b1c2b Sort inputs to compatibility suite zip files
Sort the inputs to remove duplicates, which fixes:
found two file paths to be copied into dest path: "target/testcases/minikin_perftests/minikin_perftests", both ["target/testcases/minikin_perftests/minikin_perftests"]"out/target/product/bullhead/testcases/minikin_perftests/minikin_perftests" and ["target/testcases/minikin_perftests/minikin_perftests"]"out/target/product/bullhead/testcases/minikin_perftests/minikin_perftests"!

Test: m -j device-tests
Change-Id: I8d7e83cd077c62461c9a08e7f1b49c321fbcb0e3
2017-05-02 17:56:57 -07:00
Dan Willemsen
4e9e5d526c Merge "Rewrite link type checking" am: e4d92ef568 am: d76aaed983
am: e834d5f059

Change-Id: I02342b80077a7e1e36e61d1f9384d3b104a982c1
2017-04-20 15:15:19 +00:00
Dan Willemsen
b47d4e9cf1 Rewrite link type checking
All the new features are turned off for now, since multiple branches and
products need to be verified before they can be turned on. So everything
should behave the same as today, except for no partition-based
warnings.

Instead of the current link type checks that happen during the build,
run as many as possible immediately after loading all the Android.mk
files. If we're allowing missing dependencies ('mm',
ALLOW_MISSING_DEPENDENCIES, tapas, etc), we'll defer the link type
checks to during the build. If we're not allowing missing dependencies,
we'll produce a better error message to the user about the missing
dependencies.

See core/main.mk for a description of the storage format.

This also remove the partition-based type checking. It hasn't worked all
that well, particularly with ASAN builds. The new VNDK checks will
handle the most pressing cases.

Test: Verify all link_type files and dependencies are the same:
  grep link_type: out/build-aosp_arm64.ninja | sed -E "s/ rule[0-9]+//" | sort
Change-Id: Id643658b9d9e84f99f5db0d526aad88c1f5d3417
2017-04-19 22:41:32 -07:00
Simran Basi
d2bde8da0f Merge "Revert "Revert "device-tests: As a dependency to tests""" am: ba0ebe9230 am: d46e933f1d
am: 379f25cd43

Change-Id: I7c6a73c688eddd2064a52b64350c71787d663911
2017-04-12 21:24:49 +00:00
Treehugger Robot
ba0ebe9230 Merge "Revert "Revert "device-tests: As a dependency to tests""" 2017-04-12 21:05:08 +00:00
Simran Basi
0b07a30ac8 Merge "Common testcase directories: Clean up duplicates" am: 4d15a84fc0 am: dce141bce8
am: 6f9ebf3c98

Change-Id: I41e04a59620eaf09e7f0bfc4e388ac4f1bb933d1
2017-04-12 08:27:19 +00:00
Simran Basi
65850daeb0 Revert "Revert "device-tests: As a dependency to tests""
This reverts commit df086140a8.

CQ-DEPEND=CL:365575
Bug: 35386840
Test: None

Change-Id: I17dc00ed64e220c5ce532386da1a1bc15cbfc439
2017-04-05 20:51:01 +00:00
Simran Basi
8a431d9c7d Common testcase directories: Clean up duplicates
This CL addresses the problem that native tests build for multiple
architectures and also build for host.

First it restructures each testcase folder to the following layout:
<testcase>/<testcase>.config
<testcase>/<arch 1>/testcase
<testcase>/<arch 2>/testcase

Secondly it now uses the new soong-zip prefix capability to
separate out host and target testcases in the device-tests &
general-tests zip files.

Bug:36692141
Test: `make device-tests general-tests cts -j` &
      ensured all built successfully.

Change-Id: I4e8b084ee56fa8940914911649ff35507d87eb27
2017-04-05 13:38:20 -07:00
Jin Qian
cbe0e25af2 Merge "Revert "device-tests: As a dependency to tests"" am: 5b216025ba am: 9c0b12db47
am: e95bc4fc6d

Change-Id: I69cb94d34737e1e692015338e40b0708db7ae91f
2017-03-21 01:14:02 +00:00
Jin Qian
df086140a8 Revert "device-tests: As a dependency to tests"
This reverts commit f153603ccc.

Change-Id: Ib439e2351da6c5eabcf412b29c6d798d05e01612
2017-03-21 01:00:41 +00:00
Simran Basi
1c90fcbefc Merge "device-tests: As a dependency to tests" am: 26594fce3f am: 318840dfb6
am: e3567c4847

Change-Id: I15832d0b20788df5374930dc1b09fe0ec9ac3122
2017-03-20 22:28:51 +00:00
Simran Basi
f153603ccc device-tests: As a dependency to tests
This change will build device-tests whenever tests is built.

Bug: 35386840
Test: None
Change-Id: If587bf74bb66b7ce5552493c73368bb68b6d34af
2017-03-20 13:14:49 -07:00
Simran Basi
af5c1f3144 Merge "device-tests & general-tests: build out zips." am: dd908dd925 am: 0aa305aacc
am: 38c95e4d6d

Change-Id: I1bdfa6a248cfb58abfc59970c82c466595c2d91e
2017-03-17 17:56:51 +00:00
Treehugger Robot
dd908dd925 Merge "device-tests & general-tests: build out zips." 2017-03-17 17:45:05 +00:00
Simran Basi
c8f21f6c4e device-tests & general-tests: build out zips.
Generates the output zips of the device-tests & general-tests
buildable suites.

Bug: 35386840
Test: make dist device-tests general-tests -j
Change-Id: I253bcd8615379334b52b4d770a5c4f7e07a58795
2017-03-15 17:56:50 -07:00
Colin Cross
4b6bc2b427 Merge "package-modules: use && instead of ; between copy commands" am: e0e20079c2 am: 8843039368
am: d826201c69

Change-Id: Ib5529cd05e439878a1083756e3b73d4d08940809
2017-03-15 02:28:39 +00:00
Colin Cross
f075bcbc98 package-modules: use && instead of ; between copy commands
Using ; to join commands in a rule causes failures to be ignored by
make.  Use && instead, and add true at the end as the second operand
to the last && operator.

Also inline copy-test-in-batch, batching is no longer necessary as
kati will fall back to a shell script if the recipe is too long to
fit in a command line.

Test: builds
Change-Id: I4a2528bf2a15106cfabaae0336662c4a0464271d
2017-03-14 16:58:34 -07:00
Dan Willemsen
ff490b6763 Merge "Speed up *TS zip file creation" am: 6d0f949296 am: 83667a3821
am: d6f077092b

Change-Id: Icf328eb0c239b7bd0a0ba602490860cad02f56db
2017-03-13 20:07:18 +00:00
Dan Willemsen
c4cf49569f Speed up *TS zip file creation
This also makes the resulting zip files more repeatable -- the file list
is sorted and the entries have static timestamps.

On my machine, this saves ~30 seconds for android-cts.zip, it now takes
less than a second.

Test: m -j cts; compare output from without this change
Change-Id: Ia71e35878ff98ba9775115860530e87eee47739f
2017-03-10 13:39:26 -08:00
Dan Willemsen
aa7e67c871 Merge changes I5e684409,I4fa35540,I24015ef0 am: 93de77745c am: d1378dec05
am: ead8af8580

Change-Id: I0608060da7307b9bd9a5bd15e601b1787c510dd4
2017-02-28 21:41:33 +00:00
Dan Willemsen
e19ca033c6 Improve warnings for package-modules.mk
Include the calling makefile and package name instead of just a warning
pointing to package-modules.mk

Test: multiproduct_kati, grep logs
Change-Id: I4fa35540b9695b44eea6c23463e137ec37d1d2c9
2017-02-24 15:49:50 -08:00
Simran Basi
a7886dc417 Merge "Add device-tests and general-tests make targets." am: c436f9eeec am: 0d0f7e1c7b
am: c1eb9a69c8

Change-Id: I6288642e2dcfa7210605030e968dae4122c8deb6
2017-02-22 19:49:48 +00:00
Simran Basi
9c295b4415 Add device-tests and general-tests make targets.
Adds the device-tests and general-tests makefiles and
added include lines to main.mk so that individual test
modules can be built properly.

These targets do not build any special tradefed wrapper
that normal *TS's usually employ. They are not necessary
here.

Bug: 35350788
Test: Updated several CTS test modules to belong to these
      suites instead and ran:
      `rm -rf out; make clean; make device-tests general-tests -j`
      then verified the output.

Change-Id: I40e3958375f7b39cb56508f2812ce9760d403f6f
2017-02-21 17:04:47 -08:00