blob: f7e4dff0d0f708848c9e8ca5c5baad086be3dfb2 [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("//build/images/factory.gni")
declare_args() {
# Use this flag to exclude artifacts from Astro builds.
# This is a very hacky way of ensuring that the resulting fuchsia.zbi fits
# within the available space on device.
# This will soon enough be replaced with a proper way to select image
# artifacts based on board / product properties.
# Artifacts that are known to not be useful on Astro builds (e.g. drivers for
# other devices, tests) may be put in `if (!filter_out_of_astro)` blocks.
# TODO(45680): remove this hack.
filter_out_of_astro = false
# Use this flag to include previously excluded artifacts on products based on
# Astro.
# Yes, our image building system is so broken that this is currently the only
# way to accommodate the configurations we run on our infrastructure.
on_second_thought_keep_on_astro = false
}
# This parameter contains runtime objects which go into most system zbi's.
# This list is the descendent of the "image" manifest file generated by the ZN,
# build and is mostly used by //build/unification/images:migrated-image.
common_image_contents = [
"//examples/drivers//fifo:demo-fifo",
"//src/bringup/bin/bootsvc:bin",
"//src/bringup/bin/console",
"//src/bringup/bin/debuglog",
"//src/bringup/bin/miscsvc",
"//src/bringup/bin/netsvc:device-name-provider",
"//src/bringup/bin/netsvc",
"//src/bringup/bin/ptysvc",
"//src/bringup/bin/pwrbtn-monitor",
"//src/bringup/bin/run-vc",
"//src/bringup/bin/svchost",
"//src/bringup/bin/sysinfo",
"//src/connectivity/bluetooth/hci/transport/uart:bt-transport-uart",
"//src/connectivity/bluetooth/hci/transport/usb:bt-transport-usb",
"//src/connectivity/bluetooth/hci/vendor/broadcom:bt-hci-broadcom",
"//src/connectivity/bluetooth/hci/vendor/mediatek:bt-hci-mediatek",
"//src/connectivity/ethernet/drivers/aml-ethernet-s912",
"//src/connectivity/ethernet/drivers/asix-88179",
"//src/connectivity/ethernet/drivers/asix-88772b",
"//src/connectivity/ethernet/drivers/dwmac",
"//src/connectivity/ethernet/drivers/ethernet",
"//src/connectivity/ethernet/drivers/ethertap",
"//src/connectivity/ethernet/drivers/realtek-8211f",
"//src/connectivity/ethernet/drivers/rndis",
"//src/connectivity/ethernet/drivers/usb-cdc-ecm",
"//src/connectivity/ethernet/drivers/usb-cdc-ecm",
"//src/connectivity/ethernet/drivers/usb-cdc-function",
"//src/connectivity/ethernet/drivers/usb-cdc-function",
"//src/connectivity/network/bin/ping",
"//src/connectivity/network/drivers/network-device",
"//src/developer/cmd:bin",
"//src/developer/forensics/crasher:crasher_exe",
"//src/devices/bin/driverctl",
"//src/devices/bin/lsdev",
"//src/devices/bin/tee-test",
"//src/devices/bin/unbind",
"//src/devices/block/bin/biotime",
"//src/devices/block/bin/blktest",
"//src/devices/block/bin/disk-inspect",
"//src/devices/block/bin/fvm-check",
"//src/devices/block/bin/gpt",
"//src/devices/block/bin/iochk",
"//src/devices/block/bin/iotime",
"//src/devices/block/bin/lsblk",
"//src/devices/block/bin/sdio",
"//src/devices/block/drivers/ahci",
"//src/devices/block/drivers/aml-sd-emmc",
"//src/devices/block/drivers/bootpart",
"//src/devices/block/drivers/core",
"//src/devices/block/drivers/ftl",
"//src/devices/block/drivers/fvm",
"//src/devices/block/drivers/gpt",
"//src/devices/block/drivers/hisi-ufs",
"//src/devices/block/drivers/mbr",
"//src/devices/block/drivers/nvme",
"//src/devices/block/drivers/pci-sdhci",
"//src/devices/block/drivers/ramdisk",
"//src/devices/block/drivers/sdhci",
"//src/devices/block/drivers/sdmmc",
"//src/devices/block/drivers/ums-function",
"//src/devices/block/drivers/usb-mass-storage",
"//src/devices/block/drivers/zxcrypt",
"//src/devices/board/drivers/integration-test",
"//src/devices/board/drivers/machina",
"//src/devices/bus/drivers/pci:bus-pci",
"//src/devices/bus/drivers/pci:bus-pci.proxy",
"//src/devices/bus/drivers/platform:platform-bus",
"//src/devices/bus/drivers/platform:platform-bus.proxy",
"//src/devices/clock/bin/clock:clkctl",
"//src/devices/clock/bin/clock",
"//src/devices/clock/drivers/amlogic-clk",
"//src/devices/clock/drivers/clock",
"//src/devices/cpu/bin/cpuctl",
"//src/devices/cpu/drivers/aml-cpu",
"//src/devices/fw/drivers/qcom-pil",
"//src/devices/gpio/bin/gpioutil",
"//src/devices/gpio/drivers/aml-axg-gpio",
"//src/devices/gpio/drivers/aml-gxl-gpio",
"//src/devices/gpio/drivers/gpio",
"//src/devices/i2c/bin:i2cutil",
"//src/devices/i2c/bin/i2c",
"//src/devices/i2c/drivers/aml-i2c",
"//src/devices/i2c/drivers/i2c",
"//src/devices/i2c/drivers/intel-i2c",
"//src/devices/internal/drivers/fragment",
"//src/devices/internal/drivers/fragment:fragment.proxy",
"//src/devices/light-sensor/drivers/ams-light",
"//src/devices/light-sensor/drivers/lite-on",
"//src/devices/misc/drivers/builtin",
"//src/devices/misc/drivers/cpu-trace",
"//src/devices/misc/drivers/ktrace",
"//src/devices/ml/drivers/aml-nna",
"//src/devices/ml/drivers/usb-harriet",
"//src/devices/nand/bin/nand-loader",
"//src/devices/nand/bin/nand-util",
"//src/devices/nand/drivers/aml-rawnand",
"//src/devices/nand/drivers/broker:nand-broker",
"//src/devices/nand/drivers/nand",
"//src/devices/nand/drivers/nandpart",
"//src/devices/nand/drivers/ram-nand",
"//src/devices/nand/drivers/skip-block",
"//src/devices/pci/drivers/amlogic-pcie",
"//src/devices/power/bin/lspwr",
"//src/devices/power/drivers/power",
"//src/devices/pwm/drivers/aml-pwm",
"//src/devices/pwm/drivers/aml-pwm-init",
"//src/devices/pwm/drivers/pwm",
"//src/devices/ram/bin/ram-info",
"//src/devices/ram/drivers/aml-ram",
"//src/devices/rtc/drivers/fallback",
"//src/devices/rtc/drivers/nxp",
"//src/devices/rtc/drivers/pl031-rtc",
"//src/devices/scpi/drivers/aml-scpi-s912:aml-scpi-s912.mailbox",
"//src/devices/scpi/drivers/aml-scpi-s912:scpi",
"//src/devices/securemem/drivers/aml-securemem",
"//src/devices/serial/drivers/aml-uart",
"//src/devices/serial/drivers/ftdi",
"//src/devices/serial/drivers/serial",
"//src/devices/serial/drivers/serial-async",
"//src/devices/serial/drivers/usb-cdc-acm",
"//src/devices/shareddma/drivers/syn-dma",
"//src/devices/spi/bin/spiutil",
"//src/devices/spi/drivers/aml-spi",
"//src/devices/spi/drivers/spi",
"//src/devices/sysmem/drivers/sysmem",
"//src/devices/tee/drivers/optee",
"//src/devices/thermal/bin/thermal-cli",
"//src/devices/thermal/drivers/aml-thermal-s905d2g",
"//src/devices/thermal/drivers/aml-thermal-s912",
"//src/devices/usb/bin/lsusb",
"//src/devices/usb/bin/usb-fwloader",
"//src/devices/usb/bin/usbctl",
"//src/devices/usb/drivers/aml-usb-phy-v2",
"//src/devices/usb/drivers/dwc2",
"//src/devices/usb/drivers/dwc3",
"//src/devices/usb/drivers/hikey-usb",
"//src/devices/usb/drivers/mt-musb-host",
"//src/devices/usb/drivers/mt-musb-peripheral",
"//src/devices/usb/drivers/usb-bus",
"//src/devices/usb/drivers/usb-composite",
"//src/devices/usb/drivers/usb-dfu",
"//src/devices/usb/drivers/usb-hub",
"//src/devices/usb/drivers/usb-peripheral",
"//src/devices/usb/drivers/usb-peripheral-test",
"//src/devices/usb/drivers/usb-test/fx3",
"//src/devices/usb/drivers/usb-test/usb-tester",
"//src/devices/usb/drivers/usb-virtual-bus",
"//src/devices/usb/drivers/virtual-bus-tester:virtual-bus-tester-function",
"//src/devices/usb/drivers/virtual-bus-tester",
"//src/diagnostics/dlog",
"//src/graphics/display/drivers/aml-canvas",
"//src/graphics/display/drivers/amlogic-display",
"//src/graphics/display/drivers/display",
"//src/graphics/display/drivers/dsi-dw",
"//src/graphics/drivers/aml-gpu",
"//src/media/audio/bin/ihda",
"//src/media/audio/drivers/astro-pdm-input",
"//src/media/audio/drivers/astro-tdm-output",
"//src/media/audio/drivers/usb-audio",
"//src/media/audio/tools/audio-driver-ctl:bin",
"//src/security/bin/syscall-check",
"//src/storage/bin/blobfs",
"//src/storage/bin/dd",
"//src/storage/bin/df",
"//src/storage/bin/disk-pave:install-disk-image",
"//src/storage/bin/fsck:fsck",
"//src/storage/bin/minfs",
"//src/storage/bin/mkfs:mkfs",
"//src/storage/bin/mount:mount",
"//src/storage/bin/umount:umount",
"//src/storage/bin/storage-metrics",
"//src/storage/fshost",
"//src/sys/bin/psutils:handles",
"//src/sys/bin/psutils:kill",
"//src/sys/bin/psutils:killall",
"//src/sys/bin/psutils:kstats",
"//src/sys/bin/psutils:memgraph",
"//src/sys/bin/psutils:ps",
"//src/sys/bin/psutils:signal",
"//src/sys/bin/psutils:threads",
"//src/sys/bin/psutils:top",
"//src/sys/bin/psutils:vmaps",
"//src/sys/bin/psutils:vmos",
"//src/testing/runtests",
"//src/ui/backlight/bin/backlight",
"//src/ui/backlight/drivers/ti-lp8556",
"//src/ui/input/bin/hid",
"//src/ui/input/drivers/focaltech",
"//src/ui/input/drivers/goodix",
"//src/ui/input/drivers/hid",
"//src/ui/input/drivers/hid-buttons",
"//src/ui/input/drivers/hidctl",
"//src/ui/input/drivers/i2c-hid",
"//src/ui/input/drivers/usb-hid",
"//src/ui/input/drivers/usb-hid",
"//src/ui/light/drivers/aml-light",
"//src/zircon/bin/kcounter",
"//src/zircon/bin/ktrace",
"//src/zircon/bin/loadgen",
"//src/zircon/testing/mutex_pi_exerciser",
"//src/zircon/bin/kstress",
"//src/storage/bin/dd",
"//zircon/system/uapp/trace-benchmark",
"//zircon/system/uapp/trace-example",
"//src/bringup/bin/waitfor",
"//src/bringup/bin/watch",
"//zircon/system/ulib/driver-info/app:driverinfo",
"//zircon/third_party/dev/ethernet/e1000",
"//zircon/third_party/uapp/dash",
"//zircon/third_party/uapp/fsck-msdosfs",
"//zircon/third_party/uapp/kilo",
"//zircon/third_party/uapp/mkfs-msdosfs",
]
if (target_cpu == "arm64") {
common_image_contents += [
"//src/devices/board/drivers/astro",
"//src/devices/usb/drivers/xhci-rewrite:xhci",
]
} else if (target_cpu == "x64") {
common_image_contents += [
"//src/connectivity/ethernet/drivers/intel-ethernet",
"//src/connectivity/ethernet/drivers/realtek-8111",
"//src/devices/board/drivers/x86:platform-bus-x86",
"//src/devices/misc/drivers/tpm",
"//src/devices/rtc/drivers/intel-rtc",
"//src/devices/serial/drivers/intel-serialio",
"//src/devices/serial/drivers/uart16550",
"//src/devices/usb/drivers/xhci:xhci-x86",
"//src/graphics/display/drivers/intel-i915",
"//src/ui/input/drivers/pc-ps2",
"//src/devices/bin/acpidump",
]
}
if (!filter_out_of_astro || on_second_thought_keep_on_astro) {
common_image_contents += [
"//src/connectivity/ethernet/drivers/asix-88179:fake-asix-88179",
"//src/connectivity/ethernet/drivers/virtio:virtio_ethernet",
"//src/devices/block/drivers/as370-sdhci",
"//src/devices/block/drivers/msm8x53-sdhci",
"//src/devices/block/drivers/mtk-sdmmc",
"//src/devices/block/drivers/virtio:virtio_block",
"//src/devices/block/drivers/virtio:virtio_scsi",
"//src/devices/board/drivers/qemu-arm64",
"//src/devices/bus/drivers/platform/test:test-audio-codec",
"//src/devices/bus/drivers/platform/test:test-board",
"//src/devices/bus/drivers/platform/test:test-child-1",
"//src/devices/bus/drivers/platform/test:test-child-2",
"//src/devices/bus/drivers/platform/test:test-child-2.proxy",
"//src/devices/bus/drivers/platform/test:test-child-3",
"//src/devices/bus/drivers/platform/test:test-clock",
"//src/devices/bus/drivers/platform/test:test-composite",
"//src/devices/bus/drivers/platform/test:test-gpio",
"//src/devices/bus/drivers/platform/test:test-i2c",
"//src/devices/bus/drivers/platform/test:test-parent",
"//src/devices/bus/drivers/platform/test:test-power",
"//src/devices/bus/drivers/platform/test:test-pwm",
"//src/devices/bus/drivers/platform/test:test-spi",
"//src/devices/clock/drivers/as370-clk",
"//src/devices/clock/drivers/hisi3660",
"//src/devices/clock/drivers/msm8x53-clk",
"//src/devices/clock/drivers/mtk-clk",
"//src/devices/clock/drivers/vs680-clk",
"//src/devices/gpio/drivers/as370-gpio",
"//src/devices/gpio/drivers/gpio-test",
"//src/devices/gpio/drivers/hi3660-gpio",
"//src/devices/gpio/drivers/mt-8167",
"//src/devices/gpio/drivers/qcom-gpio",
"//src/devices/i2c/drivers/dw-i2c",
"//src/devices/i2c/drivers/mt8167-i2c",
"//src/devices/misc/drivers/test",
"//src/devices/misc/drivers/virtio-rng:virtio_rng",
"//src/devices/misc/drivers/virtio-socket:virtio_socket",
"//src/devices/nand/drivers/cadence-hpnfc",
"//src/devices/power/drivers/as370-power",
"//src/devices/power/drivers/msm8x53-power",
"//src/devices/power/drivers/mtk-power",
"//src/devices/power/drivers/power:power-test",
"//src/devices/power/drivers/vs680-power",
"//src/devices/serial/bin/serial-test",
"//src/devices/serial/drivers/ftdi:ftdi-fake-usb",
"//src/devices/serial/drivers/usb-cdc-acm:fake-usb-cdc-acm",
"//src/devices/serial/drivers/virtio-console:virtio_console",
"//src/devices/spi/drivers/dw-spi",
"//src/devices/spi/drivers/mtk-spi",
"//src/devices/tests/bind-debugger-test:bind-debugger-test-driver",
"//src/devices/tests/crash-device",
"//src/devices/tests/ddk-lifecycle:ddk-lifecycle-test",
"//src/devices/tests/ddk-power:ddk-power-test-child",
"//src/devices/tests/ddk-power:ddk-power-test",
"//src/devices/tests/ddk-runcompatibilityhook:ddk-runcompatibilityhook-test-child",
"//src/devices/tests/ddk-runcompatibilityhook:ddk-runcompatibilityhook-test",
"//src/devices/tests/ddk-schedule-work:ddk-schedule-work-perf",
"//src/devices/tests/ddk-schedule-work:ddk-schedule-work-test",
"//src/devices/tests/devhost-test:devhost-test-child",
"//src/devices/tests/devhost-test",
"//src/devices/tests/devhost-test:devhost-test-manual",
"//src/devices/tests/fidl-async-llcpp-driver",
"//src/devices/tests/fidl-llcpp-driver",
"//src/devices/tests/isolateddevmgr:isolateddevmgr-test",
"//src/devices/tests/mock-device",
"//src/devices/tests/sysdev",
"//src/devices/tests/unit-test-test:unit-test-fail",
"//src/devices/tests/unit-test-test:unit-test-pass",
"//src/devices/thermal/drivers/as370-thermal",
"//src/devices/thermal/drivers/mtk-thermal",
"//src/devices/thermal/drivers/vs680-thermal",
"//src/devices/usb/bin/xdc-test",
"//src/devices/usb/drivers/as370-usb-phy",
"//src/devices/usb/drivers/nelson-usb-phy",
"//src/devices/usb/drivers/usb-bus:usb-device",
"//src/devices/usb/drivers/usb-test/flash-programmer",
"//src/graphics/display/drivers/dsi-mt",
"//src/graphics/display/drivers/fake:fake-display",
"//src/graphics/display/drivers/goldfish-display",
"//src/graphics/display/drivers/hikey-display",
"//src/graphics/display/drivers/mt8167s-display",
"//src/graphics/display/drivers/simple:simple.amd-kaveri",
"//src/graphics/display/drivers/simple:simple.bochs",
"//src/graphics/display/drivers/simple:simple.intel",
"//src/graphics/display/drivers/simple:simple.nv",
"//src/graphics/display/drivers/simple:simple.vmware",
"//src/graphics/display/drivers/ssd1306",
"//src/graphics/display/drivers/vim-display",
"//src/graphics/drivers/virtio:virtio_gpu",
"//src/media/audio/drivers/alc5514",
"//src/media/audio/drivers/alc5663",
"//src/media/audio/drivers/as370-pdm-input",
"//src/media/audio/drivers/as370-tdm-output",
"//src/media/audio/drivers/codecs/max98373",
"//src/media/audio/drivers/codecs/tas5782",
"//src/media/audio/drivers/codecs/tas5805",
"//src/media/audio/drivers/gauss-pdm-input",
"//src/media/audio/drivers/gauss-tdm",
"//src/media/audio/drivers/intel-hda/codecs/hdmi:hdmi-audio-codec",
"//src/media/audio/drivers/intel-hda/codecs/qemu:qemu-audio-codec",
"//src/media/audio/drivers/intel-hda/codecs/realtek:realtek-audio-codec",
"//src/media/audio/drivers/intel-hda/controller:intel-hda",
"//src/media/audio/drivers/max98927",
"//src/media/audio/drivers/mt8167-tdm-input",
"//src/media/audio/drivers/mt8167-tdm-output",
"//src/media/audio/drivers/nelson-pdm-input",
"//src/media/audio/drivers/nelson-tdm-output",
"//src/media/audio/drivers/sherlock-pdm-input",
"//src/media/audio/drivers/sherlock-tdm-output",
"//src/media/audio/tools/audio-driver-ctl:test",
"//src/ui/backlight/drivers/sg-micro",
"//src/ui/input/drivers/bma253",
"//src/ui/input/drivers/cypress",
"//src/ui/input/drivers/usb-hid:fake",
"//src/ui/input/drivers/virtio:virtio_input",
"//src/ui/light/drivers/gpio-light",
"//src/ui/light/drivers/lp50xx-light",
"//src/devices/bus/drivers/platform/test:test-audio-codec",
"//src/devices/bus/drivers/platform/test:test-board",
"//src/devices/bus/drivers/platform/test:test-child-1",
"//src/devices/bus/drivers/platform/test:test-child-2",
"//src/devices/bus/drivers/platform/test:test-child-2.proxy",
"//src/devices/bus/drivers/platform/test:test-child-3",
"//src/devices/bus/drivers/platform/test:test-clock",
"//src/devices/bus/drivers/platform/test:test-composite",
"//src/devices/bus/drivers/platform/test:test-gpio",
"//src/devices/bus/drivers/platform/test:test-i2c",
"//src/devices/bus/drivers/platform/test:test-parent",
"//src/devices/bus/drivers/platform/test:test-power",
"//src/devices/bus/drivers/platform/test:test-pwm",
"//src/devices/bus/drivers/platform/test:test-spi",
]
if (target_cpu == "arm64") {
common_image_contents += [
"//src/devices/board/drivers/as370",
"//src/devices/board/drivers/c18",
"//src/devices/board/drivers/gauss:gauss-i2c-test",
"//src/devices/board/drivers/gauss",
"//src/devices/board/drivers/hikey960:hi3660-i2c-test",
"//src/devices/board/drivers/hikey960",
"//src/devices/board/drivers/msm8998",
"//src/devices/board/drivers/msm8x53-som",
"//src/devices/board/drivers/mt8167s_ref",
"//src/devices/board/drivers/nelson",
"//src/devices/board/drivers/qemu-arm64",
"//src/devices/board/drivers/vim2",
"//src/devices/board/drivers/vim3",
"//src/devices/board/drivers/vs680-evk",
]
if (factory_mode) {
common_image_contents +=
[ "//src/devices/board/drivers/sherlock:sherlock-factory" ]
} else {
common_image_contents +=
[ "//src/devices/board/drivers/sherlock:sherlock" ]
}
}
}