Commit graph

684 commits

Author SHA1 Message Date
SzuWei Lin
fa420b40c5 Add USE_XML_AUDIO_POLICY_CONF to GSI
USE_XML_AUDIO_POLICY_CONF is must for Treble device, so it is
also must on GSI. The settings is missed when creating GSI
aosp_$arch, add it back by this patch.

Bug: 110988359
Bug: 111053290
Test: build aosp_arm64 and build pass
Change-Id: I95f096e58350233fdcc8de115cc1691360070445
2018-07-06 13:22:35 +08:00
Isaac Chen
55e1d01f92 Refactor BoardConfig.mk for emulator products
The majority of the contents in BoardConfig.mk of emulator products
are the same. The common part is factored out as EmuConfig.mk so it's
easier to maintain these closely related products going forward.

Bug: 80117040
Test: Following products have been built and booted to homescreen:
  $ lunch aosp_x86-userdebug; m -j; emulator
  $ lunch aosp_x86_64-userdebug; m -j; emulator

Change-Id: I5392e0e88865d4908906a67c29939c23af84baf0
Merged-In: I5392e0e88865d4908906a67c29939c23af84baf0
(cherry picked from commit 510b76d8ff)
2018-07-05 18:47:15 +08:00
Bowgo Tsai
631900e6ce Enable /cache mount point
Non-A/B devices using AOSP OTA flow will mount /cache in the
fstab file. Without setting BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE,
/cache will be a symlink to /data/cache which introduces the
failure of `mount_all /vendor/etc/fstab.{ro.hardware}`. This is
because all devices laucned in P need to switch to "system-as-root".

This CL sets board config to create /cache directory in rootfs
(system-as-root GSI image). Note that A/B devices doesn't mount
or use /cache so leaving an empty /cache in rootfs has no harm.

Bug: 78485405
Test: Boot GSI on walleye
Change-Id: Ic260d2917cc64c9497f5f60ea11303e953e80efd
Merged-In: Ic260d2917cc64c9497f5f60ea11303e953e80efd
2018-06-29 14:23:25 +01:00
Anton Hansson
c0c39cf270 Add some experimental mainline targets.
These are not really realistic at the moment, but it's nice to get some
targets checked in that can be iterated upon.

- mainline_system: base mk for mainline systemimage. It will evolve to
  inherit other mks than base, and probably get a bunch of things added.
- mainline_system_arm: variant of mainline_system, specifically for
  the 'generic' device.
- mainline_arm: experimental product that also includes the non-system
  parts of aosp. Useful to experiment with the mk split.

Bug: 80410283
Test: lunch mainline_arm64 && m nothing && lunch mainline_system_arm64 && m nothing
Change-Id: I9beaa6f5f9c683733ed76a6d4e5c70b9376a5bb2
Merged-In: I9beaa6f5f9c683733ed76a6d4e5c70b9376a5bb2
2018-06-28 17:28:24 +01:00
Mathieu Chartier
f39c2c7495 Move go default system properties into prop files
Test: manual
Bug: 110517986

(cherry-picked from commit 732a4cc62f)

Merged-In: I28f5c18bb9e70c755ece50c49c02434f825878dc
Change-Id: I28f5c18bb9e70c755ece50c49c02434f825878dc
2018-06-26 15:12:46 -07:00
Dan Willemsen
5250840358 aosp_x86_arm builds have overriding commands
This product has warnings about overriding build commands, which means
that there are multiple instructions on how to build a file, and we've
just picked one of them. Which one we pick is usually stable, but it can
change.

Bug: 77611511
Test: turn default to false, aosp_x86_arm still uses a warning
Change-Id: Id821c04e3dd6a1f69ea748827c3570a751b4e1dd
2018-06-19 23:25:16 -07:00
Treehugger Robot
7f0ac95d21 Merge "Set proper CPU variant for aosp_arm" 2018-06-15 20:19:10 +00:00
Isaac Chen
e44b0d96b9 Set proper CPU variant for aosp_arm
System image of aosp_arm products is the new GSI in Pi.
Its arch variants need to be the same as the legacy GSI built
with aosp_arm_ab so it can pass related CTS/VTS tests.

Bug: 80401108
Test: $ lunch aosp_arm-userdebug; m -j; emulator # booted OK
      $ lunch aosp_arm-userdebug; m -j cts

Change-Id: I29fffca3e02a2251913a327b54640fc622e77a8d
Merged-Id: I29fffca3e02a2251913a327b54640fc622e77a8d
(cherry picked from commit b2e58893c3)
2018-06-15 18:40:42 +00:00
Bo Hu
82de42067e Merge "emulator: move sepolicy to goldfish project" 2018-06-13 22:14:32 +00:00
bohu
4001858313 emulator: move sepolicy to goldfish project
The sepolicies are emulator specific and are installed
under vendor partition, move them to the right location.

BUG: 110030159
Change-Id: I6acc27a3b787a3fafd9373c84492537185b184c5
Merged-In: I6acc27a3b787a3fafd9373c84492537185b184c5
2018-06-13 18:37:16 +00:00
Treehugger Robot
59c5127bea Merge "Create system.prop for GSI Pi" 2018-06-13 17:48:06 +00:00
SzuWei Lin
326ad779c1 Create system.prop for GSI Pi
Properties for GSI Pi are not exactly the same as those for legacy GSI.
Create a new gsi_system.prop for GSI Pi to avoid reusing legacy
treble_system.prop used by legacy GSI (aosp_$arch_a(b) products).

Bug: 78605339
Test: build and observe the system/build.prop
Change-Id: I435e33558e244009af9a91a97580fd56591ff6f3
Merged-In: I435e33558e244009af9a91a97580fd56591ff6f3
(cherry picked from commit 3fc49fede8)
2018-06-12 18:03:31 +08:00
Bjoern Johansson
a53c522678 Support new hostapd build target without HIDL
The new build target for hostapd does not include the HIDL control
interface and it's a separate binary from the hostapd used for WiFi
hotspots. This new binary needs its own SELinux rules and it should be
included in emulator builds since it's used to provide virtual access
points.

BUG: 74401469
Test: run cts -m CtsNetTestCases
Change-Id: I6a654ac2dea20af048ac731876ac603773fcf3d8
2018-06-11 15:56:51 -07:00
bohu
3a83195522 emulator: update aosp sepolicies
There have been quite some changes that should go to aosp.
This CL squash all of them into a single one.

Change-Id: I1e8d172b99cc98c93f2925fef32da8b461c277ed
Merged-In: I93b8489f710d194917d4b482ebca960c39658fd9
Merged-In: Ifac85db4e13d0b946f91b7eeffb4288d40d0ebb8
2018-06-11 15:56:25 -07:00
Treehugger Robot
f1a5557164 Merge "Temporarily whitelisting system domains writing vendor props" 2018-06-06 03:54:11 +00:00
Jeff Vander Stoep
8d235ecb49 sepolicy: update OWNERS
Test: n/a
Change-Id: I905b099c66e44468ca342bcbfe3dcb4dd44071a9
2018-06-04 22:10:54 -07:00
Jiyong Park
6b79c9b769 Temporarily whitelisting system domains writing vendor props
system properties must not be used as a communication channel in between
system and vendor processes. However, there has been no enforcement on
this: system process could write system properties that are owned and
read by vendor processes and vice versa. Such communication should be
done over hwbinder and should be formally specified in HIDL.

Until we finish migrating the existing use cases of sysprops to HIDL,
whitelisting them in system_writes_vendor_properties_violators so that
the violators are clearly tracked.

These violators are allowed only for P, but not for Q.

Bug: 78598545
Test: m -j selinux_policy when choosecombo'ed to aosp_arm64
Merged-In: I8f66aa20bb2d926cf517d40c93f4300c4d16b04b
Change-Id: I8f66aa20bb2d926cf517d40c93f4300c4d16b04b
(cherry picked from commit bb1432b61b)
2018-05-24 19:03:25 +09:00
Isaac Chen
50958e2cae Merge "Enable VNDK for aosp_arm(64)" 2018-04-24 18:10:44 +00:00
Treehugger Robot
a0f595ec69 Merge "ARM emulator: aosp_arm on 64-bit binder and kernel" 2018-04-24 13:35:01 +00:00
Isaac Chen
5327e98b1a Enable VNDK for aosp_arm(64)
This is needed for the system images of aosp_arm(64) products to
be used as their respective GSIs in P, and for also aosp_arm(64)
products to boot with the current GSIs.

Bug: 78255604
Test: Built and booted the following products to home screen
    $ lunch aosp_arm-userdebug; m -j; emulator
    $ lunch aosp_arm64-userdebug; m -j; emulator
    # The system image, both userdebug and user builds, of
    # aosp_arm64 could also boot to home screen and browse
    # the network on a physical device.

Change-Id: I83b79fd4d4e6e522ee78c720fb8c5f6f67ee411b
Merged-In: I83b79fd4d4e6e522ee78c720fb8c5f6f67ee411b
(cherry picked from commit f71547079a)
2018-04-24 19:12:11 +08:00
Treehugger Robot
3527ff9b84 Merge "Make aosp_$arch system images closer to GSIs" 2018-04-24 02:19:23 +00:00
Isaac Chen
50e6251baa ARM emulator: aosp_arm on 64-bit binder and kernel
Starting in P, all 32-bit and 64-bit architectures use 64-bit
binder interface. This is similar to ag/3576770 for x86.

Bug: 71861550
Test: the following products can boot to home screen successfully:
    lunch aosp_arm-userdebug; m -j; emulator
    lunch sdk_phone_armv7-userdebug; m -j; emulator
Change-Id: Ibe1f53a5798342555e2e84395a13b48d461f483d
Merged-In: Ibe1f53a5798342555e2e84395a13b48d461f483d
(cherry picked from commit 6f114c0110c466d2a117f3e531f9ea5170a121ee)
2018-04-24 10:10:50 +08:00
Isaac Chen
0c97f084c7 Make aosp_$arch system images closer to GSIs
This change modifies aosp_$arch product makefiles so their
system images can be closer to their respective GSIs.

The added contents in this CL are based on treble_common*.mk.
Contents specific to GSI are in aosp_$arch.mk.
Contents common to all devices are moved to full_base.mk.
Contents related to specific device are moved to device.mk.

BoardConfig related makefiles will be changed in another CL.

Bug: 70772101
Test: The following products can boot to home screen:
    $ lunch aosp_x86-userdebug; m -j; emulator
    $ lunch aosp_x86_64-userdebug; m -j; emulator
    $ lunch aosp_arm-userdebug; m -j; emulator
    $ lunch aosp_arm64-userdebug; m -j; emulator

Change-Id: I225a13dd74b3e748cc5d1705e1a453348b01d43f
Merged-In: I225a13dd74b3e748cc5d1705e1a453348b01d43f
(cherry picked from commit 164eed2e7d)
2018-04-24 10:03:14 +08:00
Pirama Arumuga Nainar
5a1598938f Remove obsolete (and broken) targets.
Bug: N/A
Test: N/A
Change-Id: I461e1adae9c0fec026f05cb890af2c4d8bd71e58
2018-04-20 15:18:22 -07:00
Dan Willemsen
07a7227776 Revert "Remove flags to turn overriding commands into errors"
This reverts commit 1d8e86139c.

Reason for revert: fixed art + mac bug

Change-Id: I53a4d490ef32270aaaa8051f5c44958d0bec6469
Test: on mac: m nothing
2018-04-06 21:00:17 +00:00
Dan Willemsen
1d8e86139c Remove flags to turn overriding commands into errors
This is a partial revert of I43b645658f468c23a5b9ebcfcd9d4516537db540

On at least a generic_x86 build internally:

art/build/Android.gtest.mk:121: error: overriding commands for target `Uncompressed', previously defined at art/build/Android.gtest.mk:101

Bug: 77611511
Test: none
Change-Id: I78ca65e6f0c81f09e7da848eda797b3a8f97a521
2018-04-06 10:50:45 -07:00
Dan Willemsen
ac406f5c68 Allow boards to turn overriding commands into an error
Many boards have warnings like this, saying that we defined a build
rule, but later something else came in and overrode it with something
else:

art/build/Android.gtest.mk:677: warning: overriding commands for target `test-art-target-gtest-cmdline_parser_test'
art/build/Android.gtest.mk:674: warning: ignoring old commands for target `test-art-target-gtest-cmdline_parser_test'

Beyond the obvious problem of replacing the rule with something else,
target-specific variables can be combined as well, leading to some very
strange problems.

Since so many boards still have problems like this, but we don't
currently have any global problems, add a flag so that we can mark
boards as not broken. This should prevent regressions while we clean up
the individual problems.

Once the non-broken devices number significantly more than the broken
devices, we'll switch this default. And once they're all cleaned up this
variable will become obsolete, and these warnings will always be errors.

Bug: 77611511
Test: lunch aosp_arm-eng; m nothing
Test: lunch aosp_marlin-eng; m nothing
Test: build_test on all downstream branches
Change-Id: I43b645658f468c23a5b9ebcfcd9d4516537db540
2018-04-05 17:26:35 -07:00
Treehugger Robot
252ff3d6b6 Merge "generic: BOARD_VNDK_VERSION := current" 2018-03-16 21:28:15 +00:00
Steven Moreland
5ee470be27 generic: BOARD_VNDK_VERSION := current
Bug: 70694532
Bug: 69526027
Test: lunch generic-userdebug, m -j, emulator (hangs >2 hours)

Change-Id: I377ab1ba2a5aea75096b27a1ec2366abf9d71fc4
2018-03-15 16:41:33 -07:00
Steven Moreland
adb7d43b5e generic_arm64: BOARD_VNDK_VERSION := current
Bug: 70694532
Bug: 69526027
Test: lunch sdk_gphone_arm64-userdebug, build, boot complete
    (unrelated /system/bin/sdcard crash)
Change-Id: I90a05f43caa479288b812075d06f57dae0a2fb2c
2018-03-15 15:19:06 -07:00
Yahan Zhou
12b5395c2f Add board name for emulator
VTS checks for ro.product.board before running. Emulator does not have
that value and causes an exception.

So let's add it to the emulator and call it goldfish_$(TARGET_ARCH).

BUG: 73741117
Test: vts-tradefed run vts, should run the tests
Change-Id: I6b00f2923bc9609d4d05c45d47ceddd2bd7be091
2018-02-27 18:11:48 -08:00
Nick Kralevich
0aa64275e8 remove nnk from OWNERS
See https://android-review.googlesource.com/c/platform/system/sepolicy/+/626014

Also remove klyubin who is no longer at Google.

Test: none
Change-Id: I98534c0cc676e41129b73331ad0e71e7fc1aa1ab
2018-02-27 09:15:10 -08:00
Justin Yun
38e934a38e Create firmware and persist in GSI for arm_ab
Some SoC vendors require firmware and persist directores to mount.
This must be provided in GSI for arm_ab not only for arm64_ab.
Once the directories are moved to /vendor, these policies for root
must be removed.

Bug: 36764215
Bug: 73720182
Test: GSI boot with 32bit devices
Change-Id: Ic5c6bb615c39853d51d233c00d2d9e8ee2c57802
2018-02-26 23:10:47 +00:00
bohu
70fefe0066 emulator: remove opengles property
BUG: 73812167
Change-Id: I5bdc475c6bdd5bdcb32c5a12f49c18c6a391b95c
2018-02-23 09:08:45 -08:00
bohu
72fa12db3c emulator: grant fingerprint hal data permission
Test: build sdk_gphone_x86-userdebug
launch emulator, enroll fingerprint, close emulator
relaunch emulator, check previously enrolled fingerprint still work

Change-Id: I27552509368f08cc6a7aa52b0e9efc5ae952469d
2018-02-14 15:37:31 -08:00
Michael Wright
0b733a2036 Merge "Revert "Correct some GSI settings to board makefile"" 2018-02-07 15:11:07 +00:00
Michael Wright
87163300c2 Revert "Correct some GSI settings to board makefile"
This reverts commit 6e96487968.

Reason for revert: build_test broken by this change.

Change-Id: I0f48bb84dc8c521540c745814daa11c2900ac2c8
2018-02-07 12:08:51 +00:00
Treehugger Robot
2f7f7ca1c0 Merge "Correct some GSI settings to board makefile" 2018-02-07 09:02:40 +00:00
Yifan Hong
87328762e4 Move system manifest / device matrix build rules
Test: build these files
Change-Id: I6467f4b7ce421358c30ad7a4c72a77dcc2ed3f88
2018-02-01 15:36:40 -08:00
SzuWei Lin
6e96487968 Correct some GSI settings to board makefile
TARGET_SUPPORTS_32_BIT_APPS and TARGET_SUPPORTS_64_BIT_APPS should
be board config variables. Move them to
target/board/treble_common_64.mk

Bug: 70951849
Test: lunch aosp_arm64_ab-userdebug; make -j
Change-Id: Ia3f6d5db1a7edc956597ab34c2feed088ecc6062
2018-01-30 17:23:47 +08:00
Tri Vo
82ca9a743a Fix /sys denials.
Labeled files linked from /sys/class/{rtc, net}.
Fixes these denials:
avc: denied { read } for pid=6413 comm="system_server" name="hctosys"
dev="sysfs" ino=10068 scontext=u:r:system_server:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0

avc: denied { write } for pid=4785 comm="Binder:4785_2" name="mtu"
dev="sysfs" ino=9213 scontext=u:r:netd:s0 tcontext=u:object_r:sysfs:s0
tclass=file permissive=0

Test: files labeled as expected; emulator boots without above denials.
Change-Id: I8fd8cc993ede0ddfd4404c0647a60da4867ef128
2018-01-24 12:39:47 -08:00
Tri Vo
30a532a1bf healthd: fix /sys denials.
Label /sys/class/power_supply/* appropriately and give healthd read
permissions to that directory.

Fixes this denial:
avc: denied { read } for pid=1386 comm="healthd" name="power_supply"
dev="sysfs" ino=2562 scontext=u:r:healthd:s0
tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0

Bug: 72437093
Test: emulator boots with no denials from healthd
Change-Id: Ie3853cb5e9167fcd70f393ff589971ad6212c580
2018-01-24 11:13:22 -08:00
Yifan Hong
5ff1f0a38a Add System SDK Versions to VINTF.
Add PLATFORM_SYSTEMSDK_VERSIONS to framework manifest
and BOARD_SYSTEMSDK_VERSIONS to device comp matrix.

Test: m framework_manifest.xml -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m device_compatibility_matrix.xml -j

Bug: 69088799
Change-Id: I0b5ac6f1c2802c353b2989b017c1cdfc9fe27987
2018-01-22 14:18:16 -08:00
Yifan Hong
65310d6b06 Merge "move VINTF metadata to /etc/vintf/ ." 2018-01-19 22:01:28 +00:00
Yifan Hong
8f863693c9 move VINTF metadata to /etc/vintf/ .
In particular,
/vendor/manifest.xml => /vendor/etc/vintf/manifest.xml
/system/manifest.xml => /system/etc/vintf/manifest.xml
/vendor/compatibility_matrix.xml =>
    /vendor/etc/vintf/compatibility_matrix.xml

Test: verify that fileis exist in destination
Test: hwservicemanager can read these files
Bug: 36790901
Change-Id: Ic361a48e170fb9a77faec76ad0e829625427820d
2018-01-19 10:52:27 -08:00
Treehugger Robot
469aafe421 Merge "Normalize the 2nd CPU architect of 64 bits arm GSI" 2018-01-19 04:26:40 +00:00
bohu
1695288dc0 emulator: enable 32bit x86 to run on 64bit kernel
BUG: 71861550
Change-Id: Iea8fae11375d66a141babd40f66dd2e3da6075e0
2018-01-18 22:26:32 +00:00
Yifan Hong
238c6ba8fe add <vendor-ndk> to VINTF.
Test: libvintf_test
Test: vintf_object_test
Test: build and verify that <vendor-ndk> tags
are in framework manifest and device compatibility
matrix.

Fixes: 36400653

Change-Id: I4d44bff81fecc8fd2f7ab8e15770544b7b85aef9
2018-01-16 21:49:52 +00:00
Yifan Hong
1e7ab9db8f Merge "framework_cm.xml: move to hardware/interfaces" 2018-01-11 19:14:24 +00:00
Nicolas Geoffray
08e7159672 Merge "Remove copy/paste code." 2018-01-11 09:20:05 +00:00