add ubivolume output
This commit is contained in:
parent
ede8f12d2b
commit
848214d104
@ -18,6 +18,9 @@ in
|
|||||||
eraseBlockSize = mkOption { type = types.str; }; # LEB
|
eraseBlockSize = mkOption { type = types.str; }; # LEB
|
||||||
maxLEBcount = mkOption { type = types.str; }; # LEB
|
maxLEBcount = mkOption { type = types.str; }; # LEB
|
||||||
};
|
};
|
||||||
|
options.system.outputs.ubivolume = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf (config.rootfsType == "ubifs") {
|
config = mkIf (config.rootfsType == "ubifs") {
|
||||||
kernel.config = {
|
kernel.config = {
|
||||||
@ -28,7 +31,7 @@ in
|
|||||||
};
|
};
|
||||||
boot.initramfs.enable = true;
|
boot.initramfs.enable = true;
|
||||||
|
|
||||||
system.outputs.rootfs =
|
system.outputs.ubivolume =
|
||||||
let
|
let
|
||||||
inherit (pkgs.pkgsBuildBuild) runCommand;
|
inherit (pkgs.pkgsBuildBuild) runCommand;
|
||||||
ubiVolume = ({ name, volumeId, image, flags ? [] }:
|
ubiVolume = ({ name, volumeId, image, flags ? [] }:
|
||||||
|
@ -39,7 +39,7 @@ on a system with pre-existing firmware and OS.
|
|||||||
dd if=/dev/zero of=$out bs=1 count=1 seek=8388607
|
dd if=/dev/zero of=$out bs=1 count=1 seek=8388607
|
||||||
'';
|
'';
|
||||||
firmwareImage = pkgs.runCommand "firmware-image" {} ''
|
firmwareImage = pkgs.runCommand "firmware-image" {} ''
|
||||||
cat ${paddedKernel} ${o.rootfs} > $out
|
cat ${paddedKernel} ${o.ubivolume} > $out
|
||||||
'';
|
'';
|
||||||
dts = pkgs.writeText "image.its" ''
|
dts = pkgs.writeText "image.its" ''
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
|
Loading…
Reference in New Issue
Block a user