Commit Graph

81 Commits

Author SHA1 Message Date
Hung-ying Tyan 1785816ca1 Enable vbmeta_system for GSI targets
in order to mix GSI onto android10 Cuttlefish.

Bug: 158302764
Test: mixing GSI onto android10 Cuttlefish
Change-Id: I77385495583034324f5e29bed27c588dc98215e2
2020-07-14 16:04:20 +00:00
bohu 9492ee3d1b emulator: support dynamic partitions
BUG: 125540538

Change-Id: I9d486f57ac4ec11b1bbe9ab97890d12441c3054e
Merged-In: I9d486f57ac4ec11b1bbe9ab97890d12441c3054e
2019-05-05 20:34:02 -07:00
SzuWei Lin a2da9a3361 Enable dyanmic image size for GSI
The original size number of GSI are fixed size. Change to give
size by the content with appending 64M bytes space.

Bug: 71970853
Test: `make systemimage` and check the out system.img
Change-Id: I345f5e22c2fee7b553fc3337e9bff0ba28f579e1
Merged-In: I345f5e22c2fee7b553fc3337e9bff0ba28f579e1
2018-08-03 14:47:43 +08:00
SzuWei Lin 2927f2185c Merge "Move some BoardConfig settings from EmuCommon to GsiCommon"
am: bcc4081cd1

Change-Id: I456dde1025f2e61c3c9c463c38279aa0404d91ac
2018-07-23 00:35:49 -07:00
SzuWei Lin e592c965ee Move some BoardConfig settings from EmuCommon to GsiCommon
Move the settings which effect the system image to the file
BoardConfigGsiCommon.mk

Bug: 80117040
Test: build aosp_arm64-userdebug and pass
Change-Id: I42b14a124992c21b2da0e9e6197b1c38c6e58ce3
Merged-In: I42b14a124992c21b2da0e9e6197b1c38c6e58ce3
2018-07-18 10:19:46 +00: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
Isaac Chen 510b76d8ff 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
2018-07-03 09:58:59 +00: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
Anton Hansson cf27a3da33 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_arm64: variant of mainline_system, specifically for
  the 'generic' device.
- mainline_arm64: experimental product that also includes the non-system
  parts of aosp. Useful to experiment with the mk split.

Bug: 80410283
Test: lunch mainline_arm && m nothing && lunch mainline_system_arm && m nothing
Change-Id: I9beaa6f5f9c683733ed76a6d4e5c70b9376a5bb2
2018-06-28 17:27:08 +01:00
Bo Hu 82de42067e Merge "emulator: move sepolicy to goldfish project" 2018-06-13 22:14:32 +00:00
bohu 4abeb75f32 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 12:45:47 -07: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
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
SzuWei Lin 494d2fe97b Enable metadata in GSI
am: 5d356e2397

Change-Id: I2086d56e42b2318a8080d16f13d48c9ee4a23bf1
2018-05-30 11:05:42 -07:00
SzuWei Lin 5d356e2397 Enable metadata in GSI
Add BOARD_USES_METADATA_PARTITION to GSI to enable metadata folder
under the root folder.

Bug: 80407843
Bug: 79781913
Test: Boot on a Pixel device with GSI applied the patch
Change-Id: I5544b76b54300aa5a87aa4fa3c0ec6feff13a554
2018-05-30 17:01:49 +08:00
Bowgo Tsai 4f2b09be68 Merge "Enable /cache mount point" into pi-dev
am: 115aae0f93

Change-Id: I0e89f53b8fe5a932de7641646d5b034358e1bdd0
2018-05-10 19:20:54 -07:00
Bowgo Tsai 4e9ff91935 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
2018-05-10 15:20:49 +08:00
Isaac Chen 64dec58cc2 Merge "Build disabled vbmeta.img for aosp_$arch" into pi-dev
am: 0d35d1a425

Change-Id: I9d0865299c34dd6997d08bb1a297ca6acda9ef8b
2018-05-09 00:00:47 -07:00
Isaac Chen e63c937bc3 Build disabled vbmeta.img for aosp_$arch
System images of aosp_$arch are used as GSIs in P, and traditional GSI
users often need a special vbmeta image to disable verity (if AVB is
employed) befrre they flash the GSI.

"BOARD_BUILD_DISABLED_VBMETAIMAGE := true" builds such vbmeta.img

Bug: 79393905
Test: # For arch in arm, arm64, x86, x86_64, do
    $ lunch aosp_$arch; m -j # found vbmeta.img under $OUT

Change-Id: I113006385991a2daab60d3c55dc03f23f1b383b8
2018-05-08 18:10:06 +08:00
android-build-team Robot 70299e3414 Merge "Create system.prop for GSI Pi" into pi-dev
am: 5646b804de

Change-Id: Ie9f26ef4e76905d8cf77de97242a39cef22cf082
2018-04-30 14:14:55 -07:00
SzuWei Lin 3fc49fede8 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
2018-04-26 08:55:43 +00:00
Dan Willemsen c7ecbfe34d Merge "Revert "Remove flags to turn overriding commands into errors"" am: 5c19615b55
am: 36850e37c9

Change-Id: Ic762fafaae579bd50960584878a4408ef1c47247
2018-04-06 17:21:02 -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 19f96c9297 Merge "Remove flags to turn overriding commands into errors" am: dc348501f0
am: 9ea760ecd2

Change-Id: I155f5d5d4993fc12e11f5f7940905758c0be22f7
2018-04-06 11:46:32 -07: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 d9a2594d1f Merge "Allow boards to turn overriding commands into an error" am: 3c93dbfa61
am: 1533d14754

Change-Id: I032fbc08fc17fb4c4f5d7f4e1f2ace0560407276
2018-04-06 09:12:29 -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
Bjoern Johansson 275bdb08cd Build emulator images with emulator WiFi HAL
Use the new emulator WiFi HAL. This is specified by the
BOARD_WLAN_DEVICE setting. This also requires that the wifi HAL service
is included.

BUG: 74514143
Bug: 68338427
Test: run cts -m CtsIncidentHostTestCases -t
com.android.server.cts.BatteryStatsValidationTest#testWifiDownload
Change-Id: Ib59550b6cfba1e2e8686a5c805cd6b3913e8508e
(cherry picked from commit 23073c6ee33eca56f1ae0c45615b87ec9aec712e)
(cherry picked from commit 2d51c9b2bf0774ac46837a93181c83329e6fc662)
2018-03-22 12:59:20 -07:00
Bjoern Johansson 12fd2d8824 Enable WiFi for arm, arm64 and x86_64
Set the required parameters in BoardConfigs to allow WiFi to work on
remaining architectures. Also update SELinux policy needed to make WiFi
work on arm and arm64. This was not required on x86 but refused to work
on arm without these changes.

BUG: 74514143
Test: Build emulator image and manually verify WiFi functionality
Change-Id: Ic645ccf7249f84ae0320770b0ef7b1b6102b7b14
(cherry picked from commit 6d28bfbeefea8fe1919ff0987ae3d935d974dc6d)
(cherry picked from commit 023a7ba64bd3b189a148ad388606ca5747ea20b1)
(cherry picked from commit 9c9cefdafbae50c0e371c30bcccb98a8b7697e98)
2018-03-22 12:57:41 -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
Isaac Chen d9fed02138 Enable VNDK for aosp_x86 and aosp_x86_64
When VNDK version is not enabled, libminijail.so are built under
system directory. It is not found in GSI, though.

Enable VNDK version causes it to be built under vendor directory.

Bug: 69395141
Test: Both of the following 2 products can boot to home screen.
    $ lunch aosp_x86-userdebug; m -j; emulator
    $ lunch aosp_x86_64-userdebug; m -j; emulator

Change-Id: I6356ffe4a806b3d8fc79057bf772d139209a5f11
Merged-In: I6356ffe4a806b3d8fc79057bf772d139209a5f11
(cherry picked from commit 532d5adf7b)
2017-12-07 15:03:25 +08:00
bohu e9046cbbaa emulator: support system-as-root
BUG: 69770927

Test: build sdk_gphone_x86-userdebug, boot up
to home with Tot emulator

Test: build sdk_phone_armv7-userdebug, boot up
to home with Tot emulator

Change-Id: I39348bf35cb748c08ed68a048389bbfc2279a91c
Merged-In: I39348bf35cb748c08ed68a048389bbfc2279a91c
2017-11-29 22:08:28 -08:00
bohu 813249bfdf emulator: squash misc modifications from oc-emu-dev
Change-Id: Ia6c3ff0805b88ef284524a4e6faa5615016b359c
Merged-In: I7380292cd4dc851a987683bdf61d511dbf74aff6
2017-10-26 16:45:05 -07:00
bohu 4a6cc6a8fc emulator: move rild.libpath to vendor
BUG: 62137708
Test: buld sdk_gphone_x86-user, launch
emulator make sure radio works

Change-Id: Ib25ae4a1c7f86ef20a45af2f88732067ad95c5f4
Merged-In: I4ef1483a8d95a74b54deb6f0d4b2461c733c8140
2017-10-26 16:45:05 -07:00
Yahan Zhou 3afe69d846 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: I330adc6da2999031d4ed2d8c4ade4667c1d0b511
Merged-In: I75b9f0de17fece3dec5ae1662400808af321bd4d
2017-10-26 16:45:05 -07:00
Mathieu Chartier 6c1aa4584a Merge "Allow system server jars for WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY"
am: dcb1f24e9b

Change-Id: I4cc653c7d4218d2e4b983f4ec1b6f8df77b2d1f4
2017-10-12 22:37:24 +00:00
Mathieu Chartier f834eccd52 Allow system server jars for WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY
Renamed WITH_DEXPREOPT_BOOT_IMG_ONLY to
WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY and changed the
behavior accordingly.

Preopt system server jars since selinux prevents system server from
loading anything from /data. If we don't do this they will need to
be extracted which is not favorable for RAM usage or performance.

Test: make and flash and look at system server maps
Bug: 65122284
Bug: 62356545

(cherry picked from commit 418258cee9)

Merged-In: I2e70c80a86327b455450b95144f21020e7bf0c6f
Change-Id: I316e79c7c6d45e2ccbfff4065137cc3ef9d2738e
2017-10-12 20:40:41 +00: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
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
Bo Hu d80d922083 Merge "Revert "Revert "emulator: create qemu images for system,vendor""" am: 5af2027e34 am: abd33cdba6
am: 1b86b7581c

Change-Id: I0c8bf4c8db0cb783c7116d2f9d0734b98341401a
2017-08-01 23:30:23 +00: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 b0ca7302aa Merge "Revert "emulator: create qemu images for system,vendor"" am: a2ea9626e5 am: b7e5cf8b6d
am: 471e2ba1d6

Change-Id: I89357469dfcb50f03771e733a41ea704801ce044
2017-08-01 07:07:07 +00: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 69121fd68c Merge "emulator: create qemu images for system,vendor" am: 571e5d47b7 am: dbbd3311ae
am: fe3b305516

Change-Id: I5cb77655098ff078c4677e083843e5d7e4a57f07
2017-08-01 02:12:16 +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