Annotation of coherent/b/kernel/us/bld, revision 1.1.1.1

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 ], 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:        ss)
                     65: #              BOOTDEV="ss0a"
                     66:                HD=$ARG
                     67:                COH_TYPE=$ARG
                     68:                ;;
                     69:        fh)
                     70:                BOOTDEV="fha0"
                     71:                HD=""
                     72:                COH_TYPE=fh
                     73:                ;;
                     74:        fv)
                     75:                BOOTDEV="fva0"
                     76:                HD=""
                     77:                COH_TYPE=fv
                     78:                ;;
                     79:        kb|kb_d|kb_f|vt|nkb)
                     80:                KB=$ARG
                     81:                ;;
                     82:        dbg)
                     83:                DEBUG="CFLAGS=-DDEBUG"
                     84:                ;;
                     85:        *)      echo "Usage: $0 [kb|nkb|kb_d|kb_f|vt] [at|ss|aha|fh|fv] [dbg]"
                     86:                exit 0
                     87:                ;;
                     88:        esac
                     89: done
                     90: if [ $KB = "vt" ]
                     91: then
                     92:        DRIVERS="$KB $HD $DRIVERS"
                     93: else
                     94:        DRIVERS="$KB $HD $DRIVERS mm"
                     95: fi
                     96: echo "Kernel:    /coh.$COH_TYPE"
                     97: echo "Version:   `version ID`"
                     98: echo "Devices:   $DRIVERS"
                     99: echo "Default root/pipe device is $BOOTDEV."
                    100: echo "Debug setting: $DEBUG"
                    101: if [ $DEBUG = "NO" ]
                    102: then
                    103:        DEBUG=""
                    104: fi
                    105: export KB HD
                    106: ( cd $KS/ldrv; make ld_support )                       || exit 1
                    107: ( cd $KS/io.286; make -f Mf.mwc $DEBUG install )       || exit 1
                    108: ( make $DEBUG kernel )                                 || exit 1
                    109: ./config.mwc ibm-at $DRIVERS root=$BOOTDEV             || exit 1
                    110: cp coherent /tmp/coh                                   || exit 1
                    111: strip /tmp/coh                                         || exit 1
                    112: set `ls -s /tmp/coh`
                    113: SIZE=$1
                    114: rm /tmp/coh                                            || exit 1
                    115: echo "Coherent bootable limit is 138 blocks.  This kernel is $SIZE"
                    116: if [ $SIZE -gt 138 ] ;then
                    117:        echo 
                    118:        echo Your Coherent image exceeds the bootable limit of 138 blocks
                    119:        echo by `expr $SIZE - 138` 'block(s).'  You will need to decrease the
                    120:        echo size of your kernel in order to make it bootable.
                    121:        echo
                    122:        echo We suggest removing some of the non critical drivers from the
                    123:        echo default list of drivers linked into Coherent.  These additional
                    124:        echo drivers may then be linked as loadable drivers using the
                    125:        echo ldconfig script located in this directory.
                    126: fi
                    127: cp coherent /interim/coh.$COH_TYPE
                    128: chown sys /interim/coh.$COH_TYPE
                    129: chgrp sys /interim/coh.$COH_TYPE
                    130: chmod 400 /interim/coh.$COH_TYPE
                    131: echo "New kernel in /interim/coh.$COH_TYPE"
                    132: ls -l /interim/coh.$COH_TYPE
                    133: # the rest is error exits
                    134: else
                    135: echo "Error - LOBJ not defined - (e.g. /usr/lobj)"
                    136: fi
                    137: else
                    138: echo "Error - KOBJ not defined - (e.g. /usr/kobj)"
                    139: fi
                    140: else
                    141: echo "Error - KS not defined - (e.g. /usr/src/sys)"
                    142: fi
                    143: else
                    144: echo "Error - USRSYS not defined - (e.g. /usr/sys)"
                    145: fi

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.