Commit graph

1511 commits

Author SHA1 Message Date
Tao Bao
27bfc86d8b Merge "Pack system/update_engine/scripts into otatools.zip." 2017-09-01 16:45:08 +00:00
bohu
18d1868580 sdk: add vendor-qem.img into the deps list
if it exists. Fix master-without-vendor sdk_x86-sdk build

Change-Id: I5656e7124d30e71120044cce668c54793f77208a
Merged-In: I5656e7124d30e71120044cce668c54793f77208a
(cherry picked from commit a508578811)
2017-08-31 16:57:44 -07:00
Tao Bao
3f4ea7cb88 Pack system/update_engine/scripts into otatools.zip.
The scripts will be needed by OTA releasetools, for parsing A/B OTA
payload.

Bug: 65261072
Test: `m otatools-package` and check for system/update_engine/scripts.
Change-Id: I5cb54561a5fb0454a37879ca20afa95b82ffdefe
2017-08-31 16:42:38 -07:00
Andreas Gampe
4ed21d10e8 Build: Change SANITIZE_LITE install settings
Under SANITIZE_LITE, the default app_process is not instrumented.
Embedding sanitized libraries into APKs will lead to crashing apps.
So move second-stage APKs to /data/asan.

The tradeoff is that for now we won't run these sanitized binaries.
Adding support for that is future work.

Also do not do a rebuild of the boot image. This would invalidate
the first-stage results. Note that this is technically dangerous,
as stack overflow guard sizes will not be adapted for ASAN runs.
However, this is a general incompatibility.

Also do not rebuild system_other. Apps are not rebuilt, so it will
create an empty image.

(cherry picked from commit 481660ef34)

Bug: 36458146
Test: m && m SANITIZE_TARGET=address SANITIZE_LITE=true
Merged-In: I3898bc53cad264529f126e6bf0af9c6ca1736877
Change-Id: I3898bc53cad264529f126e6bf0af9c6ca1736877
2017-08-31 08:56:18 -07:00
Bowgo Tsai
9a05dca429 Copy adbd from system/bin to recovery/root/sbin
This change will be submitted with other changes moving adbd from
root/sbin to system/bin. We need to copy it specifically to recovery root.
Previously it was copied by rsync $(TARGET_ROOT_OUT) $(TARGET_RECOVERY_OUT).

Bug: 63910933
Test: normal boot sailfish, checks adb works
Test: recovery boot sailfish, checks adb works
Test: normal boot bullhead, checks adb works
Test: recovery boot bullhead, checks adb works

Change-Id: Ib49605f97a190aec2648cb000d1159b6e15db673
Merged-In: Ib49605f97a190aec2648cb000d1159b6e15db673
(cherry picked from commit 3147e7cfab)
2017-08-24 14:27:49 +08:00
Ivan Lozano
781469ac0a Merge "Don't append _asan to non-asan build flavors."
am: 1782e17ef2

Change-Id: I8f7aaf1152e7e964e7983d91308181077dc7c6f4
2017-08-14 21:10:39 +00:00
Steve Muckle
fa6595001a resolve merge conflicts of b145b04127 to stage-aosp-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ice4e7c23c5a6e0ba4aa085e82c121d472f89209a
2017-08-14 13:00:27 -07:00
Ivan Lozano
1782e17ef2 Merge "Don't append _asan to non-asan build flavors." 2017-08-14 18:47:43 +00:00
Treehugger Robot
b145b04127 Merge "Move build-image-kernel-modules out of recovery macro" 2017-08-14 16:24:31 +00:00
Ivan Lozano
0f71db3248 Don't append _asan to non-asan build flavors.
Right now we add the '_asan' suffix to the build flavor whenever
SANITIZE_TARGET is defined. This patch ensures the suffix is only
added when SANITIZE_TARGET=address.

Test: Checked flavor of SANITIZE_TARGET=address and integer_overflow
builds.
Bug: 30969751
Bug: 64561273

Change-Id: Ie20340f81b395e0b6b5f8086350bbc20f83d5fa4
2017-08-14 08:25:03 -07: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
9b99ddc8a5 Revert "emulator: create qemu images for system,vendor"
This reverts commit b5d0503758.

Change-Id: Ie46a3a3dd99dec42673b3e3bd5b9085ca0480a8d
2017-08-01 06:50:07 +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
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
Xu Chao
2b04bf4725 Move build-image-kernel-modules out of recovery macro
build-image-kernel-modules is defined under recovery macro
when build without recovery,the driver kos are not packed
into the vendor image

Test: build with TARGET_NO_RECOVERY on and set ko to be build
in BOARD_VENDOR_KERNEL_MODULES to see if kos are packed into
vendor image

Change-Id: I162ccb2fe50c09ece07b6b07e416721985228006
2017-07-21 15:25:17 -07:00
Steve Muckle
fb2714e61c fix builds on macOS when kernel modules are used
The mac implementation of sed has different requirements for the -i
option. Instead of using that, just redirect the output to the final
location of modules.dep, since it's being copied in the very next
line anyway.

Bug: 38268091
Test: run build with kernel modules on macOS
Merged-In: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
Change-Id: I49e4a1a69f01139ef47711ab1223d3a8e5cda568
2017-07-21 15:24:51 -07:00
Tri Vo
ecf83a839f package modules.alias onto device
Test: device builds and boots, vendor/lib/modules/modules.alias appears
on device.
Merged-In: I668a396ccd11e4eb599e1f6aa2906400ac78f02b
Change-Id: I668a396ccd11e4eb599e1f6aa2906400ac78f02b
2017-07-21 15:24:21 -07:00
Jeff Gaston
6264b662f3 Merge "Update to latest jacoco usage"
am: 483fae7430

Change-Id: Ibc94d5ba6db7690441825dd655b6cb26d989b78d
2017-07-17 20:44:10 +00:00
Jeff Gaston
483fae7430 Merge "Update to latest jacoco usage" 2017-07-17 20:36:39 +00:00
Tianjie Xu
a07a04c737 Merge "Generate brotli compressed {}.new.dat for full OTA"
am: 1b28eca1a1

Change-Id: I3474e8efb634513fbc4876e5c272cf56b3443e12
2017-07-14 23:27:21 +00:00
Jeff Gaston
aaae43cd24 Update to latest jacoco usage
Bug: 36792868
Test: EMMA_INSTRUMENT_STATIC=true m -j

Change-Id: I419b543283b52be9a72f5c6b10e4cbea68782174
2017-07-14 13:04:05 -07:00
Tianjie Xu
b0a29ad8c2 Generate brotli compressed {}.new.dat for full OTA
Brotli has a better compression ratio than deflation. So for non-AB
full OTA, we can compress the new.dat with brotli first and store it
in the zip package.
This increase the OTA generation time by ~5 minutes for a full OTA
(measured based on 2.0G system.new.dat)

Bug: 34220646
Test: Generate a full OTA for bullhead
Change-Id: I9c0550af8eafcfa68711f74290c8e2d05a96648f
2017-07-14 10:53:21 -07:00
Howard Chen
fd380f20cb Merge "Add a make maco to convert string to upper case"
am: 8eff2d7c8e

Change-Id: I86260216cea1c2a6d46599481e19e0063ae576a8
2017-07-06 03:50:54 +00:00
Howard Chen
8eff2d7c8e Merge "Add a make maco to convert string to upper case" 2017-07-06 03:46:07 +00:00
Bowgo Tsai
95202bcba6 Merge "Align size of vbmeta image to 4k boundary"
am: efb6fddf39

Change-Id: I4ace791408c92f55bc55f2fbf72dfef3ab363a70
2017-07-06 00:58:16 +00:00
Treehugger Robot
efb6fddf39 Merge "Align size of vbmeta image to 4k boundary" 2017-07-06 00:29:52 +00: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
Bowgo Tsai
0556231cae Align size of vbmeta image to 4k boundary
Adding option "--padding_size 4096" in BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS
instead of INTERNAL_AVB_MAKE_VBMETA_IMAGE_ARGS. The former setting will
be propogated to `make dist` while the latter is only used for `make`.

Bug: 38454093
Test: `make dist` and check vbmeta.img is being padded.
Merged-In: I929288b218761a4637a2a2ef0679d3ff85c70731
Change-Id: I929288b218761a4637a2a2ef0679d3ff85c70731
(cherry picked from commit 9e95beab31)
2017-07-01 00:34:02 +08:00
Howard Chen
b83b205265 Add a make maco to convert string to upper case
There's already a to-lower function. Add a to-upper function to make
it complete.

Bug:36012197
Test: `make` pass, flash images from $OUT and boot device with chain
partitions

Change-Id: I39fe8c277a3cf6b87fc3c411eeab2fa5fb40007b
2017-06-29 16:18:47 +08:00
Tao Bao
ce10b6e2f3 Merge "Allow packing custom radio images into target_files zip."
am: 9ea6a8b817

Change-Id: Ifdcdfa2214e4fa75bb0c7a5df1cb1796814fa7bc
2017-06-29 03:16:17 +00:00
Tao Bao
95a95c3a5e Allow packing custom radio images into target_files zip.
Radio images are added to INSTALLED_RADIOIMAGE_TARGET, which by default
will be packed under RADIO/ in a target_files zip. This CL introduces
BOARD_PACK_RADIOIMAGES that allows additionally copying them into
IMAGES/, which will then be included into <product>-img.zip.

Bug: 62195105
Test: Define BOARD_PACK_RADIOIMAGES and `m dist`. Check the generated
      target_files zip and <product>-img.zip.
Change-Id: I3deafd2dfecd1d4dbfdfc2d002fc40ef22fb60ea
2017-06-27 13:50:12 -07:00
Chris Fries
abd4388b4c Merge "Makefile: Add avbtool to INTERNAL_USERIMAGES_DEPS" am: ccac0f861b
am: ba0be93555

Change-Id: I1b6a9b8f05d10738267a51da65bd404242885e6c
2017-06-21 23:16:31 +00:00
Chris Fries
df0387ddab Makefile: Add avbtool to INTERNAL_USERIMAGES_DEPS
.. in order to let the system_other image use it.

Bug: 33203383 Can't build target on mac
Change-Id: Iac2faf0ebdcc933675afbec2301d5d455aa33501
2017-06-21 16:19:35 -05:00
Colin Cross
38e8c8bc8c Merge "Add make sync target" am: 564ce0fa53
am: 5d848ba50a

Change-Id: I384460e7373aec904a4779d8af1648f20c004ff8
2017-06-21 03:00:47 +00:00
Treehugger Robot
564ce0fa53 Merge "Add make sync target" 2017-06-21 02:42:28 +00:00
Bowgo Tsai
98e356910f Merge "Use make functions to convert a text to lower case" am: cd46f1012e
am: 5a7d87afce

Change-Id: I5da050178795dce0333b74ca91a7c18968ea5bd7
2017-06-21 02:18:31 +00:00
Colin Cross
91a52277b0 Add make sync target
make sync will build everything necessary to adb sync system
and vendor, without wasting time rebuilding system.img and
vendor.img.

Test: m -j sync
Change-Id: I91c0012eed6d58a338393cc375056a30e2a24b09
2017-06-20 16:57:52 -07:00
Bowgo Tsai
e615afd6d0 Use make functions to convert a text to lower case
We cannot cache the result of ($shell ...) and we have to run these on
every build even if we don't have to re-read the makefiles. Replace it
with make functions $(substr $(substr ... )).

Bug: 38399657
Test: `make` pass, flash images from $OUT and boot device with chain partitions
Change-Id: I6d4ff8e487931ba25008a2a881401a8951d4049e
2017-06-20 17:44:00 +08:00
Bowgo Tsai
abbba2c832 Merge "AVB: support chain partition signing" am: 0effed4b94
am: dcad0945ab

Change-Id: I5bc9f2dcc94b2db846d9956c0def6b3c9910b2c5
2017-06-20 07:07:33 +00:00
Bowgo Tsai
e408b4ceb2 Merge "Align size of vbmeta image to 4k boundary" am: 6b126fb7bc
am: e7151a57aa

Change-Id: I0a4dbbe18574e1c2037b185c7e3794033da2c974
2017-06-14 02:14:41 +00:00
Jeff Vander Stoep
0b3fc37d7e Build split file_contexts for recovery
am: 4ff042c4aa

Change-Id: If9ff1b6b2ed152333eeb92a83d9bdbbacc431ed2
2017-06-13 17:59:05 +00:00
Jeff Vander Stoep
4ff042c4aa Build split file_contexts for recovery
Bug: 62564629
Test: build and flash marlin. Successfully switch between regular
    and recovery modes

Change-Id: I67ae2f59ca1868cfe777de0d4f0c4e3c2d99329d
2017-06-13 15:39:29 +00:00
Bowgo Tsai
3e599ead66 AVB: support chain partition signing
Current build system will include AVB metadata from each partition and
store them into /vbmeta partiton when BOARD_AVB_ENABLE is set, which makes
each partition tightly-coupled.

Add the support for 'chain partition':
  - The vbmeta of each partition is stored on the same partition itself.
  - The public key used to verify each partition is stored in /vbmeta.

For example, the following build variables are required to enable chain
partition for system partition:
  - BOARD_AVB_SYSTEM_KEY_PATH := path/to/system_private_key
  - BOARD_AVB_SYSTEM_ALGORITHM := SHA512_RSA8192
  - BOARD_AVB_SYSTEM_ROLLBACK_INDEX := 1
  - BOARD_AVB_SYSTEM_ROLLBACK_INDEX_LOCATION := 2

The corresponding settings will be added into META/misc_info.txt for
build_image.py and/or add_img_to_target_files.py:
  - avb_system_key_path=path/to/system_private_key
  - avb_system_algorithm=SHA512_RSA8192
  - avb_system_add_hashtree_footer_args=--rollback_index 1
  - avb_system_rollback_index_location=2

To enable chain partition for other partitions, just replace SYSTEM with
BOOT, VENDOR and/or DTBO in the build variables.

Also switch from  `avbtool make_vbmeta_image --setup_rootfs_from_kernel system.img ...`
to `avbtool add_hashtree_footer --image system.img --setup_as_rootfs_from_kernel...`
when BOARD_BUILD_SYSTEM_ROOT_IMAGE is true. This works for both chained
and no-chained:
  - chained: `avbtool add_hashtree_footer --setup_as_rootfs_from_kernel` will
    add dm-verity kernel cmdline descriptor to system.img
  - no-chained: `avbtool make_vbmeta_image --include_descriptors_from_image
    system.img` will include the kernel cmdline descriptor from system.img into
    vbmeta.img

Bug: 38399657
Test: `make` pass, flash images from $OUT and boot device without chain partitions
Test: `make` pass, flash images from $OUT and boot device with chain partitions
Test: `make dist` pass, flash images from TF.zip and boot device without chain partitions
Test: `make dist` pass, flash images from TF.zip and boot device with chain partitions
Test: follow the same steps in
      https://android-review.googlesource.com/#/c/407572/

Change-Id: I344f79290743d7d47b5e7441b3a21df812a69099
2017-06-13 17:45:10 +08:00
Bowgo Tsai
7cd30041e9 Align size of vbmeta image to 4k boundary
Adding option "--padding_size 4096" when making vbmeta.img.

Bug: 38454093
Test: build vbmeta.img and check it's being padded.
Change-Id: Id3ba6bf9998755bae75ec8b272ceccf59f4b8666
2017-06-13 11:31:06 +08:00
Tao Bao
88c9dddd0f Revert "Move /default.prop to /system/etc/prop.default"
This reverts commit fad00e4318.

init fails to read default.prop under recovery:
init: Couldn't load properties from /default.prop: Too many symbolic links encountered

Bug: 62525809
Change-Id: I133e9025693e3e01278ec73c8d08860fc89d314b
2017-06-12 17:00:42 +00:00
Hung-ying Tyan
fad00e4318 Move /default.prop to /system/etc/prop.default
This patch tries to fix the problem where the default properties need
to go with the system image especially on non-AB devices where
/default.prop is on the ramdisk image. A symlink is created at
/default.prop for backward compatibility.

Bug: 37815285
Test: Tested with ag/2376383. Booted pixel phones, checked the location
      of prop.default, verified the symlink, checked a few properties
      (via adb shell getprop) and manually tested a few apps (Camera,
      Maps etc).
      sign_target_files_apks.py was tested with:
      sign_target_files_apks -o -e DynamiteLoader.apk= -e DynamiteModulesA.apk= \
          -e DynamiteModulesB.apk= -e DynamiteModulesC.apk= -e DynamiteModulesD.apk= \
          -e GoogleCertificates.apk= out/dist/*-target_files-*.zip signed-target_files.zip

Change-Id: I1a9a2ba49c8252afc13ced3dea71253afbd3091e
2017-06-09 13:00:58 +08:00
Tao Bao
f6737d7506 Merge "Remove three board_avb_* args from META/misc_info.txt." am: 401b1d2509 am: 6466063839
am: 26912a3a57

Change-Id: Ief85e4efe05855b4486ed7e2f8bac22302ddd6a9
2017-06-05 20:24:06 +00:00