add CI job to test tftpboot

This commit is contained in:
Daniel Barlow 2023-12-18 22:42:29 +00:00
parent 9ca9723c9d
commit e5db2691e5
7 changed files with 123 additions and 3 deletions

View file

@ -0,0 +1,33 @@
{ config, pkgs, lib, lim, ... } :
let
inherit (pkgs.pseudofile) dir symlink;
dts = pkgs.runCommand "qemu.dts" {
nativeBuildInputs = with pkgs.pkgsBuildBuild; [ dtc qemu ];
} ''
qemu-system-arm -machine virt -machine dumpdtb=tmp.dtb
dtc -I dtb -O dts -o $out tmp.dtb
'';
in {
imports = [
../../modules/outputs/ext4fs.nix
../../modules/outputs/tftpboot.nix
];
config = {
hardware.dts.src = lib.mkForce dts;
boot.tftp = {
loadAddress = lim.parseInt "0x42000000";
serverip = "10.0.2.2";
ipaddr = "10.0.2.15";
};
boot.imageFormat = "fit";
rootfsType = "ext4";
filesystem = dir {
hello = {
type = "f";
uid = 7;
gid = 24;
file = "hello world";
};
};
};
}