1// 2// Copyright (C) 2021 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15 16package { 17 default_applicable_licenses: ["device_generic_trusty_license"], 18} 19 20// Added automatically by a large-scale-change 21// See: http://go/android-license-faq 22license { 23 name: "device_generic_trusty_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 ], 28 // large-scale-change unable to identify any license_text files 29} 30 31prebuilt_etc { 32 name: "keymaster_soft_wrapped_attestation_keys.xml", 33 vendor: true, 34 src: "keymaster_soft_wrapped_attestation_keys.xml", 35} 36 37// Using java_genrule_host as it is the only genrule variant that has an 38// explicit host version. This is rather hacky but there is no built-in module 39// in soong to package up host tools. 40java_genrule_host { 41 name: "trusty-host_package", 42 tools: [ 43 "adb", 44 "assemble_cvd", 45 "dtc", 46 "e2fsdroid", 47 "lz4", 48 "make_f2fs", 49 "mkbootfs", 50 "mke2fs", 51 "replace_ramdisk_modules", 52 "rpmb_dev", 53 "sload_f2fs", 54 "toybox", 55 "trusty_qemu_system_aarch64", 56 ], 57 srcs: [ 58 ":trusty_qemu_shared_files", 59 ], 60 cmd: "mkdir -p $(genDir)/trusty-host_package/bin && " + 61 "cp -f -t $(genDir)/trusty-host_package/bin " + 62 "$(location adb) $(location assemble_cvd) $(location dtc) " + 63 "$(location e2fsdroid) $(location lz4) $(location make_f2fs) $(location mkbootfs) " + 64 "$(location mke2fs) $(location replace_ramdisk_modules) " + 65 "$(location rpmb_dev) $(location sload_f2fs) " + 66 "$(location toybox) $(location trusty_qemu_system_aarch64) && " + 67 "cp -f -r `dirname $(location dtc)`/../lib64 $(genDir)/trusty-host_package/ && " + 68 "mkdir -p $(genDir)/trusty-host_package/share/qemu &&" + 69 "cp -f $(in) $(genDir)/trusty-host_package/share/qemu/ && " + 70 "tar Scfz $(out) -C $(genDir)/trusty-host_package --mtime='2020-01-01' .", 71 out: ["trusty-host_package.tar.gz"], 72 73 dist: { 74 targets: ["trusty-host_package"], 75 }, 76 77 target: { 78 darwin: { 79 enabled: false, 80 }, 81 }, 82} 83