From 4461686e80ffdab8212aa2cb58b0b7e502a8601a Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 3 Jul 2024 18:45:26 +0200 Subject: [PATCH] Add dev shell without rootfs Makes iteration quicker. --- flake.nix | 6 ++++++ fpga/upload.sh | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index cef84f7..e6590f5 100644 --- a/flake.nix +++ b/flake.nix @@ -132,5 +132,11 @@ echo " UBOOT_ENV = $UBOOT_ENV" ''; }; + + devShells.x86_64-linux.lagarto-ox-rd = + self.outputs.devShells.x86_64-linux.lagarto-ox.overrideAttrs (old:{ + TOPLEVEL = ""; + ROOTFS = ""; + }); }; } diff --git a/fpga/upload.sh b/fpga/upload.sh index d64bfa7..783b0ef 100755 --- a/fpga/upload.sh +++ b/fpga/upload.sh @@ -16,7 +16,11 @@ rsync -a fpga/env.sh "$dst" rsync $OPENSBI/share/opensbi/*/fpga/*/firmware/fw_payload.bin "$dst/opensbi.bin" rsync "$KERNEL/Image" "$dst/kernel.bin" rsync "$INITRD/initrd" "$dst/initrd.bin" -rsync "$ROOTFS/sd-image/rootfs.img" "$dst/rootfs.img" +if [ -n "$ROOTFS" ]; then + rsync "$ROOTFS/sd-image/rootfs.img" "$dst/rootfs.img" +else + echo "Skipping rootfs" +fi rsync "$UBOOT_ENV" "$dst/uboot.env" echo "Now go to $dst and run ./boot.sh"