3
0
Fork 0
forked from mirrors/nixpkgs

build kernel and copy it to the diskimage. Now all there is left is an

initial ramdisk.

svn path=/nixu/trunk/; revision=3481
This commit is contained in:
Armijn Hemel 2005-07-31 15:25:39 +00:00
parent cc0935ebe8
commit ec898a881e
2 changed files with 19 additions and 3 deletions

View file

@ -1,5 +1,6 @@
#! /bin/sh -e #! /bin/sh -e
# deps is an array
declare -a deps declare -a deps
archivesDir=/tmp/arch archivesDir=/tmp/arch
@ -8,7 +9,9 @@ nixpkgs=/nixpkgs/trunk/pkgs
fill_disk=$archivesDir/scripts/fill-disk.sh fill_disk=$archivesDir/scripts/fill-disk.sh
storePaths=$archivesDir/mystorepaths storePaths=$archivesDir/mystorepaths
validatePaths=$archivesDir/validatepaths validatePaths=$archivesDir/validatepaths
bootiso=/tmp/nixos.iso
# keep chmod happy
touch ${archivesDir}/blah touch ${archivesDir}/blah
chmod -f -R +w ${archivesDir}/* chmod -f -R +w ${archivesDir}/*
rm -rf ${archivesDir}/* rm -rf ${archivesDir}/*
@ -28,6 +31,8 @@ nix=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).nix' | $NIX_CMD_PAT
syslinux=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).syslinux' | $NIX_CMD_PATH/nix-instantiate -)) syslinux=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).syslinux' | $NIX_CMD_PATH/nix-instantiate -))
kernel=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).kernel' | $NIX_CMD_PATH/nix-instantiate -))
#nixDeps=$($NIX_CMD_PATH/nix-store -qR $(echo '(import ./pkgs.nix).nix' | $NIX_CMD_PATH/nix-instantiate -)) #nixDeps=$($NIX_CMD_PATH/nix-store -qR $(echo '(import ./pkgs.nix).nix' | $NIX_CMD_PATH/nix-instantiate -))
#nixDeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).nix' | $NIX_CMD_PATH/nix-instantiate -))) #nixDeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).nix' | $NIX_CMD_PATH/nix-instantiate -)))
@ -77,7 +82,18 @@ echo copying bootimage
mkdir ${archivesDir}/isolinux mkdir ${archivesDir}/isolinux
cp ${syslinux}/lib/syslinux/isolinux.bin ${archivesDir}/isolinux cp ${syslinux}/lib/syslinux/isolinux.bin ${archivesDir}/isolinux
chmod u+w ${archivesDir}/isolinux/* chmod u+w ${archivesDir}/isolinux/*
mkisofs -rJ -o /tmp/nix-pull.iso -b isolinux/isolinux.bin -c isolinux/boot.cat \
echo copying kernel
# By following the symlink we don't have to know the version number
# of the kernel here.
cp -L $kernel/vmlinuz ${archivesDir}/isolinux/linux
# echo making ramdisk
# todo!
echo creating ISO image
mkisofs -rJ -o ${bootiso} -b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \ -no-emul-boot -boot-load-size 4 -boot-info-table \
${archivesDir} ${archivesDir}

View file

@ -10,5 +10,5 @@ rec {
less screen openssh binutils strace shadowutils iputils gnumake curl less screen openssh binutils strace shadowutils iputils gnumake curl
gnused gnutar gnugrep gzip mingetty grub;}; gnused gnutar gnugrep gzip mingetty grub;};
everything = [boot sysvinit]; everything = [boot sysvinit kernel];
} }