feat(image): install upstream kexec which now have support for UKIs
This commit is contained in:
parent
0a0e9127e0
commit
7365ef8918
13 changed files with 74 additions and 7 deletions
15
flake.nix
15
flake.nix
|
@ -22,22 +22,23 @@
|
|||
{
|
||||
packages = {
|
||||
default = patosPkgs.image;
|
||||
image = pkgs.callPackage ./image {
|
||||
image = pkgs.callPackage ./pkgs/image {
|
||||
inherit patosPkgs;
|
||||
inherit version;
|
||||
};
|
||||
rootfs = pkgs.callPackage ./rootfs {
|
||||
rootfs = pkgs.callPackage ./pkgs/rootfs {
|
||||
inherit patosPkgs;
|
||||
inherit version;
|
||||
};
|
||||
initrd = pkgs.callPackage ./rootfs/mkinitrd.nix {
|
||||
initrd = pkgs.callPackage ./pkgs/rootfs/mkinitrd.nix {
|
||||
inherit patosPkgs;
|
||||
inherit version;
|
||||
};
|
||||
kernel = pkgs.callPackage ./kernel { };
|
||||
glibc = pkgs.callPackage ./glibc { };
|
||||
systemd = pkgs.callPackage ./systemd { };
|
||||
dbus-broker = pkgs.callPackage ./dbus-broker { };
|
||||
kernel = pkgs.callPackage ./pkgs/kernel { };
|
||||
glibc = pkgs.callPackage ./pkgs/glibc { };
|
||||
kexec = pkgs.callPackage ./pkgs/kexec-tools { };
|
||||
systemd = pkgs.callPackage ./pkgs/systemd { };
|
||||
dbus-broker = pkgs.callPackage ./pkgs/dbus-broker { };
|
||||
|
||||
qemu-uefi-tpm = pkgs.callPackage ./utils/qemu-uefi-tpm.nix { };
|
||||
};
|
||||
|
|
62
pkgs/kexec-tools/default.nix
Normal file
62
pkgs/kexec-tools/default.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildPackages,
|
||||
fetchFromGitHub,
|
||||
autoconf,
|
||||
zlib,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "kexec-tools";
|
||||
version = "main";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "horms";
|
||||
repo = "kexec-tools";
|
||||
rev = "a7fcd424c4c80dea5a2fd5ffa274ffeb8129c790";
|
||||
hash = "sha256-QKE+KCkueA21zNunTMidP9OuZaw0IG5tFDF4UJITTTQ=";
|
||||
};
|
||||
|
||||
dontPatchShebangs = true;
|
||||
|
||||
hardeningDisable = [
|
||||
"format"
|
||||
"pic"
|
||||
"relro"
|
||||
"pie"
|
||||
];
|
||||
|
||||
buildCommand = ''
|
||||
unpackPhase
|
||||
mkdir -p $out
|
||||
cd source
|
||||
./bootstrap
|
||||
./configure --prefix=/
|
||||
make DESTDIR=$out install
|
||||
'';
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
autoconf
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://horms.net/projects/kexec/kexec-tools";
|
||||
description = "Tools related to the kexec Linux feature";
|
||||
platforms = platforms.linux;
|
||||
badPlatforms = [
|
||||
"microblaze-linux"
|
||||
"microblazeel-linux"
|
||||
"riscv64-linux"
|
||||
"riscv32-linux"
|
||||
"sparc-linux"
|
||||
"sparc64-linux"
|
||||
];
|
||||
license = licenses.gpl2Only;
|
||||
};
|
||||
}
|
|
@ -26,6 +26,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
|||
kmodBin = pkgs.kmod.out;
|
||||
libbpf = pkgs.libbpf.out;
|
||||
btrfs = pkgs.btrfs-progs.out;
|
||||
kexec = patosPkgs.kexec.out;
|
||||
|
||||
builder = ./mkrootfs.sh;
|
||||
})
|
|
@ -107,6 +107,9 @@ $out/usr/bin/busybox --list | xargs -I {} ln -sf busybox $out/usr/bin/{}
|
|||
### install dbus broker
|
||||
cp -r $dbusBroker/* $out/
|
||||
|
||||
### install kexec
|
||||
cp -Pr ${kexec}/sbin/kexec $out/usr/bin/
|
||||
|
||||
### install btrfs progs
|
||||
cp -Pr ${btrfs}/bin/* $out/usr/bin/
|
||||
cp -Pr ${btrfs}/lib/* $out/usr/lib/
|
Loading…
Add table
Reference in a new issue