blob: 6274307e48334bf73f7fb270004a1dc533299a3b [file] [log] [blame]
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//zircon/prebuilt/config.gni")
# This is the directory populated by //zircon/scripts/download-prebuilt.
# Currently all Zircon firmware blobs are stored there.
firmware_dir = "//zircon/prebuilt/downloads/firmware"
# Declares firmware files to be added to manifests.
#
# Parameters
#
# sources (required)
# List of paths to firmware files.
# These paths must be relative to the directory holding all firmware files.
template("firmware") {
assert(defined(invoker.sources), "Must add some sources")
mappings = []
foreach(source, invoker.sources) {
name = get_path_info(source, "file")
mappings += [ "lib/firmware/$name=" +
rebase_path("$firmware_dir/$source", root_build_dir) ]
}
group(target_name) {
metadata = {
if (have_firmware) {
migrated_manifest_lines = mappings
}
}
}
}