build: exact per-binary imports — the pre-wired default set is gone
Every binary's build.zig now names precisely the modules its source
imports (derived by scanning each artifact's sources, transitively
through same-directory files), and its zon carries only the domains
those come from — kernel stays implicit (the root shim + link script
live there). build-support's userBinary resolves each name through one
module-to-domain table (module_homes); Domains/domains()/defaultImports
and the raw recipe entry point are deleted. An undeclared @import is a
compile error (verified: injecting @import("xkeyboard-config") into
logger fails with 'no module named ... available within module
program'), and e.g. xkeyboard-config now appears in exactly two
manifests — the two keyboard drivers. Availability never bloated the
emitted binaries (Zig compiles only what a program imports); this makes
the declared interfaces honest. Production and -Dtest-case manifests
byte-identical; all build variants and standalone package builds
green.
This commit is contained in:
parent
c621b649f6
commit
4476208361
|
|
@ -1,9 +1,16 @@
|
|||
//! The danos build API (docs/build-packages-plan.md, phase 0): the one shared
|
||||
//! recipe for building a user-space binary, extracted from the root build so
|
||||
//! cross-cutting build changes have a single home. Consumers declare this
|
||||
//! package in their build.zig.zon (as "build-support") and @import its
|
||||
//! build.zig from their own build.zig; nothing is compiled from this package
|
||||
//! itself — it exports build-time functions only.
|
||||
//! The danos build API (docs/build-packages-plan.md): the one shared recipe
|
||||
//! for building a user-space binary. A binary package's build.zig names its
|
||||
//! binary and EXACTLY the modules its source imports — the moral equivalent
|
||||
//! of a C file's include list — and `userBinary` resolves each name from the
|
||||
//! library domain package that exports it. Nothing is pre-wired: an @import
|
||||
//! the package did not declare is a compile error, and a domain none of the
|
||||
//! imports come from never appears in the package's manifest. The only
|
||||
//! implicit dependency is the kernel package, because the shared root shim
|
||||
//! (root.zig, user.ld) lives there and itself reaches start + logging.
|
||||
//!
|
||||
//! Consumers declare this package in their build.zig.zon (as "build-support")
|
||||
//! and @import its build.zig from their own build.zig; nothing is compiled
|
||||
//! from this package itself — it exports build-time functions only.
|
||||
|
||||
const std = @import("std");
|
||||
|
||||
|
|
@ -24,40 +31,79 @@ pub fn freestandingTarget(b: *std.Build) std.Build.ResolvedTarget {
|
|||
});
|
||||
}
|
||||
|
||||
/// What `userBinaryFromImports` needs to know about one user binary.
|
||||
/// Which library domain package exports each importable module — the one
|
||||
/// name -> home table. When a domain grows a module, it gets a row here; a
|
||||
/// binary naming a module whose home is missing from its own build.zig.zon
|
||||
/// fails loudly at dependency resolution.
|
||||
const ModuleHome = struct { name: []const u8, home: []const u8 };
|
||||
const module_homes = [_]ModuleHome{
|
||||
// library/kernel — the userspace private-ABI library, split by concern.
|
||||
.{ .name = "abi", .home = "kernel" },
|
||||
.{ .name = "system-call", .home = "kernel" },
|
||||
.{ .name = "ipc", .home = "kernel" },
|
||||
.{ .name = "time", .home = "kernel" },
|
||||
.{ .name = "thread", .home = "kernel" },
|
||||
.{ .name = "logging", .home = "kernel" },
|
||||
.{ .name = "process", .home = "kernel" },
|
||||
.{ .name = "file-system", .home = "kernel" },
|
||||
.{ .name = "memory", .home = "kernel" },
|
||||
.{ .name = "service", .home = "kernel" },
|
||||
.{ .name = "start", .home = "kernel" },
|
||||
// library/device — driver-side libraries + the flat reference data.
|
||||
.{ .name = "mmio", .home = "device" },
|
||||
.{ .name = "acpi-ids", .home = "device" },
|
||||
.{ .name = "device-abi", .home = "device" },
|
||||
.{ .name = "aml", .home = "device" },
|
||||
.{ .name = "usb-abi", .home = "device" },
|
||||
.{ .name = "usb-ids", .home = "device" },
|
||||
.{ .name = "usb", .home = "device" },
|
||||
.{ .name = "driver", .home = "device" },
|
||||
.{ .name = "block", .home = "device" },
|
||||
.{ .name = "pci", .home = "device" },
|
||||
.{ .name = "pci-class", .home = "device" },
|
||||
.{ .name = "device-registry", .home = "device" },
|
||||
// library/client — userspace service clients.
|
||||
.{ .name = "display", .home = "client" },
|
||||
.{ .name = "input", .home = "client" },
|
||||
// library/protocol — the wire protocols.
|
||||
.{ .name = "vfs-protocol", .home = "protocol" },
|
||||
.{ .name = "input-protocol", .home = "protocol" },
|
||||
.{ .name = "block-protocol", .home = "protocol" },
|
||||
.{ .name = "usb-transfer-protocol", .home = "protocol" },
|
||||
.{ .name = "device-manager-protocol", .home = "protocol" },
|
||||
.{ .name = "display-protocol", .home = "protocol" },
|
||||
.{ .name = "scanout-protocol", .home = "protocol" },
|
||||
.{ .name = "power-protocol", .home = "protocol" },
|
||||
// library/csv — the /etc/*.csv helpers.
|
||||
.{ .name = "csv", .home = "csv" },
|
||||
// library/xkeyboard-config — keycode -> keysym/character tables.
|
||||
.{ .name = "xkeyboard-config", .home = "xkeyboard-config" },
|
||||
};
|
||||
|
||||
fn moduleHome(name: []const u8) ?[]const u8 {
|
||||
for (module_homes) |entry| {
|
||||
if (std.mem.eql(u8, entry.name, name)) return entry.home;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// What `userBinary` needs to know about one user binary.
|
||||
pub const UserBinaryOptions = struct {
|
||||
name: []const u8,
|
||||
/// The program's own source file — it becomes the `program` module the
|
||||
/// root shim imports; a program only defines `pub fn main`.
|
||||
root_source_file: std.Build.LazyPath,
|
||||
/// The shared root shim supplying the compilation-root declarations
|
||||
/// (`main` re-export, panic handler, `_start` pull): library/kernel/root.zig.
|
||||
shim_source_file: std.Build.LazyPath,
|
||||
/// The shared user link script. Its PHDRS (segment permissions) are
|
||||
/// authoritative — the kernel's W^X user-ELF loader requires exact perms.
|
||||
linker_script: std.Build.LazyPath,
|
||||
target: std.Build.ResolvedTarget,
|
||||
/// The default set of importable modules every user binary sees — the
|
||||
/// library/kernel concern modules (ipc, memory, process, time, logging,
|
||||
/// file-system, ...), the device/service clients (driver, block, display,
|
||||
/// input), mmio, acpi-ids, and xkeyboard-config. Must include `start` and
|
||||
/// `logging` (the root shim reaches those two directly).
|
||||
default_imports: []const std.Build.Module.Import,
|
||||
/// Exactly the modules the program's source @imports (directly or through
|
||||
/// its same-directory files) — no more, no less. Order is free; sorted
|
||||
/// reads best. An undeclared @import fails the compile; a declared name no
|
||||
/// domain exports fails the build graph with a pointer to module_homes.
|
||||
imports: []const []const u8,
|
||||
/// Built multi-threaded (`single_threaded = false`) so real atomics/TLS
|
||||
/// work — required before a binary may call `Thread.spawn`
|
||||
/// (docs/threading.md). Threads are a deliberate per-binary opt-in.
|
||||
threaded: bool = false,
|
||||
};
|
||||
|
||||
/// The module registered under `name` in `imports` — the root shim reaches the
|
||||
/// couple of concern modules it needs (start, logging) out of the default set.
|
||||
fn findImport(imports: []const std.Build.Module.Import, name: []const u8) *std.Build.Module {
|
||||
for (imports) |import| {
|
||||
if (std.mem.eql(u8, import.name, name)) return import.module;
|
||||
}
|
||||
@panic("default_imports is missing a module the root shim needs");
|
||||
}
|
||||
|
||||
/// Build one user-space binary the same way for every program (init, the
|
||||
/// services, the drivers): freestanding, ReleaseSmall, `.large` code model
|
||||
/// (the image base is above 4 GiB — smaller models emit 32-bit relocations
|
||||
|
|
@ -66,38 +112,50 @@ fn findImport(imports: []const std.Build.Module.Import, name: []const u8) *std.B
|
|||
/// the kernel's W^X user-ELF loader requires exact perms.
|
||||
///
|
||||
/// The compilation root is not the program's own file but the shared shim
|
||||
/// (options.shim_source_file), which supplies the root declarations (`main`
|
||||
/// re-export, panic handler, `_start` pull) so a program only defines
|
||||
/// (the kernel package's root.zig), which supplies the root declarations
|
||||
/// (`main` re-export, panic handler, `_start` pull) so a program only defines
|
||||
/// `pub fn main`. The program's file becomes the `program` module the shim
|
||||
/// imports; reach it through `programModule` to add per-binary imports.
|
||||
pub fn userBinaryFromImports(b: *std.Build, options: UserBinaryOptions) *std.Build.Step.Compile {
|
||||
/// imports; reach it through `programModule` to add per-binary non-library
|
||||
/// modules (compile-time options).
|
||||
pub fn userBinary(b: *std.Build, options: UserBinaryOptions) *std.Build.Step.Compile {
|
||||
const kernel = b.dependency("kernel", .{});
|
||||
var imports: std.ArrayListUnmanaged(std.Build.Module.Import) = .empty;
|
||||
for (options.imports) |name| {
|
||||
const home = moduleHome(name) orelse @panic(b.fmt(
|
||||
"no library domain exports a module named '{s}' — if a domain grew it, add its row to module_homes in build-support/build.zig",
|
||||
.{name},
|
||||
));
|
||||
const dependency = if (std.mem.eql(u8, home, "kernel")) kernel else b.dependency(home, .{});
|
||||
imports.append(b.allocator, .{ .name = name, .module = dependency.module(name) }) catch @panic("OOM");
|
||||
}
|
||||
// Settings (target, optimize, code model, ...) live on the root module
|
||||
// only; the program module inherits them.
|
||||
const program_module = b.createModule(.{
|
||||
.root_source_file = options.root_source_file,
|
||||
.imports = options.default_imports,
|
||||
.imports = imports.items,
|
||||
});
|
||||
const exe = b.addExecutable(.{
|
||||
.name = options.name,
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = options.shim_source_file,
|
||||
.target = options.target,
|
||||
.root_source_file = kernel.path("root.zig"),
|
||||
.target = freestandingTarget(b),
|
||||
.optimize = .ReleaseSmall,
|
||||
.code_model = .large,
|
||||
.single_threaded = !options.threaded, // a threaded binary needs real atomics/TLS
|
||||
.sanitize_c = .off,
|
||||
.stack_check = false,
|
||||
.stack_protector = false,
|
||||
// The root shim itself imports only start (_start + panic) and logging
|
||||
// (std_options); the program's own file reaches the full default set.
|
||||
// The root shim itself imports only start (_start + panic) and
|
||||
// logging (std_options) — straight from the kernel package, so a
|
||||
// program's own import list stays exactly its own.
|
||||
.imports = &.{
|
||||
.{ .name = "start", .module = findImport(options.default_imports, "start") },
|
||||
.{ .name = "logging", .module = findImport(options.default_imports, "logging") },
|
||||
.{ .name = "start", .module = kernel.module("start") },
|
||||
.{ .name = "logging", .module = kernel.module("logging") },
|
||||
.{ .name = "program", .module = program_module },
|
||||
},
|
||||
}),
|
||||
});
|
||||
exe.setLinkerScript(options.linker_script);
|
||||
exe.setLinkerScript(kernel.path("user.ld"));
|
||||
exe.entry = .{ .symbol_name = "_start" };
|
||||
exe.image_base = 0x7000_0000_0000;
|
||||
exe.use_llvm = true;
|
||||
|
|
@ -105,95 +163,11 @@ pub fn userBinaryFromImports(b: *std.Build, options: UserBinaryOptions) *std.Bui
|
|||
return exe;
|
||||
}
|
||||
|
||||
/// The `program` module of a binary built by `userBinaryFromImports` — the
|
||||
/// module rooted at the program's own source file. Per-binary imports
|
||||
/// (protocol modules, bus ABIs) go here, not on the root shim: module imports
|
||||
/// The `program` module of a binary built by `userBinary` — the module rooted
|
||||
/// at the program's own source file. Per-binary non-library modules (an
|
||||
/// addOptions build_options) go here, not on the root shim: module imports
|
||||
/// are not transitive, so an import added to the root would be invisible to
|
||||
/// the program's code.
|
||||
pub fn programModule(exe: *std.Build.Step.Compile) *std.Build.Module {
|
||||
return exe.root_module.import_table.get("program").?;
|
||||
}
|
||||
|
||||
/// The library domain packages a user binary's default import set draws from.
|
||||
/// A binary package declares these in its build.zig.zon under exactly these
|
||||
/// dependency names (kernel, device, client, xkeyboard-config) and resolves
|
||||
/// them with `domains`. Path dependencies deduplicate by resolved location,
|
||||
/// so every binary and the root build share one instance of each module.
|
||||
pub const Domains = struct {
|
||||
kernel: *std.Build.Dependency,
|
||||
device: *std.Build.Dependency,
|
||||
client: *std.Build.Dependency,
|
||||
xkeyboard_config: *std.Build.Dependency,
|
||||
};
|
||||
|
||||
/// Resolve the four default-set domain packages by their conventional
|
||||
/// dependency names — the one-liner for a binary package's build fn.
|
||||
pub fn domains(b: *std.Build) Domains {
|
||||
return .{
|
||||
.kernel = b.dependency("kernel", .{}),
|
||||
.device = b.dependency("device", .{}),
|
||||
.client = b.dependency("client", .{}),
|
||||
.xkeyboard_config = b.dependency("xkeyboard-config", .{}),
|
||||
};
|
||||
}
|
||||
|
||||
/// What `userBinary` needs to know about one user binary. The domain wiring
|
||||
/// (default imports, root shim, link script, target) is derived.
|
||||
pub const DomainUserBinaryOptions = struct {
|
||||
name: []const u8,
|
||||
/// The program's own source file — it becomes the `program` module.
|
||||
root_source_file: std.Build.LazyPath,
|
||||
domains: Domains,
|
||||
/// See UserBinaryOptions.threaded.
|
||||
threaded: bool = false,
|
||||
};
|
||||
|
||||
/// THE default import set every user binary sees — the library/kernel concern
|
||||
/// modules (ipc, memory, process, time, logging, file-system, ...), the
|
||||
/// device/service clients (driver, block, display, input), mmio, acpi-ids,
|
||||
/// and xkeyboard-config — assembled from the domain packages. This is the
|
||||
/// single authoritative list: the root build's stanzas and every binary
|
||||
/// package both draw from here, so adding a default module is a one-place
|
||||
/// change (the cross-cutting rule, docs/build-packages-plan.md).
|
||||
pub fn defaultImports(libraries: Domains) [17]std.Build.Module.Import {
|
||||
const kernel = libraries.kernel;
|
||||
const device = libraries.device;
|
||||
const client = libraries.client;
|
||||
return .{
|
||||
.{ .name = "mmio", .module = device.module("mmio") },
|
||||
.{ .name = "xkeyboard-config", .module = libraries.xkeyboard_config.module("xkeyboard-config") },
|
||||
.{ .name = "acpi-ids", .module = device.module("acpi-ids") },
|
||||
.{ .name = "system-call", .module = kernel.module("system-call") },
|
||||
.{ .name = "ipc", .module = kernel.module("ipc") },
|
||||
.{ .name = "memory", .module = kernel.module("memory") },
|
||||
.{ .name = "process", .module = kernel.module("process") },
|
||||
.{ .name = "thread", .module = kernel.module("thread") },
|
||||
.{ .name = "time", .module = kernel.module("time") },
|
||||
.{ .name = "logging", .module = kernel.module("logging") },
|
||||
.{ .name = "file-system", .module = kernel.module("file-system") },
|
||||
.{ .name = "service", .module = kernel.module("service") },
|
||||
.{ .name = "start", .module = kernel.module("start") },
|
||||
.{ .name = "driver", .module = device.module("driver") },
|
||||
.{ .name = "block", .module = device.module("block") },
|
||||
.{ .name = "display", .module = client.module("display") },
|
||||
.{ .name = "input", .module = client.module("input") },
|
||||
};
|
||||
}
|
||||
|
||||
/// Build one user binary against the domain packages' default import set
|
||||
/// (`defaultImports`). Per-binary extras go through
|
||||
/// `programModule(exe).addImport`. This is THE recipe a binary package's
|
||||
/// build.zig calls; the root shim and user link script come from the kernel
|
||||
/// domain package's directory.
|
||||
pub fn userBinary(b: *std.Build, options: DomainUserBinaryOptions) *std.Build.Step.Compile {
|
||||
const default_imports = defaultImports(options.domains);
|
||||
return userBinaryFromImports(b, .{
|
||||
.name = options.name,
|
||||
.root_source_file = options.root_source_file,
|
||||
.shim_source_file = options.domains.kernel.path("root.zig"),
|
||||
.linker_script = options.domains.kernel.path("user.ld"),
|
||||
.target = freestandingTarget(b),
|
||||
.default_imports = &default_imports,
|
||||
.threaded = options.threaded,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ root split into `build/images.zig` + `build/qemu.zig`; the root `build.zig` is
|
|||
tests, the QEMU suite at parity with main, boot-image file list unchanged.
|
||||
The `lazyDependency` payoff (What-this-buys #4) is in too: the /test fixtures
|
||||
and the unselected discovery package are lazy — a build loads and compiles
|
||||
only what it ships.
|
||||
only what it ships. And imports are exact: the pre-wired default set is gone;
|
||||
every binary names precisely the modules its source imports and carries only
|
||||
those domains in its manifest (rule 1 below).
|
||||
|
||||
## Why
|
||||
|
||||
|
|
@ -55,10 +57,15 @@ these packages is consumed.
|
|||
|
||||
Rules:
|
||||
|
||||
- **Dependencies are declared at domain level** (a binary's zon names `kernel`,
|
||||
`device`), **imports stay module-level** (`@import("pci")`). `build-support`
|
||||
pre-wires the core set every binary uses (service, ipc, memory, process,
|
||||
logging); per-binary build files name only extras.
|
||||
- **Imports are exact and per binary.** A binary's build.zig names precisely
|
||||
the modules its source `@import`s — the moral equivalent of a C file's
|
||||
include list — and its zon names only the domains those modules come from
|
||||
(plus `build-support` and `kernel`, which is implicit in every binary: the
|
||||
root shim and user link script live there). Nothing is pre-wired: an
|
||||
undeclared `@import` is a compile error, and build-support's one
|
||||
module-to-domain table (`module_homes`) resolves each name. Availability
|
||||
never meant bloat — Zig only compiles what a program actually imports — but
|
||||
exactness makes the declared interface honest and machine-checked.
|
||||
- **Modules export source, not artifacts** — each consumer compiles libraries
|
||||
with its own flags, so per-binary optimization choices keep working; Zig's
|
||||
cache deduplicates.
|
||||
|
|
@ -71,9 +78,10 @@ Rules:
|
|||
|
||||
## What this buys
|
||||
|
||||
1. Library interfaces become machine-checked: a consumer can only import what a
|
||||
domain exports, and each domain's zon declares what it needs (claim-before-
|
||||
touch, applied to source).
|
||||
1. Library interfaces become machine-checked: a consumer can only import what
|
||||
it declared — per binary, down to the single module — and each domain's zon
|
||||
declares what it needs (claim-before-touch, applied to source). A keyboard
|
||||
driver carries `xkeyboard-config` in its manifest; nothing else does.
|
||||
2. Each library domain gets a standalone `zig build test` — runtime-library
|
||||
stability testing in isolation.
|
||||
3. Adding a binary = adding a directory (source + two small files), not editing
|
||||
|
|
@ -124,15 +132,15 @@ rewritten against the package template.
|
|||
## Execution notes (the finished shape)
|
||||
|
||||
- The shared recipe lives in `build-support/build.zig`: `userBinary` (what
|
||||
every binary package calls), `userBinaryFromImports` (the underlying
|
||||
recipe), and `defaultImports` — the ONE list of default modules. The `start`
|
||||
root shim and `user.ld` are named through the kernel package
|
||||
(Dependency.path).
|
||||
every binary package calls, resolving each named import through the
|
||||
`module_homes` table) and `programModule` (for per-binary addOptions
|
||||
modules). The `start` root shim and `user.ld` are named through the kernel
|
||||
package (Dependency.path).
|
||||
- Adding a binary = adding a directory with source + a ~15-line build.zig +
|
||||
zon (copy any existing binary package, e.g.
|
||||
`system/drivers/pci-bus/build.zig`), then one dependency + one bundled
|
||||
entry in the root build.zig and one zon line. Per-binary extras go through
|
||||
`build_support.programModule(exe).addImport(...)` inside the package.
|
||||
`system/drivers/pci-bus/build.zig`) listing exactly the modules the source
|
||||
imports and the domains they come from, then one dependency + one bundled
|
||||
entry in the root build.zig and one zon line.
|
||||
- The boot-tree array in the root (search `"etc/init.csv"` or
|
||||
`.getEmittedBin()`) is the image file list — the authoritative comparison
|
||||
target for any future build change.
|
||||
|
|
|
|||
|
|
@ -138,15 +138,16 @@ a higher-level service (block ↔ filesystem, a scanout driver ↔ the composito
|
|||
private wire to its *hardware* — virtio-gpu's command set — is not that; it stays a
|
||||
driver-private file, like the virtio-pci transport beside it.
|
||||
|
||||
The build side of this has since landed: the shared recipe in
|
||||
[`build-support/build.zig`](../../build-support/build.zig) (`defaultImports` +
|
||||
`userBinary`) injects the default modules — the library/kernel concern modules (`ipc`,
|
||||
`memory`, `process`, `time`, `logging`, `file-system`, `thread`, `service`), the
|
||||
device/service clients (`driver`, `block`, `display`, `input`), plus `mmio`,
|
||||
`xkeyboard-config`, `acpi-ids` — into every user binary, and per-binary extras —
|
||||
protocol modules, bus logic — are added with `programModule(exe).addImport(...)`.
|
||||
Every binary owns a package with its own ~15-line `build.zig` calling that recipe
|
||||
(see [build-packages-plan.md](../build-packages-plan.md)). That's the *entire*
|
||||
The build side of this has since landed: every binary owns a package whose
|
||||
~15-line `build.zig` names EXACTLY the modules its source imports — the moral
|
||||
equivalent of a C file's include list — and the shared recipe in
|
||||
[`build-support/build.zig`](../../build-support/build.zig) (`userBinary`)
|
||||
resolves each name from the library domain that exports it (kernel's concern
|
||||
modules, the device driver libraries, the service clients, the protocols). An
|
||||
undeclared `@import` is a compile error, and a domain none of the imports come
|
||||
from never appears in the binary's manifest — a keyboard driver declares
|
||||
`xkeyboard-config`; nothing else does (see
|
||||
[build-packages-plan.md](../build-packages-plan.md)). That's the *entire*
|
||||
mechanism — Zig modules already give you everything else.
|
||||
|
||||
The discipline that makes this work: **a class driver must not import a bus's *hardware*
|
||||
|
|
|
|||
|
|
@ -117,24 +117,28 @@ The driver directory is its own build package
|
|||
([build-packages-plan.md](../build-packages-plan.md)): a ~15-line `build.zig`
|
||||
plus a `build.zig.zon` beside the source. Copy both from an existing driver —
|
||||
`system/drivers/pci-bus/` is the template — and adjust the name, root source
|
||||
file, and per-driver extras:
|
||||
file, and the import list. The list names EXACTLY the modules the driver's
|
||||
source `@import`s (the moral equivalent of its include list; an undeclared
|
||||
import is a compile error):
|
||||
|
||||
```zig
|
||||
pub fn build(b: *std.Build) void {
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "intel-uhd-graphics-750",
|
||||
.root_source_file = b.path("intel-uhd-graphics-750.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "driver", "ipc", "memory", "process", "service" },
|
||||
});
|
||||
build_support.programModule(exe).addImport("pci", b.dependency("device", .{}).module("pci")); // if the pci library is used
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
```
|
||||
|
||||
The zon declares `build-support`, the four domain packages, and any extras'
|
||||
homes by relative path (again, copy pci-bus's and adjust); for the
|
||||
`.fingerprint` field, leave the copied value in place and `zig build` will
|
||||
reject it and suggest the fresh one to paste.
|
||||
The zon declares `build-support`, `kernel` (implicit in every binary: the root
|
||||
shim lives there), and the homes of the listed imports — for the minimal
|
||||
driver above that is kernel alone plus `device` (for `driver`); add
|
||||
`protocol`, `client`, ... only when an import comes from them (again, copy
|
||||
pci-bus's zon and adjust). For the `.fingerprint` field, leave the copied
|
||||
value in place and `zig build` will reject it and suggest the fresh one to
|
||||
paste.
|
||||
|
||||
Then three one-liners in the root build register the package: the dependency
|
||||
and a row in the boot-tree array in `build.zig` (search for
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! 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.
|
||||
//! The pci-bus driver as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,11 +9,10 @@ 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),
|
||||
.imports = &.{
|
||||
"device-manager-protocol", "driver", "ipc", "logging", "memory", "pci-class",
|
||||
"process", "service",
|
||||
},
|
||||
});
|
||||
// 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0x283fca121f0bb145, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,35 +1,36 @@
|
|||
//! The ps2-bus driver as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The ps2-bus driver as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
|
||||
const ps2_bus_exe = build_support.userBinary(b, .{
|
||||
.name = "ps2-bus",
|
||||
.root_source_file = b.path("ps2-bus.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "acpi-ids", "driver", "ipc", "logging", "memory", "process", "service", "time" },
|
||||
});
|
||||
b.installArtifact(ps2_bus_exe);
|
||||
|
||||
const ps2_keyboard_exe = build_support.userBinary(b, .{
|
||||
.name = "ps2-keyboard",
|
||||
.root_source_file = b.path("keyboard.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"acpi-ids", "driver", "input", "input-protocol", "ipc", "logging", "memory",
|
||||
"process", "time", "xkeyboard-config",
|
||||
},
|
||||
});
|
||||
build_support.programModule(ps2_keyboard_exe).addImport("input-protocol", protocol.module("input-protocol"));
|
||||
b.installArtifact(ps2_keyboard_exe);
|
||||
|
||||
const ps2_mouse_exe = build_support.userBinary(b, .{
|
||||
.name = "ps2-mouse",
|
||||
.root_source_file = b.path("mouse.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"acpi-ids", "driver", "input", "input-protocol", "ipc", "logging", "memory",
|
||||
"process", "time",
|
||||
},
|
||||
});
|
||||
build_support.programModule(ps2_mouse_exe).addImport("input-protocol", protocol.module("input-protocol"));
|
||||
b.installArtifact(ps2_mouse_exe);
|
||||
|
||||
// Standalone `zig build test`; the root aggregate depends on this step.
|
||||
|
|
|
|||
|
|
@ -4,12 +4,15 @@
|
|||
.fingerprint = 0x642a365353bf7de9, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,29 @@
|
|||
//! The usb-hid driver as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The usb-hid driver as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
const device = b.dependency("device", .{});
|
||||
|
||||
const usb_hid_keyboard_exe = build_support.userBinary(b, .{
|
||||
.name = "usb-hid-keyboard",
|
||||
.root_source_file = b.path("keyboard.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"driver", "input", "input-protocol", "ipc", "logging", "process", "service", "usb",
|
||||
"usb-abi", "xkeyboard-config",
|
||||
},
|
||||
});
|
||||
build_support.programModule(usb_hid_keyboard_exe).addImport("usb", device.module("usb"));
|
||||
build_support.programModule(usb_hid_keyboard_exe).addImport("usb-abi", device.module("usb-abi"));
|
||||
build_support.programModule(usb_hid_keyboard_exe).addImport("input-protocol", protocol.module("input-protocol"));
|
||||
b.installArtifact(usb_hid_keyboard_exe);
|
||||
|
||||
const usb_hid_mouse_exe = build_support.userBinary(b, .{
|
||||
.name = "usb-hid-mouse",
|
||||
.root_source_file = b.path("mouse.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"driver", "input", "input-protocol", "ipc", "logging", "process", "service", "usb",
|
||||
"usb-abi",
|
||||
},
|
||||
});
|
||||
build_support.programModule(usb_hid_mouse_exe).addImport("usb", device.module("usb"));
|
||||
build_support.programModule(usb_hid_mouse_exe).addImport("usb-abi", device.module("usb-abi"));
|
||||
build_support.programModule(usb_hid_mouse_exe).addImport("input-protocol", protocol.module("input-protocol"));
|
||||
b.installArtifact(usb_hid_mouse_exe);
|
||||
|
||||
// Standalone `zig build test`; the root aggregate depends on this step.
|
||||
|
|
|
|||
|
|
@ -4,12 +4,15 @@
|
|||
.fingerprint = 0x66328b738fffff01, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
//! The usb-storage driver as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The usb-storage driver as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
const device = b.dependency("device", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "usb-storage",
|
||||
.root_source_file = b.path("usb-storage.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"block-protocol", "driver", "ipc", "logging", "memory", "process", "service",
|
||||
"time", "usb",
|
||||
},
|
||||
});
|
||||
build_support.programModule(exe).addImport("usb", device.module("usb"));
|
||||
build_support.programModule(exe).addImport("block-protocol", protocol.module("block-protocol"));
|
||||
b.installArtifact(exe);
|
||||
|
||||
// Standalone `zig build test`; the root aggregate depends on this step.
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0xce09fdc4c50bb4fe, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,24 +1,18 @@
|
|||
//! The usb-xhci-bus driver as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The usb-xhci-bus driver as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
const device = b.dependency("device", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "usb-xhci-bus",
|
||||
.root_source_file = b.path("usb-xhci-bus.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"device-manager-protocol", "driver", "input", "ipc", "logging", "memory", "mmio",
|
||||
"pci", "process", "service", "time", "usb-abi", "usb-ids", "usb-transfer-protocol",
|
||||
},
|
||||
});
|
||||
build_support.programModule(exe).addImport("device-manager-protocol", protocol.module("device-manager-protocol"));
|
||||
build_support.programModule(exe).addImport("pci", device.module("pci"));
|
||||
build_support.programModule(exe).addImport("usb-abi", device.module("usb-abi"));
|
||||
build_support.programModule(exe).addImport("usb-ids", device.module("usb-ids"));
|
||||
build_support.programModule(exe).addImport("usb-transfer-protocol", protocol.module("usb-transfer-protocol"));
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
.fingerprint = 0x46d21373f05f6b20, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,23 +1,19 @@
|
|||
//! The virtio-gpu driver as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The virtio-gpu driver as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
const device = b.dependency("device", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "virtio-gpu",
|
||||
.root_source_file = b.path("virtio-gpu.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"display-protocol", "driver", "ipc", "logging", "memory", "mmio", "pci", "process",
|
||||
"scanout-protocol", "service", "time",
|
||||
},
|
||||
});
|
||||
build_support.programModule(exe).addImport("pci", device.module("pci"));
|
||||
build_support.programModule(exe).addImport("display-protocol", protocol.module("display-protocol"));
|
||||
build_support.programModule(exe).addImport("scanout-protocol", protocol.module("scanout-protocol"));
|
||||
b.installArtifact(exe);
|
||||
|
||||
// Standalone `zig build test`; the root aggregate depends on this step.
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0xfb704899c18b9a23, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
//! The acpi discovery service as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2). The artifact is named "discovery": one swappable process per
|
||||
//! firmware fills the ramdisk's neutral `discovery` slot (docs/discovery.md),
|
||||
//! so the device manager never learns which firmware it is on. The root
|
||||
//! build's -Ddiscovery picks this package or `fdt`.
|
||||
//! The acpi service as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
//!
|
||||
//! The artifact is named "discovery": one swappable process per firmware
|
||||
//! fills the ramdisk's neutral `discovery` slot (docs/discovery.md); the
|
||||
//! root's -Ddiscovery picks this package or `fdt`.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -11,14 +13,10 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "discovery",
|
||||
.root_source_file = b.path("acpi.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"acpi-ids", "aml", "device-manager-protocol", "driver", "ipc", "logging", "memory",
|
||||
"power-protocol", "process", "service", "time",
|
||||
},
|
||||
});
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
// The shared AML interpreter (the same parser the kernel runs), the
|
||||
// device-manager report channel, and the power protocol (the SCI/power
|
||||
// button path, docs/power.md).
|
||||
build_support.programModule(exe).addImport("aml", b.dependency("device", .{}).module("aml"));
|
||||
build_support.programModule(exe).addImport("device-manager-protocol", protocol.module("device-manager-protocol"));
|
||||
build_support.programModule(exe).addImport("power-protocol", protocol.module("power-protocol"));
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0xf31e9a0903256b64, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,21 +1,18 @@
|
|||
//! The device-manager service as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The device-manager service as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
const device = b.dependency("device", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "device-manager",
|
||||
.root_source_file = b.path("device-manager.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"device-manager-protocol", "device-registry", "driver", "file-system", "ipc",
|
||||
"logging", "memory", "process", "service", "time",
|
||||
},
|
||||
});
|
||||
build_support.programModule(exe).addImport("device-manager-protocol", protocol.module("device-manager-protocol"));
|
||||
build_support.programModule(exe).addImport("device-registry", device.module("device-registry"));
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0x7092fc24905cd147, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The display-demo service as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The display-demo service as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "display-demo",
|
||||
.root_source_file = b.path("display-demo.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "display", "logging", "time" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0x5d2832e1e2880143, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
//! The display service as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The display service as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "display",
|
||||
.root_source_file = b.path("display.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"display", "display-protocol", "driver", "input", "ipc", "logging", "memory",
|
||||
"scanout-protocol", "service", "thread", "time",
|
||||
},
|
||||
.threaded = true, // real atomics/TLS (docs/threading.md)
|
||||
});
|
||||
build_support.programModule(exe).addImport("display-protocol", protocol.module("display-protocol"));
|
||||
build_support.programModule(exe).addImport("scanout-protocol", protocol.module("scanout-protocol"));
|
||||
b.installArtifact(exe);
|
||||
|
||||
// Standalone `zig build test`; the root aggregate depends on this step.
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
.fingerprint = 0xcd172a34b127a19, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
//! The fat service as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The fat service as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "fat",
|
||||
.root_source_file = b.path("fat.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"block", "file-system", "ipc", "logging", "memory", "process", "service", "time",
|
||||
"vfs-protocol",
|
||||
},
|
||||
});
|
||||
build_support.programModule(exe).addImport("vfs-protocol", protocol.module("vfs-protocol"));
|
||||
b.installArtifact(exe);
|
||||
|
||||
// Standalone `zig build test`; the root aggregate depends on this step.
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0x98958143ecfe1636, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
//! The fdt discovery service as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2). The artifact is named "discovery" like acpi's: the Raspberry Pis
|
||||
//! hand over a flattened device tree instead of ACPI, and the aarch64 target
|
||||
//! flips the root build's -Ddiscovery default when it lands (docs/arm.md).
|
||||
//! A placeholder until the ARM bring-up.
|
||||
//! The fdt service as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
//!
|
||||
//! The artifact is named "discovery" like acpi's: the Raspberry Pis hand over
|
||||
//! a flattened device tree, and the aarch64 target flips the root's
|
||||
//! -Ddiscovery default when it lands (docs/arm.md). A placeholder until the
|
||||
//! ARM bring-up.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -11,7 +14,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "discovery",
|
||||
.root_source_file = b.path("fdt.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "process" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0xe5e27506c7fc2eea, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//! init (PID 1) as a binary package (docs/build-packages-plan.md, phase 2):
|
||||
//! this file names only what is specific to init — the shared recipe and the
|
||||
//! default-import wiring live in build-support. The root build consumes the
|
||||
//! artifact for the boot image and forwards its -Dserial here.
|
||||
//! init (PID 1) as a binary package (docs/build-packages-plan.md): this file
|
||||
//! names the binary and EXACTLY the modules its source imports — the shared
|
||||
//! recipe and the module-to-domain map live in build-support. The root build
|
||||
//! consumes the artifact for the boot image and forwards its -Dserial here.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,14 +10,11 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "init",
|
||||
.root_source_file = b.path("init.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{
|
||||
"csv", "file-system", "ipc", "logging", "memory", "power-protocol",
|
||||
"process", "time",
|
||||
},
|
||||
});
|
||||
// init speaks the power protocol (orderly shutdown, docs/power.md) and
|
||||
// parses its boot service list from /etc/init.csv with the shared csv
|
||||
// helpers. Which services it starts is data, not a compile-time option:
|
||||
// the root build selects which init.csv variant is bundled (-Ddiagnose).
|
||||
build_support.programModule(exe).addImport("power-protocol", b.dependency("protocol", .{}).module("power-protocol"));
|
||||
build_support.programModule(exe).addImport("csv", b.dependency("csv", .{}).module("csv"));
|
||||
// init reads the same `serial` flag the kernel does: its liveness heartbeat
|
||||
// is a serial/test-build diagnostic (the QEMU harness's init tests assert
|
||||
// on it, and -Dserial images emit it), so a flashable image runs a purely
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
.fingerprint = 0xc674e474eeeced43, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
.csv = .{ .path = "../../../library/csv" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,15 @@
|
|||
//! The input service as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The input service as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "input",
|
||||
.root_source_file = b.path("input.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "input", "input-protocol", "ipc", "logging", "process", "service" },
|
||||
});
|
||||
build_support.programModule(exe).addImport("input-protocol", protocol.module("input-protocol"));
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0xd82832d7113ed94e, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The logger service as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The logger service as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "logger",
|
||||
.root_source_file = b.path("logger.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "file-system", "ipc", "logging", "service", "time" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0x987e13f37b0eaea2, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../build-support" },
|
||||
.kernel = .{ .path = "../../../library/kernel" },
|
||||
.device = .{ .path = "../../../library/device" },
|
||||
.client = .{ .path = "../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The args-echo test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The args-echo test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "args-echo",
|
||||
.root_source_file = b.path("args-echo.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "logging", "process" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0xcc0ad94cf777eeb, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,15 @@
|
|||
//! The crash-test test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The crash-test test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "crash-test",
|
||||
.root_source_file = b.path("crash-test.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "device-manager-protocol", "driver", "ipc", "logging", "process", "time" },
|
||||
});
|
||||
build_support.programModule(exe).addImport("device-manager-protocol", protocol.module("device-manager-protocol"));
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0x611122f815277984, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,19 +1,15 @@
|
|||
//! The device-list test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The device-list test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const protocol = b.dependency("protocol", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "device-list",
|
||||
.root_source_file = b.path("device-list.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "device-manager-protocol", "ipc", "logging", "time" },
|
||||
});
|
||||
build_support.programModule(exe).addImport("device-manager-protocol", protocol.module("device-manager-protocol"));
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0xcdf12d2276a06cb1, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
.protocol = .{ .path = "../../../../library/protocol" },
|
||||
},
|
||||
.paths = .{""},
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The fat-test test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The fat-test test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "fat-test",
|
||||
.root_source_file = b.path("fat-test.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "file-system", "logging", "process", "time" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0x8dac87d9dc3aabca, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The input-source test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The input-source test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "input-source",
|
||||
.root_source_file = b.path("input-source.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "input", "logging", "process", "time" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0x933ef62ed7d33db7, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The input-test test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The input-test test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "input-test",
|
||||
.root_source_file = b.path("input-test.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "input", "logging" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0x9b12c53bde4d070e, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,15 @@
|
|||
//! The iommu-fault-test test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The iommu-fault-test test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const device = b.dependency("device", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "iommu-fault-test",
|
||||
.root_source_file = b.path("iommu-fault-test.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "driver", "logging", "mmio", "pci", "pci-class", "time" },
|
||||
});
|
||||
build_support.programModule(exe).addImport("pci", device.module("pci"));
|
||||
build_support.programModule(exe).addImport("pci-class", device.module("pci-class"));
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0xd7ec3a4e1a61696c, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,15 @@
|
|||
//! The pci-cap-test test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The pci-cap-test test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
||||
pub fn build(b: *std.Build) void {
|
||||
const device = b.dependency("device", .{});
|
||||
|
||||
const exe = build_support.userBinary(b, .{
|
||||
.name = "pci-cap-test",
|
||||
.root_source_file = b.path("pci-cap-test.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "driver", "ipc", "logging", "mmio", "pci", "pci-class", "time" },
|
||||
});
|
||||
build_support.programModule(exe).addImport("pci", device.module("pci"));
|
||||
build_support.programModule(exe).addImport("pci-class", device.module("pci-class"));
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,12 @@
|
|||
.fingerprint = 0x2d4f027d811c3953, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The process-test test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The process-test test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "process-test",
|
||||
.root_source_file = b.path("process-test.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "ipc", "logging", "process", "service", "time" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0x3796ac392c89622b, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The shared-memory-client test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The shared-memory-client test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "shared-memory-client",
|
||||
.root_source_file = b.path("shared-memory-client.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "ipc", "logging", "memory", "time" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0xc3945d0308ff5720, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The shared-memory-server test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The shared-memory-server test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "shared-memory-server",
|
||||
.root_source_file = b.path("shared-memory-server.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "ipc", "logging", "memory", "service" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0x5ebd8ca0f8a1675b, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The thread-test test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The thread-test test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "thread-test",
|
||||
.root_source_file = b.path("thread-test.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "logging", "memory", "process", "thread", "time" },
|
||||
.threaded = true, // real atomics/TLS (docs/threading.md)
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0x5cce628236ddbf19, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
//! The vfs-test test fixture as a binary package (docs/build-packages-plan.md,
|
||||
//! phase 2): this file names only what is specific to this binary — the shared
|
||||
//! recipe and the default-import wiring live in build-support. The root build
|
||||
//! consumes the artifact(s) for the boot image.
|
||||
//! The vfs-test test fixture as a binary package (docs/build-packages-plan.md):
|
||||
//! this file names the binary and EXACTLY the modules its source imports —
|
||||
//! the shared recipe and the module-to-domain map live in build-support.
|
||||
|
||||
const std = @import("std");
|
||||
const build_support = @import("build-support");
|
||||
|
|
@ -10,7 +9,7 @@ pub fn build(b: *std.Build) void {
|
|||
const exe = build_support.userBinary(b, .{
|
||||
.name = "vfs-test",
|
||||
.root_source_file = b.path("vfs-test.zig"),
|
||||
.domains = build_support.domains(b),
|
||||
.imports = &.{ "file-system", "logging", "process", "time" },
|
||||
});
|
||||
b.installArtifact(exe);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
.fingerprint = 0x29b5b8c468cdfe6e, // Changing this has security and trust implications.
|
||||
.minimum_zig_version = "0.16.0",
|
||||
.dependencies = .{
|
||||
// build-support supplies the shared recipe; kernel is implicit in
|
||||
// every binary (the root shim + link script live there). The rest
|
||||
// are exactly the homes of this binary's declared imports.
|
||||
.@"build-support" = .{ .path = "../../../../build-support" },
|
||||
.kernel = .{ .path = "../../../../library/kernel" },
|
||||
.device = .{ .path = "../../../../library/device" },
|
||||
.client = .{ .path = "../../../../library/client" },
|
||||
.@"xkeyboard-config" = .{ .path = "../../../../library/xkeyboard-config" },
|
||||
},
|
||||
.paths = .{""},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue