artifact_lock_updater

Outputs a tool that writes a lock-file to out_path in the current WORKSPACE

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
out_pathPath for artifact_lock.json, relative to WORKSPACEStringoptional“artifact_lock.json”
spec_fileSource artifact_spec.json fileLabelrequired

fuchsia_artifact

A pre-built artifact used for product assembly.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
artifact_nameThe group-unique name of the artifact. If omitted, the target name is usedStringoptional""
attributesString attributes for this artifact. The “name” attribute is set to the name of the target if it is not specified here.Dictionary: String -> Stringoptional{}
blobsAll blobs required by this artifact.List of labelsoptional[]
fileThe artifact file itself. For type “package”, this is a meta.far file.Labelrequired
typeThe artifact type. Currently can only be “package”Stringoptional“package”

fuchsia_board_configuration

Declares a board configuration JSON file for use with ffx assembly.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
filesA dictionary of files to template-literal keysDictionary: Label -> Stringoptional{}
fuchsia_coreCore image to provide board files.Labelrequired
templateA template for a board configurationLabelrequired

fuchsia_component

Creates a Fuchsia component which can be added to a package

This rule will take a component manifest and compile it into a form that is suitable to be included in a package. The component can include any number of dependencies which will be included in the final package.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
component_nameThe name of the package, defaults to the rule nameStringoptional""
depsThe list of dependencies this component depends onList of labelsoptional[]
manifestThe component manifest fileLabelrequired

fuchsia_component_manifest

Compiles a component manifest from a input file.

This rule will compile an input cml file and output a cm file. The file can, optionally, include additional cml files but they must be relative to the src file and included in the includes attribute.

{
    include: ["foo.cml", "some_dir/bar.cml"]
}

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
includesA list of dependencies which are included in the src cmlList of labelsoptional[]
srcThe source manifest to compileLabelrequired

fuchsia_image_paver

Declares an action that paves the given product.

Additional command line arguments are passed to the IDK bootserver tool.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
product_imageA fuchsia_product_image target.Labelrequired
slice_sizeFVM slice size in bytesIntegeroptional8388608

fuchsia_package

Builds a fuchsia package.

This rule will take a list of dependencies to create a fuchsia package manifest. The dependencies must provide FuchsiaComponentInfo or FuchsiaPackageResourceInfo providers to be included in the final package.

Returns a json representation of the package.

fuchsia_package_resource(
  name = "text_file",
  src = "my-text.txt",
  dest = "data/my-text.txt",
)

fuchsia_package(
  name = "my_package",
  deps = [":text_file"]
)

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsThe list of dependencies this package depends onList of labelsoptional[]
package_nameThe name of the package, defaults to the rule nameStringoptional""

fuchsia_package_archive

Creates a fuchsia package archive (far file).

This rule create a far file from a given fuchsia package containing the package's meta package as well as all of the contained blobs.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
archive_nameWhat to name the archive. The .far file will be appended if not in this nameStringoptional""
packageThe fuchsia_package to archiveLabelrequired

fuchsia_package_group

A group of Fuchsia packages, composed of all the artifacts and groups specified in deps.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsFuchsia artifacts and package groups to include in this group.List of labelsoptional[]

fuchsia_package_resource

Declares a resource to be included in a Fuchsia package.

src can be a static file or something generated by another rule. dest must be a path relative to /.

This rule can be added as a dependency of a fuchsia_package or a dependency of a fuchsia_package and it will be added to the final package contents.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
destThe path where this will be installed in the package.Stringrequired
srcThe resource to include in the package.Labelrequired

fuchsia_product_configuration

A JSON configuration for a Fuchsia image, for use by ffx assembly.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
base_package_groupPackage group to be included in ‘base’ for the product image.LabeloptionalNone
boot_argsKernel boot argumentsList of stringsoptional[]
bootfs_filesFuchsia artifact of type ‘package’ with files for inclusion in BootFS.Labelrequired
cache_package_groupPackage group to be included in ‘cache’ for the product image.LabeloptionalNone
clock_backstopEarliest UTC timestamp that the system can be set to.Integerrequired
core_imageFuchsia core_image target.LabeloptionalNone
kernel_argsArguments provided to kernel.List of stringsoptional[]
system_package_groupPackages that will be merged into the system package (the base package).LabeloptionalNone

fuchsia_product_image

Declares a Fuchsia product image.

product must be a fuchsia_product_configuration target. board must be a fuchsia_board_configuration target.

fuchsia_product_image targets may be used by the fuchsia_product_pave rule.

This generates the following files:

name_data.blk - the MinFS partition. name_blob.blk - the BlobFS partition. name_fvm_sparse.blk - the FVM sparse image. name_fuchsia.zbi - the Zircon boot image. name_fuchsia.vbmeta - VBMeta signature for the Zircon boot image.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
boardA fuchsia_board_configuration target.LabeloptionalNone
productA fuchsia_product_configuration target.LabeloptionalNone

fuchsia_product_release

Declares a release archive.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
lock_fileThe lock file which contains the list of packages neededLabelrequired
product_imageCore image to provide board files.Labelrequired

fuchsia_toolchain_info

Fuchsia toolchain info rule, to be passed to the native toolchain rule.

It provides information about tools in the Fuchsia toolchain, primarily those included in the Fuchsia IDK.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
blobfsblobfs tool executable.Labelrequired
bootserverbootserver executableLabelrequired
cmccmc tool executable.Labelrequired
farfar tool executable.Labelrequired
ffxffx tool executable.Labelrequired
fvmfvm tool executable.Labelrequired
merklerootmerkleroot tool executable.Labelrequired
pmpm tool executable.Labelrequired
zbizbi tool executable.Labelrequired

FuchsiaArtifactInfo

A pre-built artifact used for product assembly.

FIELDS

NameDescription
attributesString key-value dictionary of attributes.
blobsA list of blobs this artifact depends on.
blob_manifestA file mapping merkleroots to paths.
fileThe artifact file.
nameThe group-unique name of the artifact.
package_manifestJSON package manifest file, if this artifact is a package.
typeA string representing the type of artifact.

FuchsiaPackageGroupInfo

The raw files that make up a set of fuchsia packages.

FIELDS

NameDescription
artifactsa list of artifacts this group depends on

FuchsiaProductImageInfo

Info needed to pave a Fuchsia image

FIELDS

NameDescription
esp_blkEFI system partition image.
blob_blkBlobFS partition image.
data_blkMinFS partition image.
images_jsonimages.json file
kernel_zbiZircon image.
vbmetaavbmeta for zircona boot image.
vbmetarvbmeta for zirconr boot image.
zirconamain boot image.
zirconrzedboot boot image.