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 { }; iasl_20180531 = self.nixpkgsOnBuildForBuild.callPackage ./coreboot/iasl_20180531 { };
coreboot = self.callPackage ./coreboot { coreboot = self.callPackage ./coreboot {
initramfs_image = "${self.initramfs}/initramfs.cpio"; initramfs_image = self.initramfs;
}; };
kernel = self.callPackage ./kernel { }; kernel = self.callPackage ./kernel { };
initramfs = self.callPackage ./initramfs { initramfs = self.callPackage ./initramfs {

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

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

Loading…
Cancel
Save