summaryrefslogtreecommitdiff
path: root/sys/src/9/boot
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-06-04 07:18:11 +0000
committercinap_lenrek <cinap_lenrek@centraldogma>2011-06-04 07:18:11 +0000
commitf55d5517ed35c21b26c3e5eb0211f9a02f341ee1 (patch)
tree2fc160cd977b0d18a5e8cc892e30ad1a02b7324c /sys/src/9/boot
parent792b186b3a1d3360592d085062cab81d725f76c7 (diff)
boot(8): strip bootfs
Diffstat (limited to 'sys/src/9/boot')
-rw-r--r--sys/src/9/boot/boot.c4
-rw-r--r--sys/src/9/boot/bootrc17
2 files changed, 8 insertions, 13 deletions
diff --git a/sys/src/9/boot/boot.c b/sys/src/9/boot/boot.c
index 420831b4a..496dbd665 100644
--- a/sys/src/9/boot/boot.c
+++ b/sys/src/9/boot/boot.c
@@ -55,12 +55,12 @@ boot(int argc, char *argv[])
setenv("bootdisk", bootdisk, 0);
/* setup the boot namespace */
- run("/boot/paqfs", "-m" "/root", "/boot/bootfs.paq", nil);
+ bind("/boot", "/bin", MAFTER);
+ run("/bin/paqfs", "-q", "-c", "8", "-m" "/root", "/boot/bootfs.paq", nil);
bind("/root", "/", MAFTER);
snprint(buf, sizeof(buf), "/%s/bin", cputype);
bind(buf, "/bin", MAFTER);
bind("/rc/bin", "/bin", MAFTER);
- bind("/boot", "/bin", MAFTER);
switch(pid = rfork(RFFDG|RFREND|RFPROC)){
case -1:
diff --git a/sys/src/9/boot/bootrc b/sys/src/9/boot/bootrc
index 697eb961e..f8f238df8 100644
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -4,13 +4,9 @@ mntgen -s slash /mnt
bind /root /mnt/broot
unmount /root
-ramfs
-
bind -q '#p' /proc
-
-for(i in S f k æ t){
+for(i in S f k æ t)
bind -a '#'^$i /dev >/dev/null >[2=1]
-}
for(i in init user nvram rootdir bootargs nobootprompt sysname \
debugfactotum fs fsaddr auth authaddr){
@@ -64,9 +60,10 @@ fn main{
if not bootargs=$nobootprompt
mn=`{echo $bootargs | awk -F! '{print $1}'}
ma=`{echo $bootargs | sed 's/[^!]*!?//'}
- for(i in `{seq 1 $#mt}){
- if(~ $mt($i) m$"mn)
- mp=$$mt($i)
+ switch(m$"mn){
+ case $mt
+ mp=m$mn
+ mp=$$mp
}
}
@@ -105,7 +102,6 @@ fn main{
# remove part of our temporary root
/mnt/broot/$cputype/bin/unmount /$cputype/bin /bin
/mnt/broot/$cputype/bin/unmount /rc/bin /bin
- /mnt/broot/$cputype/bin/unmount /tmp
/mnt/broot/$cputype/bin/unmount /
# create the name space, mount the root fs
@@ -139,14 +135,13 @@ if(test -e '#u' && test -x /bin/usb/usbd){
}
# bind in an ip interface
-for(i in I l`{seq 0 3})
+for(i in I l^(0 1 2 3))
bind -qa '#'$i /net
configlocal # add partitions and binds
while(){
@{main}
- sleep 1
# cleanup so it can be restarted
nobootprompt=()