2004-02-14 22:56:51 +00:00
|
|
|
#! /bin/sh -e
|
|
|
|
|
2006-10-31 17:39:55 +00:00
|
|
|
set -x
|
|
|
|
|
|
|
|
if test -z "$TMPDIR"; then export TMPDIR=/tmp; fi
|
|
|
|
|
2005-07-31 15:25:39 +00:00
|
|
|
# deps is an array
|
2005-07-29 16:54:36 +00:00
|
|
|
declare -a deps
|
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
build="nix-build --no-out-link"
|
2006-07-09 22:33:01 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
coreutils=$($build ./pkgs.nix -A coreutils)
|
2006-07-09 22:33:01 +00:00
|
|
|
|
2006-07-02 22:37:40 +00:00
|
|
|
# determine where we can find the Nix binaries
|
2006-07-09 22:33:01 +00:00
|
|
|
NIX=$($coreutils/bin/dirname $(which nix-store))
|
2006-07-02 22:37:40 +00:00
|
|
|
|
2006-07-03 08:39:52 +00:00
|
|
|
# make sure we use many of our own tools, because it is more pure
|
2006-10-31 20:28:35 +00:00
|
|
|
mktemp=$($build ./pkgs.nix -A mktemp)
|
2006-07-02 22:37:40 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
gnused=$($build ./pkgs.nix -A gnused)
|
|
|
|
gnutar=$($build ./pkgs.nix -A gnutar151)
|
|
|
|
cdrtools=$($build ./pkgs.nix -A cdrtools)
|
|
|
|
gzip=$($build ./pkgs.nix -A gzip)
|
|
|
|
cpio=$($build ./pkgs.nix -A cpio)
|
2006-07-03 08:39:52 +00:00
|
|
|
|
|
|
|
archivesDir=$($mktemp/bin/mktemp -d)
|
2006-08-08 20:24:33 +00:00
|
|
|
archivesDir2=$($mktemp/bin/mktemp -d)
|
2005-07-05 13:52:49 +00:00
|
|
|
manifest=${archivesDir}/MANIFEST
|
2006-10-31 17:39:55 +00:00
|
|
|
nixpkgs=./pkgs
|
2005-07-06 16:00:20 +00:00
|
|
|
fill_disk=$archivesDir/scripts/fill-disk.sh
|
2005-08-31 12:58:46 +00:00
|
|
|
ramdisk_login=$archivesDir/scripts/ramdisk-login.sh
|
2006-08-27 14:14:59 +00:00
|
|
|
login_script=$archivesDir/scripts/login.sh
|
2005-07-29 16:54:36 +00:00
|
|
|
storePaths=$archivesDir/mystorepaths
|
2006-08-04 23:39:59 +00:00
|
|
|
narStorePaths=$archivesDir/narstorepaths
|
2005-07-29 16:54:36 +00:00
|
|
|
validatePaths=$archivesDir/validatepaths
|
2006-10-31 17:39:55 +00:00
|
|
|
bootiso=$TMPDIR/nixos.iso
|
|
|
|
initrd=$TMPDIR/initram.img
|
2005-08-03 12:00:42 +00:00
|
|
|
initdir=${archivesDir}/initdir
|
2005-08-31 12:02:28 +00:00
|
|
|
initscript=$archivesDir/scripts/init.sh
|
2005-07-06 14:42:41 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
nix=$($build ./pkgs.nix -A nix)
|
|
|
|
busybox=$($build ./pkgs.nix -A busybox)
|
|
|
|
nano=$($build ./pkgs.nix -A nano)
|
|
|
|
nanoDiet=$($build ./pkgs.nix -A nanoDiet)
|
|
|
|
ncurses=$($build ./pkgs.nix -A ncursesDiet)
|
2006-08-02 22:42:56 +00:00
|
|
|
|
|
|
|
nixDeps=$($NIX/nix-store -qR $nix)
|
2004-08-06 13:52:39 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
storeExpr=$($build ./pkgs.nix -A boot)
|
2006-08-02 22:42:56 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
kernelscripts=$($build ./pkgs.nix -A kernelscripts)
|
2006-08-07 19:48:18 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
mkinitrd=$($build ./pkgs.nix -A mkinitrd)
|
2006-08-27 22:18:39 +00:00
|
|
|
|
2006-08-02 22:42:56 +00:00
|
|
|
### make NAR files for everything we want to install and some more. Make sure
|
|
|
|
### the right URL is in there, so specify /cdrom and not cdrom
|
2006-10-31 20:28:35 +00:00
|
|
|
$NIX/nix-push --copy $archivesDir $manifest --target file:///cdrom $storeExpr $($build ./pkgs.nix -A kernel) $kernelscripts $mkinitrd
|
|
|
|
#$NIX/nix-push --copy $archivesDir2 $manifest --target http://losser.labs.cs.uu.nl/~armijn/.nix $storeExpr $($build ./pkgs.nix -A kernel) $kernelscripts
|
2004-02-18 10:56:07 +00:00
|
|
|
|
|
|
|
# Location of sysvinit?
|
2006-10-31 20:28:35 +00:00
|
|
|
sysvinitPath=$($build ./pkgs.nix -A sysvinit)
|
2004-02-18 10:56:07 +00:00
|
|
|
|
2004-02-18 14:56:32 +00:00
|
|
|
# Location of Nix boot scripts?
|
2006-10-31 20:28:35 +00:00
|
|
|
bootPath=$($build ./pkgs.nix -A boot)
|
2005-07-06 16:00:20 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
syslinux=$($build ./pkgs.nix -A syslinux)
|
2005-07-31 13:11:44 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
kernel=$($build ./pkgs.nix -A kernel)
|
|
|
|
kernelscripts=$($build ./pkgs.nix -A kernelscripts)
|
2005-07-31 15:25:39 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
utillinux=$($build ./pkgs.nix -A utillinux)
|
2005-07-11 17:59:19 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
gnugrep=$($build ./pkgs.nix -A gnugrep)
|
2006-08-02 22:42:56 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
grub=$($build ./pkgs.nix -A grubWrapper)
|
2006-08-02 22:42:56 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
findutils=$($build ./pkgs.nix -A findutilsWrapper)
|
2006-08-02 22:42:56 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
modutils=$($build ./pkgs.nix -A module_init_toolsStatic)
|
2006-08-04 23:39:59 +00:00
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
dhcp=$($build ./pkgs.nix -A dhcpWrapper)
|
2006-08-08 20:24:33 +00:00
|
|
|
|
2006-08-06 23:59:31 +00:00
|
|
|
#combideps=$($NIX/nix-store -qR $nix $utillinux $gnugrep $grub $gzip $findutils)
|
2006-08-30 00:15:02 +00:00
|
|
|
combideps=$($NIX/nix-store -qR $nix $busybox $grub $findutils $modutils $dhcp $nano)
|
2006-08-02 22:42:56 +00:00
|
|
|
|
2006-08-27 22:18:39 +00:00
|
|
|
for i in $storeExpr $mkinitrd
|
2006-08-04 23:39:59 +00:00
|
|
|
do
|
|
|
|
echo $i >> $narStorePaths
|
|
|
|
done
|
2006-08-02 22:42:56 +00:00
|
|
|
#for i in $nixDeps
|
|
|
|
for i in $combideps
|
2005-08-26 16:06:52 +00:00
|
|
|
do
|
2005-08-27 00:36:07 +00:00
|
|
|
echo $i >> $storePaths
|
|
|
|
echo '' >> $storePaths
|
2006-06-24 22:14:43 +00:00
|
|
|
deps=$($NIX/nix-store -q --references $i)
|
2006-07-03 22:20:22 +00:00
|
|
|
pkgs=$(echo $deps | $coreutils/bin/wc -w)
|
2005-08-27 00:36:07 +00:00
|
|
|
echo $pkgs >> $storePaths
|
|
|
|
for j in $deps
|
|
|
|
do
|
|
|
|
echo $j >> $storePaths
|
|
|
|
done
|
|
|
|
echo copying from store: $i
|
2006-07-03 08:39:52 +00:00
|
|
|
$gnutar/bin/tar -cf - $i | $gnutar/bin/tar --directory=$archivesDir -xf -
|
2005-08-26 16:06:52 +00:00
|
|
|
done
|
|
|
|
|
2006-08-03 16:19:04 +00:00
|
|
|
tar zcf ${archivesDir}/nixstore.tgz $combideps
|
|
|
|
|
2006-10-31 20:28:35 +00:00
|
|
|
utilLinux=$($build ./pkgs.nix -A utillinuxStatic)
|
|
|
|
coreUtilsDiet=$($NIX/nix-store -qR $($build ./pkgs.nix -A coreutilsDiet))
|
2006-06-24 22:14:43 +00:00
|
|
|
|
|
|
|
## temporarily normal e2fsprogs until I can get it to build with dietlibc
|
2006-10-31 20:28:35 +00:00
|
|
|
e2fsProgs=$($NIX/nix-store -qR $($build ./pkgs.nix -A e2fsprogsDiet))
|
|
|
|
#e2fsProgs=$($NIX/nix-store -qR $($build ./pkgs.nix -A e2fsprogs))
|
|
|
|
modUtils=$($NIX/nix-store -qR $($build ./pkgs.nix -A module_init_toolsStatic))
|
|
|
|
Grub=$($NIX/nix-store -qR $($build ./pkgs.nix -A grubWrapper))
|
|
|
|
Kernel=$($NIX/nix-store -qR $($build ./pkgs.nix -A kernel))
|
|
|
|
SysVinit=$($NIX/nix-store -qR $($build ./pkgs.nix -A sysvinit))
|
|
|
|
BootPath=$($NIX/nix-store -qR $($build ./pkgs.nix -A boot))
|
|
|
|
|
|
|
|
bashGlibc=$($build ./pkgs.nix -A bash)
|
|
|
|
bash=$($build ./pkgs.nix -A diet.bash)
|
|
|
|
coreutilsdiet=$($build ./pkgs.nix -A diet.coreutils)
|
|
|
|
utillinux=$($build ./pkgs.nix -A utillinux)
|
|
|
|
e2fsprogs=$($build ./pkgs.nix -A e2fsprogsDiet)
|
|
|
|
modutils=$($build ./pkgs.nix -A module_init_toolsStatic)
|
|
|
|
grub=$($build ./pkgs.nix -A grubWrapper)
|
|
|
|
mingettyWrapper=$($build ./pkgs.nix -A mingettyWrapper)
|
|
|
|
dhcp=$($build ./pkgs.nix -A dhcpWrapper)
|
|
|
|
gnugrep=$($build ./pkgs.nix -A gnugrep)
|
|
|
|
which=$($build ./pkgs.nix -A which)
|
|
|
|
eject=$($build ./pkgs.nix -A eject)
|
|
|
|
sysklogd=$($build ./pkgs.nix -A sysklogd)
|
|
|
|
#kudzu=$($build ./pkgs.nix -A kudzu)
|
2005-08-01 17:30:45 +00:00
|
|
|
|
|
|
|
echo creating directories for bootimage
|
|
|
|
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/mkdir ${initdir}
|
|
|
|
$coreutils/bin/mkdir ${initdir}/bin
|
|
|
|
$coreutils/bin/mkdir ${initdir}/cdrom
|
|
|
|
$coreutils/bin/mkdir ${initdir}/dev
|
|
|
|
$coreutils/bin/mkdir ${initdir}/etc
|
|
|
|
$coreutils/bin/mkdir ${initdir}/etc/sysconfig
|
|
|
|
$coreutils/bin/mkdir ${initdir}/installimage
|
2006-08-08 20:24:33 +00:00
|
|
|
$coreutils/bin/mkdir ${initdir}/lib
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/mkdir ${initdir}/modules
|
|
|
|
$coreutils/bin/mkdir ${initdir}/proc
|
|
|
|
$coreutils/bin/mkdir ${initdir}/sbin
|
|
|
|
$coreutils/bin/mkdir ${initdir}/sys
|
|
|
|
$coreutils/bin/mkdir ${initdir}/tmp
|
|
|
|
$coreutils/bin/mkdir -p ${initdir}/usr/bin
|
|
|
|
$coreutils/bin/mkdir -p ${initdir}/usr/sbin
|
|
|
|
$coreutils/bin/mkdir ${initdir}/var
|
|
|
|
$coreutils/bin/mkdir ${initdir}/var/run
|
2006-08-08 20:24:33 +00:00
|
|
|
$coreutils/bin/mkdir -p ${initdir}/var/state/dhcp
|
2005-08-01 17:30:45 +00:00
|
|
|
|
2005-07-31 13:11:44 +00:00
|
|
|
echo copying nixpkgs
|
|
|
|
|
2005-09-30 15:22:08 +00:00
|
|
|
#svn export ${nixpkgs} ${archivesDir}/pkgs
|
2006-11-01 12:07:22 +00:00
|
|
|
(cd $nixpkgs && tar -zcf ${archivesDir}/nixpkgs.tgz .)
|
2005-07-31 13:11:44 +00:00
|
|
|
|
2005-08-27 00:36:07 +00:00
|
|
|
#echo copying packages from store
|
2005-07-31 13:11:44 +00:00
|
|
|
|
|
|
|
echo copying scripts
|
|
|
|
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/mkdir ${archivesDir}/scripts
|
|
|
|
$coreutils/bin/cp -fa * ${archivesDir}/scripts
|
2006-07-03 08:39:52 +00:00
|
|
|
$gnused/bin/sed -e "s^@bash\@^$bash^g" \
|
2005-08-31 12:02:28 +00:00
|
|
|
-e "s^@coreutils\@^$coreutilsdiet^g" \
|
2006-08-06 23:59:31 +00:00
|
|
|
-e "s^@busybox\@^$busybox^g" \
|
2005-08-31 12:02:28 +00:00
|
|
|
< $initscript > $initscript.tmp
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/mv $initscript.tmp $initscript
|
2006-07-03 08:39:52 +00:00
|
|
|
$gnused/bin/sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
|
2005-07-06 16:00:20 +00:00
|
|
|
-e "s^@bootPath\@^$bootPath^g" \
|
2005-10-11 19:39:41 +00:00
|
|
|
-e "s^@nix\@^$nix^g" \
|
2005-08-01 17:30:45 +00:00
|
|
|
-e "s^@bash\@^$bash^g" \
|
2005-12-24 21:15:24 +00:00
|
|
|
-e "s^@bashGlibc\@^$bashGlibc^g" \
|
2005-08-03 12:00:42 +00:00
|
|
|
-e "s^@findutils\@^$findutils^g" \
|
2006-08-06 23:59:31 +00:00
|
|
|
-e "s^@busybox\@^$busybox^g" \
|
2005-08-28 16:56:48 +00:00
|
|
|
-e "s^@coreutilsdiet\@^$coreutilsdiet^g" \
|
2005-08-03 12:00:42 +00:00
|
|
|
-e "s^@coreutils\@^$coreutils^g" \
|
2005-12-24 11:50:42 +00:00
|
|
|
-e "s^@utilLinux\@^$utilLinux^g" \
|
2005-08-03 12:00:42 +00:00
|
|
|
-e "s^@utillinux\@^$utillinux^g" \
|
2005-08-05 13:48:22 +00:00
|
|
|
-e "s^@e2fsprogs\@^$e2fsprogs^g" \
|
2005-08-09 16:51:26 +00:00
|
|
|
-e "s^@modutils\@^$modutils^g" \
|
2005-08-12 23:40:12 +00:00
|
|
|
-e "s^@grub\@^$grub^g" \
|
2005-08-14 01:40:36 +00:00
|
|
|
-e "s^@kernel\@^$kernel^g" \
|
2006-08-07 19:48:18 +00:00
|
|
|
-e "s^@kernelscripts\@^$kernelscripts^g" \
|
2005-08-23 16:53:39 +00:00
|
|
|
-e "s^@gnugrep\@^$gnugrep^g" \
|
2005-08-25 23:10:36 +00:00
|
|
|
-e "s^@which\@^$which^g" \
|
2006-08-08 20:24:33 +00:00
|
|
|
-e "s^@dhcp\@^$dhcp^g" \
|
2005-09-30 15:22:08 +00:00
|
|
|
-e "s^@sysklogd\@^$sysklogd^g" \
|
2005-08-26 16:06:52 +00:00
|
|
|
-e "s^@gnutar\@^$gnutar^g" \
|
2006-08-03 13:43:44 +00:00
|
|
|
-e "s^@gzip\@^$gzip^g" \
|
2005-08-28 00:51:34 +00:00
|
|
|
-e "s^@mingetty\@^$mingettyWrapper^g" \
|
2005-07-06 16:00:20 +00:00
|
|
|
< $fill_disk > $fill_disk.tmp
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/mv $fill_disk.tmp $fill_disk
|
2005-07-31 13:11:44 +00:00
|
|
|
|
2006-07-03 08:39:52 +00:00
|
|
|
$gnused/bin/sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
|
2005-08-31 12:58:46 +00:00
|
|
|
-e "s^@bootPath\@^$bootPath^g" \
|
2006-06-24 22:14:43 +00:00
|
|
|
-e "s^@NIX\@^$nix^g" \
|
2005-08-31 12:58:46 +00:00
|
|
|
-e "s^@bash\@^$bash^g" \
|
|
|
|
-e "s^@findutils\@^$findutils^g" \
|
|
|
|
-e "s^@coreutilsdiet\@^$coreutilsdiet^g" \
|
|
|
|
-e "s^@coreutils\@^$coreutils^g" \
|
2005-12-24 11:50:42 +00:00
|
|
|
-e "s^@utillinux\@^$utilLinux^g" \
|
2005-08-31 12:58:46 +00:00
|
|
|
-e "s^@e2fsprogs\@^$e2fsprogs^g" \
|
|
|
|
-e "s^@modutils\@^$modutils^g" \
|
|
|
|
-e "s^@grub\@^$grub^g" \
|
|
|
|
-e "s^@kernel\@^$kernel^g" \
|
2006-08-07 19:48:18 +00:00
|
|
|
-e "s^@kernelscripts\@^$kernelscripts^g" \
|
2005-08-31 12:58:46 +00:00
|
|
|
-e "s^@gnugrep\@^$gnugrep^g" \
|
|
|
|
-e "s^@which\@^$which^g" \
|
|
|
|
-e "s^@gnutar\@^$gnutar^g" \
|
|
|
|
-e "s^@mingetty\@^$mingettyWrapper^g" \
|
2006-08-27 14:14:59 +00:00
|
|
|
-e "s^@busybox\@^$busybox^g" \
|
2005-08-31 12:58:46 +00:00
|
|
|
< $ramdisk_login > $ramdisk_login.tmp
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/mv $ramdisk_login.tmp $ramdisk_login
|
2005-08-31 12:58:46 +00:00
|
|
|
|
2006-08-27 14:14:59 +00:00
|
|
|
$gnused/bin/sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
|
|
|
|
-e "s^@bootPath\@^$bootPath^g" \
|
|
|
|
-e "s^@NIX\@^$nix^g" \
|
|
|
|
-e "s^@bash\@^$bash^g" \
|
|
|
|
-e "s^@findutils\@^$findutils^g" \
|
|
|
|
-e "s^@coreutilsdiet\@^$coreutilsdiet^g" \
|
|
|
|
-e "s^@coreutils\@^$coreutils^g" \
|
|
|
|
-e "s^@utillinux\@^$utilLinux^g" \
|
|
|
|
-e "s^@e2fsprogs\@^$e2fsprogs^g" \
|
|
|
|
-e "s^@modutils\@^$modutils^g" \
|
|
|
|
-e "s^@grub\@^$grub^g" \
|
|
|
|
-e "s^@kernel\@^$kernel^g" \
|
|
|
|
-e "s^@kernelscripts\@^$kernelscripts^g" \
|
|
|
|
-e "s^@gnugrep\@^$gnugrep^g" \
|
|
|
|
-e "s^@which\@^$which^g" \
|
|
|
|
-e "s^@gnutar\@^$gnutar^g" \
|
|
|
|
-e "s^@mingetty\@^$mingettyWrapper^g" \
|
|
|
|
-e "s^@busybox\@^$busybox^g" \
|
2006-08-30 00:15:02 +00:00
|
|
|
-e "s^@nano\@^$nanoDiet^g" \
|
2006-08-27 14:14:59 +00:00
|
|
|
< $login_script > $login_script.tmp
|
|
|
|
$coreutils/bin/mv $login_script.tmp $login_script
|
|
|
|
|
2005-07-31 13:11:44 +00:00
|
|
|
echo copying bootimage
|
|
|
|
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/mkdir ${archivesDir}/isolinux
|
|
|
|
$coreutils/bin/cp ${syslinux}/lib/syslinux/isolinux.bin ${archivesDir}/isolinux
|
|
|
|
$coreutils/bin/cp isolinux.cfg ${archivesDir}/isolinux
|
|
|
|
$coreutils/bin/chmod u+w ${archivesDir}/isolinux/*
|
2005-07-31 15:25:39 +00:00
|
|
|
|
|
|
|
echo copying kernel
|
|
|
|
|
|
|
|
# By following the symlink we don't have to know the version number
|
|
|
|
# of the kernel here.
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/cp -L $kernel/vmlinuz ${archivesDir}/isolinux
|
2005-07-31 15:25:39 +00:00
|
|
|
|
2006-08-08 20:24:33 +00:00
|
|
|
strippedName=$(basename $kernel);
|
|
|
|
if echo "$strippedName" | grep -q '^[a-z0-9]\{32\}-'; then
|
|
|
|
strippedName=$(echo "$strippedName" | cut -c34- | cut -c 7-)
|
|
|
|
fi
|
|
|
|
|
|
|
|
kernelhash=$(basename $root/$kernel);
|
|
|
|
if echo "$kernelhash" | grep -q '^[a-z0-9]\{32\}-'; then
|
|
|
|
kernelhash=$(echo "$kernelhash" | cut -c -32)
|
|
|
|
fi
|
2005-12-24 11:50:42 +00:00
|
|
|
|
2006-08-08 20:24:33 +00:00
|
|
|
version=$strippedName-$kernelhash
|
|
|
|
|
|
|
|
echo version: $version
|
|
|
|
|
|
|
|
#echo linking kernel modules
|
|
|
|
#$coreutils/bin/ln -s $kernel/lib $archivesDir/lib
|
|
|
|
|
|
|
|
echo copying network drivers
|
|
|
|
#$coreutils/bin/cp -fau --parents --no-preserve=mode $kernel/lib/modules/*/modules.* $archivesDir
|
|
|
|
#$coreutils/bin/cp -fau --parents --no-preserve=mode $kernel/lib/modules/*/kernel/drivers/net/* $archivesDir
|
|
|
|
|
|
|
|
$gnutar/bin/tar -cf - $kernel/lib/modules/*/modules.* | $gnutar/bin/tar --directory=$archivesDir --strip-components 3 -xf -
|
|
|
|
$gnutar/bin/tar -cf - $kernel/lib/modules/*/kernel/drivers/net/* | $gnutar/bin/tar --directory=$archivesDir --strip-components 3 -xf -
|
2005-12-24 11:50:42 +00:00
|
|
|
|
2005-08-01 17:30:45 +00:00
|
|
|
echo creating ramdisk
|
|
|
|
|
2006-08-08 20:24:33 +00:00
|
|
|
umask 0022
|
|
|
|
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/rm -f ${initrd}
|
2005-08-31 12:02:28 +00:00
|
|
|
#cp ${archivesDir}/scripts/fill-disk.sh ${initdir}/init
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/cp ${archivesDir}/scripts/fill-disk.sh ${initdir}/
|
|
|
|
$coreutils/bin/cp ${archivesDir}/scripts/ramdisk-login.sh ${initdir}/
|
2006-08-27 14:14:59 +00:00
|
|
|
$coreutils/bin/cp ${archivesDir}/scripts/login.sh ${initdir}/
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/cp ${archivesDir}/scripts/init.sh ${initdir}/init
|
2005-12-24 11:50:42 +00:00
|
|
|
#ln -s ${bash}/bin/bash ${initdir}/bin/sh
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/cp ${bash}/bin/bash ${initdir}/bin/sh
|
|
|
|
$coreutils/bin/chmod u+x ${initdir}/init
|
|
|
|
$coreutils/bin/chmod u+x ${initdir}/fill-disk.sh
|
|
|
|
$coreutils/bin/chmod u+x ${initdir}/ramdisk-login.sh
|
2006-08-27 14:14:59 +00:00
|
|
|
$coreutils/bin/chmod u+x ${initdir}/login.sh
|
2005-12-24 11:50:42 +00:00
|
|
|
#cp -fau --parents ${utilLinux} ${initdir}
|
|
|
|
#cp -fau --parents ${coreUtilsDiet} ${initdir}
|
|
|
|
#cp -fau --parents ${modUtils} ${initdir}
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/cp -fau --parents ${bash}/bin ${initdir}
|
2006-08-06 23:59:31 +00:00
|
|
|
#$coreutils/bin/cp -fau --parents ${utilLinux}/bin ${initdir}
|
|
|
|
#$coreutils/bin/chmod -R u+w ${initdir}
|
|
|
|
#$coreutils/bin/cp -fau --parents ${utilLinux}/sbin ${initdir}
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/cp -fau --parents ${e2fsProgs} ${initdir}
|
2006-08-06 23:59:31 +00:00
|
|
|
#$coreutils/bin/cp -fau --parents ${coreutilsdiet}/bin ${initdir}
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/cp -fau --parents ${modutils}/bin ${initdir}
|
|
|
|
$coreutils/bin/chmod -R u+w ${initdir}
|
|
|
|
$coreutils/bin/cp -fau --parents ${modutils}/sbin ${initdir}
|
2006-08-06 23:59:31 +00:00
|
|
|
$coreutils/bin/cp -fau --parents ${busybox} ${initdir}
|
2006-08-30 00:15:02 +00:00
|
|
|
$coreutils/bin/cp -fau --parents ${nanoDiet} ${initdir}
|
2006-08-30 00:40:15 +00:00
|
|
|
$coreutils/bin/cp -fau --parents ${ncurses} ${initdir}
|
2005-08-03 12:00:42 +00:00
|
|
|
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/touch ${archivesDir}/NIXOS
|
2005-08-11 14:06:04 +00:00
|
|
|
|
2006-07-03 23:16:44 +00:00
|
|
|
(cd ${initdir}; find . |$cpio/bin/cpio -H newc -o) | $gzip/bin/gzip -9 > ${initrd}
|
2005-08-01 17:30:45 +00:00
|
|
|
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/chmod -f -R +w ${initdir}/*
|
|
|
|
$coreutils/bin/rm -rf ${initdir}
|
2005-08-19 15:26:01 +00:00
|
|
|
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/cp ${initrd} ${archivesDir}/isolinux
|
|
|
|
$coreutils/bin/rm -f ${initrd}
|
2005-07-31 15:25:39 +00:00
|
|
|
|
|
|
|
echo creating ISO image
|
|
|
|
|
2006-07-03 09:32:15 +00:00
|
|
|
$cdrtools/bin/mkisofs -rJ -o ${bootiso} -b isolinux/isolinux.bin \
|
|
|
|
-c isolinux/boot.cat -no-emul-boot -boot-load-size 4 \
|
|
|
|
-boot-info-table ${archivesDir}
|
2005-08-09 16:51:26 +00:00
|
|
|
|
2005-08-14 01:40:36 +00:00
|
|
|
# cleanup, be diskspace friendly
|
2005-08-16 21:46:08 +00:00
|
|
|
|
|
|
|
echo cleaning up
|
|
|
|
|
2006-07-03 22:20:22 +00:00
|
|
|
$coreutils/bin/chmod -f -R +w ${archivesDir}/*
|
2005-12-24 11:50:42 +00:00
|
|
|
#rm -rf ${archivesDir}/*
|