rename flashimage to mtdimage

This commit is contained in:
Daniel Barlow
2023-12-11 19:02:30 +00:00
parent 39c338d710
commit 876bd7d8ce
10 changed files with 20 additions and 21 deletions

View File

@@ -24,7 +24,7 @@
./outputs.nix
./outputs/vmroot.nix
./outputs/ubimage.nix
./outputs/flashimage.nix
./outputs/mtdimage.nix
./ppp
./ramdisk.nix
./squashfs.nix

View File

@@ -32,7 +32,7 @@ in {
};
};
defaultOutput = mkOption {
description = "\"Default\" output: what gets built for this device when outputs.default is requested. Typically this is \"flashimage\" or \"vmroot\"";
description = "\"Default\" output: what gets built for this device when outputs.default is requested. Typically this is \"mtdimage\" or \"vmroot\"";
type = types.nonEmptyStr;
};
ram = {

View File

@@ -9,7 +9,6 @@ let
o = config.system.outputs;
phram_address = lib.toHexString (config.hardware.ram.startAddress + 256 * 1024 * 1024);
in {
# imports = [ ./flashimage.nix ];
options.system.outputs = {
diskimage = mkOption {
type = types.package;

View File

@@ -11,7 +11,7 @@ in {
options.system.outputs = {
firmware = mkOption {
type = types.package;
internal = true; # component of flashimage
internal = true; # component of mtdimage
description = ''
Binary image (combining kernel, FDT, rootfs, initramfs
if needed, etc) for the target device.
@@ -19,16 +19,16 @@ in {
};
flash-scr = mkOption {
type = types.package;
internal = true; # component of flashimage
internal = true; # component of mtdimage
description = ''
Copy-pastable U-Boot commands to TFTP download the
image and write it to flash
'';
};
flashimage = mkOption {
mtdimage = mkOption {
type = types.package;
description = ''
flashimage
mtdimage
**********
This creates an image called :file:`firmware.bin` suitable for
@@ -80,10 +80,10 @@ in {
dd if=${o.uimage} of=$out bs=${bs} conv=sync
dd if=${o.rootfs} of=$out bs=${bs} conv=sync,nocreat,notrunc oflag=append
'';
flashimage =
mtdimage =
let o = config.system.outputs; in
# could use trivial-builders.linkFarmFromDrvs here?
pkgs.runCommand "flashimage" {} ''
pkgs.runCommand "mtdimage" {} ''
mkdir $out
cd $out
ln -s ${o.firmware} firmware.bin