// // Copyright (C) 2021 The Android Open Source Project // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package { default_applicable_licenses: ["device_generic_trusty_license"], } // Added automatically by a large-scale-change // See: http://go/android-license-faq license { name: "device_generic_trusty_license", visibility: [":__subpackages__"], license_kinds: [ "SPDX-license-identifier-Apache-2.0", ], // large-scale-change unable to identify any license_text files } prebuilt_etc { name: "keymaster_soft_wrapped_attestation_keys.xml", vendor: true, src: "keymaster_soft_wrapped_attestation_keys.xml", } // Using java_genrule_host as it is the only genrule variant that has an // explicit host version. This is rather hacky but there is no built-in module // in soong to package up host tools. java_genrule_host { name: "trusty-host_package", tools: [ "adb", "assemble_cvd", "dtc", "e2fsdroid", "lz4", "make_f2fs", "mkbootfs", "mke2fs", "replace_ramdisk_modules", "rpmb_dev", "sload_f2fs", "toybox", "trusty_qemu_system_aarch64", ], srcs: [ ":trusty_qemu_shared_files", ], cmd: "mkdir -p $(genDir)/trusty-host_package/bin && " + "cp -f -t $(genDir)/trusty-host_package/bin " + "$(location adb) $(location assemble_cvd) $(location dtc) " + "$(location e2fsdroid) $(location lz4) $(location make_f2fs) $(location mkbootfs) " + "$(location mke2fs) $(location replace_ramdisk_modules) " + "$(location rpmb_dev) $(location sload_f2fs) " + "$(location toybox) $(location trusty_qemu_system_aarch64) && " + "cp -f -r `dirname $(location dtc)`/../lib64 $(genDir)/trusty-host_package/ && " + "mkdir -p $(genDir)/trusty-host_package/share/qemu &&" + "cp -f $(in) $(genDir)/trusty-host_package/share/qemu/ && " + "tar Scfz $(out) -C $(genDir)/trusty-host_package --mtime='2020-01-01' .", out: ["trusty-host_package.tar.gz"], dist: { targets: ["trusty-host_package"], }, target: { darwin: { enabled: false, }, }, }