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

unix.superglobalmegacorp.com

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