mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
78b2ed263e
svn path=/nixu/trunk/; revision=7063
25 lines
837 B
Nix
25 lines
837 B
Nix
# Create an initial ramdisk containing the closure of the specified
|
|
# `init' package. An initial ramdisk is used during the initial
|
|
# stages of booting a Linux system. It is loaded by the boot loader
|
|
# along with the kernel image. It's supposed to contain everything
|
|
# (such as kernel modules) necessary to allow us to mount the root
|
|
# file system. Once the root file system is mounted, the `real' boot
|
|
# script can be called.
|
|
#
|
|
# An initrd is really just a gzipped cpio archive.
|
|
#
|
|
# A symlink `/init' is made to the store path passed in the `init'
|
|
# argument.
|
|
|
|
{stdenv, cpio, init}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "initrd";
|
|
builder = ./make-initrd.sh;
|
|
buildInputs = [cpio];
|
|
inherit init;
|
|
|
|
# For obtaining the closure of `init'.
|
|
exportReferencesGraph = ["init-closure" init];
|
|
pathsFromGraph = ./paths-from-graph.sh;
|
|
}
|