initramfs: produce a single file in /nix/store rather than a directory

master
Adam Joseph 2 years ago
parent 25f9d4e927
commit ffdfb0fe19

@ -15,7 +15,7 @@ let
iasl_20180531 = self.nixpkgsOnBuildForBuild.callPackage ./coreboot/iasl_20180531 { };
coreboot = self.callPackage ./coreboot {
initramfs_image = "${self.initramfs}/initramfs.cpio";
initramfs_image = self.initramfs;
};
kernel = self.callPackage ./kernel { };
initramfs = self.callPackage ./initramfs {

@ -8,12 +8,11 @@
}:
nixpkgsOnBuildForHost.stdenv.mkDerivation {
name = "initramfs";
name = "initramfs.cpio";
nativeBuildInputs = with nixpkgsOnBuildForBuild; [ findutils cpio ];
srcs = [ ];
dontUnpack = true;
buildPhase = ''
mkdir -p $out
mkdir build
mkdir -p build/lib/modules
BUILD=$(pwd)/build
@ -25,7 +24,7 @@ nixpkgsOnBuildForHost.stdenv.mkDerivation {
popd
chmod -R u+w $BUILD
pushd $BUILD
find . | cpio --create -H newc -R +0:+0 > $out/initramfs.cpio
find . | cpio --create -H newc -R +0:+0 > $out
popd
'';
dontInstall = true;

@ -8,7 +8,7 @@
}:
let
initramfs_lzma = runCommand "initramfs.lzma" { } ''
lzma < ${initramfs}/initramfs.cpio > $out;
lzma < ${initramfs} > $out;
'';
in stdenv.mkDerivation {
name = "ownerboot-stage1-fit";

Loading…
Cancel
Save