blob: 637e3e7c145b5cf14f3344ee38e1f8aefa2244da [file] [log] [blame]
# Copyright 2017 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.
declare_args() {
# If a package is referenced in monolith and in preinstall, monolith takes
# priority, and the package will be added to OTA images as part of the
# verified boot set of static packages.
# Does nothing.
#
# Will be removed after 30 April 2019.
allow_layer_guesswork = false
# These arguments should be set by the board definition gni file.
# A list of packages included in the monolith from the board definition.
# This list is appended with the list from the product definition and any
# additional specified packages
board_packages = []
}
monolith = []
preinstall = []
available = []
monolith += board_packages
# Resolve all the JSON files and their dependencies
# into lists of GN labels:
# monolith - package labels for base system and verified boot image
# preinstall - package labels for preinstall, but not OTA
# available - package labels for the install and update repository
_preprocessed_products = exec_script("preprocess_products.py",
[
"--monolith=$monolith",
"--preinstall=$preinstall",
"--available=$available",
],
"json")
# Tell GN that the files preprocess_products.py ran are inputs to the
# generation step, by declaring them as file inputs to a (silly) exec_script
# invocation.
exec_script("/bin/sh",
[
"-c",
":",
],
"",
_preprocessed_products.files_read)
monolith_package_labels = []
foreach(pkg, _preprocessed_products.monolith) {
monolith_package_labels += [ get_label_info(pkg, "label_no_toolchain") ]
}
preinstall_package_labels = []
foreach(pkg, _preprocessed_products.preinstall) {
preinstall_package_labels += [ get_label_info(pkg, "label_no_toolchain") ]
}
available_package_labels = []
foreach(pkg, _preprocessed_products.available) {
available_package_labels += [ get_label_info(pkg, "label_no_toolchain") ]
}