Skip to content

Commit

Permalink
Remove symlinked test key
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbaur committed Jun 22, 2024
1 parent 273d15f commit ca257a8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
3 changes: 3 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ pub fn build(b: *std.Build) !void {
.strip = optimize != std.builtin.OptimizeMode.Debug,
});
tboot_loader.root_module.addOptions("build_options", tboot_loader_options);
tboot_loader.root_module.addAnonymousImport("test_key", .{
.root_source_file = b.path("test/keys/tboot/key.der"),
});
tboot_loader.root_module.addImport("linux_headers", linux_headers_module);

const cpio_tool = b.addRunArtifact(b.addExecutable(.{
Expand Down
6 changes: 1 addition & 5 deletions pkgs/tinyboot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ stdenv.mkDerivation (
../../build.zig
../../build.zig.zon
../../src
../../test/keys/tboot/key.der
];
};

Expand Down Expand Up @@ -61,11 +62,6 @@ stdenv.mkDerivation (
# probably a nixpkgs bug.
zigCheckFlags = finalAttrs.zigBuildFlags;

# TODO(jared): make embedFile work better with the test key
preConfigure = ''
ln -sf ${../../test/keys/tboot/key.der} src/test_key
'';

postInstall = lib.optionalString withLoader ''
xz --check=crc32 --lzma2=dict=512KiB $out/tboot-loader.cpio
'';
Expand Down
1 change: 0 additions & 1 deletion src/test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ pub const filesystem = @import("./disk/filesystem.zig");
pub const log = @import("./log.zig");
pub const message = @import("./message.zig");
pub const partition_table = @import("./disk/partition_table.zig");
pub const security = @import("./security.zig");
pub const server = @import("./server.zig");
pub const system = @import("./system.zig");
pub const tmp = @import("./tmp.zig");
Expand Down
1 change: 0 additions & 1 deletion src/test_key

This file was deleted.

0 comments on commit ca257a8

Please sign in to comment.