From 6c2ae977a7f36b7b8bd8d87c9f2a0cf32ecf2a19 Mon Sep 17 00:00:00 2001 From: Madoura Date: Fri, 4 Nov 2022 11:55:16 -0500 Subject: [PATCH 1/2] starfive/visionfive/v1: Make sd-image more flake-friendly --- starfive/visionfive/v1/sd-image-installer.nix | 6 ++++-- starfive/visionfive/v1/sd-image.nix | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/starfive/visionfive/v1/sd-image-installer.nix b/starfive/visionfive/v1/sd-image-installer.nix index c08ba96..1b32132 100644 --- a/starfive/visionfive/v1/sd-image-installer.nix +++ b/starfive/visionfive/v1/sd-image-installer.nix @@ -1,12 +1,14 @@ # To build, use: # nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image-installer.nix -A config.system.build.sdImage +{ modulesPath, ... }: + { imports = [ - + "${modulesPath}/profiles/installation-device.nix" ./sd-image.nix ]; - # the installation media is also the installation target, + # The installation media is also the installation target, # so we don't want to provide the installation configuration.nix. installer.cloneConfig = false; } diff --git a/starfive/visionfive/v1/sd-image.nix b/starfive/visionfive/v1/sd-image.nix index 7a8aa81..6b4acfc 100644 --- a/starfive/visionfive/v1/sd-image.nix +++ b/starfive/visionfive/v1/sd-image.nix @@ -1,13 +1,13 @@ # To build, use: -# nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image.nix -A config.system.build.sdImage -{ config, pkgs, ... }: +# nix-build "" -I nixos-config=starfive/visionfive/v1/sd-image.nix -A config.system.build.sdImage +{ config, pkgs, modulesPath, ... }: let firmware = pkgs.callPackage ./firmware.nix { }; in { imports = [ - - + "${modulesPath}/profiles/base.nix" + "${modulesPath}/installer/sd-card/sd-image.nix" ./default.nix ]; From ca3a7fca0298f0f7f3a34cf552394eb4310514b5 Mon Sep 17 00:00:00 2001 From: Madoura Date: Fri, 4 Nov 2022 11:56:02 -0500 Subject: [PATCH 2/2] starfive/visionfive/v1: Make README.MD formatting more readable --- starfive/visionfive/v1/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/starfive/visionfive/v1/README.md b/starfive/visionfive/v1/README.md index 5476943..eb7a631 100644 --- a/starfive/visionfive/v1/README.md +++ b/starfive/visionfive/v1/README.md @@ -1,4 +1,4 @@ -### Build the SD image +## Build the SD image - ``nix-build "" -A config.system.build.sdImage -I nixos-config=iso.nix`` - ``iso.nix`` @@ -16,10 +16,10 @@ } ``` -### Relevant documentation +## Relevant documentation - Flashing -- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_connection.html -- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/using_xmodem1.html + - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_connection.html + - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/using_xmodem1.html - Recovery -- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_setup.html -- - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/for_maclinux4.html + - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/hardware_setup.html + - https://doc-en.rvspace.org/VisionFive/Quick_Start_Guide/VisionFive_QSG/for_maclinux4.html