|
|
1.1 root 1: #
2: # bld - make a complete COHERENT mwc kernel.
3: #
4: # $Log: bld,v $
5: # Revision 1.1 92/07/17 15:29:51 bin
6: # Initial revision
7: #
8: # Revision 1.3 92/01/10 10:09:12 hal
9: # Add "dbg" option.
10: # Default to rootdev = pipedev = (0,0).
11: #
12: #
13:
14: # Shell variables
15: # DRIVERS is the list of device drivers to be linked into the kernel.
16: # COH_TYPE is one of [ fl | at | ss | aha ] and is for information -
17: # it is the suffix on the name of the kernel produced.
18: # BOOTDEV is the device name for the COHERENT boot floppy or partition -
19: # it is passed to the "config" script.
20: # HD is the device driver name for the hard drive device driver linked
21: # into this kernel - it is one of [ aha154x | at | ss | ps], or
22: # may be omitted entirely for a floppy-only system.
23: # KB is one of [ kb | nkb ] - the first of these uses fixed keyboard
24: # tables and scan code set 1, and source is provided in the
25: # driver kit; use it if you are concerned about supporting
26: # keyboards of questionable compatibility or want to work with
27: # keyboard driver source - the second of these uses loadable
28: # keyboard tables for international support, but requires
29: # full compatibility, and source code is not provided in the
30: # driver kit.
31: # DEBUG is empty for normal kernels, is "dbg" if debug versions of
32: # kernel and drivers are wanted
33:
34: # Default arguments -
35: # use old kb driver, at hard disk, let tboot set rootdev & pipedev
36: BOOTDEV="None"
37: HD=at
38: COH_TYPE=at
39: KB=kb
40:
41: if [ $USRSYS ]
42: then
43: if [ $KS ]
44: then
45: if [ $KOBJ ]
46: then
47: if [ $LOBJ ]
48: then
49: DRIVERS="rm fl lp "
50: DEBUG="NO"
51: for ARG
52: do
53: case $ARG in
54: at)
55: # BOOTDEV="at0a"
56: HD=$ARG
57: COH_TYPE=$ARG
58: ;;
59: aha)
60: # BOOTDEV="sd0a"
61: HD=aha154x
62: COH_TYPE=$ARG
63: ;;
64: ps)
65: BOOTDEV="fva0"
66: # DRIVERS="rm fl lp"
67: DRIVERS="rm fl_ps lp"
68: HD=$ARG
69: COH_TYPE=$ARG
70: ;;
71: ss)
72: # BOOTDEV="ss0a"
73: HD=$ARG
74: COH_TYPE=$ARG
75: ;;
76: fh)
77: BOOTDEV="fha0"
78: HD=""
79: COH_TYPE=fh
80: ;;
81: fv)
82: BOOTDEV="fva0"
83: HD=""
84: COH_TYPE=fv
85: ;;
86: kb|kb_d|kb_f|vt|nkb)
87: KB=$ARG
88: ;;
89: dbg)
90: DEBUG="CFLAGS=-DDEBUG"
91: ;;
92: *) echo "Usage: $0 [kb|nkb|kb_d|kb_f|vt] [at|ps|ss|aha|fh|fv] [dbg]"
93: exit 0
94: ;;
95: esac
96: done
97: if [ $KB = "vt" ]
98: then
99: DRIVERS="$KB $HD $DRIVERS"
100: else
101: DRIVERS="$KB $HD $DRIVERS mm"
102: fi
103: echo "Kernel: /coh.$COH_TYPE"
104: echo "Version: `version ID`"
105: echo "Devices: $DRIVERS"
106: echo "Default root/pipe device is $BOOTDEV."
107: echo "Debug setting: $DEBUG"
108: if [ $DEBUG = "NO" ]
109: then
110: DEBUG=""
111: fi
112: export KB HD
113: ( cd $KS/ldrv; make ld_support ) || exit 1
114: ( cd $KS/io.286; make -f Mf.mwc $DEBUG install ) || exit 1
115: ( make $DEBUG kernel ) || exit 1
116: ./config.mwc ibm-at $DRIVERS root=$BOOTDEV || exit 1
117: cp coherent /tmp/coh || exit 1
118: strip /tmp/coh || exit 1
119: set `ls -s /tmp/coh`
120: SIZE=$1
121: rm /tmp/coh || exit 1
122: echo "Coherent bootable limit is 138 blocks. This kernel is $SIZE"
123: if [ $SIZE -gt 138 ] ;then
124: echo
125: echo Your Coherent image exceeds the bootable limit of 138 blocks
126: echo by `expr $SIZE - 138` 'block(s).' You will need to decrease the
127: echo size of your kernel in order to make it bootable.
128: echo
129: echo We suggest removing some of the non critical drivers from the
130: echo default list of drivers linked into Coherent. These additional
131: echo drivers may then be linked as loadable drivers using the
132: echo ldconfig script located in this directory.
133: fi
134: cp coherent /interim/coh.$COH_TYPE
135: chown sys /interim/coh.$COH_TYPE
136: chgrp sys /interim/coh.$COH_TYPE
137: chmod 400 /interim/coh.$COH_TYPE
138: echo "New kernel in /interim/coh.$COH_TYPE"
139: ls -l /interim/coh.$COH_TYPE
140: # the rest is error exits
141: else
142: echo "Error - LOBJ not defined - (e.g. /usr/lobj)"
143: fi
144: else
145: echo "Error - KOBJ not defined - (e.g. /usr/kobj)"
146: fi
147: else
148: echo "Error - KS not defined - (e.g. /usr/src/sys)"
149: fi
150: else
151: echo "Error - USRSYS not defined - (e.g. /usr/sys)"
152: fi
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.