support aarch64 in tftpboot test

This commit is contained in:
Daniel Barlow 2023-12-19 12:12:12 +00:00
parent e5db2691e5
commit 32c13c46bb
7 changed files with 42 additions and 17 deletions

View file

@ -4,8 +4,13 @@ let
dts = pkgs.runCommand "qemu.dts" {
nativeBuildInputs = with pkgs.pkgsBuildBuild; [ dtc qemu ];
} ''
qemu-system-arm -machine virt -machine dumpdtb=tmp.dtb
qemu-system-${pkgs.stdenv.hostPlatform.qemuArch} \
-machine virt -machine dumpdtb=tmp.dtb
dtc -I dtb -O dts -o $out tmp.dtb
# https://stackoverflow.com/a/69890137,
# XXX try fdtput $out -p -t s /pl061@9030000 status disabled
# instead of using sed
sed -i $out -e 's/compatible = "arm,pl061.*/status = "disabled";/g'
'';
in {
imports = [
@ -15,7 +20,7 @@ in {
config = {
hardware.dts.src = lib.mkForce dts;
boot.tftp = {
loadAddress = lim.parseInt "0x42000000";
loadAddress = lim.parseInt "0x44000000";
serverip = "10.0.2.2";
ipaddr = "10.0.2.15";
};