forked from DGNum/liminix
builders/uimage: support aligning the FIT
This is necessary when writing to a MTD partition with a certain erasesize.
This commit is contained in:
parent
c59364d623
commit
dde8386f75
3 changed files with 4 additions and 2 deletions
|
@ -67,6 +67,7 @@ in {
|
||||||
};
|
};
|
||||||
loadAddress = mkOption { type = types.ints.unsigned; default = null; };
|
loadAddress = mkOption { type = types.ints.unsigned; default = null; };
|
||||||
entryPoint = mkOption { type = types.ints.unsigned; };
|
entryPoint = mkOption { type = types.ints.unsigned; };
|
||||||
|
alignment = mkOption { type = types.ints.unsigned; default = null; description = "Alignment passed to `mkimage` for FIT"; };
|
||||||
radios = mkOption {
|
radios = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Kernel modules (from mac80211 package) required for the
|
Kernel modules (from mac80211 package) required for the
|
||||||
|
|
|
@ -111,7 +111,7 @@ in
|
||||||
};
|
};
|
||||||
uimage = liminix.builders.uimage {
|
uimage = liminix.builders.uimage {
|
||||||
commandLine = concatStringsSep " " config.boot.commandLine;
|
commandLine = concatStringsSep " " config.boot.commandLine;
|
||||||
inherit (config.hardware) loadAddress entryPoint;
|
inherit (config.hardware) loadAddress entryPoint alignment;
|
||||||
inherit (config.boot) imageFormat;
|
inherit (config.boot) imageFormat;
|
||||||
inherit (o) kernel dtb;
|
inherit (o) kernel dtb;
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,6 +20,7 @@ in {
|
||||||
, extraName ? "" # e.g. socFamily
|
, extraName ? "" # e.g. socFamily
|
||||||
, loadAddress
|
, loadAddress
|
||||||
, imageFormat
|
, imageFormat
|
||||||
|
, alignment ? null
|
||||||
, dtb ? null
|
, dtb ? null
|
||||||
} : stdenv.mkDerivation {
|
} : stdenv.mkDerivation {
|
||||||
name = "kernel.image";
|
name = "kernel.image";
|
||||||
|
@ -70,7 +71,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_VARS
|
_VARS
|
||||||
mkimage -f mkimage.its kernel.uimage
|
mkimage -f mkimage.its ${lib.optionalString (alignment != null) "-B 0x${lib.toHexString alignment}"} kernel.uimage
|
||||||
mkimage -l kernel.uimage
|
mkimage -l kernel.uimage
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue