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".
This commit is contained in:
parent
1d674abe9c
commit
67bed722f2
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -2,8 +2,6 @@ enum {
|
|||
Debug = 0,
|
||||
};
|
||||
|
||||
extern char* bootdisk;
|
||||
|
||||
extern void fatal(char*);
|
||||
extern int readfile(char*, char*, int);
|
||||
extern void run(char*, ...);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -37,9 +37,6 @@ ip
|
|||
port
|
||||
int cpuserver = 1;
|
||||
|
||||
boot cpu
|
||||
tcp
|
||||
|
||||
bootdir
|
||||
/power/bin/rc
|
||||
/rc/lib/rcmain
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue