Files
danos/system/drivers/pci-bus/build.zig
T
Daniel Samson 6f4fdc2789 build: phase 2 pilot — pci-bus builds as a package
build-support gains the domains-based userBinary: the default import set
(the library/kernel concern modules, driver/service clients, mmio,
acpi-ids, xkeyboard-config) is assembled from the domain packages, and
the root shim + user link script come from the kernel package directory.
system/drivers/pci-bus is the first binary package: a ~15-line
declarative build.zig naming only its extras (device-manager-protocol,
pci-class); the root build consumes the artifact for the boot image and
the driver also builds standalone from its own directory. Boot-image
file list unchanged.
2026-07-26 22:55:47 +01:00

21 lines
1001 B
Zig

//! The pci-bus driver as a binary package (docs/build-packages-plan.md,
//! phase 2): this file names only what is specific to pci-bus — the shared
//! recipe and the default-import wiring live in build-support. The root build
//! consumes the artifact for the boot image.
const std = @import("std");
const build_support = @import("build-support");
pub fn build(b: *std.Build) void {
const exe = build_support.userBinary(b, .{
.name = "pci-bus",
.root_source_file = b.path("pci-bus.zig"),
.domains = build_support.domains(b),
});
// The bus driver reports discovered functions to the device manager, and
// decodes each function's class triple to human names in its boot log.
build_support.programModule(exe).addImport("device-manager-protocol", b.dependency("protocol", .{}).module("device-manager-protocol"));
build_support.programModule(exe).addImport("pci-class", b.dependency("device", .{}).module("pci-class"));
b.installArtifact(exe);
}