blob: 9f471a2d49c98d090527aabe00cfc1b93c1b3c71 [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("zbi_input.gni")
# Declare arguments to be added to the kernel command line of a ZBI file.
#
# Parameters
#
# args
# Required: List of strings representing the arguments to add to the kernel
# command line.
#
# deps (optional)
# testonly (optional)
# Usual GN meanings.
template("kernel_cmdline") {
assert(defined(invoker.args), "Arguments are required")
zbi_input(target_name) {
forward_variables_from(invoker,
[
"deps",
"testonly",
"visibility",
])
type = "cmdline"
args = []
foreach(arg, invoker.args) {
args += [ "--entry=$arg" ]
}
# Add the raw args for use with assembly.
kernel_cmdline_args = invoker.args
}
}