add zImage output
This commit is contained in:
parent
a8891461aa
commit
03b17fa3ed
2 changed files with 17 additions and 2 deletions
|
@ -30,6 +30,16 @@ in
|
|||
Kernel vmlinux file (usually ELF)
|
||||
'';
|
||||
};
|
||||
zimage = mkOption {
|
||||
type = types.package;
|
||||
internal = true;
|
||||
description = ''
|
||||
zimage
|
||||
******
|
||||
|
||||
Kernel in compressed self-extracting package
|
||||
'';
|
||||
};
|
||||
dtb = mkOption {
|
||||
type = types.package;
|
||||
internal = true;
|
||||
|
@ -80,6 +90,10 @@ in
|
|||
kernel = liminix.builders.kernel.override {
|
||||
inherit (config.kernel) config src extraPatchPhase;
|
||||
};
|
||||
zimage = liminix.builders.kernel.override {
|
||||
targets = ["arch/arm/boot/zImage"];
|
||||
inherit (config.kernel) config src extraPatchPhase;
|
||||
};
|
||||
dtb = liminix.builders.dtb {
|
||||
inherit (config.boot) commandLine;
|
||||
dts = config.hardware.dts.src;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
, config
|
||||
, src
|
||||
, extraPatchPhase ? "echo"
|
||||
, targets ? ["vmlinux"]
|
||||
} :
|
||||
let
|
||||
writeConfig = import ./write-kconfig.nix { inherit lib writeText; };
|
||||
|
@ -90,12 +91,12 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make vmlinux modules_prepare -j$NIX_BUILD_CORES
|
||||
make ${lib.concatStringsSep " " (map baseNameOf targets)} modules_prepare -j$NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
${CROSS_COMPILE}strip -d vmlinux
|
||||
cp vmlinux $out
|
||||
cp ${lib.concatStringsSep " " targets} $out
|
||||
mkdir -p $headers
|
||||
cp -a include .config $headers/
|
||||
mkdir -p $modulesupport
|
||||
|
|
Loading…
Reference in a new issue