Commit graph

499 commits

Author SHA1 Message Date
Jiyong Park
03eb06150b Don't reserve size for bad blocks when checking image size
When checking *.img size with the partition size, the build system
reserves additional bits for spare bits and spare bad blocks.

However, for emmc and ufs, the space bits and blocks are entirely
managed by the underlying controller and thus not visible from outside
of the controller. In fact the check routine was made for legacy MTD
storages where raw flash blocks are directly exposed.

This makes the size checking a little bit conservative in modern devices.
Builds were failed even though the *.img can actually fit into the
partition. To handle this problem, the additional size is no longer
reserved when checking *.img size with the partition size.

This change also removes following build flags that are meaningful
only for devices having MTD storages:
BOARD_NAND_PAGE_SIZE
BOARD_NAND_SPARE_SIZE
Further use of them breaks the build

Bug: 35790399
Bug: 66399382
Test: build

Merged-In: I954bf261441b53844e75d05788866f1692a2ad43
Change-Id: I954bf261441b53844e75d05788866f1692a2ad43
2017-10-04 21:25:08 +09:00
Steve Muckle
b4a3124822 Merge "get kernel configs from kernel/configs" 2017-09-13 19:33:19 +00:00
Steve Muckle
378c2bb42a get kernel configs from kernel/configs
The kernel configs have moved out of VTS and into their own
repository.

Test: build and boot
Change-Id: I649af63216e7b18604586f70396bceff626c30d0
2017-09-12 16:26:28 -07:00
Steven Moreland
fdce598ed8 aosp_arm64_ab is vndk
Test: builds with BOARD_VNDK_VERSION=current
Test: test only one product is using this w/ multiproduct_kati
Bug: 65375837
Merged-In: I972ab897a8bc23ba5c5f6bf133db0017e4334f40
Change-Id: I972ab897a8bc23ba5c5f6bf133db0017e4334f40
2017-09-05 22:31:30 +00:00
Bo Hu
35149ca0b7 Merge changes from topic "aosp-emulator-oc"
* changes:
  emulator: fix widevine drm vndbinder denial
  emulator: fix selinux issues
  emulator: squash misc modifications from oc-emu-dev
  emualtor: keep libopenjdkjvmti*.so on sdk images
  emulator: move rild.libpath to vendor
  sdk:enable emulator to launch in build environment
  build-emulator: fully treblize emulator image
  Build vendor image for emulator
2017-08-31 22:56:31 +00:00
bohu
dc745a9090 emulator: fix widevine drm vndbinder denial
[   86.252399] type=1400 audit(1503684692.153:25): avc: denied { read write } for pid=4160 comm="android.hardwar" name="vndbinder" dev="tmpfs" ino=5163 scontext=u:r:hal_drm_widevine:s0 tcontext=u:object_r:vndbinder_device:s0 tclass=chr_file permissive=0

BUG: 64726466

Test: build sdk_gphone_x86-user target, launch it
and the above denial should be fixed.

Change-Id: Ied1268878236c42fbb0751a0f33014b332d78c32
Merged-In: Ied1268878236c42fbb0751a0f33014b332d78c32
2017-08-30 17:13:55 -07:00
bohu
913a990249 emulator: fix selinux issues
with cas/camera/drm hals

BUG: 64726466

Test: build aosp_x86-eng, boot emulator
without camera/drm hals killed by
selinux avc denials; camera can take
pictures

Change-Id: I8a154fdb5d7aa7763aab2b912976eb9e1d329cdb
Merged-In: I8a154fdb5d7aa7763aab2b912976eb9e1d329cdb
2017-08-30 17:13:51 -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
bohu
bc43c4ec29 emulator: move rild.libpath to vendor
BUG: 62137708
Test: buld sdk_gphone_x86-user, launch
emulator make sure radio works

Change-Id: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
Merged-In: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
2017-08-30 17:13:37 -07:00
bohu
e3f4e9f025 build-emulator: fully treblize emulator image
Install emulator specific binaries and libraries
to vendor partition; update selinux; add vndk.

BUG: 37511975

Test: build user build, launch emualtor, run CTS.

Change-Id: I70f58947e98b41b195d77b4347d2efdc09348392
Merged-In: I70f58947e98b41b195d77b4347d2efdc09348392
2017-08-30 17:13:26 -07:00
Yahan Zhou
3cf7441dbe Build vendor image for emulator
BUG: 37511975

Test: lunch sdk_gphone_x86-user, make with dist option, unzip
sdk_gphone_x86-emulator-eng.xxxx.zip to system image folder, emulator
can boot

Change-Id: I75b9f0de17fece3dec5ae1662400808af321bd4d
Merged-In: I75b9f0de17fece3dec5ae1662400808af321bd4d
2017-08-30 17:13:20 -07:00
Yifan Hong
63e264d142 fwk comp mat: add arch specific kernel requirements
Test: m system_compatibility_matrix.xml -j
Bug: 64124223
Change-Id: Ieda3ea43e5d3b7d393461bd54b311b58af443f7c
Merged-In: Ieda3ea43e5d3b7d393461bd54b311b58af443f7c
2017-08-28 17:32:59 -07:00
Yifan Hong
a508b30df5 fwk comp mat: use a for loop for supported kernel versions
Test: m system_compatibility_matrix.xml -j

Bug: 64124223
Change-Id: Ife95bfb5b7103239e116df1ae844cc3a643b4c28
Merged-In: Ife95bfb5b7103239e116df1ae844cc3a643b4c28
2017-08-28 17:32:59 -07:00
Isaac Chen
9a888ebb51 Merge "Revert "Revert "Build support for 32-bit armv8-a""" 2017-08-25 01:55:56 +00:00
Yifan Hong
1aecc84239 Add <kernel> entry to fwk compat mat.
Test: builds and verify that system/compatibility_matrix.xml
      has configs filled.
Test: `vintf | tail` on marlin shows that fwk compat mat
      is compatible with runtime info.

Bug: 38324908
Change-Id: I8a35ea582fea1faa083c409ec58813c3ac82dc9c
Merged-In: I8a35ea582fea1faa083c409ec58813c3ac82dc9c
2017-08-24 11:28:04 -07:00
Bowgo Tsai
eb7b438994 Pass FRAMEWORK_VBMETA_VERSION to assemble_vintf
Note that this depends on a change in avbtool:
  https://android-review.googlesource.com/#/c/406374/

Bug: 38325029
Test: builds system.img, checks $OUT/system/compatibility_matrix.xml
      contains correct vbmeta-version
Change-Id: Iacc0a2687fb39600ad6b8e9cfbfe5c1a3b90b40b
Merged-In: Iacc0a2687fb39600ad6b8e9cfbfe5c1a3b90b40b
2017-08-24 11:28:04 -07:00
Yifan Hong
dae462bdd1 Accept multiple input files for device manifest.
Test: test with DEVICE_MANIFEST_FILE variable split
      into multiple files

Bug: 38217107
Change-Id: I1146898e4ccf0e8bac7d8541032f160476dbc148
Merged-In: I1146898e4ccf0e8bac7d8541032f160476dbc148
2017-08-24 11:28:02 -07:00
Isaac Chen
f5af850a29 Revert "Revert "Build support for 32-bit armv8-a""
This reverts commit 7de79cbeaf.

Fixed CTS build issue by adding -march=armv7-a in cts/tests/tests/os/jni/Android.mk since the library built here needs/uses instruction (swp) obsolete in ARMv8.

Bug: 64964151
Test: lunch aosp_arm64-userdebug; make -j cts
      lunch aosp_x86-userdebug; make -j cts
      lunch aosp_sailfish-userdebug; make -j cts
      lunch aosp_bullhead-userdebug; make -j cts

Change-Id: Ic3a121600da8e2a9a2d5176b9680cd18ce457959
2017-08-23 10:58:57 +00:00
Tobias Thierer
0d35b9fba3 Merge "Revert "Build support for 32-bit armv8-a""
am: 1da1c6d056

Change-Id: I7a5ae22c984ffe8781998b5ae8e20aeb7516fac1
2017-08-22 10:36:35 +00:00
Tobias Thierer
7de79cbeaf Revert "Build support for 32-bit armv8-a"
This reverts commit 0daa78eef4.

Reason for revert: Broke the build for some targets (including marlin and angler).

$ make cts
build/core/combo/TARGET_linux-arm.mk:43: kryo is armv8-a.
build/core/combo/TARGET_linux-arm.mk:45: TARGET_2ND_ARCH_VARIANT, armv7-a-neon, ignored! Use armv8-a instead.
[...]
cts/tests/tests/os/jni/android_os_cts_CpuInstructions.cpp:88:20: error: instruction requires: armv7 or earlier
    asm volatile ( "swp r0, r0, [%0]" : "+r"(ptr) : : "r0" );
                   ^
<inline asm>:1:2: note: instantiated into assembly here
        swp r0, r0, [r1]
        ^

Change-Id: I65a91ed5a4461eca6646df13642a87a5c37d6c85
2017-08-21 15:03:16 +00:00
Isaac Chen
ef1e443e14 Merge "Build support for 32-bit armv8-a"
am: 70fe80491c

Change-Id: I6b4291a893ff42eca1933b8783e342855f22917f
2017-08-19 06:16:49 +00:00
Isaac Chen
0daa78eef4 Build support for 32-bit armv8-a
Overwrite TARGET_(2ND_)ARCH_VARIANT as armv8-a if
TARGET_(2ND_)CPU_VARIANT is set to some known armv8-a core like
cortex-a53, cortex-a73, kryo, denver64 etc.

For clang, -march is ignored if -mcpu is set to specific core so this
change doen't impact the objects built for armv7-a-neon/some_armv8_core
since it's treated as armv8-a/some_armv8_core.

Bug: 62895439
Test: Built modified aosp_arm64 with armv8-a as its TARGET_2ND_CPU_ARCH
      and generic as its TARGET_2ND_CPU_VARIANT successfully.
      "lunch hikey-userdebug; make" and verify TARGET_2ND_ARCH_VARIANT
      is overwritten.

Change-Id: If4260cf397783b5f56c4fd432615f4676429a1d3
2017-08-10 16:13:22 +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
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
Jeff Vander Stoep
9a8f6775ec sepolicy: remove all use of domain_deprecated
This attribute has been removed from public policy and is no longer
available.

Bug: 38316109
Test: build policy
Change-Id: I3407ced2d725de982e19b77345827de03d93c426
(cherry picked from commit ec488e1fee)
2017-07-24 08:17:39 -07:00
Isaac Chen
1573baca1b Generic AOSP system image for non-A/B arm devices
aosp_arm_a: for non-A/B 32-bit arm devices
aosp_arm64_a: for non-A/B 64-bit arm devices
Both are based on aosp_arm64_ab (for A/B devices).

Bug: 36153731
Test: build with oc-dev and the resulted system image works on one
32-bit arm device successfully (no 64-bit arm device to test yet).
Change-Id: Ifb5c4239e5c22005e055cfa840feca9c0a92586f
2017-05-19 09:29:21 +00:00
TreeHugger Robot
2e8ce7628d Merge "sepolicy: remove all use of domain_deprecated" into oc-dev 2017-05-16 21:36:39 +00:00
Jeff Vander Stoep
ec488e1fee sepolicy: remove all use of domain_deprecated
This attribute has been removed from public policy and is no longer
available.

Bug: 38316109
Test: build policy
Change-Id: I3407ced2d725de982e19b77345827de03d93c426
2017-05-15 13:25:06 -07:00
Yifan Hong
4a352c9df0 Only checks compatibility for VINTF XMLs when PRODUCT_FULL_TREBLE
Bug: 37954458
Bug: 37321309

Test: build with lunch bullhead (PRODUCT_FULL_TREBLE=false)
Test: build with lunch marlin   (PRODUCT_FULL_TREBLE=true)
Change-Id: I2f3f8e4439e3986b9af635ac52c116f352215642
2017-05-03 16:33:23 -07:00
Yifan Hong
c9ad35ce39 Add compatibility check for system_manifest/compatibility_matrix.xml
Add compatibility check against device vintf schemas
when framework schemas are built.

Test: build with lunch marlin (that has manifest.xml)
Test: build with mini_emulator_arm64 (that doesn't have manfiest.xml)

Bug: 37321309

Change-Id: I87db152754d0185938bcef0c4395f477b8fd269b
2017-05-01 22:29:16 -07:00
Yifan Hong
b5cbe22b84 Add device/fwk compatibility matrices to device.
Also renamed matrix.xml to compatibility_matrix.xml.

Test: make and ensure vendor/compatibility_matrix.xml is there.
Test: adb shell vintf (see matrices, compatible = true)

Bug: 37321309
Change-Id: I4ebbedf47a576a50a42df53b72e507ed31ef2e56
2017-05-01 21:49:18 -07:00
Diego Wilson
77fcc43b6c Remove BOARD_USES_RECOVERY_AS_BOOT from aosp_arm64_ab
The target does not have a kernel so this flag does
not make sense.

Bug: 37443196
Test: flash aosp_arm64_ab system.img on sailfish
Change-Id: I1f22866dd5ecdd16615c02fdc8aa898b1ec2ddbd
2017-04-20 11:36:50 -07:00
Yifan Hong
aa21221f80 Use assemble_vintf to verify framework manifests.
Test: builds, and verify that system/manifest.xml is there.

Bug: 36681384 Runtime-Collectible information must be statically
collectible
Bug: 36983271 VINTF checked at build time

Change-Id: Ic3bb50211311fa423a2ad56bd2891cb57d7dc1a5
2017-04-14 16:29:55 -07:00
Yifan Hong
283af596eb Use assemble_vintf to verify device manifests.
Test: builds, and verify that vendor/manifest.xml has
sepolicy version.

Bug: 36681384 Runtime-Collectible information must be statically
collectible
Bug: 36983271 VINTF checked at build time

Change-Id: I10e4cff6ed1b78a7cb9239e822ab054e1b90e7d3
2017-04-14 16:29:04 -07:00
Michael Schwartz
4d9cb56866 Rule to copy device manifest to device
The device manifest defines the collection of HAL interfaces exposed by
the vendor. Create a common rule so each target need not define their own.

Bug: 36810913
Test: Ran marlin build and inspected file was copied
Change-Id: I9f53796fdd85e706f91664d275aff6dbd785213f
2017-04-13 08:42:42 -07:00
Steven Moreland
417fc4f445 ENABLE_TREBLE is deprecated
ENABLE_TREBLE is deprecated...removing obsolete code fragments related
to the flag.

Test: marlin boots/works
aosp_arm64_ab boots/works on sailfish/marlin

Bug: 32978887
Change-Id: I59b4509e4e7ec11cfa138200bccc4418c10b44f3
2017-04-03 12:27:51 +09:00
Jiyong Park
6fdf938751 Remove marlin/sailfish specific sepolicy
Don't use sepolicy dir for marlin/sailfish.

Bug: 36231802
Test: aosp_arm64_ab should boot
Change-Id: I0e76841530cec2c51b61251ffde802bd7ec10663
2017-03-30 14:25:41 +09:00
TreeHugger Robot
d4bcd158a5 Merge "Use HWC2 for all emulator images." 2017-03-24 21:03:37 +00:00
Jiyong Park
06241051e8 Make telephony work on generic system image
Bug: 36070427
Test: modem is up and emergency call can be made
Change-Id: Ic09200943a7ae7c51e420c6485f3b1b95c702265
2017-03-24 08:47:47 +00:00
Lingfeng Yang
450cd0ba62 Use HWC2 for all emulator images.
bug: 36375335

Change-Id: I1a220d7ea0174a87713e3009ceba22a5e3f66f25
2017-03-23 19:33:33 +00:00
Diego Wilson
f4efd73e96 Remove dependency on marlin sepolicy
Now that the selinux policy has been split between the system and
vendor partitions the aosp_arm64_ab build variant no longer
depends on the marlin selinux policy to work on marlin and sailfish.

Test: build and flash aosp_arm64_ab system.img on marlin and sailfish
Change-Id: I7681207284d783ffca1acccf44dbb159ea3b521c
2017-03-23 13:30:04 -04:00
Diego Wilson
a2d55b58d8 Move device specific properties to /vendor
By setting BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED on aosp_arm64_ab
the device specific properties like ro.product.board
are hosted in /vendor/build.prop.

Test: build and flash aosp_arm64_ab system.img on sailfish and marlin.
Change-Id: I8062ff81221a3026626736b012ceaf99d8ca2d12
2017-03-20 13:02:53 -07:00
bohu
7a0f58cfd7 Merge "Emulator: Enable logcat -Q to run in emulator" am: 406d3b6df1 am: 5c8080cc18
am: 4e0937222d

Change-Id: I93add2438689c5c02eb2155e68ba8514d8f8b81f
2017-03-17 16:38:34 +00:00
bohu
5c8080cc18 Merge "Emulator: Enable logcat -Q to run in emulator"
am: 406d3b6df1

Change-Id: I9f429980942e043ea874ad45bb88646d1c036f5b
2017-03-17 16:30:33 +00:00
bohu
8c3364bd59 Emulator: Enable logcat -Q to run in emulator
Create qemu_cmdline property and make sure logcat
can read it.

Change-Id: I83261a1ba29ecf9fd9b51a815425742177018c87
2017-03-15 22:27:08 -07:00
Jiyong Park
38f8aacf3b Add aosp_arm64_ab for generic system image for A/B-ready devices
aosp_arm64_ab is added as a product to build a generic system image for
all devices with ARM64 and A/B ready partitions. For now, it only
supports sailfish/marlin devices because following items are not yet
split.

- fstab
- overlays
- sepolicy

Bug: 35653062
Test: build and flash it to sailfish (or marlin)

$ source build/envsetup.sh; choosecombo 1 sailfish userdebug
$ ENABLE_EARLY_MOUNT=true ENABLE_TREBLE=true m -j 80
$ fastboot flashall
(For now, the two ENABLE_* are required to install  *.rc and *.prop
files into vendor partition. This restriction will be removed in the
future.)

$ source build/envsetup.sh; choosecombo 1 aosp_arm64_ab userdebug
$ m -j 80 systemimage
$ fastboot flash system out/target/product/generic_arm64_ab/system.img
$ fastboot -w reboot

Change-Id: Ia91163f2d51e90a488c9451cba23242887ea82ba
2017-03-09 17:14:37 +09:00