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 16soong_namespace {} 17 18package { 19 default_applicable_licenses: ["device_generic_trusty_license"], 20} 21 22// Added automatically by a large-scale-change 23// See: http://go/android-license-faq 24license { 25 name: "device_generic_trusty_license", 26 visibility: [":__subpackages__"], 27 license_kinds: [ 28 "SPDX-license-identifier-Apache-2.0", 29 ], 30 // large-scale-change unable to identify any license_text files 31} 32 33prebuilt_etc { 34 name: "keymaster_soft_wrapped_attestation_keys.xml", 35 vendor: true, 36 src: "keymaster_soft_wrapped_attestation_keys.xml", 37} 38 39// Using java_genrule_host as it is the only genrule variant that has an 40// explicit host version. This is rather hacky but there is no built-in module 41// in soong to package up host tools. 42java_genrule_host { 43 name: "trusty-host_package", 44 tools: [ 45 "adb", 46 "assemble_cvd", 47 "dtc", 48 "e2fsdroid", 49 "lz4", 50 "make_f2fs", 51 "mkbootfs", 52 "mke2fs", 53 "replace_ramdisk_modules", 54 "rpmb_dev", 55 "sload_f2fs", 56 "toybox", 57 "trusty_qemu_system_aarch64", 58 ], 59 srcs: [ 60 ":trusty_qemu_shared_files", 61 ], 62 cmd: "mkdir -p $(genDir)/trusty-host_package/bin && " + 63 "cp -f -t $(genDir)/trusty-host_package/bin " + 64 "$(location adb) $(location assemble_cvd) $(location dtc) " + 65 "$(location e2fsdroid) $(location lz4) $(location make_f2fs) $(location mkbootfs) " + 66 "$(location mke2fs) $(location replace_ramdisk_modules) " + 67 "$(location rpmb_dev) $(location sload_f2fs) " + 68 "$(location toybox) $(location trusty_qemu_system_aarch64) && " + 69 "cp -f -r `dirname $(location dtc)`/../lib64 $(genDir)/trusty-host_package/ && " + 70 "mkdir -p $(genDir)/trusty-host_package/share/qemu &&" + 71 "cp -f $(in) $(genDir)/trusty-host_package/share/qemu/ && " + 72 "tar Scfz $(out) -C $(genDir)/trusty-host_package --mtime='2020-01-01' .", 73 out: ["trusty-host_package.tar.gz"], 74 75 dist: { 76 targets: ["trusty-host_package"], 77 }, 78 79 target: { 80 darwin: { 81 enabled: false, 82 }, 83 }, 84} 85