|
|
1.1 ! root 1: : ! 2: : configure a Coherent kernel for the AT ! 3: : ! 4: : usage: config [help] ! 5: : config [stand=fha0] ! 6: : config [stand=fva0] ! 7: : config [stand=fha0] [standard] [root=DRV] [DRV ...] ! 8: : config [stand=fva0] [standard] [root=DRV] [DRV ...] ! 9: ! 10: : initialize variables ! 11: : ! 12: ATSTANDARD=" fl lp mm " ! 13: ATKERNEL=atkernel.o ! 14: ! 15: STANDARD="${ATSTANDARD}" ! 16: KERNEL="${ATKERNEL}" ! 17: LIBS="lib/tty.a lib/support.a" ! 18: BUILD=0 ! 19: DEV=/tmp/dev ! 20: PASS1="" ! 21: PASS2="" ! 22: UNDEF="" ! 23: PATCH="" ! 24: ROOTDEV="" ! 25: INSTALL="" ! 26: ! 27: case "$#" in ! 28: 0) /bin/echo ! 29: /bin/echo "The following can be used as arguments to config:" ! 30: /bin/echo ! 31: /bin/cat doc/* ! 32: exit 0 ! 33: ;; ! 34: esac ! 35: ! 36: for ARG in $* ! 37: do ! 38: case "${ARG}" in ! 39: help) ! 40: /bin/echo ! 41: /bin/echo "The following can be used as arguments to config:" ! 42: /bin/echo ! 43: /bin/cat doc/* ! 44: exit 0 ! 45: ;; ! 46: ibm-at) ! 47: STANDARD="${ATSTANDARD}" ! 48: KERNEL="${ATKERNEL}" ! 49: ;; ! 50: *) ! 51: PASS1="${PASS1} ${ARG}" ! 52: ;; ! 53: esac ! 54: done ! 55: ! 56: for ARG in ${PASS1} ! 57: do ! 58: case "${ARG}" in ! 59: standard) ! 60: PASS2="${STANDARD} ${PASS2}" ! 61: ;; ! 62: stand\=fha0) ! 63: /etc/umount /dev/fha0 2> /dev/null ! 64: echo -n "Insert 5.25 high capacity floppy into drive 0, press return [y to format]: " ! 65: read x ! 66: case "x$x" in ! 67: xy) /etc/fdformat -i 6 /dev/fha0 || exit 1 ;; ! 68: esac ! 69: /etc/mkfs /dev/fha0 2400 || exit 1 ! 70: /bin/cp /conf/boot.fha /dev/fha0 || exit 1 ! 71: /etc/mount /dev/fha0 /f0 || exit 1 ! 72: /bin/mkdir /f0/bin /f0/dev /f0/etc /f0/mnt /f0/tmp || exit 1 ! 73: umask 011 ! 74: /etc/mknod /f0/dev/null c 0 0 || exit 1 ! 75: /bin/ln -f /f0/dev/null /f0/dev/swap || exit 1 ! 76: umask 077 ! 77: /etc/mknod /f0/dev/mem c 0 1 || exit 1 ! 78: /etc/mknod /f0/dev/kmem c 0 2 || exit 1 ! 79: /bin/chmod 777 /f0/tmp || exit 1 ! 80: umask 022 ! 81: ! 82: /bin/cp /bin/bad /bin/cat /bin/cp /bin/cpdir \ ! 83: /bin/db /bin/dd /bin/df /bin/du \ ! 84: /bin/echo /bin/kill \ ! 85: /bin/ls /bin/mkdir /bin/mv /bin/ncheck \ ! 86: /bin/rm /bin/sh /bin/stty /bin/sync \ ! 87: /bin/time /bin/true /f0/bin || exit 1 ! 88: /bin/cp /etc/fsck /etc/init /etc/badscan /etc/clri \ ! 89: /etc/fdisk /etc/mkfs \ ! 90: /etc/mknod /etc/mount /etc/umount /f0/etc || exit 1 ! 91: ! 92: DEV=/f0/dev ! 93: : ! 94: : Place a Coherent image out on drive 0. ! 95: : Add a floppy root patched version as a file called 'stand'. ! 96: : ! 97: INSTALL="umask 022; set -e ; /bin/cp coherent /f0 ; \ ! 98: /conf/patch coherent 'rootdev_=makedev(4,14)' ; \ ! 99: /conf/patch coherent 'pipedev_=makedev(4,14)' ; \ ! 100: /bin/cp coherent /f0/stand ; /bin/strip /f0/stand ; \ ! 101: /etc/umount /dev/fha0 ; /bin/df /dev/fha0" ! 102: ! 103: case "$#" in ! 104: 1) eval ${INSTALL} ; exit 0 ;; ! 105: esac ! 106: ;; ! 107: ! 108: stand\=fva0) ! 109: /etc/umount /dev/fva0 2> /dev/null ! 110: echo -n "Insert high density 3.5 floppy into drive 0, press return [y to format]: " ! 111: read x ! 112: case "x$x" in ! 113: xy) /etc/fdformat -i 6 /dev/fva0 || exit 1 ;; ! 114: esac ! 115: /etc/mkfs /dev/fva0 2880 || exit 1 ! 116: /bin/cp /conf/boot.fva /dev/fva0 || exit 1 ! 117: /etc/mount /dev/fva0 /f0 || exit 1 ! 118: /bin/mkdir /f0/bin /f0/dev /f0/etc /f0/mnt /f0/tmp || exit 1 ! 119: umask 011 ! 120: /etc/mknod /f0/dev/null c 0 0 || exit 1 ! 121: /bin/ln -f /f0/dev/null /f0/dev/swap || exit 1 ! 122: umask 077 ! 123: /etc/mknod /f0/dev/mem c 0 1 || exit 1 ! 124: /etc/mknod /f0/dev/kmem c 0 2 || exit 1 ! 125: /bin/chmod 777 /f0/tmp || exit 1 ! 126: umask 022 ! 127: ! 128: /bin/cp /bin/bad /bin/cat /bin/cp /bin/cpdir \ ! 129: /bin/db /bin/dd /bin/df /bin/du \ ! 130: /bin/echo /bin/kill \ ! 131: /bin/ls /bin/mkdir /bin/mv /bin/ncheck \ ! 132: /bin/rm /bin/sh /bin/stty /bin/sync \ ! 133: /bin/time /bin/true /f0/bin || exit 1 ! 134: /bin/cp /etc/fsck /etc/init /etc/badscan /etc/clri \ ! 135: /etc/fdisk /etc/mkfs \ ! 136: /etc/mknod /etc/mount /etc/umount /f0/etc || exit 1 ! 137: ! 138: DEV=/f0/dev ! 139: : ! 140: : Place a Coherent image out on drive 0. ! 141: : Add a floppy root patched version as a file called 'stand'. ! 142: : ! 143: INSTALL="umask 022; set -e ; /bin/cp coherent /f0 ; \ ! 144: /conf/patch coherent 'rootdev_=makedev(4,15)' ; \ ! 145: /conf/patch coherent 'pipedev_=makedev(4,15)' ; \ ! 146: /bin/cp coherent /f0/stand ; /bin/strip /f0/stand ; \ ! 147: /etc/umount /dev/fva0 ; /bin/df /dev/fva0" ! 148: ! 149: case "$#" in ! 150: 1) eval ${INSTALL} ; exit 0 ;; ! 151: esac ! 152: ;; ! 153: ! 154: DEV\=*) ! 155: DEV=`/bin/echo "${ARG}" | /bin/sed -e 's/^....//'` ! 156: ;; ! 157: *) ! 158: PASS2="${PASS2} ${ARG}" ! 159: ;; ! 160: esac ! 161: done ! 162: ! 163: : get the proper driver information ! 164: : ! 165: ! 166: for ARG in ${PASS2} ! 167: do ! 168: case "$ARG" in ! 169: ! 170: root\=fva0) ! 171: ROOTDEV="makedev(4,15)" ! 172: . confdrv/fl ! 173: ;; ! 174: root\=fha0) ! 175: ROOTDEV="makedev(4,14)" ! 176: . confdrv/fl ! 177: ;; ! 178: root\=*) ! 179: ARG=`/bin/echo "${ARG}" | /bin/sed -e 's/^.....//'` ! 180: ! 181: case "${ARG}" in ! 182: *[0123][abcdx]) ! 183: FILE=`/bin/echo "${ARG}" | /bin/sed -e 's/..$//'` ! 184: ;; ! 185: *) ! 186: FILE="${ARG}" ! 187: ;; ! 188: esac ! 189: ! 190: if /bin/test -r confdrv/${FILE} ! 191: then ! 192: . confdrv/${FILE} ! 193: ROOTDEV="${MAKEDEV}" ! 194: /bin/echo "'confdrv/${FILE}' executing" ! 195: else ! 196: /bin/echo "'confdrv/${FILE}' does not exist" ! 197: exit 1 ! 198: fi ! 199: ;; ! 200: ! 201: swap) ! 202: ;; ! 203: ! 204: swap\=*) ! 205: ARG=`/bin/echo "${ARG}" | /bin/sed -e 's/^.....//'` ! 206: ! 207: case "${ARG}" in ! 208: *[0123][abcdx]) ! 209: FILE=`/bin/echo "${ARG}" | /bin/sed -e 's/..$//'` ! 210: if [ -d "${DEV-/dev}" ] ! 211: then ! 212: /bin/ln -f ${DEV-/dev}/${ARG} ${DEV-/dev}/swap ! 213: fi ! 214: ;; ! 215: *) ! 216: FILE="${ARG}" ! 217: ;; ! 218: esac ! 219: ! 220: if /bin/test -r confdrv/${FILE} ! 221: then ! 222: . confdrv/${FILE} ! 223: PATCH="${PATCH} swapdev_=${MAKEDEV}" ! 224: /bin/echo "Swap device will be ${DEV-/dev}/${ARG}" ! 225: /bin/echo "See documentation before enabling" ! 226: else ! 227: /bin/echo "'confdrv/${FILE}' does not exist" ! 228: exit 1 ! 229: fi ! 230: ;; ! 231: ! 232: *\=*) ! 233: PATCH="${PATCH} ${ARG}" ! 234: ;; ! 235: ! 236: *) ! 237: case "${ARG}" in ! 238: *[0123][abcdx]) ! 239: FILE=`/bin/echo "${ARG}" | /bin/sed -e 's/..$//'` ! 240: ;; ! 241: *) ! 242: FILE="${ARG}" ! 243: ;; ! 244: esac ! 245: ! 246: if /bin/test -r confdrv/${FILE} ! 247: then ! 248: . confdrv/${FILE} ! 249: case "${ROOTDEV}" in ! 250: ?*) ;; ! 251: *) ROOTDEV="${MAKEDEV}" ;; ! 252: esac ! 253: else ! 254: /bin/echo "'confdrv/${FILE}' does not exist" ! 255: exit 1 ! 256: fi ! 257: ;; ! 258: esac ! 259: done ! 260: ROOTDEV="${ROOTDEV-makedev(4,14)}" ! 261: ! 262: : include stub drivers ! 263: : ! 264: UNDEF="${UNDEF} ${LIBS}" ! 265: ! 266: : make the proper root and pipe devices ! 267: : ! 268: PATCH="${PATCH} rootdev_=${ROOTDEV} pipedev_=${ROOTDEV}" ! 269: ! 270: set -ex ! 271: : ! 272: : create a kernel with the desired device drivers ! 273: : ! 274: /bin/ld -i -x -o coherent ${KERNEL} ${UNDEF} -lc ! 275: : ! 276: : enable the desired device drivers ! 277: : ! 278: /conf/patch coherent ALLSIZE_=16384 NBUF_=32 NCLIST_=24 ${PATCH} ! 279: /bin/chmod 644 coherent ! 280: /bin/chown sys coherent ! 281: /bin/chgrp sys coherent ! 282: /bin/sync ! 283: : ! 284: eval ${INSTALL}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.