| # Copyright 2017 The ChromiumOS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| CROS_WORKON_INCREMENTAL_BUILD="1" |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| # TODO(b/187784160): Avoid directly including headers from other packages. |
| CROS_WORKON_SUBTREE="common-mk arc/setup chromeos-config libsegmentation metrics net-base .gn" |
| |
| PLATFORM_NATIVE_TEST="yes" |
| PLATFORM_SUBDIR="arc/setup" |
| |
| # Do not run test parallelly until unit tests are fixed. |
| # shellcheck disable=SC2034 |
| PLATFORM_PARALLEL_GTEST_TEST="no" |
| |
| inherit tmpfiles cros-workon cros-unibuild platform cros-protobuf |
| |
| DESCRIPTION="Set up environment to run ARC." |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/arc/setup" |
| |
| LICENSE="BSD-Google" |
| KEYWORDS="~*" |
| IUSE=" |
| arc_erofs |
| arc_hw_oemcrypto |
| arcpp |
| arcvm |
| fuzzer |
| houdini |
| houdini64 |
| lvm_stateful_partition |
| ndk_translation |
| test" |
| |
| REQUIRED_USE="|| ( arcpp arcvm )" |
| |
| COMMON_DEPEND=" |
| arcpp? ( chromeos-base/arc-sdcard ) |
| chromeos-base/arc-setup-rs:= |
| chromeos-base/bootstat:= |
| chromeos-base/chromeos-config-tools:= |
| chromeos-base/cryptohome-client:= |
| >=chromeos-base/metrics-0.0.1-r3152:= |
| chromeos-base/libsegmentation:= |
| chromeos-base/net-base:= |
| chromeos-base/patchpanel-client:= |
| dev-libs/openssl:= |
| dev-libs/re2:= |
| sys-libs/libselinux:= |
| chromeos-base/minijail:= |
| " |
| |
| RDEPEND="${COMMON_DEPEND} |
| !<chromeos-base/arc-common-scripts-0.0.1-r131 |
| !<chromeos-base/arcvm-common-scripts-0.0.1-r77 |
| chromeos-base/patchpanel |
| chromeos-base/vboot_reference |
| arcvm? ( chromeos-base/crosvm ) |
| arcpp? ( |
| chromeos-base/swap_management |
| sys-apps/restorecon |
| ) |
| " |
| |
| DEPEND="${COMMON_DEPEND} |
| chromeos-base/system_api:=[fuzzer?] |
| test? ( chromeos-base/arc-base ) |
| " |
| |
| |
| src_install() { |
| platform_src_install |
| |
| if use arcpp; then |
| insinto /opt/google/containers/arc-art |
| doins "${OUT}/dev-rootfs.squashfs" |
| |
| # container-root is where the root filesystem of the container in which |
| # patchoat and dex2oat runs is mounted. dev-rootfs is mount point |
| # for squashfs. |
| diropts --mode=0700 --owner=root --group=root |
| keepdir /opt/google/containers/arc-art/mountpoints/container-root |
| keepdir /opt/google/containers/arc-art/mountpoints/dev-rootfs |
| keepdir /opt/google/containers/arc-art/mountpoints/vendor |
| fi |
| |
| local fuzzer_component_id="488493" |
| platform_fuzzer_install "${S}"/OWNERS "${OUT}"/android_binary_xml_tokenizer_fuzzer \ |
| --comp "${fuzzer_component_id}" |
| platform_fuzzer_install "${S}"/OWNERS "${OUT}"/android_xml_util_find_fingerprint_and_sdk_version_fuzzer \ |
| --comp "${fuzzer_component_id}" |
| platform_fuzzer_install "${S}"/OWNERS "${OUT}"/arc_setup_util_find_all_properties_fuzzer \ |
| --comp "${fuzzer_component_id}" |
| platform_fuzzer_install "${S}"/OWNERS "${OUT}"/arc_property_util_expand_property_contents_fuzzer \ |
| --comp "${fuzzer_component_id}" |
| } |
| |
| platform_pkg_test() { |
| platform_test "run" "${OUT}/arc-setup_testrunner" |
| } |