rename diskimage to mbrimage

This commit is contained in:
Daniel Barlow 2023-12-11 19:04:34 +00:00
parent 876bd7d8ce
commit 601bb289ee
2 changed files with 7 additions and 7 deletions

View file

@ -15,7 +15,7 @@
imports = [ imports = [
../../modules/arch/arm.nix ../../modules/arch/arm.nix
../modules/outputs/tftpboot.nix ../modules/outputs/tftpboot.nix
../modules/outputs/diskimage.nix ../modules/outputs/mbrimage.nix
../modules/outputs/extlinux.nix ../modules/outputs/extlinux.nix
../modules/outputs/ext4fs.nix ../modules/outputs/ext4fs.nix
]; ];

View file

@ -10,10 +10,10 @@ let
phram_address = lib.toHexString (config.hardware.ram.startAddress + 256 * 1024 * 1024); phram_address = lib.toHexString (config.hardware.ram.startAddress + 256 * 1024 * 1024);
in { in {
options.system.outputs = { options.system.outputs = {
diskimage = mkOption { mbrimage = mkOption {
type = types.package; type = types.package;
description = '' description = ''
diskimage mbrimage
********* *********
This creates a disk image file with a partition table containing This creates a disk image file with a partition table containing
@ -25,10 +25,10 @@ in {
config = { config = {
system.outputs = { system.outputs = {
diskimage = mbrimage =
let let
o = config.system.outputs; o = config.system.outputs;
in pkgs.runCommand "diskimage" { in pkgs.runCommand "mbrimage" {
depsBuildBuild = [ pkgs.pkgsBuildBuild.util-linux ]; depsBuildBuild = [ pkgs.pkgsBuildBuild.util-linux ];
} '' } ''
# leave 4 sectors at start for partition table # leave 4 sectors at start for partition table
@ -39,10 +39,10 @@ in {
vmdisk = pkgs.runCommand "vmdisk" {} '' vmdisk = pkgs.runCommand "vmdisk" {} ''
mkdir $out mkdir $out
cd $out cd $out
ln -s ${o.diskimage} ./diskimage ln -s ${o.mbrimage} ./mbrimage
cat > run.sh <<EOF cat > run.sh <<EOF
#!${pkgs.runtimeShell} #!${pkgs.runtimeShell}
${pkgs.pkgsBuildBuild.run-liminix-vm}/bin/run-liminix-vm --arch ${pkgs.stdenv.hostPlatform.qemuArch} --u-boot ${pkgs.ubootQemuArm}/u-boot.bin --phram-address 0x${phram_address} --disk-image ${o.diskimage} /dev/null /dev/null ${pkgs.pkgsBuildBuild.run-liminix-vm}/bin/run-liminix-vm --arch ${pkgs.stdenv.hostPlatform.qemuArch} --u-boot ${pkgs.ubootQemuArm}/u-boot.bin --phram-address 0x${phram_address} --disk-image ${o.mbrimage} /dev/null /dev/null
EOF EOF
chmod +x run.sh chmod +x run.sh
''; '';