From 6e7614fdb0d9a4896b9041ab69656fb917804df9 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Sat, 20 Aug 2005 21:49:53 +0000 Subject: [PATCH] use module-init-tools instead of modutils. Now we can insert modules :) svn path=/nixu/trunk/; revision=3650 --- boot/builder.sh | 1 + boot/default.nix | 4 ++-- boot/env.sh | 2 +- fill-disk.sh | 15 +++++++++++++++ init/default.nix | 4 ++-- make-disk.sh | 4 ++-- pkgs.nix | 6 +++--- 7 files changed, 26 insertions(+), 10 deletions(-) diff --git a/boot/builder.sh b/boot/builder.sh index 4b637748adef..ae2fdbf32b64 100755 --- a/boot/builder.sh +++ b/boot/builder.sh @@ -35,6 +35,7 @@ for i in $boot $halt $login $env; do -e "s^@gzip\@^$gzip^g" \ -e "s^@gcc\@^$gcc^g" \ -e "s^@mingetty\@^$mingetty^g" \ + -e "s^@module_init_tools\@^$module_init_tools^g" \ -e "s^@grub\@^$grub^g" \ -e "s^@udev\@^$udev^g" \ -e "s^@out\@^$out^g" \ diff --git a/boot/default.nix b/boot/default.nix index 78c7c39c924f..0bfc2517361c 100644 --- a/boot/default.nix +++ b/boot/default.nix @@ -1,7 +1,7 @@ { stdenv, kernel, bash, coreutils, findutils, utillinux, sysvinit, e2fsprogs , nettools, nix, subversion, gcc, wget, which, vim, less, screen, openssh , binutils, strace, shadowutils, iputils, gnumake, curl, gnused, gnugrep -, gnutar, gzip, mingetty, grubWrapper, parted, modutils, hotplug, udev}: +, gnutar, gzip, mingetty, grubWrapper, parted, module_init_tools, hotplug, udev}: derivation { name = "boot"; @@ -14,5 +14,5 @@ derivation { inherit stdenv kernel bash coreutils findutils utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake curl gnused - gnutar gnugrep gzip mingetty grubWrapper parted modutils udev; + gnutar gnugrep gzip mingetty grubWrapper parted module_init_tools udev; } diff --git a/boot/env.sh b/boot/env.sh index 6ec13130b663..8366f5342134 100644 --- a/boot/env.sh +++ b/boot/env.sh @@ -1 +1 @@ -export PATH=@nix@/bin:@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@sysvinit@/bin:@sysvinit@/sbin:@e2fsprogs@/bin:@e2fsprogs@/sbin:@nettools@/bin:@nettools@/sbin:@gcc@/bin:@subversion@/bin:@which@/bin:@wget@/bin:@vim@/bin:@less@/bin:@screen@/bin:@openssh@/bin:@binutils@/bin:@strace@/bin:@shadowutils@/bin:@shadowutils@/sbin:@iputils@/bin:@gnumake@/bin:@curl@/bin:@gnused@/bin:@gnutar@/bin:@gnugrep@/bin:@gzip@/bin:@mingetty@/sbin:@grub@/bin:@grub@/sbin +export PATH=@nix@/bin:@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@sysvinit@/bin:@sysvinit@/sbin:@e2fsprogs@/bin:@e2fsprogs@/sbin:@nettools@/bin:@nettools@/sbin:@gcc@/bin:@subversion@/bin:@which@/bin:@wget@/bin:@vim@/bin:@less@/bin:@screen@/bin:@openssh@/bin:@binutils@/bin:@strace@/bin:@shadowutils@/bin:@shadowutils@/sbin:@iputils@/bin:@gnumake@/bin:@curl@/bin:@gnused@/bin:@gnutar@/bin:@gnugrep@/bin:@gzip@/bin:@mingetty@/sbin:@grub@/bin:@grub@/sbin:@module_init_tools@/sbin diff --git a/fill-disk.sh b/fill-disk.sh index 218260caf6cb..50c335ccc4db 100755 --- a/fill-disk.sh +++ b/fill-disk.sh @@ -150,6 +150,11 @@ make_dir 00755 /sys make_dir 01777 /tmp make_dir 00755 /usr make_dir 00755 /var +make_dir 00755 /var/log +make_dir 00755 /var/run +make_dir 00755 /var/spool +make_dir 00755 /var/state +make_dir 00755 /var/tmp ## ## Add a few devices to /dev on the install disk. This is by far complete. @@ -287,6 +292,16 @@ rm -f $root/etc/hosts echo "127.0.0.1 localhost" >> $root/etc/hosts echo "192.168.150.1 uml" >> $root/etc/hosts +### +### Do kernel stuff here. +### +strippedName=$(basename @kernel@); +if echo "$strippedName" | grep -q '^[a-z0-9]\{32\}-'; then + strippedName=$(echo "$strippedName" | cut -c34-) +fi + +echo "stripped" $strippedName + ### ### Do funky stuff with grub here. diff --git a/init/default.nix b/init/default.nix index fbb983cba2dd..39f8586f7ebd 100644 --- a/init/default.nix +++ b/init/default.nix @@ -1,4 +1,4 @@ -{ stdenv, bash, coreutils, utillinux, e2fsprogs, nix, shadowutils, mingetty, grubWrapper, parted, modutils, hotplug}: +{ stdenv, bash, coreutils, utillinux, e2fsprogs, nix, shadowutils, mingetty, grubWrapper, parted, module_init_tools, hotplug}: derivation { name = "init"; @@ -7,5 +7,5 @@ derivation { stage1 = ./prepare-disk.sh; stage2 = ./install-disk.sh; inherit stdenv bash coreutils utillinux e2fsprogs nix shadowutils - mingetty grubWrapper parted modutils; + mingetty grubWrapper parted module_init_tools; } diff --git a/make-disk.sh b/make-disk.sh index 3218fc8007d7..588f031d3dc7 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -47,7 +47,7 @@ echo $($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).ni utilLinux=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).utillinux' | $NIX_CMD_PATH/nix-instantiate -))) coreUtils=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).coreutils' | $NIX_CMD_PATH/nix-instantiate -))) e2fsProgs=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX_CMD_PATH/nix-instantiate -))) -modUtils=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).modutils' | $NIX_CMD_PATH/nix-instantiate -))) +modUtils=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).module_init_tools' | $NIX_CMD_PATH/nix-instantiate -))) Grub=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX_CMD_PATH/nix-instantiate -))) #gnuSed=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).gnused' | $NIX_CMD_PATH/nix-instantiate -))) #gnuGrep=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX_CMD_PATH/nix-instantiate -))) @@ -60,7 +60,7 @@ coreutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).coreutils' | findutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).findutils' | $NIX_CMD_PATH/nix-instantiate -)) utillinux=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).utillinux' | $NIX_CMD_PATH/nix-instantiate -)) e2fsprogs=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX_CMD_PATH/nix-instantiate -)) -modutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).modutils' | $NIX_CMD_PATH/nix-instantiate -)) +modutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).module_init_tools' | $NIX_CMD_PATH/nix-instantiate -)) grub=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX_CMD_PATH/nix-instantiate -)) hotplug=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).hotplug' | $NIX_CMD_PATH/nix-instantiate -)) udev=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).udev' | $NIX_CMD_PATH/nix-instantiate -)) diff --git a/pkgs.nix b/pkgs.nix index 7d5d568cb934..5a5065bcfe96 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -3,15 +3,15 @@ rec { stdenv kernel bash coreutils findutils utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake curl gnused gnutar gnugrep gzip - mingetty grubWrapper syslinux parted modutils hotplug udev; + mingetty grubWrapper syslinux parted module_init_tools hotplug udev; boot = (import ./boot) {inherit stdenv kernel bash coreutils findutils utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake curl - gnused gnutar gnugrep gzip mingetty grubWrapper parted modutils hotplug udev;}; + gnused gnutar gnugrep gzip mingetty grubWrapper parted module_init_tools hotplug udev;}; init = (import ./init) {inherit stdenv bash coreutils - utillinux e2fsprogs nix shadowutils mingetty grubWrapper parted modutils hotplug;}; + utillinux e2fsprogs nix shadowutils mingetty grubWrapper parted module_init_tools hotplug;}; everything = [boot init sysvinit kernel]; }