Fixes qemu issues.

This commit is contained in:
Bailey 2023-04-04 13:51:16 -04:00
parent bb3c82e2a5
commit 4887730cec
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
result
sd-card.img

View file

@ -25,7 +25,9 @@
vmscript = pkgs.writeScriptBin "vmscript" ''
#!${pkgs.runtimeShell}
img=${self.outputs.packages.${system}.uncompressed}/sd-card.img
img=./sd-card.img
cp ${self.outputs.packages.${system}.uncompressed}/sd-card.img $img
chmod 640 $img
${pkgs.qemu}/bin/qemu-system-aarch64 \
-machine raspi3b \
-kernel "${crossPkgs.ubootRaspberryPi3_64bit}/u-boot.bin" \

View file

@ -5,7 +5,7 @@ let
offset = 8;
id = "0xfeed3425";
name = "FIRMWARE";
size = 512;
size = 504; # offset + size = 512. Must be power of two.
};
rootfsImage = import ./rootfs.nix { inherit pkgs; };