3 # this file configures a boot program (/boot) for a kernel.
6 echo usage: mkboot file >[1=2]
13 #include "../boot/boot.h"
18 BEGIN { cpuflag = 0; bootprog = "boot"; bootdisk = "#S/sdC0/"; rootdir = "/root"; }
19 $0 ~ "^boot" && $2=="cpu"\
21 if(NF == 4 && $3 == "boot")
24 $0 ~ "^boot" && $2=="rootdir" && NF==3\
26 $0 ~ "^boot" && ($2=="bboot" || $2=="romboot" || $2=="dosboot")\
27 { cpuflag = 1; bootprog = $2; }
28 $0 ~ "^boot" && $2=="boot" && NF==3\
30 END { print "int cpuflag = " cpuflag ";"
31 print "char* rootdir = \"" rootdir "\";"
32 print "char* bootdisk = \"" bootdisk "\";"
33 print "extern void " bootprog "(int, char**);"
35 print "main(int argc, char **argv)"
37 print "\t" bootprog "(argc, argv);"
43 # configure in a cache file system if a
44 # /386/bin/root appears in the bootdir section.
46 ../port/mkextract bootdir 0 $* | awk '
48 $1 ~ "bin/cfs$" { cfs = 1 }
50 print "int (*cfs)(int) = cache;"
52 print "int (*cfs)(int) = 0;"