summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-12-14 22:10:34 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-12-14 22:10:34 +0100
commit67bed722f21cb216a0fcc3d3ebebf161b09439d4 (patch)
tree6a4b705d247c9cdeba59acfdd63cb5470aa67802
parent1d674abe9cdb20c59852fe096412a6890314f99a (diff)
downloadplan9front-67bed722f21cb216a0fcc3d3ebebf161b09439d4.tar.xz
kernel: get rid of /boot/boot parametrization
there is no use for "bootdisk" variable parametrization of /boot/boot and no point for the boot section with its boot methods in the kernel configuration anymore. so mkboot and boot$CONF.out are gone. move the rules for bootfs.paq creation in 9/boot/bootmkfile. location of bootfs.proto is now in 9/boot/bootfs.proto. our /boot/boot target is now just "boot".
-rw-r--r--sys/src/9/alphapc/apc6
-rw-r--r--sys/src/9/alphapc/apccpu12
-rw-r--r--sys/src/9/bcm/picpuf6
-rw-r--r--sys/src/9/bcm/pif7
-rw-r--r--sys/src/9/bitsy/bitsy10
-rw-r--r--sys/src/9/boot/boot.c3
-rw-r--r--sys/src/9/boot/boot.h2
-rw-r--r--sys/src/9/boot/bootfs.proto (renamed from sys/src/9/port/bootfs.proto)0
-rw-r--r--sys/src/9/boot/bootmkfile27
-rwxr-xr-xsys/src/9/boot/mkboot33
-rw-r--r--sys/src/9/kw/plug6
-rw-r--r--sys/src/9/mtx/mtx12
-rw-r--r--sys/src/9/mtx/mtxcpu11
-rw-r--r--sys/src/9/omap/beagle6
-rw-r--r--sys/src/9/omap4/panda6
-rw-r--r--sys/src/9/pc/pccpuf6
-rw-r--r--sys/src/9/pc/pcf6
-rw-r--r--sys/src/9/pc64/pc646
-rw-r--r--sys/src/9/pc64/pccpu646
-rw-r--r--sys/src/9/port/portmkfile20
-rw-r--r--sys/src/9/ppc/blast3
-rw-r--r--sys/src/9/teg2/ts5
-rw-r--r--sys/src/9/xen/xenpcf6
23 files changed, 53 insertions, 152 deletions
diff --git a/sys/src/9/alphapc/apc b/sys/src/9/alphapc/apc
index ecfd0b602..83608e1cd 100644
--- a/sys/src/9/alphapc/apc
+++ b/sys/src/9/alphapc/apc
@@ -55,12 +55,8 @@ ip
port
int cpuserver = 0;
-boot boot
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/alphapc/apccpu b/sys/src/9/alphapc/apccpu
index f8ed97149..21b5b1110 100644
--- a/sys/src/9/alphapc/apccpu
+++ b/sys/src/9/alphapc/apccpu
@@ -49,12 +49,8 @@ ip
port
int cpuserver = 1;
-boot cpu
- tcp
-
bootdir
- bootapccpu.out boot
- /alpha/bin/ip/ipconfig
- /alpha/bin/auth/factotum
-
-
+ /$objtype/bin/paqfs
+ /$objtype/bin/auth/factotum
+ bootfs.paq
+ boot
diff --git a/sys/src/9/bcm/picpuf b/sys/src/9/bcm/picpuf
index c3141f1af..70cd23eff 100644
--- a/sys/src/9/bcm/picpuf
+++ b/sys/src/9/bcm/picpuf
@@ -45,12 +45,8 @@ misc
port
int cpuserver = 1;
-boot boot #S/sdM0/
- local
- tcp
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/bcm/pif b/sys/src/9/bcm/pif
index ef376f805..a7b65a05a 100644
--- a/sys/src/9/bcm/pif
+++ b/sys/src/9/bcm/pif
@@ -45,12 +45,9 @@ misc
port
int cpuserver = 0;
-boot boot #S/sdM0/
- local
- tcp
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
+
diff --git a/sys/src/9/bitsy/bitsy b/sys/src/9/bitsy/bitsy
index b87c7354e..8f4c5c753 100644
--- a/sys/src/9/bitsy/bitsy
+++ b/sys/src/9/bitsy/bitsy
@@ -41,9 +41,9 @@ misc
port
int cpuserver = 1;
-boot cpu
-boot
- paq
bootdir
- bootbitsy.out boot
- /arm/bin/paqfs paqfs
+ /$objtype/bin/paqfs
+ /$objtype/bin/auth/factotum
+ bootfs.paq
+ boot
+
diff --git a/sys/src/9/boot/boot.c b/sys/src/9/boot/boot.c
index 96ea7fc26..4daf5a661 100644
--- a/sys/src/9/boot/boot.c
+++ b/sys/src/9/boot/boot.c
@@ -5,7 +5,7 @@
#include "../boot/boot.h"
void
-boot(int argc, char *argv[])
+main(int argc, char *argv[])
{
char cputype[64];
char buf[32];
@@ -36,7 +36,6 @@ boot(int argc, char *argv[])
USED(argc);
readfile("#e/cputype", cputype, sizeof(cputype));
- setenv("bootdisk", bootdisk, 0);
/* setup the boot namespace */
bind("/boot", "/bin", MAFTER);
diff --git a/sys/src/9/boot/boot.h b/sys/src/9/boot/boot.h
index 4cb7400bb..c72622807 100644
--- a/sys/src/9/boot/boot.h
+++ b/sys/src/9/boot/boot.h
@@ -2,8 +2,6 @@ enum {
Debug = 0,
};
-extern char* bootdisk;
-
extern void fatal(char*);
extern int readfile(char*, char*, int);
extern void run(char*, ...);
diff --git a/sys/src/9/port/bootfs.proto b/sys/src/9/boot/bootfs.proto
index 33df1759f..33df1759f 100644
--- a/sys/src/9/port/bootfs.proto
+++ b/sys/src/9/boot/bootfs.proto
diff --git a/sys/src/9/boot/bootmkfile b/sys/src/9/boot/bootmkfile
index 0b873ae7a..e2c73d7eb 100644
--- a/sys/src/9/boot/bootmkfile
+++ b/sys/src/9/boot/bootmkfile
@@ -1,18 +1,29 @@
BOOTDIR=../boot
-BOOTLIB=$BOOTDIR/libboot.a$O
BOOTFILES=\
aux.$O\
boot.$O\
-
-$BOOTLIB(%.$O):N: %.$O
-
-$BOOTLIB: ${BOOTFILES:%=$BOOTLIB(%)}
- names=`{membername $newprereq}
- ar vu $BOOTLIB $names
- rm $names
+ printstub.$O\
$BOOTFILES: $BOOTDIR/boot.h
%.$O: $BOOTDIR/%.c
$CC -I$BOOTDIR $CFLAGS $BOOTDIR/$stem.c
+
+boot: $BOOTFILES
+ $LD -o $target $BOOTFILES
+
+BOOTFSPROTO=$BOOTDIR/bootfs.proto
+
+bootfs.paq: $BOOTFSPROTO \
+ `{disk/mkfs -s / -ax $BOOTFSPROTO >[2]/dev/null \
+ | awk '/^end of archive/{exit}{print $1}' \
+ | while(x=`{read}){test -f $x && echo $x}}
+ mkdir -p bootfs
+ disk/mkfs -s / -d bootfs $BOOTFSPROTO
+ @{
+ cd bootfs/$objtype/bin
+ strip * */* */*/* >[2]/dev/null || status=''
+ }
+ mkpaqfs -o $target bootfs
+ rm -rf bootfs
diff --git a/sys/src/9/boot/mkboot b/sys/src/9/boot/mkboot
deleted file mode 100755
index 339a700a3..000000000
--- a/sys/src/9/boot/mkboot
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/rc
-#
-# this file configures a boot program (/boot) for a kernel.
-#
-if(! ~ $#* 1){
- echo usage: mkboot file >[1=2]
- exit 1
-}
-
-cat <<'---'
-#include <u.h>
-#include <libc.h>
-#include "../boot/boot.h"
-
----
-
-awk '
- BEGIN { bootprog = "boot"; bootdisk = "/dev/sdC0/"; }
- $0 ~ "^boot" && $2=="cpu"\
- { if(NF == 4 && $3 == "boot")
- bootdisk = $4
- }
- $0 ~ "^boot" && $2=="boot" && NF==3\
- { bootdisk = $3 }
- END { print "char* bootdisk = \"" bootdisk "\";"
- print "extern void " bootprog "(int, char**);"
- print "void"
- print "main(int argc, char **argv)"
- print "{"
- print "\t" bootprog "(argc, argv);"
- print "}"
- }
-' $1
diff --git a/sys/src/9/kw/plug b/sys/src/9/kw/plug
index 3ff558d78..281d6837f 100644
--- a/sys/src/9/kw/plug
+++ b/sys/src/9/kw/plug
@@ -66,12 +66,8 @@ port
int cpuserver = 1;
int i8250freq = 3686000;
-boot cpu
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/mtx/mtx b/sys/src/9/mtx/mtx
index 47c2441f5..01dcd101d 100644
--- a/sys/src/9/mtx/mtx
+++ b/sys/src/9/mtx/mtx
@@ -36,11 +36,11 @@ ip
port
int cpuserver = 0;
-boot
- tcp
-
bootdir
- bootmtx.out boot
- /power/bin/ip/ipconfig
- /power/bin/auth/factotum
+ /$objtype/bin/paqfs
+ /$objtype/bin/auth/factotum
+ bootfs.paq
+ boot
+
+
diff --git a/sys/src/9/mtx/mtxcpu b/sys/src/9/mtx/mtxcpu
index b64090725..c95629847 100644
--- a/sys/src/9/mtx/mtxcpu
+++ b/sys/src/9/mtx/mtxcpu
@@ -36,11 +36,8 @@ ip
port
int cpuserver = 1;
-boot cpu
- tcp
-
bootdir
- bootmtxcpu.out boot
- ipconfig.hack ipconfig
- factotum.hack factotum
-
+ /$objtype/bin/paqfs
+ /$objtype/bin/auth/factotum
+ bootfs.paq
+ boot
diff --git a/sys/src/9/omap/beagle b/sys/src/9/omap/beagle
index e67ef9e3e..5306731b0 100644
--- a/sys/src/9/omap/beagle
+++ b/sys/src/9/omap/beagle
@@ -69,12 +69,8 @@ port
int cpuserver = 1;
int i8250freq = 3686000;
-boot cpu
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/omap4/panda b/sys/src/9/omap4/panda
index 1df7580ad..5481a31b8 100644
--- a/sys/src/9/omap4/panda
+++ b/sys/src/9/omap4/panda
@@ -66,12 +66,8 @@ misc
port
int cpuserver = 1;
-boot cpu
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/pc/pccpuf b/sys/src/9/pc/pccpuf
index 8ad34961b..98c852e1f 100644
--- a/sys/src/9/pc/pccpuf
+++ b/sys/src/9/pc/pccpuf
@@ -142,12 +142,8 @@ ip
port
int cpuserver = 1;
-boot cpu
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/pc/pcf b/sys/src/9/pc/pcf
index 2fe6f11b0..00de2cd0a 100644
--- a/sys/src/9/pc/pcf
+++ b/sys/src/9/pc/pcf
@@ -143,12 +143,8 @@ ip
port
int cpuserver = 0;
-boot boot
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/pc64/pc64 b/sys/src/9/pc64/pc64
index 538dedec1..0512bec61 100644
--- a/sys/src/9/pc64/pc64
+++ b/sys/src/9/pc64/pc64
@@ -141,12 +141,8 @@ ip
port
int cpuserver = 0;
-boot boot
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/pc64/pccpu64 b/sys/src/9/pc64/pccpu64
index 1aed2b8b7..ef82503d3 100644
--- a/sys/src/9/pc64/pccpu64
+++ b/sys/src/9/pc64/pccpu64
@@ -141,12 +141,8 @@ ip
port
int cpuserver = 1;
-boot boot
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/port/portmkfile b/sys/src/9/port/portmkfile
index 0ecfbd80c..a3e200111 100644
--- a/sys/src/9/port/portmkfile
+++ b/sys/src/9/port/portmkfile
@@ -30,7 +30,7 @@ all:V:
mk 'CONF='$i
clean:V:
- rm -f *.[$OS] *.i *.root.s *.rootc.c cfs.h fs.h init.h conf.h *.out *.m errstr.h bootfs.paq
+ rm -f *.[$OS] *.i *.root.s *.rootc.c cfs.h fs.h init.h conf.h *.out *.m errstr.h boot bootfs.paq
for(i in $CONFLIST $CRAPLIST)
mk $i.clean
@@ -87,21 +87,3 @@ unthwack.$O: ../port/thwack.h
devsdp.$O: ../port/thwack.h
devproc.$O sysproc.$O: /sys/include/tos.h
devproc.$O edf.$O proc.$O: /sys/include/trace.h
-
-boot$CONF.out: $CONF printstub.$O $BOOTLIB
- $BOOTDIR/mkboot $CONF > boot$CONF.c
- $CC $CFLAGS boot$CONF.c
- $LD -o boot$CONF.out boot$CONF.$O printstub.$O $BOOTLIB
-
-bootfs.paq: ../port/bootfs.proto \
- `{disk/mkfs -s / -ax ../port/bootfs.proto >[2]/dev/null \
- | awk '/^end of archive/{exit}{print $1}' \
- | while(x=`{read}){test -f $x && echo $x}}
- mkdir -p bootfs
- disk/mkfs -s / -d bootfs ../port/bootfs.proto
- @{
- cd bootfs/$objtype/bin
- strip * */* */*/* >[2]/dev/null || status=''
- }
- mkpaqfs -o $target bootfs
- rm -rf bootfs
diff --git a/sys/src/9/ppc/blast b/sys/src/9/ppc/blast
index 5581d7a40..8dd4b8028 100644
--- a/sys/src/9/ppc/blast
+++ b/sys/src/9/ppc/blast
@@ -37,9 +37,6 @@ ip
port
int cpuserver = 1;
-boot cpu
- tcp
-
bootdir
/power/bin/rc
/rc/lib/rcmain
diff --git a/sys/src/9/teg2/ts b/sys/src/9/teg2/ts
index 3b444c2f1..236e5923e 100644
--- a/sys/src/9/teg2/ts
+++ b/sys/src/9/teg2/ts
@@ -77,11 +77,8 @@ port
int cpuserver = 1;
int i8250freq = 3686000;
-boot cpu
- tcp
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
diff --git a/sys/src/9/xen/xenpcf b/sys/src/9/xen/xenpcf
index 1f4074496..56cfd341f 100644
--- a/sys/src/9/xen/xenpcf
+++ b/sys/src/9/xen/xenpcf
@@ -49,14 +49,10 @@ ip
port
int cpuserver = 0;
-boot boot
- tcp
- local
-
bootdir
- boot$CONF.out boot
/$objtype/bin/paqfs
/$objtype/bin/auth/factotum
bootfs.paq
+ boot
xenstore