diff --git a/Linux-0.11/INSTALL/partition-programs/edpart.arc b/Linux-0.11/INSTALL/partition-programs/edpart.arc new file mode 100644 index 00000000..02f0f406 Binary files /dev/null and b/Linux-0.11/INSTALL/partition-programs/edpart.arc differ diff --git a/Linux-0.11/INSTALL/partition-programs/edpart.doc b/Linux-0.11/INSTALL/partition-programs/edpart.doc new file mode 100644 index 00000000..9274265e --- /dev/null +++ b/Linux-0.11/INSTALL/partition-programs/edpart.doc @@ -0,0 +1,31 @@ +Edpart.exe is a disk partition editor capable of managing up to four +partitions on PC/XT and AT hard disks. It specifically says "no +copyright", so I figured someone else might like to use it rather than +doing fdisk/diskfix pairs to create partitions. + +There's no instruction file and no real on-line help, so here's a +summary: + +EDPART.EXE maintains up to four hard disk partitions on either of two +hard drives. If it sees more than one hard drive, it will ask which +one to edit. + +The commands are: + +CREATE Create hard disk partitions +DELETE Delete hard disk partitions +STATUS Bootable partitions may have the following status: + ACTIVE This partition is the boot partition + READ/WRITE R/W, not the boot partition + Non-bootable partitions (``extensions'') may be any of: + READ/WRITE + READ-ONLY + INACCESSIBLE +TYPE There are four types; for Minix purposes, either "extension" + type will do to my knowledge. + DOS(4) Bootable For DOS 3.x + DOS(4) Extension + DOS(1) Bootable For DOS 2.x + DOS(1) Extension + The "Bootable" partitions are recognized by MS-DOS directly, + so I don't advise using either of them for Minix. diff --git a/Linux-0.11/INSTALL/partition-programs/pdisk.arc b/Linux-0.11/INSTALL/partition-programs/pdisk.arc new file mode 100644 index 00000000..d4abbcc6 Binary files /dev/null and b/Linux-0.11/INSTALL/partition-programs/pdisk.arc differ diff --git a/Linux-0.11/INSTALL/partition-programs/pdisk.doc b/Linux-0.11/INSTALL/partition-programs/pdisk.doc new file mode 100644 index 00000000..8d6a415d --- /dev/null +++ b/Linux-0.11/INSTALL/partition-programs/pdisk.doc @@ -0,0 +1,79 @@ +This stuff is mostly self explanatory, but: + part takes one optional argument, which is the disk number with + which to start (either 0 or 1. 0 is default). + + 286pd1.sys and 286pd2.sys are for driving partitions on your first + and second disks, respectively. They will only work on 80186 or higher + processors. For 8086/8088 computers, use pdisk1.sys, pdisk2.sys. They + are just a *wee* bit slower.... + + fdins is for use when you're short of free space in "low menory" -- + i.e. free interrupt vectors. fdintins, on the other hand, doesn't + use up any application space memory. In either case, these programs + don't do *anything* directly -- you run them in order to create a + .COM program that does the dirty work. You get TBL1.com, TBL2.com, + TBL1INT.com, or TBL2INT.com, depending on whether you run fdins, + fdintins and specifiy disk 1 or 2 (== 0 or 1). + + pformat is for when you want to be particularly destructive with your + new partition. You run "pformat :" where must be a + valid pdisk. It's good for marking newly developed bad sectors, + I guess. Be careful. + +According to tests I ran with the PC Magazine benchmark program, disk access +to a pdisk is actually faster than the normal DOS driver (i.e. C: or a DOS +3.3/4.x extended DOS partition). (This may only be true using the 286 version, +and may be affected by your usage. The main point is that you certainly do +not take a performance *cut* by using my program.) + +I am not including most of the COPYING file that comes with stuff from the +Free Software Foundation (Richard Stallman, et al.) because I don't know +if I'm allowed, but that's what I intend for this software. Specifically, +you can *give* away as many copies of this software as you like. You can +charge a *reasonable* handling fee. You can even incorporate parts of it +into other projects, as long as you distribute at least the source you got +from pdisk. I don't want money or contributions, I want plaudits. I hope +this software is helpful to you. + +When you find the inevitable bug (there are *none* in the driver, but I +don't absolutely swear for the partitioning program), please try to +fix it yourself and let me know the solution. Failing that, drop me a +line describing the situation exactly, especially including DOS version and +all hardware, including fixed disk and controller type. I don;t promise +to do anything about it, but I might. + +One thing I recommend from experience: my boot code will only work on some +IBM compatibles. It is best to use the manafacturer's (or generic) MSDOS +fdisk to set up the initial partition, then use "format c: /s" to set up +your bootable DOS partition. If you can get this working right with pdisk, +that would be nice. + +have fun. Scott E. Garfinkle + smsdpg!seg@uunet.uu.net + + + + NO WARRANTY + + BECAUSE PDISK IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY NO +WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT +WHEN OTHERWISE STATED IN WRITING, SCOTT GARFINKLE +AND/OR OTHER PARTIES PROVIDE PDISK "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF PDISK IS WITH YOU. SHOULD PDISK PROVE DEFECTIVE, YOU +ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL SCOTT GARFINKLE +AND/OR ANY OTHER PARTY +WHO MAY MODIFY AND REDISTRIBUTE PDISK AS PERMITTED ABOVE, BE LIABLE TO +YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) PDISK, EVEN +IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR +ANY CLAIM BY ANY OTHER PARTY. diff --git a/Linux-0.11/INSTALL/rawrite.c b/Linux-0.11/INSTALL/rawrite.c new file mode 100644 index 00000000..4ac1f1cb --- /dev/null +++ b/Linux-0.11/INSTALL/rawrite.c @@ -0,0 +1,182 @@ +/* + rawrite.c Write a binary image to a 360K diskette. + By Mark Becker + + Usage: + MS-DOS prompt> RAWRITE + + And follow the prompts. + +History +------- + + 1.0 - Initial release + 1.1 - Beta test (fixing bugs) 4/5/91 + Some BIOS's don't like full-track writes. + 1.101 - Last beta release. 4/8/91 + Fixed BIOS full-track write by only + writing 3 sectors at a time. + 1.2 - Final code and documentation clean-ups. 4/9/91 +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define FALSE 0 +#define TRUE (!FALSE) + +#define SECTORSIZE 512 + +#define RESET 0 +#define LAST 1 +#define READ 2 +#define WRITE 3 +#define VERIFY 4 +#define FORMAT 5 + +int done; + +/* + Catch ^C and ^Break. +*/ +int handler(void) +{ + done = TRUE; + return(0); +} +void msg(char (*s)) +{ + fprintf(stderr, "%s\n", s); + _exit(1); +} +/* + Identify the error code with a real error message. +*/ +void Error(int (status)) +{ + switch (status) { + case 0x00: msg("Operation Successful"); break; + case 0x01: msg("Bad command"); break; + case 0x02: msg("Address mark not found"); break; + case 0x03: msg("Attempt to write on write-protected disk"); break; + case 0x04: msg("Sector not found"); break; + case 0x05: msg("Reset failed (hard disk)"); break; + case 0x06: msg("Disk changed since last operation"); break; + case 0x07: msg("Drive parameter activity failed"); break; + case 0x08: msg("DMA overrun"); break; + case 0x09: msg("Attempt to DMA across 64K boundary"); break; + case 0x0A: msg("Bad sector detected"); break; + case 0x0B: msg("Bad track detected"); break; + case 0x0C: msg("Unsupported track"); break; + case 0x10: msg("Bad CRC/ECC on disk read"); break; + case 0x11: msg("CRC/ECC corrected data error"); break; + case 0x20: msg("Controller has failed"); break; + case 0x40: msg("Seek operation failed"); break; + case 0x80: msg("Attachment failed to respond"); break; + case 0xAA: msg("Drive not ready (hard disk only"); break; + case 0xBB: msg("Undefined error occurred (hard disk only)"); break; + case 0xCC: msg("Write fault occurred"); break; + case 0xE0: msg("Status error"); break; + case 0xFF: msg("Sense operation failed"); break; + } + _exit(1); +} + +/* + Identify what kind of diskette is installed in the specified drive. + Return the number of sectors per track assumed as follows: + 9 - 360 K and 720 K 5.25". +15 - 1.2 M HD 5.25". +18 - 1.44 M 3.5". +*/ +int nsects(int (drive)) +{ + static int nsect[] = {18, 15, 9}; + + char *buffer; + int i, status; +/* + Read sector 1, head 0, track 0 to get the BIOS running. +*/ + buffer = (char *)malloc(SECTORSIZE); + biosdisk(RESET, drive, 0, 0, 0, 0, buffer); + status = biosdisk(READ, drive, 0, 10, 1, 1, buffer); + if (status == 0x06) /* Door signal change? */ + status = biosdisk(READ, drive, 0, 0, 1, 1, buffer); + + for (i=0; i < sizeof(nsect)/sizeof(int); ++i) { + biosdisk(RESET, drive, 0, 0, 0, 0, buffer); + status = biosdisk(READ, drive, 0, 0, nsect[i], 1, buffer); + if (status == 0x06) + status = biosdisk(READ, drive, 0, 0, nsect[i], 1, buffer); + if (status == 0x00) break; + } + if (i == sizeof(nsect)/sizeof(int)) { + msg("Can't figure out how many sectors/track for this diskette."); + } + free(buffer); + return(nsect[i]); +} + +void main(void) +{ + char fname[MAXPATH]; + char *buffer, *pbuf; + int count, fdin, drive, head, track, status, spt, buflength, ns; + + puts("RaWrite 1.2 - Write disk file to raw floppy diskette\n"); + ctrlbrk(handler); + printf("Enter source file name: "); + scanf("%s", fname); + _fmode = O_BINARY; + if ((fdin = open(fname, O_RDONLY)) <= 0) { + perror(fname); + exit(1); + } + + printf("Enter destination drive: "); + scanf("%s", fname); + drive = fname[0]; + drive = (islower(drive) ? toupper(drive) : drive) - 'A'; + printf("Please insert a formatted diskette into "); + printf("drive %c: and press -ENTER- :", drive + 'A'); + while (bioskey(1) == 0) ; /* Wait... */ + if ((bioskey(0) & 0x7F) == 3) exit(1); /* Check for ^C */ + putchar('\n'); + done = FALSE; +/* + * Determine number of sectors per track and allocate buffers. + */ + spt = nsects(drive); + buflength = spt * SECTORSIZE; + buffer = (char *)malloc(buflength); + printf("Number of sectors per track for this disk is %d\n", spt); + printf("Writing image to drive %c:. Press ^C to abort.\n", drive+'A'); +/* + * Start writing data to diskette until there is no more data to write. + */ + head = track = 0; + while ((count = read(fdin, buffer, buflength)) > 0 && !done) { + pbuf = buffer; + for (ns = 1; count > 0 && !done; ns+=3) { + printf("Track: %02d Head: %2d Sector: %2d\r", track, head, ns); + status = biosdisk(WRITE, drive, head, track, ns, 3, pbuf); + + if (status != 0) Error(status); + + count -= (3*SECTORSIZE); + pbuf += (3*SECTORSIZE); + } + if ((head = (head + 1) & 1) == 0) ++track; + } + if (eof(fdin)) { + printf("\nDone.\n"); + biosdisk(2, drive, 0, 0, 1, 1, buffer); /* Retract head */ + } +} /* end main */ diff --git a/Linux-0.11/INSTALL/rawrite.doc b/Linux-0.11/INSTALL/rawrite.doc new file mode 100644 index 00000000..09a815b9 --- /dev/null +++ b/Linux-0.11/INSTALL/rawrite.doc @@ -0,0 +1,86 @@ +RaWrite 1.2 +----------- + +Purpose +------- + +Write a disk image file to a 360K floppy disk. + + +Equipment/Software Requirements +------------------------------- + +PC/XT/AT with a floppy disk drive capable of reading and writing a 360K +diskette. + +This program uses generic low-level BIOS diskette read/write functions. It +should be portable to nearly every PC in existance. PS/2's should be able +to run RawWrite but this has not been tested. + + +CAVEAT +------ + +This program will write ANY disk file to a floppy, overwriting any previous +information that may have been present. If you wish to re-use a diskette +under MS-DOS thats been written to by RawWrite then the disk will need to be +reformatted; all MS-DOS specific information will have been erased. + + +How to Compile +-------------- + +TCC rawrite.c + +The source code is specific to Borland International's Turbo C 2.01 and has +been tested in all memory models. + + +Usage +----- + +C> RAWRITE + +And follow the prompts. All arguments are case-insensitive. + +A sample run is shown below. The disk file being written, in this example, +is named DEMODISK and the destination - where the image is being written - +is the B: drive. + +This program may be aborted at any time by typing ^C. + + +Sample Run +---------- + +C> RAWRITE +RaWrite 1.2 - Write disk file to raw floppy diskette + +Enter source file name: DEMODISK +Enter destination drive: B +Please insert a formatted 360K diskette into drive B: and press -ENTER- : +Writing image to drive B: + + +Errors +------ + +RaWrite attempts to determine if the diskette is a 360K, 720K, 1.2M, or +1.44M diskette by reading specific sectors. If the inserted diskette is not +one of the mentioned types, then RaWrite will abort with a short error +message. + +Errors such as write protect, door open, bad disk, bad sector, etc. cause a +program abort with a short error message. + + +History +------- + + 1.0 - Initial release + 1.1 - Beta test (fixing bugs) 4/5/91 + Some BIOS's don't like full-track writes. + 1.101 - Last beta release. 4/8/91 + Fixed BIOS full-track write by only only + writing 3 sectors at a time. + 1.2 - Final code and documentation clean-ups. 4/9/91 diff --git a/Linux-0.11/INSTALL/rawrite.exe b/Linux-0.11/INSTALL/rawrite.exe new file mode 100644 index 00000000..a4a464ba Binary files /dev/null and b/Linux-0.11/INSTALL/rawrite.exe differ diff --git a/Linux-0.11/binaries/compilers/gccbin.tar.Z b/Linux-0.11/binaries/compilers/gccbin.tar.Z new file mode 100644 index 00000000..078fa263 Binary files /dev/null and b/Linux-0.11/binaries/compilers/gccbin.tar.Z differ diff --git a/Linux-0.11/binaries/sbin/update.Z b/Linux-0.11/binaries/sbin/update.Z new file mode 100644 index 00000000..e18ec7af Binary files /dev/null and b/Linux-0.11/binaries/sbin/update.Z differ diff --git a/Linux-0.11/binaries/usr.bin/archivers/zoo-210.bin.tar.Z b/Linux-0.11/binaries/usr.bin/archivers/zoo-210.bin.tar.Z new file mode 100644 index 00000000..193a9bcc Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/archivers/zoo-210.bin.tar.Z differ diff --git a/Linux-0.11/binaries/usr.bin/diffbin.tar.Z b/Linux-0.11/binaries/usr.bin/diffbin.tar.Z new file mode 100644 index 00000000..803976fa Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/diffbin.tar.Z differ diff --git a/Linux-0.11/binaries/usr.bin/install.tar.Z b/Linux-0.11/binaries/usr.bin/install.tar.Z new file mode 100644 index 00000000..cf3f4bd7 Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/install.tar.Z differ diff --git a/Linux-0.11/binaries/usr.bin/kermit.Z b/Linux-0.11/binaries/usr.bin/kermit.Z new file mode 100644 index 00000000..3393666b Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/kermit.Z differ diff --git a/Linux-0.11/binaries/usr.bin/locate.Z b/Linux-0.11/binaries/usr.bin/locate.Z new file mode 100644 index 00000000..42d54f04 Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/locate.Z differ diff --git a/Linux-0.11/binaries/usr.bin/patch.Z b/Linux-0.11/binaries/usr.bin/patch.Z new file mode 100644 index 00000000..d6f34330 Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/patch.Z differ diff --git a/Linux-0.11/binaries/usr.bin/pmake/pm_supp.tar.Z b/Linux-0.11/binaries/usr.bin/pmake/pm_supp.tar.Z new file mode 100644 index 00000000..8d3d455c Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/pmake/pm_supp.tar.Z differ diff --git a/Linux-0.11/binaries/usr.bin/pmake/pmake.README b/Linux-0.11/binaries/usr.bin/pmake/pmake.README new file mode 100644 index 00000000..5eef34e5 --- /dev/null +++ b/Linux-0.11/binaries/usr.bin/pmake/pmake.README @@ -0,0 +1,11 @@ +pmake.Z is the make from the bsd net release #2. +pm_supp.tar.Z is a tar file of some support "include" files used +by that version of make. + +It may not completely correctly handle error conditions from children, +since I had to guess a bit on how to recode its abuse of the old +union wait. + +John Kohl +jtkohl@cs.berkeley.edu +[sources on request; that's another kermit, though.] diff --git a/Linux-0.11/binaries/usr.bin/pmake/pmake.Z b/Linux-0.11/binaries/usr.bin/pmake/pmake.Z new file mode 100644 index 00000000..26d480f3 Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/pmake/pmake.Z differ diff --git a/Linux-0.11/binaries/usr.bin/sed.Z b/Linux-0.11/binaries/usr.bin/sed.Z new file mode 100644 index 00000000..d7e7c43d Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/sed.Z differ diff --git a/Linux-0.11/binaries/usr.bin/uemacs.Z b/Linux-0.11/binaries/usr.bin/uemacs.Z new file mode 100644 index 00000000..0d511bcf Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/uemacs.Z differ diff --git a/Linux-0.11/binaries/usr.bin/uniq.Z b/Linux-0.11/binaries/usr.bin/uniq.Z new file mode 100644 index 00000000..b9a4fc68 Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/uniq.Z differ diff --git a/Linux-0.11/binaries/usr.bin/zoo-210.bin.tar.Z b/Linux-0.11/binaries/usr.bin/zoo-210.bin.tar.Z new file mode 100644 index 00000000..193a9bcc Binary files /dev/null and b/Linux-0.11/binaries/usr.bin/zoo-210.bin.tar.Z differ diff --git a/Linux-0.11/docs/FAQ b/Linux-0.11/docs/FAQ new file mode 100644 index 00000000..422c41e9 --- /dev/null +++ b/Linux-0.11/docs/FAQ @@ -0,0 +1,256 @@ + +daemon@ATHENA.MIT.EDU (Robert Blum) Linux_Activists 12/19/91 01:39 (253 lines) +Subject: A FAQ is coming... +Date: Thu, 19 Dec 91 07:29:21 +0100 +From: blum@cip-s01.informatik.rwth-aachen.de (Robert Blum) +To: linux-activists@joker.cs.hut.fi + +Hi Linuxers! + +Following is a FAQ-compilation (most credits to Linus) for Linux. +Mail me, if you like it, and mail me, if you dislike it or have +any ideas on changing this. + +Thanks in advance, + Robert Blum + + +QUESTION: What is linux? + +ANSWER: Linux is a small unix for 386-AT computers, that has the added +advantage of being free. It is still in beta-testing, but is slowly +getting useful even for somewhat real developement. + + +QUESTION: Does it run on my computer? + +ANSWER: Linux has been written on a clone-386, with IDE drives and a VGA +screen. It should work on most similar setups. The harddisk should be +AT-standard (ie not SCSI, ESDI), and the system must be ISA. Otherwise +the requirements seem relatively small: a 386 (SX, DX or any 486). The +current version (0.10) needs a colour screen adapter, but this is not +the case with the next version. + +It needs at least 2M to run, and 4M is definitely a plus. It can happily +use up to 16M (and more if you change some things). + + +QUESTION: Will linux run on a PC or 286-AT? If not, why? + +ANSWER: Linux uses the 386 chip protected mode functions extensively, +and is a true 32-bit operating system. Thus x86 chips, x<3, will simply +not run it. + + +QUESTION: Does linux do paging? Can I have virtual memory on my small +machine? + +ANSWER: Linux does use the 386 paging unit, but currently only for +memory management. No use of disks as expansion RAM. This is one of the +things that will be implemented sometime in the (far?) future. Linux +also uses the paging unit to share pages between several processes after +a fork: thus it needs less memory. However, almost all the user programs +available for linux are GNU software, which want gobs and gobs of +memory. This is the reason at least 4M is recommended: GNU cc (gcc) +simply won't run in less. + + +QUESTION: Can I have tasks spanning the full 4GB of addressable 386 +memory? No more 64kB limits like in coherent or standard minix? + +ANSWER: Linux does limit the task-size, but at a much more reasonable +64MB (MEGA-byte, not kilos), so bigger programs are no problem. + + +QUESTION: Does the bigger program sizes mean I can run X? + +ANSWER: X is not ported to linux, and though I hope it will be some day, +I cannot guarantee it. It's big, and wants a lot from the system. + + +QUESTION: Where can I get linux? Is there a mailserver? + +ANSWER: Linux can be gotten by anonymous ftp from + nic.funet.fi (128.214.6.100): + directory /pub/OS/Linux + Tupac-Amaru.Informatik.RWTH-Aachen.DE (137.226.112.31): + directory /pub/msdos/replace + tsx-11.mit.edu (18.172.1.2): + directory /pub/linux + ftp.eecs.umich.edu (141.212.99.7): + directory linux +You might want to check out which of these is the most up-to-date. + +If you don't have ftp-capability, you are in trouble. You might try +mailing "mailserver@nic.funet.fi" with "help" in the body of the mail. + + +QUESTION: Is there a newsgroup or mailing-list about linux? Where can I +get my questions answered? How about bug-reports? + +ANSWER: There is a mailing list set up at the address +'Linux-activists@niksula.hut.fi'. To join, mail a request to +'Linux-activists-request@niksula.hut.fi'. DO NOT mail "I want to +[un]subscribe" to the mailing-list, use the request-address. + +Questions and bug-reports can be sent either to the mailing-list or to +"torvalds@kruuna.helsinki.fi", depending on which you find more +appropriate. + + +QUESTION: I got the minix-demo, but it won't boot. Linux boots from +floppy. What's wrong? + +ANSWER: You probably wrote the minix demo to a 1.44M disk, which (for +some unfathomable reason) doesn't work. The minix demo wants a 720kB or +1.2M disk. + + +QUESTION: The minix-demo boots all right, but doesn't seem to recognize +my second harddisk. What's up? + +ANSWER: The minix-demo does support a second harddisk, but there are no +special files made for it, and the minix demo doesn't include the +"mknod" command. Mount the linux root-floppy, and use the devices on +that. + + +QUESTION: How can I be sure I won't be writing over anything important? +I have to use DOS in on my machine, and I don't want to lose any files. + +ANSWER: Back up everything. Just in case. Then, write some easily +recognizable pattern to the partition you have reserved for linux, using +some DOS tool. You can then use "cat /dev/hdX" under minix to examine +which of the partitions you used. + + +QUESTION: Minix mkfs doesn't accept the size I give the device, although +I double-checked with fdisk, and it's correct. + +ANSWER: Be sure you give the size in BLOCKS, ie 1024 bytes, not sectors. +Also, make doubly certain that you have the correct partition. + + +QUESTION: I used the minix mkfs to make a filesystem on /dev/hd3 after +having checked that this was indeed the partition I had reserved. Minix +mounts the new partition ok, but linux doesn't. What gives? + +ANSWER: In some cases partitions are numbered differently under minix +and linux. This seems to correlate to the FDISK version you have used. +/dev/hd3 under minix may be /dev/hd2 under linux etc. + +There are a few rules about this: /dev/hd0 and /dev/hd5 are always the +same under linux and minix. DO NOT USE THEM, they are the whole raw +disk, not partitions. Also if a partition is on drive 1 under minix (ie +/dev/hd1-4), it is drive 1 under linux as well. + + +QUESTION: I mounted the linux filesystem, and copied the files from the +root-disk to the harddisk. Now I cannot find them any more, and +somethimes linux dies with a "panic: trying to free unused inode". + +ANSWER: You have probably forgot to sync before rebooting. Linux, like +all unices, use a "buffer cache" to speed up reads and writes to disk. +On a machine that has enough memory, this buffer-cache is 1.5MB, and if +you forget to sync before exiting, it may not be fully written out to +disk. Re-mkfs and re-install (or try to use the preliminary fsck, but +remeber that although fsck tries to correct the faults it finds, it may +fail.) + + +QUESTION: the mtools package on the root-disk won't work. I get an +ENOENT error message for all devices. + +ANSWER: mtools needs to be told which device to look for. Use 'ln' or +'mknod' to create a sepcial file called "/dev/dosX", where X is A, B or +C. This file should point to the device you want to read. + + +QUESTION: Turbo (Microsoft) Assembler won't compile the Linux boot code. +In fact, some of the opcodes in these files look completely unfamiliar. Why? + +ANSWER: The Linux boot codes are written in Bruce Evans' minix assembler, +which has the same opcodes as the original minix assembler. There are a few +differences between these and normal DOS assemblers: + + - No segments - everything is in the same segment (at least in the + bootsectors and setup, as they don't use the .data segments) + + - mov[b|w|l] are shorter versions of mov ax,[byte|word|long] ptr [XXX]. + This is how unix assemblers normally give the size (byte, word or long). + Gas has similar constructs. + + - There is no "jmp short", the opcodes are "j" for a short jump and + "jmp" for a long one. + + - "jmpi" is a jump with a segment:offset pair. I don't know how this is + written in DOS assembly. + + +QUESTION: While running du I get "Kernel panic: free_inode: bit already +cleared". Also, du produces a ENOENT error for all the files in certain +of my directories. What's going on? + +ANSWER: These are both consistent with a bad file-system. That's relatively +easy to produce by not syncing before rebooting, as linux usually has 1.5MB +of buffer space held in memory (unless you have <=4M RAM, in which case +the buffers are only about 0.5MB). Also linux doesn't do anything +special about the bit-map blocks, and as they are used often, those are +the thing most likely to be in memory. If you reboot, and they haven't +been written to disk ... + +I'm afraid that as long as there is no fsck for linux there is no way to +correct the matter (unless you have minix and can run minix fsck), and +the only thing to do is to reinstall the filesystem from scratch (ie do +a mkfs from the minix demodisk and reboot from the original +linux-floppy). + +A sync is done only every 30 seconds normally (standard unix practice), +so do one by hand (some people think you should do 3 syncs after each +other, but that's superstition), or by logging out from the +startup-shell, which automatically syncs the system. Unmounting a +filesystem also syncs it (but of course you can never unmount root). + +Another (sad) possibility is that you have bad blocks on your disk. Not +very probable, as they would have to be in the inode-tables, just a +couple of blocks in size. Again there aren't programs available to read +a disk for bad sectors and put them in some kind of "bad-sector-file". +On IDE drives this is no problem (bad sectors are automatically mapped +away). + + +QUESTION: What is the "em" binary? + +ANSWER: Em is micro-EMacs (probably version 3.10). + +QUESTION: I seem to be unable to compile anythong with gcc. Why? + +ANSWER: If you have only 2 MB RAM, gcc will die silently without compiling + anything. You must have at least 4 MB to do compilations + + +QUESTION: I'm using a program that uses signal handlers which are installed +using sigaction() with the SA_NOMASK, and they get a general protection +error right after the signal handler tries to return. What's going +wrong? + +ANSWER: You are using a libc.a that has an out-of-date signal.o and +sig_restore.o file, and they don't know how to deal with SA_NOMASK. +(The one in gccbin.tar.Z is out-of-date.) You can obtain the newer +signal.c from the unistd.tar.Z file, but don't use the associated +sig_restore.c from there; the FTP sites should have a separate +sig_restore.c which is up to date. While you're at it, you should also +get an updated crt0.c file as well, and install your new crt0.o and +libc.a in /usr/lib. + +(This answer will likely change in the near future, since there are +plans to change the format of the signal trampoline code yet again.... +but for now, this should be an accurate description of how things stand +now.) + + +QUESTION: gcc complains about not finding crt0.o and the system include files +What am i doing wrong ? + +ANSWER: The include files normal place is in /usr/include. libc.a and *.a +should be in /usr/lib diff --git a/Linux-0.11/docs/FAQ-0.11 b/Linux-0.11/docs/FAQ-0.11 new file mode 100644 index 00000000..3903dcdc --- /dev/null +++ b/Linux-0.11/docs/FAQ-0.11 @@ -0,0 +1,248 @@ + +QUESTION: What is linux? + +ANSWER: Linux is a small unix for 386-AT computers, that has the added +advantage of being free. It is still in beta-testing, but is slowly +getting useful even for somewhat real developement. + + +QUESTION: Does it run on my computer? + +ANSWER: Linux has been written on a clone-386, with IDE drives and a VGA +screen. It should work on most similar setups. The harddisk should be +AT-standard (ie not SCSI, ESDI), and the system must be ISA. Otherwise +the requirements seem relatively small: a 386 (SX, DX or any 486). + +It needs at least 2M to run, and 4M is definitely a plus. It can happily +use up to 16M (and more if you change some things). + + +QUESTION: Will linux run on a PC or 286-AT? If not, why? + +ANSWER: Linux uses the 386 chip protected mode functions extensively, +and is a true 32-bit operating system. Thus x86 chips, x<3, will simply +not run it. + + +QUESTION: Does linux do paging? Can I have virtual memory on my small +machine? + +ANSWER: Linux does use the 386 paging unit, but currently only for +memory management. It currently is not doing any paging or swapping. +This is one of the things that will be implemented sometime in the +near future. Linux also uses the paging unit to share pages between +several processes after a fork: thus it needs less memory. However, +of the interesting programs which have been ported to linux so want +gobs and gobs of memory; in particular, the GNU C compiler (gcc) needs +at least 4 meg of memory. + +Even after paging is implemented, 4 Megs would still be recommended, +since large programs would run very slowly. + + +QUESTION: Can I have tasks spanning the full 4GB of addressable 386 +memory? No more 64kB limits like in coherent or standard minix? + +ANSWER: Linux does limit the task-size, but at a much more reasonable +64MB (MEGA-byte, not kilos), so bigger programs are no problem. + + +QUESTION: Does the bigger program sizes mean I can run X? + +ANSWER: X is not ported to linux, and though I hope it will be some day, +I cannot guarantee it. It's big, and wants a lot from the system. + + +QUESTION: Where can I get linux? Is there a mailserver? + +ANSWER: Linux can be gotten by anonymous ftp from + nic.funet.fi (128.214.6.100): + directory /pub/OS/Linux + Tupac-Amaru.Informatik.RWTH-Aachen.DE (137.226.112.31): + directory /pub/msdos/replace + tsx-11.mit.edu (18.172.1.2): + directory /pub/linux + ftp.eecs.umich.edu (141.212.99.7): + directory linux +You might want to check out which of these is the most up-to-date. + +If you don't have ftp-capability, you are in trouble. You might try +mailing "mailserver@nic.funet.fi" with "help" in the body of the mail. + + +QUESTION: Is there a newsgroup or mailing-list about linux? Where can I +get my questions answered? How about bug-reports? + +ANSWER: There is a mailing list set up at the address +'Linux-activists@niksula.hut.fi'. To join, mail a request to +'Linux-activists-request@niksula.hut.fi'. DO NOT mail "I want to +[un]subscribe" to the mailing-list, use the request-address. + +Questions and bug-reports can be sent either to the mailing-list or to +"torvalds@kruuna.helsinki.fi", depending on which you find more +appropriate. + + +QUESTION: I got the minix-demo, but it won't boot. Linux boots from +floppy. What's wrong? + +ANSWER: You probably wrote the minix demo to a 1.44M disk, which (for +some unfathomable reason) doesn't work. The minix demo wants a 720kB or +1.2M disk. + +In any case, you shouldn't need to use the Minix-demo disk any more; +as of version 0.11, Linux comes with sufficient filesystem utilities +(mkfs, fsck, etc.) so that Minix should no longer be required to bring +up an operating Linux system. + + +QUESTION: The minix-demo boots all right, but doesn't seem to +recognize my second harddisk. What's up? [SUGGESTION: delete this +question; see above first paragraph] + +ANSWER: The minix-demo does support a second harddisk, but there are no +special files made for it, and the minix demo doesn't include the +"mknod" command. Mount the linux root-floppy, and use the devices on +that. + + +QUESTION: How can I be sure I won't be writing over anything important? +I have to use DOS in on my machine, and I don't want to lose any files. + +ANSWER: Back up everything. Just in case. Then, write some easily +recognizable pattern to the partition you have reserved for linux, using +some DOS tool. You can then use "cat /dev/hdX" under minix to examine +which of the partitions you used. + + +QUESTION: The mkfs program doesn't accept the size I give the device, +although I double-checked with fdisk, and it's correct. + +ANSWER: Be sure you give the size in BLOCKS, ie 1024 bytes, not sectors. +Also, make doubly certain that you have the correct partition. + + +QUESTION: I used the minix mkfs to make a filesystem on /dev/hd3 after +having checked that this was indeed the partition I had reserved. Minix +mounts the new partition ok, but linux doesn't. What gives? + +ANSWER: In some cases partitions are numbered differently under minix +and linux. This seems to correlate to the FDISK version you have used. +/dev/hd3 under minix may be /dev/hd2 under linux etc. + +There are a few rules about this: /dev/hd0 and /dev/hd5 are always the +same under linux and minix. DO NOT USE THEM, they are the whole raw +disk, not partitions. Also if a partition is on drive 1 under minix (ie +/dev/hd1-4), it is drive 1 under linux as well. + + +QUESTION: I mounted the linux filesystem, and copied the files from the +root-disk to the harddisk. Now I cannot find them any more, and +somethimes linux dies with a "panic: trying to free unused inode". + +ANSWER: You have probably forgot to sync before rebooting. Linux, like +all unices, use a "buffer cache" to speed up reads and writes to disk. +On a machine that has enough memory, this buffer-cache is 1.5MB, and if +you forget to sync before exiting, it may not be fully written out to +disk. Re-mkfs and re-install (or try to use the preliminary fsck, but +remeber that although fsck tries to correct the faults it finds, it may +fail.) + + +QUESTION: the mtools package on the root-disk won't work. I get an +ENOENT error message for all devices. + +ANSWER: mtools needs to be told which device to look for. Use 'ln' or +'mknod' to create a special file called "/dev/dosX", where X is A, B or +C. This file should point to the device you want to read. + + +QUESTION: Turbo (Microsoft) Assembler won't compile the Linux boot code. +In fact, some of the opcodes in these files look completely unfamiliar. Why? + +ANSWER: The Linux boot codes are written in Bruce Evans' minix assembler, +which has the same opcodes as the original minix assembler. There are a few +differences between these and normal DOS assemblers: + + - No segments - everything is in the same segment (at least in the + bootsectors and setup, as they don't use the .data segments) + + - mov[b|w|l] are shorter versions of mov ax,[byte|word|long] ptr [XXX]. + This is how unix assemblers normally give the size (byte, word or long). + Gas has similar constructs. + + - There is no "jmp short", the opcodes are "j" for a short jump and + "jmp" for a long one. + + - "jmpi" is a jump with a segment:offset pair. I don't know how this is + written in DOS assembly. + + +QUESTION: While running du I get "Kernel panic: free_inode: bit already +cleared". Also, du produces a ENOENT error for all the files in certain +of my directories. What's going on? + +ANSWER: These are both consistent with a bad file-system. That's relatively +easy to produce by not syncing before rebooting, as linux usually has 1.5MB +of buffer space held in memory (unless you have <=4M RAM, in which case +the buffers are only about 0.5MB). Also linux doesn't do anything +special about the bit-map blocks, and as they are used often, those are +the thing most likely to be in memory. If you reboot, and they haven't +been written to disk ... + +If this happens to you, you should run the fsck program to determine +to fix the inconsistencies in the file system. The syntax is: + +fsck [-larvsm] device_name + +You should first run it without any arguments, to assess the damage, +and then run it with the -r or (if you're feeling adventurous) -a +options to reapir the damage. The -a flag stands for automatic, which +means tath fsck won't bother to ask you for confirmation before it +fixes each inconsistency. + +While the Linux system is in operation the disk buffers are forced out +to disk only every 30 seconds by the /bin/update program (if it were +done more frequently it would slow down the system). Before you halt, +powerdown, or reboot your system, you should use the 'sync' program to +manually write out any disk buffers to disk (some people think you +should do 3 syncs after each other, but that's superstition). Or, you +can log out out from the startup-shell, which automatically syncs the +system. Unmounting a filesystem also syncs it (but of course you can +never unmount root). + +Another (sad) possibility is that you have bad blocks on your disk. Not +very probable, as they would have to be in the inode-tables, just a +couple of blocks in size. Again there aren't programs available to read +a disk for bad sectors and put them in some kind of "bad-sector-file". +On IDE drives this is no problem (bad sectors are automatically mapped +away). + + +QUESTION: What is the "em" binary? + +ANSWER: Em is micro-EMacs (probably version 3.10). + +QUESTION: I seem to be unable to compile anythong with gcc. Why? + +ANSWER: If you have only 2 MB RAM, gcc will die silently without compiling + anything. You must have at least 4 MB to do compilations + + +QUESTION: I'm using a program that uses signal handlers which are installed +using sigaction() with the SA_NOMASK, and they get a general protection +error right after the signal handler tries to return. What's going +wrong? + +ANSWER: You are using a libc.a that has an out-of-date signal.o and +sig_restore.o file, and they don't know how to deal with SA_NOMASK. +(The one in gccbin.tar.Z is out-of-date.) You can obtain complete +sources to the libc.a library from the FTP sites, and compile your own +to make sure that you have the most up-to-date versions of all the +library routines. + +QUESTION: gcc complains about not finding crt0.o and the system include files +What am i doing wrong ? + +ANSWER: The include files normal place is in /usr/include. libc.a and *.a +should be in /usr/lib diff --git a/Linux-0.11/docs/FAQv.txt b/Linux-0.11/docs/FAQv.txt new file mode 100644 index 00000000..c6b742f3 --- /dev/null +++ b/Linux-0.11/docs/FAQv.txt @@ -0,0 +1,265 @@ +head 1.1; +branch ; +access ; +symbols ; +locks tytso:1.1; strict; +comment @# @; + + +1.1 +date 91.12.19.11.59.54; author tytso; state Exp; +branches ; +next ; + + +desc +@@ + + + +1.1 +log +@Initial revision +@ +text +@ +QUESTION: What is linux? + +ANSWER: Linux is a small unix for 386-AT computers, that has the added +advantage of being free. It is still in beta-testing, but is slowly +getting useful even for somewhat real developement. + + +QUESTION: Does it run on my computer? + +ANSWER: Linux has been written on a clone-386, with IDE drives and a VGA +screen. It should work on most similar setups. The harddisk should be +AT-standard (ie not SCSI, ESDI), and the system must be ISA. Otherwise +the requirements seem relatively small: a 386 (SX, DX or any 486). The +current version (0.10) needs a colour screen adapter, but this is not +the case with the next version. + +It needs at least 2M to run, and 4M is definitely a plus. It can happily +use up to 16M (and more if you change some things). + + +QUESTION: Will linux run on a PC or 286-AT? If not, why? + +ANSWER: Linux uses the 386 chip protected mode functions extensively, +and is a true 32-bit operating system. Thus x86 chips, x<3, will simply +not run it. + + +QUESTION: Does linux do paging? Can I have virtual memory on my small +machine? + +ANSWER: Linux does use the 386 paging unit, but currently only for +memory management. No use of disks as expansion RAM. This is one of the +things that will be implemented sometime in the (far?) future. Linux +also uses the paging unit to share pages between several processes after +a fork: thus it needs less memory. However, almost all the user programs +available for linux are GNU software, which want gobs and gobs of +memory. This is the reason at least 4M is recommended: GNU cc (gcc) +simply won't run in less. + + +QUESTION: Can I have tasks spanning the full 4GB of addressable 386 +memory? No more 64kB limits like in coherent or standard minix? + +ANSWER: Linux does limit the task-size, but at a much more reasonable +64MB (MEGA-byte, not kilos), so bigger programs are no problem. + + +QUESTION: Does the bigger program sizes mean I can run X? + +ANSWER: X is not ported to linux, and though I hope it will be some day, +I cannot guarantee it. It's big, and wants a lot from the system. + + +QUESTION: Where can I get linux? Is there a mailserver? + +ANSWER: Linux can be gotten by anonymous ftp from + nic.funet.fi (128.214.6.100): + directory /pub/OS/Linux + Tupac-Amaru.Informatik.RWTH-Aachen.DE (137.226.112.31): + directory /pub/msdos/replace + tsx-11.mit.edu (18.172.1.2): + directory /pub/linux + ftp.eecs.umich.edu (141.212.99.7): + directory linux +You might want to check out which of these is the most up-to-date. + +If you don't have ftp-capability, you are in trouble. You might try +mailing "mailserver@@nic.funet.fi" with "help" in the body of the mail. + + +QUESTION: Is there a newsgroup or mailing-list about linux? Where can I +get my questions answered? How about bug-reports? + +ANSWER: There is a mailing list set up at the address +'Linux-activists@@niksula.hut.fi'. To join, mail a request to +'Linux-activists-request@@niksula.hut.fi'. DO NOT mail "I want to +[un]subscribe" to the mailing-list, use the request-address. + +Questions and bug-reports can be sent either to the mailing-list or to +"torvalds@@kruuna.helsinki.fi", depending on which you find more +appropriate. + + +QUESTION: I got the minix-demo, but it won't boot. Linux boots from +floppy. What's wrong? + +ANSWER: You probably wrote the minix demo to a 1.44M disk, which (for +some unfathomable reason) doesn't work. The minix demo wants a 720kB or +1.2M disk. + + +QUESTION: The minix-demo boots all right, but doesn't seem to recognize +my second harddisk. What's up? + +ANSWER: The minix-demo does support a second harddisk, but there are no +special files made for it, and the minix demo doesn't include the +"mknod" command. Mount the linux root-floppy, and use the devices on +that. + + +QUESTION: How can I be sure I won't be writing over anything important? +I have to use DOS in on my machine, and I don't want to lose any files. + +ANSWER: Back up everything. Just in case. Then, write some easily +recognizable pattern to the partition you have reserved for linux, using +some DOS tool. You can then use "cat /dev/hdX" under minix to examine +which of the partitions you used. + + +QUESTION: Minix mkfs doesn't accept the size I give the device, although +I double-checked with fdisk, and it's correct. + +ANSWER: Be sure you give the size in BLOCKS, ie 1024 bytes, not sectors. +Also, make doubly certain that you have the correct partition. + + +QUESTION: I used the minix mkfs to make a filesystem on /dev/hd3 after +having checked that this was indeed the partition I had reserved. Minix +mounts the new partition ok, but linux doesn't. What gives? + +ANSWER: In some cases partitions are numbered differently under minix +and linux. This seems to correlate to the FDISK version you have used. +/dev/hd3 under minix may be /dev/hd2 under linux etc. + +There are a few rules about this: /dev/hd0 and /dev/hd5 are always the +same under linux and minix. DO NOT USE THEM, they are the whole raw +disk, not partitions. Also if a partition is on drive 1 under minix (ie +/dev/hd1-4), it is drive 1 under linux as well. + + +QUESTION: I mounted the linux filesystem, and copied the files from the +root-disk to the harddisk. Now I cannot find them any more, and +somethimes linux dies with a "panic: trying to free unused inode". + +ANSWER: You have probably forgot to sync before rebooting. Linux, like +all unices, use a "buffer cache" to speed up reads and writes to disk. +On a machine that has enough memory, this buffer-cache is 1.5MB, and if +you forget to sync before exiting, it may not be fully written out to +disk. Re-mkfs and re-install (or try to use the preliminary fsck, but +remeber that although fsck tries to correct the faults it finds, it may +fail.) + + +QUESTION: the mtools package on the root-disk won't work. I get an +ENOENT error message for all devices. + +ANSWER: mtools needs to be told which device to look for. Use 'ln' or +'mknod' to create a sepcial file called "/dev/dosX", where X is A, B or +C. This file should point to the device you want to read. + + +QUESTION: Turbo (Microsoft) Assembler won't compile the Linux boot code. +In fact, some of the opcodes in these files look completely unfamiliar. Why? + +ANSWER: The Linux boot codes are written in Bruce Evans' minix assembler, +which has the same opcodes as the original minix assembler. There are a few +differences between these and normal DOS assemblers: + + - No segments - everything is in the same segment (at least in the + bootsectors and setup, as they don't use the .data segments) + + - mov[b|w|l] are shorter versions of mov ax,[byte|word|long] ptr [XXX]. + This is how unix assemblers normally give the size (byte, word or long). + Gas has similar constructs. + + - There is no "jmp short", the opcodes are "j" for a short jump and + "jmp" for a long one. + + - "jmpi" is a jump with a segment:offset pair. I don't know how this is + written in DOS assembly. + + +QUESTION: While running du I get "Kernel panic: free_inode: bit already +cleared". Also, du produces a ENOENT error for all the files in certain +of my directories. What's going on? + +ANSWER: These are both consistent with a bad file-system. That's relatively +easy to produce by not syncing before rebooting, as linux usually has 1.5MB +of buffer space held in memory (unless you have <=4M RAM, in which case +the buffers are only about 0.5MB). Also linux doesn't do anything +special about the bit-map blocks, and as they are used often, those are +the thing most likely to be in memory. If you reboot, and they haven't +been written to disk ... + +I'm afraid that as long as there is no fsck for linux there is no way to +correct the matter (unless you have minix and can run minix fsck), and +the only thing to do is to reinstall the filesystem from scratch (ie do +a mkfs from the minix demodisk and reboot from the original +linux-floppy). + +A sync is done only every 30 seconds normally (standard unix practice), +so do one by hand (some people think you should do 3 syncs after each +other, but that's superstition), or by logging out from the +startup-shell, which automatically syncs the system. Unmounting a +filesystem also syncs it (but of course you can never unmount root). + +Another (sad) possibility is that you have bad blocks on your disk. Not +very probable, as they would have to be in the inode-tables, just a +couple of blocks in size. Again there aren't programs available to read +a disk for bad sectors and put them in some kind of "bad-sector-file". +On IDE drives this is no problem (bad sectors are automatically mapped +away). + + +QUESTION: What is the "em" binary? + +ANSWER: Em is micro-EMacs (probably version 3.10). + +QUESTION: I seem to be unable to compile anythong with gcc. Why? + +ANSWER: If you have only 2 MB RAM, gcc will die silently without compiling + anything. You must have at least 4 MB to do compilations + + +QUESTION: I'm using a program that uses signal handlers which are installed +using sigaction() with the SA_NOMASK, and they get a general protection +error right after the signal handler tries to return. What's going +wrong? + +ANSWER: You are using a libc.a that has an out-of-date signal.o and +sig_restore.o file, and they don't know how to deal with SA_NOMASK. +(The one in gccbin.tar.Z is out-of-date.) You can obtain the newer +signal.c from the unistd.tar.Z file, but don't use the associated +sig_restore.c from there; the FTP sites should have a separate +sig_restore.c which is up to date. While you're at it, you should also +get an updated crt0.c file as well, and install your new crt0.o and +libc.a in /usr/lib. + +(This answer will likely change in the near future, since there are +plans to change the format of the signal trampoline code yet again.... +but for now, this should be an accurate description of how things stand +now.) + + +QUESTION: gcc complains about not finding crt0.o and the system include files +What am i doing wrong ? + +ANSWER: The include files normal place is in /usr/include. libc.a and *.a +should be in /usr/lib +@ diff --git a/Linux-0.11/docs/INFO-SHEET-0.11 b/Linux-0.11/docs/INFO-SHEET-0.11 new file mode 100644 index 00000000..baf7e490 --- /dev/null +++ b/Linux-0.11/docs/INFO-SHEET-0.11 @@ -0,0 +1,113 @@ +LINUX INFORMATION SHEET + + +1. WHAT IS LINUX 0.11 + LINUX 0.11 is a freely distributable UNIX clone. It is almost +fully System V compatible. LINUX has been written from scratch, and +therefore does not contain any AT&T or MINIX code--not in the kernel, +the compiler, the utilities, or the libraries. For this reason it can +be made available with the complete source code via anonymous FTP. +Sorrily, it runs only on 386/486 AT-bus-machines. EISA will probably do +too, but you need an AT-Bus controller for your harddisk. + + + Version 0.11 is still a beta release, but it provides almost full +functionality. Various users have been able to compile bigger projects +like bison/flex by only changing the makefile to their needs, and these +tools are fully functional. + + +2. LINUX features + - System call compatible with V7 of the UNIX operating system + - Full multiprogramming (multiple programs can run at once) + - Memory paging with copy-on-write + - Demand loading of executables + - Page sharing of executables + - ANSI compliant C compiler (gcc) + - A complete set of compiler writing tools + (bison as yacc-replacement, flex as lex replacement) + - The gnu-born again shell (bash) + - Micro emacs + - most utilities you need for development + (cat, cp, kermit, ls, make, etc.) + - Over 200 library procedures (atoi, fork, malloc, read, stdio, etc.) + - Currently 3 national keyboards: finnish/us/german + - Full source code (in C) for the OS is freely distributable + - Full source code of the tools can be gotten from many anonymous ftp sites + (It's almost completel the GNU project) + - Runs in protected mode on 386 and above + - Support for extended memory up to 16M on 386 and above + - RS-232 serial line support with terminal emulation, kermit, zmodem, etc. + - Supports the real time clock + + + +3. HARDWARE REQUIRED + - A 386 or 486 machine that is an AT-bus-machine. EISA will probably do + too. + - An IDE hard disk is required to use this system. + - Both 5.25" and 3.5" diskettes are supported + - At least 2 megabytes of RAM is required for LINUX to be operational, + but gcc will only work from 4 MB on. + - Any video card will do + - Up to two serial lines are supported + - The real time clock is supported + + +4. PARTIAL LIST OF UTILITIES INCLUDED IN OR AVAILABLE FOR LINUX 0.10 + - The MTOOLS package (reading/writing to DOS) + - The complete GNU filetools (ls,cat,cp,mv,...) + - The GNU C compiler with GNU assembler,linker,ar,... + - bison + - flex + - rcs + - pmake (BSD 4.2 make) + - kermit + - Micro emacs + - less + - mkfs + - fsck + - mount/umount + + + +5. LINUX BINARIES + The LINUX binaries (including all the tools) are available at three + anonymous FTP sites. These are: + nic.funet.fi:/pub/OS/Linux + tsx-11.mit.edu + tupac-amaru.informatik.rwth-aachen.de:/pub/msdos/replace + + + +6. LEGAL STATUS OF LINUX + Although LINUX is supplied with the complete source code, it is +copyrighted software. But it is, opposite to MINIX available for free, +provided you obey to the rules specified in the LINUX copyright. + + + +7. NEWS ABOUT LINUX + Since LINUX's introduction to the public there has been a rapidly +growing mailing list, "linux-activists@joker.cs.hut.fi". To subscribe +to this list, mail to "linux-activists-requests@joker.cs.hut.fi". If +the traffic in this lists increases further, there are plans to swap +(at least partially) over to comp.os.misc, so watch out for any LINUX +articles in this group. If you simply want to know whats the current +state of the art, do a "finger torvalds@kruuna.helsinki.fi", and you'll +get some information. + + + +8. FUTURE PLANS + The major current project is bringing LINUX to a version number +greater than 1.0. It has also to undergo some (minor) revisions to be +compatible to the IEEE POSIX P1003.1 and P1003.2 standards. Various +people are currently working on + - math support/fp emulation in the kernel + - Page swapping (since paging is alreay implemented) + - A virtual filesystem layer + - STREAMS +If you want to join the developers, join the mailing list + + diff --git a/Linux-0.11/docs/INSTALL-0.11 b/Linux-0.11/docs/INSTALL-0.11 new file mode 100644 index 00000000..4ab694a5 --- /dev/null +++ b/Linux-0.11/docs/INSTALL-0.11 @@ -0,0 +1,206 @@ + + Using Linux v0.11 + Linus Torvalds 08.12.91 + +NOTE: Users of 0.10, please check the "changed" list before using 0.11. + + Booting linux + +Linux-0.11 can easily be booted by getting the 2 files bootimage-0.11.Z +and rootimage-0.11.Z from the linux archive, uncompressing them and +writing them out to disks of the same size (ie 2 1.44M floppies or 2 +1.2M floppies). Writing the disks is done with the "rawrite.exe" program +from dos, or with "dd" from unix. Linux is then booted simply by +inserting the bootdiskette in drive A, and rebooting the machine. If +everything goes well, linux will ask you to insert the root-disk after +loading the system. Hopefully linux will then correctly load the shell +executable, and leave you as root on the new system (prompt '# '). + + Using it. + +You can get a complete list of available commands by pressing +twice: the root-disk contains mostly setup-programs needed to install +the system on a harddisk. You can test them a bit, reading directories +etc. + +In order to install linux on the harddisk, first check out your harddisk +by executing the command "fdisk" - it should show you all the partitions +available. If you have only 1 AT-harddisk, you should get a +errormessage, just ignore it. At my system fdisk reports the following: + +/dev/hd1: 20476 blocks minix +/dev/hd2: 19975 blocks minix +/dev/hd3: 1020 blocks minix +/dev/hd4: 170 blocks active 16-bit DOS (>=32M) +/dev/hd6: 41641 blocks active minix + +The partition type given (12-bit DOS, minix etc) doesn{t really mean +anything, unless it's a "extended partition", in which case you +shouldn't use that partition for anything: linux doesn't yet understand +them. When later using "mkfs" to make a linux file system, it won't +change the output of fdisk, so fdisk may well report "DOS", while in +fact you have made it a linux partition. + +If fdisk doesn't print out anything but errors, linux is unable to read +your harddisk, and you are f**ked. Play around with the floppy version, +but you won't be able to do anything real. + + Making a filesystem + +In order to really use linux, you will have to make a filesystem on your +harddisk. This starts by deciding which partition you can use. Look +again at what fdisk reports, and try to figure out which of the +partitions you are using for DOS, OS/2 etc. /dev/hdX where X={1,2,3,4} +always refers to the first harddisk, X={6,7,8,9} always refers to the +second disk. /dev/hd0 and /dev/hd5 are special: they are all of the +drive, and mkfs will refuse to use them for a filesystem. + +When you are certain you know which device points to which partition, +you make a filesystem on the partition of your choice by writing: + + mkfs -c /dev/hdX blocks + +where "-c" means that you want mkfs to check for errors, "dev/hdX" is +the free partition you intend to use for linux, and "blocks" is the +number of blocks fdisk reports for that particular partition. NOTE! mkfs +will overwrite the partition you selected, so be doubly (or triply) sure +that you don't mind that. + +Note that when using the "-c" flag, mkfs will read through the entire +partition: this can take some time. If there are read errors, mkfs will +mark the particular block as bad, and continue: linux will also print a +little message "harddisk I/O error". After running mkfs these messages +should never occur again: if they do, your data may be corrupted. + + Mounting the filesystem + +After mkfs has exited, it's time to mount the file-system, and do the +necessary things to make it a root file system. Mount the new filesystem +on /user by writing: + + cd / + mount /dev/hdX /user + +If you get errors for this, mkfs failed, and there is probably something +seriously wrong. + +After mounting the device, you want to move all the files on the current +floppy-root to the new fs. This can most easily be done by writing: + + cd /user + for i in bin dev etc usr tmp floppy + do + cp +recursive +verbose /$i $i + done + sync + +which will also tell you what it is doing (/bin/sh -> bin/sh etc). + +After that, you should have a new filesystem that contains the bare +necessities to start hacking linux. Play around some more, and exit +linux by writing "logout or exit". This should result in + + child 4 died with error code 0000 + # + +Do a couple of syncs (3 is a magic number), and reboot the machine. +ALWAYS remember to sync before rebooting: terrible things happen if you +don't. + + Using the harddisk as root + +Once you have happily made a new root, you will want to boot up with it. +This is done by changing a word at offset 508 in the boot-image. The +word (in 386-order, ie low byte first) tells the system which device to +use as root: it is initially 0, which means that we want to use a floppy +of the same type as the boot-disk (and this is the reason that you may +not use a 360kB boot-disk even though the system fits on one: it has to +be the same type as the root-diskette). + +In order to use the harddisk as root, this value has to be changed to +point to the correct device. Harddisks have a major number of 3 under +linux, and the minor nr is the same as the number X in /dev/hdX. The +complete device number is then calculated with + + DEV_NO = (major<<8)+minor + +or alternatively major*256+minor. Thus /dev/hd1 is (3<<8)+1 = 0x301, +/dev/hd6 = 0x0306 etc. Assuming the partition you made into the new root +was /dev/hd2, you will have to write 0x0302 into the boot-image. That +is, you should change the 508th byte in the image to 0x02, and the 509th +byte to 0x03. There is a sample program for this in some of the older +INSTALL-notes, if you don't understand what it's all about. + + Ok, I got the root on hd, what now? + +As you have probably noticed, you cannot get very far with the binaries +found on the original root-diskette. So the first thing you want to do +is to import some new binaries. To do this you need to tell linux what +kind of floppies you have, as that's the easiest way to import things. + +As with harddisk, floppies have device numbers, but this time major = 2 +instead of 3. The minor number is not as easy: it's a composite that +tells which drive (A, B, C or D) and what type of drive (360kB, 1.2M, +1.44M etc). The formula is 'minor = type*4+nr', where nr is 0-3 for A-D, +and type is 2 for 1.2M disks, and 7 for 1.44M disks. There are other +types, but these should suffice for now. + +Thus if you have a 1.2M A-drive, and want to call it "floppy0", you have +to tell linux so. This is done with the "mknod" command. mknod takes 4 +paramters: the unix name of the device, a "b" or a "c" depending on +whether it's a Block of Character device, and the major and minor +numbers. Thus to make "floppy0" a 1.2M A-drive, you write: + + mknod /dev/floppy0 b 2 8 + +b is for Block-device, the 2 is for floppy, and the 8 is 4*2+0, where +the 2 is 1.2M-drive and the 0 is drive A. Likewise to make a "floppy1" +device that is a 1.44M drive in B, you write: + + mknod /dev/floppy1 b 2 29 + +where 29 = 4*7 + 1. There are a couple of standard names, for users +that are used to minix (major, minor in parentheses): /dev/PS0 is a +1.44M in A (2,28), /dev/PS1 a 1.44M in B (2,29), /dev/at0 is a 1.2M in A +(2,8), /dev/at1 is a 1.2M in B (2,9). Use mknod to make those that fit +your computer. + +After you have made these special block devices, you can now read a +floppy under linux. The easiest way to import things into linux is by +writing a tar-file to a floppy with rawrite.exe, and then using: + + tar xvf /dev/floppy0 + +to untar it under linux. This way you can get the gcc binaries etc +available from the linux-carrying sites. + + Changes from 0.10: + +- /bin/update is no longer automatically executed upon bootup: instead +the file /etc/rc is evaluated by the shell. This file can then start the +update process, mount andy needed filesystems, possibly fsck'ing them +first. A minimal /etc/rc looks like this: + + /bin/update & + > /etc/mtab + echo " Ok." + +- init() restarts the shell every time it is exited: logout from the +login shell results in a "child xxx died with error code yyy", a sync +and then a new shell as root. + +- floppies work a lot better than in 0.10. Even using two floppies at +the same time seems to work out ok. Reading big chunks at a time is also +faster then in 0.10 (I think). + +- harddisk errors are handled better. Use the "-c" option in mkfs to map +out all errors. + +- linux accepts most video-cards: harcules, MDA, CGA etc seem to work. + +- ^G beeps on the console, so command completion under bash etc will +notify of errors. + +- sticky directories, corrected handling of uid/gid bits, and better +handling of protections when not root. Most of these won't be noticeable +until we get a init/login. diff --git a/Linux-0.11/images/bootimage-0.11.Z b/Linux-0.11/images/bootimage-0.11.Z new file mode 100644 index 00000000..d74976a5 Binary files /dev/null and b/Linux-0.11/images/bootimage-0.11.Z differ diff --git a/Linux-0.11/images/rootimage-0.11.Z b/Linux-0.11/images/rootimage-0.11.Z new file mode 100644 index 00000000..419d3d01 Binary files /dev/null and b/Linux-0.11/images/rootimage-0.11.Z differ diff --git a/Linux-0.11/info/vt102.codes b/Linux-0.11/info/vt102.codes new file mode 100644 index 00000000..b12eecaa --- /dev/null +++ b/Linux-0.11/info/vt102.codes @@ -0,0 +1,386 @@ + +Escape codes for vt102 terminal. + +All numbers below are octal. means numeric value, means character string. +If is missing it is 0 or in cursor movements 1. + +Reset and set modes + Set Modes + Esc [ ; ... ; h + 033 133 073 073 150 + Reset Modes + Esc [ ; ... ; l + 033 133 073 073 154 + + Where is + '2'= Lock keyboard (set); Unlock keyboard (reset) + '4'= Insert mode (set); Replace mode (reset) + '12'= Echo on (set); Echo off (reset) + '20'= Return = CR+LF (set); Return = CR (reset) + '?1'= Cursorkeys application (set); Cursorkeys normal (reset) + '?2'= Ansi (set); VT52 (reset) + '?3'= 132 char/row (set); 80 char/row (reset) + '?4'= Jump scroll (set); Smooth scroll (reset) + '?5'= Reverse screen (set); Normal screen (reset) + '?6'= Sets relative coordinates (set); Sets absolute coordinates (reset) + '?7'= Auto wrap (set); Auto wrap off (reset) + '?8'= Auto repeat on (set); Auto repeat off (reset) + '?18'= Send FF to printer after print screen (set); No char after PS (reset) + '?19'= Print screen prints full screen (set); PS prints scroll region (reset) + '?25'= Cursor on (set); Cursor off (reset) + +Set scrolling region (n1=upper,n2=lower) + Esc [ ; r + 033 133 073 162 + + +Cursor movement (=how many chars or lines), cursor stop at margin. + Up + Esc [ A + 033 133 101 + Down + Esc [ B + 033 133 102 + Right + Esc [ C + 033 133 103 + Left + Esc [ n D + 033 133 104 + Cursor position (=y,=x, from top of screen or scroll region) + Esc [ ; H + 033 133 073 110 + Or Esc [ ; f + 033 133 073 146 + Index (cursor down with scroll up when at margin) + Esc D + 033 104 + Reverse index (cursor up with scroll down when at margin) + Esc M + 033 115 + Next line (CR+Index) + Esc E + 033 105 + Save cursor and attribute + Esc 7 + 033 067 + Restore cursor and attribute + Esc 8 + 033 070 + + +Keybad character selection + Application keypad mode + Esc = + 033 075 + Numeric keypad mode + Esc > + 033 076 + + Keypadkeys codes generated + Numeric Application VT52 Application + 0 0 (060) Esc O p (033 117 160) Esc ? p (033 077 160) + 1 1 (061) Esc O q (033 117 161) Esc ? q (033 077 161) + 2 2 (062) Esc O r (033 117 162) Esc ? r (033 077 162) + 3 3 (063) Esc O s (033 117 163) Esc ? s (033 077 163) + 4 4 (064) Esc O t (033 117 164) Esc ? t (033 077 164) + 5 5 (065) Esc O u (033 117 165) Esc ? u (033 077 165) + 6 6 (066) Esc O v (033 117 166) Esc ? v (033 077 166) + 7 7 (067) Esc O w (033 117 167) Esc ? w (033 077 167) + 8 8 (070) Esc O x (033 117 170) Esc ? x (033 077 170) + 9 9 (071) Esc O y (033 117 171) Esc ? y (033 077 171) + - (minus) - (055) Esc O m (033 117 155) Esc ? m (033 077 155) + , (comma) , (054) Esc O l (033 117 154) Esc ? l (033 077 154) + . (period) . (056) Esc O n (033 117 156) Esc ? n (033 077 156) + Enter CR (015)* Esc O M (033 117 115) Esc ? M (033 077 115) + PF1 Esc O P Esc O P (033 117 120) Esc P (033 120) + PF2 Esc O Q Esc O Q (033 117 121) Esc Q (033 121) + PF3 Esc O R Esc O R (033 117 122) Esc R (033 122) + PF4 Esc O S Esc O S (033 117 123) Esc S (033 123) + * Or CR+LF (015 012) + + Cursorkeys codes generated (changed by set and reset modes '?1') + normal application + Up Esc [ A Esc O A + 033 133 101 033 117 101 + Down Esc [ B Esc O B + 033 133 102 033 117 102 + Right Esc [ C Esc O C + 033 133 103 033 117 103 + Left Esc [ D Esc O D + 033 133 104 033 117 104 + + +Select chaacter set + UK as G0 + Esc ( A + 033 050 101 + US as G0 + Esc ( B + 033 050 102 + Special characters and line drawing character set as G0 + Esc ( 0 + 033 050 060 + Alternate ROM as G0 + Esc ( 1 + 033 050 061 + Alternate ROM special characters character set as G0 + Esc ( 2 + 033 050 062 + + UK as G1 + Esc ) A + 033 051 101 + US as G1 + Esc ) B + 033 051 102 + Special characters and line drawing character set as G1 + Esc ) 0 + 033 051 060 + Alternate ROM as G1 + Esc ) 1 + 033 051 061 + Alternate ROM special characters character set as G1 + Esc ) 2 + 033 051 062 + + Selects G2 for one character + Esc N + 033 115 + Selects G3 for one character + Esc O + 033 117 + + +Set graphic rendition + Esc [ ; m + 033 133 073 156 + + Where is + 0 = Turn off attributes + 1 = Bold (Full) + 2 = Half + 4 = Underline + 5 = Blink + 7 = Reverse + 21 = Normal intensity + 22 = Normal intensity + 24 = Cancel underlined + 25 = Cancel blinking + 27 = Cancel reverse + +Tab stops + Set horizontal tab + Esc H + 033 110 + Clear horizontal tab + Esc [ g + 033 133 147 + Or Esc [ 0 g + 033 133 060 147 + Clear all horizontal tabs + Esc [ 3 g + 033 133 063 147 + + +Line attributes + Double-height + Top half + Esc # 3 + 033 043 063 + Bottom half + Esc # 4 + 033 043 064 + Single-width, single-height + Esc # 5 + 033 043 065 + Double-width + Esc # 6 + 033 043 066 + + +Erasing + Erase in line + End of line (including cursor position) + Esc [ K + 033 133 113 + Or Esc [ 0 K + 033 133 060 113 + Beginning of line (including cursor position) + Esc [ 1 K + 033 133 061 113 + Complete line + Esc [ 2 K + 033 133 062 113 + Erase in display + End of screen (including cursor position) + Esc [ J + 033 133 112 + Or Esc [ 0 J + 033 133 060 112 + Beginning of screen (including cursor position) + Esc [ 1 J + 033 133 061 112 + Complete display + Esc [ 2 J + 033 133 062 112 + + +Computer editing + Delete characters ( characters right from cursor + Esc [ P + 033 133 120 + Inser line ( lines) + Esc [ L + 033 133 114 + Delete line ( lines) + Esc [ M + 033 133 115 + + +Printing + Esc [ i + 033 133 151 + + Where is + ''= Same as '0' + '0'= Prints screen (full or scroll region) + '4'= Printer controller off + '5'= Printer controller on (Print all received chars to printer) + '?1'= Print cursor line + '?4'= Auto print off + '?5'= Auto print on (Prints line to printer when you exit from it) + + +Reports + Device status + Esc [ n + 033 133 156 + + Where is + '0'=Response Ready, no malfunctions detected + '3'=Malfunction, error in self-test. + '5'=Status report request + '6'=Request cursor position. + '?10'=Response to printer status request, All ok. + '?11'=Response to printer status request, Printer is not ready. + '?13'=Response to printer status request, No printer. + '?15'=Status report request from printer + + Cursor position raport (Response to request cursor position) + Esc [ ; R + 033 133 073 122 + Request terminal to identify itself (esc Z may not be supported in future) + Esc [ c + 033 133 143 + Esc [ 0 c + 033 133 060 143 + Esc Z + 033 132 + Response to terminal identify (VT102) + Esc [ ? 6 c + 033 133 077 066 143 + + +Reset to initial state + Esc c + 033 143 + + +Tests + Invoke confidence test + Esc [ 2 ; y + 033 133 062 073 171 + + Where is + '1'= Power-up test + '2'= Data loopback test + '4'= EIA loopback test + '9'= Power-up tests (continuously) + '10'= Data loopback tests (continuously) + '12'= EIA loopback tests (continuously) + '16'= Printer loopback test + '24'= Printer loopback tests (continuously) + + +Screen adjustments + Esc # 8 + 033 043 070 + + +Keyboard indicator + Led L1 off + Esc [ 0 q + 033 133 060 181 + Led L1 on + Esc [ 1 q + 033 133 061 181 + + + +VT52 sequences + Ansi mode + Esc < + 033 074 + Cursor positioning + Up Esc A + 033 101 + Down Esc B + 033 102 + Right Esc C + 033 103 + Left Esc D + 033 104 + Home Esc H + 033 110 + Direct cursor address + Esc Y + 033 131 + Reverse linefeed Esc I + 033 111 + Erase to end of line Esc K + 033 113 + Erase to end of screen Esc J + 033 112 + Auto print on Esc ^ + 033 136 + Auto print off Esc + 033 137 + Printer controller on Esc W + 033 127 + Printer controller off Esc X + 033 130 + Print cursor line Esc V + 033 135 + Print screen Esc ] + 033 135 + Indentify request Esc Z + 033 132 + Response to indetify Esc / Z + request (VT52) 033 057 132 + Special charset (same Esc F + as line draw in VT102 033 106 + Normal char set Esc G + 033 107 + + +Control characters + 000 = Null (fill character) + 003 = ETX (Can be selected half-duplex turnaround char) + 004 = EOT (Can be turnaround or disconnect char, if turn, then DLE-EOT=disc.) + 005 = ENQ (Transmits answerback message) + 007 = BEL (Generates bell tone) + 010 = BS (Moves cursor left) + 011 = HT (Moves cursor to next tab) + 012 = LF (Linefeed or New line operation) + 013 = VT (Processed as LF) + 014 = FF (Processed as LF, can be selected turnaround char) + 015 = CR (Moves cursor to left margin, can be turnaround char) + 016 = SO (Selects G1 charset) + 017 = SI (Selects G0 charset) + 021 = DC1 (XON, causes terminal to continue transmit) + 023 = DC3 (XOFF, causes terminal to stop transmitting) + 030 = CAN (Cancels escape sequence) + 032 = SUB (Processed as CAN) + 033 = ESC (Processed as sequence indicator) + diff --git a/Linux-0.11/info/xterm-seqs.ms b/Linux-0.11/info/xterm-seqs.ms new file mode 100644 index 00000000..289c7866 --- /dev/null +++ b/Linux-0.11/info/xterm-seqs.ms @@ -0,0 +1,502 @@ +.\"#! troff -Q -ms $1 +.\" This is the "Xterm Control Sequences" document, originally written by +.\" Edward Moy, University of California, Berkeley, for the X.V10R4 xterm. +.\" Some minor edits have been made to begin to reconcile this document with +.\" the current sources, but it still has a long way to go: +.\" +.\" 1) I don't guarantee that this is 100% correct. I tried most of +.\" the things that seemed to be different, and this document +.\" reflects what I saw. Stuff that appears to be in the X10R4 +.\" document and missing from this document is so because it +.\" appears not to be present in the X11 version of "xterm" (e.g., +.\" the "Alternate Character ROM" character sets and the Sun TTY +.\" emulation). +.\" +.\" 2) It is definitely not 100% complete; some escape sequences +.\" that do something that's either unobservable - at least in +.\" the current state of the code - or not useful aren't +.\" documented. An example of the former are the Locking Shift +.\" sequences that modify the interpretation of the GR +.\" characters; at present, it sets a state variable that's +.\" unused, but perhaps some future version will use it (perhaps +.\" for displaying characters in the range 0200-0377?). An +.\" example of the latter is the sequence to set DECANM mode +.\" (ANSI/VT52 mode): it doesn't do what it does on a VT100, +.\" namely get the terminal to emulate a VT100, it only seems to +.\" fiddle the current character set a bit. +.\" +.\" 3) It doesn't document any of the mouse-related stuff, such as +.\" what the "Track Mouse" escape sequence does, or what the +.\" different mouse modes (MIT, VT220, "VT220 Hilite") do; I +.\" leave that to somebody familiar with that part of the code.... +.\" +.\" Run this file through troff and use the -ms macro package. +.ND +.de St +.sp +.nr PD 0 +.nr PI 1.5i +.nr VS 16 +.. +.de Ed +.nr PD .3v +.nr VS 12 +.. +.rm CH +.ds LH Xterm Control Sequences +.nr s 6*\n(PS/10 +.ds L \s\nsBEL\s0 +.ds E \s\nsESC\s0 +.ds T \s\nsTAB\s0 +.ds X \s\nsETX\s0 +.ds N \s\nsENQ\s0 +.ds e \s\nsETB\s0 +.ds C \s\nsCAN\s0 +.ds S \s\nsSUB\s0 +.nr [W \w'\*L'u +.nr w \w'\*E'u +.if \nw>\n([W .nr [W \nw +.nr w \w'\*T'u +.if \nw>\n([W .nr [W \nw +.nr w \w'\*X'u +.if \nw>\n([W .nr [W \nw +.nr w \w'\*N'u +.if \nw>\n([W .nr [W \nw +.nr w \w'\*e'u +.if \nw>\n([W .nr [W \nw +.nr w \w'\*C'u +.if \nw>\n([W .nr [W \nw +.nr w \w'\*S'u +.if \nw>\n([W .nr [W \nw +.nr [W +\w'\|\|'u +.de [] +.nr w \w'\\$2' +.nr H \\n([Wu-\\nwu +.nr h \\nHu/2u +.ds \\$1 \(br\v'-1p'\(br\v'1p'\h'\\nhu'\\$2\h'\\nHu-\\nhu'\(br\l'-\\n([Wu\(ul'\v'-1p'\(br\l'-\\n([Wu\(rn'\v'1p'\| +.. +.[] Et \v'-1p'\*X\v'1p' +.[] En \v'-1p'\*N\v'1p' +.[] Be \v'-1p'\*L\v'1p' +.[] Bs \v'-1p'\s\nsBS\s0\v'1p' +.[] Ta \v'-1p'\*T\v'1p' +.[] Lf \v'-1p'\s\nsLF\s0\v'1p' +.[] Vt \v'-1p'\s\nsVT\s0\v'1p' +.[] Ff \v'-1p'\s\nsFF\s0\v'1p' +.[] Cr \v'-1p'\s\nsCR\s0\v'1p' +.[] So \v'-1p'\s\nsSO\s0\v'1p' +.[] Si \v'-1p'\s\nsSI\s0\v'1p' +.[] Eb \v'-1p'\*e\v'1p' +.[] Ca \v'-1p'\*C\v'1p' +.[] Su \v'-1p'\*S\v'1p' +.[] Es \v'-1p'\*E\v'1p' +.[] Fs \v'-1p'\s\nsFS\s0\v'1p' +.[] Gs \v'-1p'\s\nsGS\s0\v'1p' +.[] Rs \v'-1p'\s\nsRS\s0\v'1p' +.[] Us \v'-1p'\s\nsUS\s0\v'1p' +.[] # # +.[] (( ( +.[] ) ) +.[] * * +.[] + + +.[] 0 0 +.[] 1 1 +.[] 2 2 +.[] 3 3 +.[] 4 4 +.[] 5 5 +.[] 6 6 +.[] 7 7 +.[] 8 8 +.[] 9 9 +.[] : : +.[] ; ; +.[] = = +.[] > > +.[] ? ? +.[] @ @ +.[] A A +.[] cB B +.[] C C +.[] D D +.[] E E +.[] F F +.[] H H +.[] J J +.[] K K +.[] L L +.[] M M +.[] N N +.[] O O +.[] P P +.[] R R +.[] S S +.[] T T +.[] Z Z +.[] [[ [ +.[] ] ] +.[] ` \` +.[] a a +.[] b b +.[] c c +.[] d d +.[] f f +.[] g g +.[] h h +.[] i i +.[] j j +.[] k k +.[] l l +.[] m m +.[] n n +.[] o o +.[] p p +.[] q q +.[] r r +.[] s s +.[] t t +.[] x x +.[] | | +.[] } } +.[] c~ ~ +.ds Cc \fIC\fP +.ds Ps \fIP\v'.3m'\h'-.2m'\s-2s\s0\v'-.3m'\fP +.ds Pm \fIP\v'.3m'\h'-.2m'\s-2m\s0\v'-.3m'\fP +.ds Pt \fIP\v'.3m'\h'-.2m'\s-2t\s0\v'-.3m'\fP +.ds Ix \fIx\fP +.ds Iy \fIy\fP +.ds Iw \fIw\fP +.ds Ih \fIh\fP +.ds Ir \fIr\fP +.ds Ic \fIc\fP +.nr LL 6.5i +.TL +Xterm Control Sequences +.am NP +.ds CF % +.. +.SH +Definitions +.IP \*(Cc +A single (required) character. +.IP \*(Ps +A single (usually optional) numeric parameter, composed of one of more digits. +.IP \*(Pm +A multiple numeric parameter composed of any number of single numeric +parameters, separated by \*; character(s). +.IP \*(Pt +A text parameter composed of printable characters. +.SH +VT102 Mode +.ds RH VT102 Mode +.LP +Most of these control sequences are standard VT102 control sequences. +There are, however, additional ones to provide control of +.I xterm +dependent functions, like the scrollbar or window size. +.St +.IP \\*(Be +Bell (Ctrl-G) +.IP \\*(Bs +Backspace (Ctrl-H) +.IP \\*(Ta +Horizontal Tab (Ctrl-I) +.IP \\*(Lf +Line Feed or New Line (Ctrl-J) +.IP \\*(Vt +Vertical Tab (Ctrl-K) +.IP \\*(Ff +Form Feed or New Page (Ctrl-L) +.IP \\*(Cr +Carriage Return (Ctrl-M) +.IP \\*(So +Shift Out (Ctrl-N) \(-> Switch to Alternate Character Set +.IP \\*(Si +Shift In (Ctrl-O) \(-> Switch to Standard Character Set +.IP \\*(Es\\*#\\*8 +DEC Screen Alignment Test (DECALN) +.IP \\*(Es\\*(((\\*(Cc +Select G0 Character Set (SCS) + \*(Cc = \*0 \(-> Special Character and Line Drawing Set + \*(Cc = \*A \(-> United Kingdom (UK) + \*(Cc = \*(cB \(-> United States (USASCII) +.IP \\*(Es\\*)\\*(Cc +Select G1 Character Set (SCS) + \*(Cc = \*0 \(-> Special Character and Line Drawing Set + \*(Cc = \*A \(-> United Kingdom (UK) + \*(Cc = \*(cB \(-> United States (USASCII) +.IP \\*(Es\\**\\*(Cc +Select G2 Character Set (SCS) + \*(Cc = \*0 \(-> Special Character and Line Drawing Set + \*(Cc = \*A \(-> United Kingdom (UK) + \*(Cc = \*(cB \(-> United States (USASCII) +.IP \\*(Es\\*+\\*(Cc +Select G3 Character Set (SCS) + \*(Cc = \*0 \(-> Special Character and Line Drawing Set + \*(Cc = \*A \(-> United Kingdom (UK) + \*(Cc = \*(cB \(-> United States (USASCII) +.IP \\*(Es\\*7 +Save Cursor (DECSC) +.IP \\*(Es\\*8 +Restore Cursor (DECRC) +.IP \\*(Es\\*= +Application Keypad (DECPAM) +.IP \\*(Es\\*> +Normal Keypad (DECPNM) +.IP \\*(Es\\*D +Index (IND) +.IP \\*(Es\\*E +Next Line (NEL) +.IP \\*(Es\\*H +Tab Set (HTS) +.IP \\*(Es\\*M +Reverse Index (RI) +.IP \\*(Es\\*N +Single Shift Select of G2 Character Set (SS2) +.IP \\*(Es\\*O +Single Shift Select of G3 Character Set (SS3) +.IP \\*(Es\\*Z +Return Terminal ID (DECID) +.IP \\*(Es\\*([[\\*(Ps\|\\*@ +Insert \*(Ps (Blank) Character(s) (default = 1) (ICH) +.IP \\*(Es\\*([[\\*(Ps\|\\*A +Cursor Up \*(Ps Times (default = 1) (CUU) +.IP \\*(Es\\*([[\\*(Ps\|\\*(cB +Cursor Down \*(Ps Times (default = 1) (CUD) +.IP \\*(Es\\*([[\\*(Ps\|\\*C +Cursor Forward \*(Ps Times (default = 1) (CUF) +.IP \\*(Es\\*([[\\*(Ps\|\\*D +Cursor Backward \*(Ps Times (default = 1) (CUB) +.IP \\*(Es\\*([[\\*(Ps\|\\*;\\*(Ps\|\\*H +Cursor Position [row;column] (default = [1,1]) (CUP) +.IP \\*(Es\\*([[\\*(Ps\|\\*J +Erase in Display (ED) + \*(Ps = \*0 \(-> Clear Below (default) + \*(Ps = \*1 \(-> Clear Above + \*(Ps = \*2 \(-> Clear All +.IP \\*(Es\\*([[\\*(Ps\|\\*K +Erase in Line (EL) + \*(Ps = \*0 \(-> Clear to Right (default) + \*(Ps = \*1 \(-> Clear to Left + \*(Ps = \*2 \(-> Clear All +.IP \\*(Es\\*([[\\*(Ps\|\\*L +Insert \*(Ps Line(s) (default = 1) (IL) +.IP \\*(Es\\*([[\\*(Ps\|\\*M +Delete \*(Ps Line(s) (default = 1) (DL) +.IP \\*(Es\\*([[\\*(Ps\|\\*P +Delete \*(Ps Character(s) (default = 1) (DCH) +.IP \\*(Es\\*([[\\*(Ps\|\\*;\\*(Ps\|\\*;\\*(Ps\|\\*;\\*(Ps\|\\*;\\*(Ps\|\\*T +Track Mouse [func;startcol;startrow;firstrow;lastrow] XXX - describe +.IP \\*(Es\\*([[\\*(Ps\|\\*c +Device Attributes (default 0) (DA) +.IP \\*(Es\\*([[\\*(Ps\|\\*;\\*(Ps\|\\*f +Horizontal and Vertical Position [row;column] (default = [1,1]) (HVP) +.IP \\*(Es\\*([[\\*(Ps\|\\*g +Tab Clear + \*(Ps = \*0 \(-> Clear Current Column (default) + \*(Ps = \*3 \(-> Clear All +.IP \\*(Es\\*([[\\*(Ps\|\\*h +Mode Set (SET) + \*(Ps = \*4 \(-> Insert Mode (IRM) + \*(Ps = \*2\*0 \(-> Automatic Linefeed (LNM) +.IP \\*(Es\\*([[\\*(Ps\|\\*l +Mode Reset (RST) + \*(Ps = \*4 \(-> Insert Mode (IRM) + \*(Ps = \*2\*0 \(-> Automatic Linefeed (LNM) +.IP \\*(Es\\*([[\\*(Pm\|\\*m +Character Attributes (SGR) + \*(Ps = \*0 \(-> Normal (default) + \*(Ps = \*1 \(-> Blink (appears as Bold) + \*(Ps = \*4 \(-> Underscore + \*(Ps = \*5 \(-> Bold + \*(Ps = \*7 \(-> Inverse +.IP \\*(Es\\*([[\\*(Ps\|\\*n +Device Status Report (DSR) + \*(Ps = 5 \(-> Status Report \*(Es\*([[\*0\*n \(-> OK + \*(Ps = 6 \(-> Report Cursor Position (CPR) [row;column] as +\*(Es\*([[\*(Ir\|\*;\*(Ic\|\*R +.IP \\*(Es\\*([[\\*(Ps\|\\*;\\*(Ps\|\\*r +Set Scrolling Region [top;bottom] (default = full size of window) (DECSTBM) +.IP \\*(Es\\*([[\\*(Ps\|\\*x +Request Terminal Parameters (DECREQTPARM) +.IP \\*(Es\\*([[\\*?\\*(Ps\|\\*h +DEC Private Mode Set (DECSET) + \*(Ps = \*1 \(-> Application Cursor Keys (DECCKM) + \*(Ps = \*3 \(-> 132 Column Mode (DECCOLM) + \*(Ps = \*4 \(-> Smooth (Slow) Scroll (DECSCLM) + \*(Ps = \*5 \(-> Reverse Video (DECSCNM) + \*(Ps = \*6 \(-> Origin Mode (DECOM) + \*(Ps = \*7 \(-> Wraparound Mode (DECAWM) + \*(Ps = \*8 \(-> Auto-repeat Keys (DECARM) + \*(Ps = \*9 \(-> Send MIT Mouse Row & Column on Button Press + \*(Ps = \*3\*8 \(-> Enter Tektronix Mode (DECTEK) + \*(Ps = \*4\*0 \(-> Allow 80 \z\(<-\(-> 132 Mode + \*(Ps = \*4\*1 \(-> \fIcurses\fP(5) fix + \*(Ps = \*4\*4 \(-> Turn On Margin Bell + \*(Ps = \*4\*5 \(-> Reverse-wraparound Mode + \*(Ps = \*4\*6 \(-> Start Logging + \*(Ps = \*4\*7 \(-> Use Alternate Screen Buffer + \*(Ps = \*1\*0\*0\*0 \(-> Send VT200 Mouse Row & Column on Button Press + \*(Ps = \*1\*0\*0\*3 \(-> Send VT200 Hilite Mouse Row & Column on Button Press +.IP \\*(Es\\*([[\\*?\\*(Ps\|\\*l +DEC Private Mode Reset (DECRST) + \*(Ps = \*1 \(-> Normal Cursor Keys (DECCKM) + \*(Ps = \*3 \(-> 80 Column Mode (DECCOLM) + \*(Ps = \*4 \(-> Jump (Fast) Scroll (DECSCLM) + \*(Ps = \*5 \(-> Normal Video (DECSCNM) + \*(Ps = \*6 \(-> Normal Cursor Mode (DECOM) + \*(Ps = \*7 \(-> No Wraparound Mode (DECAWM) + \*(Ps = \*8 \(-> No Auto-repeat Keys (DECARM) + \*(Ps = \*9 \(-> Don't Send Mouse Row & Column on Button Press + \*(Ps = \*4\*0 \(-> Disallow 80 \z\(<-\(-> 132 Mode + \*(Ps = \*4\*1 \(-> No \fIcurses\fP(5) fix + \*(Ps = \*4\*4 \(-> Turn Off Margin Bell + \*(Ps = \*4\*5 \(-> No Reverse-wraparound Mode + \*(Ps = \*4\*6 \(-> Stop Logging + \*(Ps = \*4\*7 \(-> Use Normal Screen Buffer + \*(Ps = \*1\*0\*0\*0 \(-> Don't Send Mouse Row & Column on Button Press + \*(Ps = \*1\*0\*0\*3 \(-> Don't Send Mouse Row & Column on Button Press +.IP \\*(Es\\*([[\\*?\\*(Ps\|\\*r +Restore DEC Private Mode + \*(Ps = \*1 \(-> Normal/Application Cursor Keys (DECCKM) + \*(Ps = \*3 \(-> 80/132 Column Mode (DECCOLM) + \*(Ps = \*4 \(-> Jump (Fast)/Smooth (Slow) Scroll (DECSCLM) + \*(Ps = \*5 \(-> Normal/Reverse Video (DECSCNM) + \*(Ps = \*6 \(-> Normal/Origin Cursor Mode (DECOM) + \*(Ps = \*7 \(-> No Wraparound/Wraparound Mode (DECAWM) + \*(Ps = \*8 \(-> Auto-repeat/No Auto-repeat Keys (DECARM) + \*(Ps = \*9 \(-> Don't Send/Send MIT Mouse Row & Column on Button Press + \*(Ps = \*4\*0 \(-> Disallow/Allow 80 \z\(<-\(-> 132 Mode + \*(Ps = \*4\*1 \(-> Off/On \fIcurses\fP(5) fix + \*(Ps = \*4\*4 \(-> Turn Off/On Margin Bell + \*(Ps = \*4\*5 \(-> No Reverse-wraparound/Reverse-wraparound Mode + \*(Ps = \*4\*6 \(-> Stop/Start Logging + \*(Ps = \*4\*7 \(-> Use Normal/Alternate Screen Buffer + \*(Ps = \*1\*0\*0\*0 \(-> Don't Send/Send VT220 Mouse Row & Column on Button Press + \*(Ps = \*1\*0\*0\*3 \(-> Don't Send/Send VT220 Hilite Mouse Row & Column on Button Press +.IP \\*(Es\\*([[\\*?\\*(Ps\|\\*s +Save DEC Private Mode + \*(Ps = \*1 \(-> Normal/Application Cursor Keys (DECCKM) + \*(Ps = \*3 \(-> 80/132 Column Mode (DECCOLM) + \*(Ps = \*4 \(-> Jump (Fast)/Smooth (Slow) Scroll (DECSCLM) + \*(Ps = \*5 \(-> Normal/Reverse Video (DECSCNM) + \*(Ps = \*6 \(-> Normal/Origin Cursor Mode (DECOM) + \*(Ps = \*7 \(-> No Wraparound/Wraparound Mode (DECAWM) + \*(Ps = \*8 \(-> Auto-repeat/No Auto-repeat Keys (DECARM) + \*(Ps = \*9 \(-> Don't Send/Send MIT Mouse Row & Column on Button Press + \*(Ps = \*4\*0 \(-> Disallow/Allow 80 \z\(<-\(-> 132 Mode + \*(Ps = \*4\*1 \(-> Off/On \fIcurses\fP(5) fix + \*(Ps = \*4\*4 \(-> Turn Off/On Margin Bell + \*(Ps = \*4\*5 \(-> No Reverse-wraparound/Reverse-wraparound Mode + \*(Ps = \*4\*6 \(-> Stop/Start Logging + \*(Ps = \*4\*7 \(-> Use Normal/Alternate Screen Buffer + \*(Ps = \*1\*0\*0\*0 \(-> Don't Send/Send VT220 Mouse Row & Column on Button Press + \*(Ps = \*1\*0\*0\*3 \(-> Don't Send/Send VT220 Hilite Mouse Row & Column on Button Press +.IP \\*(Es\\*]\\*(Ps\|\\*;\\*(Pt\|\\*(Be +Set Text Parameters + \*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt + \*(Ps = \*1 \(-> Change Icon Name to \*(Pt + \*(Ps = \*2 \(-> Change Window Title to \*(Pt + \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt +.IP \\*(Es\\*c +Full Reset (RIS) +.IP \\*(Es\\*n +Locking Shift Select of G2 Character Set (LS2) +.IP \\*(Es\\*o +Locking Shift Select of G3 Character Set (LS3) +.Ed +.SH +Tektronix 4015 Mode +.ds RH Tektronix 4015 Mode +.LP +Most of these sequences are standard Tektronix 4015 control sequences. +The major features missing are the alternate (APL) character set and +the write-thru and defocused modes. +.St +.IP \\*(Be +Bell (Ctrl-G) +.IP \\*(Bs +Backspace (Ctrl-H) +.IP \\*(Ta +Horizontal Tab (Ctrl-I) +.IP \\*(Lf +Line Feed or New Line (Ctrl-J) +.IP \\*(Vt +Vertical Tab (Ctrl-K) +.IP \\*(Ff +Form Feed or New Page (Ctrl-L) +.IP \\*(Cr +Carriage Return (Ctrl-M) +.IP \\*(Es\\*(Et +Switch to VT102 Mode +.IP \\*(Es\\*(En +Return Terminal Status +.IP \\*(Es\\*(Lf +PAGE (Clear Screen) +.IP \\*(Es\\*(Eb +COPY (Save Tektronix Codes to File) +.IP \\*(Es\\*(Ca +Bypass Condition +.IP \\*(Es\\*(Su +GIN mode +.IP \\*(Es\\*(Fs +Special Point Plot Mode +.IP \\*(Es\\*(Gs +Graph Mode (same as \*(Gs) +.IP \\*(Es\\*(Rs +Incremental Plot Mode (same as \*(Rs) +.IP \\*(Es\\*(Us +Alpha Mode (same as \*(Us) +.IP \\*(Es\\*8 +Select Large Character Set +.IP \\*(Es\\*9 +Select #2 Character Set +.IP \\*(Es\\*: +Select #3 Character Set +.IP \\*(Es\\*; +Select Small Character Set +.IP \\*(Es\\*]\\*(Ps\|\\*;\\*(Pt\|\\*(Be +Set Text Parameters + \*(Ps = \*0 \(-> Change Icon Name and Window Title to \*(Pt + \*(Ps = \*1 \(-> Change Icon Name to \*(Pt + \*(Ps = \*2 \(-> Change Window Title to \*(Pt + \*(Ps = \*4\*6 \(-> Change Log File to \*(Pt +.IP \\*(Es\\*` +Normal Z Axis and Normal (solid) Vectors +.IP \\*(Es\\*a +Normal Z Axis and Dotted Line Vectors +.IP \\*(Es\\*b +Normal Z Axis and Dot-Dashed Vectors +.IP \\*(Es\\*c +Normal Z Axis and Short-Dashed Vectors +.IP \\*(Es\\*d +Normal Z Axis and Long-Dashed Vectors +.IP \\*(Es\\*h +Defocused Z Axis and Normal (solid) Vectors +.IP \\*(Es\\*i +Defocused Z Axis and Dotted Line Vectors +.IP \\*(Es\\*j +Defocused Z Axis and Dot-Dashed Vectors +.IP \\*(Es\\*k +Defocused Z Axis and Short-Dashed Vectors +.IP \\*(Es\\*l +Defocused Z Axis and Long-Dashed Vectors +.IP \\*(Es\\*p +Write-Thru Mode and Normal (solid) Vectors +.IP \\*(Es\\*q +Write-Thru Mode and Dotted Line Vectors +.IP \\*(Es\\*r +Write-Thru Mode and Dot-Dashed Vectors +.IP \\*(Es\\*s +Write-Thru Mode and Short-Dashed Vectors +.IP \\*(Es\\*t +Write-Thru Mode and Long-Dashed Vectors +.IP \\*(Fs +Point Plot Mode +.IP \\*(Gs +Graph Mode +.IP \\*(Rs +Incremental Plot Mode +.IP \\*(Us +Alpha Mode +.Ed diff --git a/Linux-0.11/info/xterm-seqs2.txt b/Linux-0.11/info/xterm-seqs2.txt new file mode 100644 index 00000000..f9624585 --- /dev/null +++ b/Linux-0.11/info/xterm-seqs2.txt @@ -0,0 +1,220 @@ +Date: 12 Sep 89 17:44:43 GMT +From: crdgw1!montnaro@uunet.uu.net (Skip Montanaro) +Organization: GE Corporate Research & Development, Schenectady, NY +Subject: XTerm Escape Sequences (X11 Version) +To: xpert@expo.lcs.mit.edu + +I rummaged around through the xterm code and came up with the following +stuff. No guarantees. I'm headed out of town for a couple days and thought +it better to get it out than let it get stale. Comments, bugs, and other +notes are welcome. Somebody else can convert it to troff. I prefer LaTeX. +:-) I will try and get to the Tek mode stuff when I return, although I doubt +it's changed much from X10 XTerm. + +I gleaned the basic stuff out of the charproc.c code, by hacking VTparse() +so it spit out leaves of the parse tree. I was mildly surprised to see +things like "ESC # BEL" turn up. + +For most folks, the most interesting stuff will probably be "ESC ] Ps ND +string NP" down near the bottom. That's what you use to change the icon and +window labels, and the log file name. Most other things appear the same as +the X10 documentation, although a few DEC-ish mode parameters (42, 43, 48, & +49) seem to have disappeared. + +------------------------------------------------------------------------------ +BEL Bell (Ctrl-G) +BS Backspace (Ctrl-H) +HT Horizontal Tab (Ctrl-I) +NL Line Feed or New Line (Ctrl-J) +VT Vertical Tab (Ctrl-K) +NP Form Feed or New Page (Ctrl-L) +CR Carriage Return (Ctrl-M) +SO Shift Out (Ctrl-N) -> Switch to Alternate Character Set +SI Shift In (Ctrl-O) -> Switch to Standard Character Set +ESC BEL (Same as non-escaped BEL) +ESC BS (Same as non-escaped BS) +ESC HT (Same as non-escaped HT) +ESC NL (Same as non-escaped NL) +ESC VT (Same as non-escaped VT) +ESC NP (Same as non-escaped NP) +ESC CR (Same as non-escaped CR) +ESC SO (Same as non-escaped SO) +ESC SI (Same as non-escaped SI) +ESC # BEL (Same as non-escaped BEL) +ESC # BS (Same as non-escaped BS) +ESC # HT (Same as non-escaped HT) +ESC # NL (Same as non-escaped NL) +ESC # VT (Same as non-escaped VT) +ESC # NP (Same as non-escaped NP) +ESC # CR (Same as non-escaped CR) +ESC # SO (Same as non-escaped SO) +ESC # SI (Same as non-escaped SI) +ESC # 8 DEC Screen Alignment Test (DECALN) +ESC ( BEL (Same as non-escaped BEL) +ESC ( BS (Same as non-escaped BS) +ESC ( HT (Same as non-escaped HT) +ESC ( NL (Same as non-escaped NL) +ESC ( VT (Same as non-escaped VT) +ESC ( NP (Same as non-escaped NP) +ESC ( CR (Same as non-escaped CR) +ESC ( SO (Same as non-escaped SO) +ESC ( SI (Same as non-escaped SI) +ESC ( C Select G0 Character Set (SCS) + C = 0 -> Special Character and Line Drawing Set + C = 1 -> Alternate Character ROM Standard Set + C = 2 -> Alternate Character ROM Special Set + C = A -> United Kingdom (UK) + C = B -> United States (USASCII) +ESC ) C Select G1 Character Set (SCS) + C takes same values as above +ESC * C Select G2 Character Set (SCS) + C takes same values as above +ESC + C Select G3 Character Set (SCS) + C takes same values as above +ESC 7 Save Cursor (DECSC) +ESC 8 Restore Cursor (DECRC) +ESC = Application Keypad (DECPAM) +ESC > Normal Keypad (DECNM) +ESC D Index (IND) +ESC E Next Line (NEL) +ESC H Tab Set (HTS) +ESC M Reverse Index (RI) +ESC N Single Shift Select of G2 Character Set (SS2) +ESC O Single Shift Select of G3 Character Set (SS3) +ESC [ BEL (Same as non-escaped BEL) +ESC [ BS (Same as non-escaped BS) +ESC [ HT (Same as non-escaped HT) +ESC [ NL (Same as non-escaped NL) +ESC [ VT (Same as non-escaped VT) +ESC [ NP (Same as non-escaped NP) +ESC [ CR (Same as non-escaped CR) +ESC [ SO (Same as non-escaped SO) +ESC [ SI (Same as non-escaped SI) +ESC [ ? BEL (Same as non-escaped BEL) +ESC [ ? BS (Same as non-escaped BS) +ESC [ ? HT (Same as non-escaped HT) +ESC [ ? NL (Same as non-escaped NL) +ESC [ ? VT (Same as non-escaped VT) +ESC [ ? NP (Same as non-escaped NP) +ESC [ ? CR (Same as non-escaped CR) +ESC [ ? SO (Same as non-escaped SO) +ESC [ ? SI (Same as non-escaped SI) +ESC [ ? Ps h DEC Private Mode Set (DECSET) + Ps = 1 -> Application Cursor Keys (DECCKM) + Ps = 2 -> Set VT52 Mode + Ps = 3 -> 132 Column Mode (DECCOLM) + Ps = 4 -> Smooth (Slow) Scroll (DECSCLM) + Ps = 5 -> Reverse Video (DECSCNM) + Ps = 6 -> Origin Mode (DECOM) + Ps = 7 -> Wraparound Mode (DECAWM) + Ps = 8 -> Auto-Repeat Keys (DECARM) + Ps = 9 -> Send MIT Mouse Row & Column on Button + Press + Ps = 38 -> Enter Tektronix Mode (DECTEK) + Ps = 40 -> Allow 80 <-> 132 Mode + Ps = 41 -> curses(5) fix + Ps = 44 -> Turn on Margin Bell + Ps = 45 -> Reverse-wraparound Mode + Ps = 46 -> Start Logging + Ps = 47 -> Use Alternate Screen Buffer + Ps = 1000 -> xtem bogus sequence (???) + Ps = 1001 -> xtem sequence w/hilite tracking (???) +ESC [ ? Ps l DEC Private Mode Reset (DECRST) + Ps = 1 -> Normal Cursor Keys (DECCKM) + Ps = 3 -> 80 Column Mode (DECCOLM) + Ps = 4 -> Jump (Fast) Scroll (DECSCLM) + Ps = 5 -> Normal Video (DECSCNM) + Ps = 6 -> Normal Cursor Mode (DECOM) + Ps = 7 -> No Wraparound Mode (DECAWM) + Ps = 8 -> No Auto-Repeat Keys (DECARM) + Ps = 9 -> Don't Send MIT Mouse Row & Column on + Button Press + Ps = 40 -> Don't Allow 80 <-> 132 Mode + Ps = 41 -> No curses(5) fix + Ps = 44 -> Turn Off Margin Bell + Ps = 45 -> No Reverse-wraparound Mode + Ps = 46 -> Stop Logging + Ps = 47 -> Use Normal Screen Buffer + Ps = 1000 -> xtem bogus sequence (???) + Ps = 1001 -> xtem sequence w/hilite tracking (???) +ESC [ ? Ps r Restore DEC Private Mode + Ps = 1 -> Normal/Application Cursor Keys (DECCKM) + Ps = 3 -> 80/132 Column Mode (DECCOLM) + Ps = 4 -> Jump (Fast)/Smooth (Slow) Scroll (DECSCLM) + Ps = 5 -> Normal/Reverse Video (DECSCNM) + Ps = 6 -> Normal/Origin Cursor Mode (DECOM) + Ps = 7 -> No Wraparound/Wraparound Mode (DECAWM) + Ps = 8 -> Auto-repeat/No Auto-repeat Keys (DECARM) + Ps = 9 -> Don't Send/Send MIT Mouse Row & Column on + Button Press + Ps = 40 -> Disallow/Allow 80 <-> 132 Mode + Ps = 41 -> Off/On curses(5) fix + Ps = 44 -> Turn Off/On Margin Bell + Ps = 45 -> No Reverse-wraparound/Reverse-wraparound + Mode + Ps = 46 -> Stop/Start Logging + Ps = 47 -> Use Normal/Alternate Screen Buffer + Ps = 1000 -> mouse bogus sequence (???) + Ps = 1001 -> mouse bogus sequence (???) +ESC [ ? Ps s Save DEC Private Mode + Same P's as Restore DEC Private Mode +ESC [ Ps @ Insert Ps (Blank) Character(s) (default = 1) (ICH) +ESC [ Ps A Cursor Up Ps Times (default = 1) (CUU) +ESC [ Ps B Cursor Down Ps Times (default = 1) (CUD) +ESC [ Ps C Cursor Forward Ps Times (default = 1) (CUF) +ESC [ Ps D Cursor Backward Ps Times (default = 1) (CUB) +ESC [ Ps ; Ps H Cursor Position [row;column] (default = [1,1]) (CUP) +ESC [ Ps J Erase in Display + Ps = 0 -> Clear Below (default) + Ps = 1 -> Clear Above + Ps = 2 -> Clear All +ESC [ Ps K Erase in Line + Ps = 0 -> Clear to Right (default) + Ps = 1 -> Clear to Left + Ps = 2 -> Clear All +ESC [ Ps L Insert Ps lines (default = 1) (IL) +ESC [ Ps M Delete Ps lines (default = 1) (DL) +ESC [ Ps P Delete Ps Characters (default = 1) (DCH) +ESC [ T Track Mouse (???) +ESC [ Ps c Device Attributes (DA1) +ESC [ Ps ; Ps f Cursor Position [row;column] (default = [1,1]) (HVP) +ESC [ Ps g Tab Clear + Ps = 0 -> Clear Current Column (default) + Ps = 3 -> Clear All +ESC [ Ps h Mode Set (SET) + Ps = 4 -> Insert Mode (IRM) + Ps = 20 -> Automatic Linefeed (LNM) +ESC [ Ps l Mode Reset (RST) + Ps = 4 -> Insert Mode (IRM) + Ps = 20 -> Automatic Linefeed (LNM) +ESC [ Pm m Character Attributes (SGR) + Ps = 0 -> Normal (default) + Ps = 1 -> Blink (appears as Bold) + Ps = 4 -> Underscore + Ps = 5 -> Bold + Ps = 7 -> Inverse +ESC [ Ps n Device Status Report (DSR) + Ps = 5 -> Status Report ESC [ 0 n -> OK + Ps = 6 -> Report Cursor Position (CPR) [row;column] + as ESC [ r ; c R +ESC [ Ps ; Ps r Set Scrolling Region [top;bottom] (default = full size + of window) (DECSTBM) +ESC [ Ps x Request Terminal Parameters (DECREQTPARM) +ESC ] Ps ND string NP OSC Mode + ND can be any non-digit Character (it's discarded) + NP can be any non-printing Character (it's discarded) + string can be any ASCII printable string + (max 511 characters) + Ps = 0 -> use string as a new icon name and title + Ps = 1 -> use string is a new icon name only + Ps = 2 -> use string is a new title only + Ps = 46 -> use string as a new log file name + +ESC c Full Reset +ESC n Switch to Alternate Character Set LS2 +ESC o Switch to Alternate Character Set LS3 +ESC | Switch to Alternate Graphics(?) Set LS3R +ESC } Switch to Alternate Graphics(?) Set LS2R +ESC ~ Switch to Alternate Graphics(?) Set LS1R +-- +Skip Montanaro (montanaro@crdgw1.ge.com) diff --git a/Linux-0.11/patchs/buffer.c.Z b/Linux-0.11/patchs/buffer.c.Z new file mode 100644 index 00000000..e9c7672d Binary files /dev/null and b/Linux-0.11/patchs/buffer.c.Z differ diff --git a/Linux-0.11/patchs/build.c.patch b/Linux-0.11/patchs/build.c.patch new file mode 100644 index 00000000..d5bb1a1c --- /dev/null +++ b/Linux-0.11/patchs/build.c.patch @@ -0,0 +1,89 @@ +*** build.c.orig Sat Nov 9 21:50:51 1991 +--- build.c Sat Nov 9 22:23:13 1991 +*************** +*** 17,24 **** +--- 17,27 ---- + */ + + #include /* fprintf */ ++ #include + #include /* contains exit */ + #include /* unistd.h needs this */ ++ #include ++ #include + #include /* contains read/write */ + #include + +*************** +*** 25,30 **** +--- 28,36 ---- + #define MINIX_HEADER 32 + #define GCC_HEADER 1024 + ++ #define DEFAULT_MAJOR_ROOT 3 ++ #define DEFAULT_MINOR_ROOT 6 ++ + /* max nr of sectors of setup: don't change unless you also change + * bootsect etc */ + #define SETUP_SECTS 4 +*************** +*** 46,54 **** + { + int i,c,id; + char buf[1024]; + +! if (argc != 4) + usage(); + for (i=0;i31 && c<127) ++ ch = c; ++ else ++ break; ++ } ++ case 10: ++ if (ch) ++ if (x>=video_num_columns) { ++ x -= video_num_columns; ++ pos -= video_size_row; ++ lf(currcons); ++ } ++ __asm__("movb _myattr,%%ah\n\t" ++ "movw %%ax,%1\n\t" ++ ::"a" (ch),"m" (*(short *)pos) ++ :"ax"); ++ pos += 2; ++ x++; ++ break; ++ ++ + } + } + set_cursor(currcons); +*************** +*** 765,771 **** + bottom = video_num_lines; + attr=0x07; + def_attr=0x07; +! state=0; + ques = 0; + iscolor = 0; + +--- 831,837 ---- + bottom = video_num_lines; + attr=0x07; + def_attr=0x07; +! restate = state=0; + ques = 0; + iscolor = 0; + diff --git a/Linux-0.11/patchs/gawk-diffs b/Linux-0.11/patchs/gawk-diffs new file mode 100644 index 00000000..0cd519f4 --- /dev/null +++ b/Linux-0.11/patchs/gawk-diffs @@ -0,0 +1,329 @@ +*** 1.1 1991/12/11 16:13:13 +--- Makefile 1991/12/11 17:07:11 +*************** +*** 64,71 **** + # MISSING = -DSPRINTF_INT -DBLKSIZE_MISSING -DSTRERROR_MISSING -DRANDOM_MISSING + + # VAX running Ultrix 3.x +- MISSING = -DSTRERROR_MISSING + + # A generic 4.2 BSD machine + # (eliminate GETOPT_MISSING for 4.3 release) + # (eliminate STRCASE_MISSING and TMPNAM_MISSING for Tahoe release) +--- 64,75 ---- + # MISSING = -DSPRINTF_INT -DBLKSIZE_MISSING -DSTRERROR_MISSING -DRANDOM_MISSING + + # VAX running Ultrix 3.x + ++ # LINUX ++ MISSING = -DSPRINTF_INT -DTMPNAM_MISSING -DBLKSIZE_MISSING -DSTRCASE_MISSING \ ++ -Dalloca=__builtin_alloca -DGCVT_MISSING -DRANDOM_MISSING \ ++ -DBCOPY_MISSING -DSTRTOD_MISSING ++ + # A generic 4.2 BSD machine + # (eliminate GETOPT_MISSING for 4.3 release) + # (eliminate STRCASE_MISSING and TMPNAM_MISSING for Tahoe release) +*************** +*** 80,92 **** + + # Comment out the next line if you don't have gcc. + # Also choose just one of -g and -O. +! #CC= gcc + +! #OPTIMIZE= -O -g + PROFILE= #-pg + DEBUG= #-DDEBUG #-DMEMDEBUG #-DFUNC_TRACE #-DMPROF + DEBUGGER= #-g -Bstatic +! WARN= #-W -Wunused -Wimplicit -Wreturn-type -Wcomment # for gcc only + + # Parser to use on grammar -- if you don't have bison use the first one + #PARSER = yacc +--- 84,96 ---- + + # Comment out the next line if you don't have gcc. + # Also choose just one of -g and -O. +! CC= gcc + +! OPTIMIZE= -O #-g + PROFILE= #-pg + DEBUG= #-DDEBUG #-DMEMDEBUG #-DFUNC_TRACE #-DMPROF + DEBUGGER= #-g -Bstatic +! WARN= -W -Wunused -Wimplicit -Wreturn-type -Wcomment # for gcc only + + # Parser to use on grammar -- if you don't have bison use the first one + #PARSER = yacc +*************** +*** 154,160 **** + + # rules to build gawk + gawk: $(ALLOBJS) $(GNUOBJS) +! $(CC) -o gawk $(CFLAGS) $(ALLOBJS) $(GNUOBJS) -lm + + $(AWKOBJS): awk.h + +--- 158,164 ---- + + # rules to build gawk + gawk: $(ALLOBJS) $(GNUOBJS) +! $(CC) -o gawk $(CFLAGS) $(ALLOBJS) $(GNUOBJS) #-lm + + $(AWKOBJS): awk.h + +*** 1.1 1991/12/11 16:18:17 +--- awk.h 1991/12/11 17:07:45 +*************** +*** 42,51 **** + extern char *alloca(); + #endif + #else + extern char *alloca(); + #endif + #ifdef SPRINTF_INT +! extern int sprintf(); + #else /* not USG */ + /* nasty nasty berkelixm */ + #define setjmp _setjmp +--- 42,53 ---- + extern char *alloca(); + #endif + #else ++ #ifndef alloca + extern char *alloca(); + #endif ++ #endif + #ifdef SPRINTF_INT +! /* extern int sprintf(); XXX LINUX */ + #else /* not USG */ + /* nasty nasty berkelixm */ + #define setjmp _setjmp +*************** +*** 78,99 **** + extern char *memset(char *, int, int); + + /* extern int fprintf(FILE *, char *, ...); */ +! extern int fprintf(); + extern int vfprintf(); + #ifndef MSDOS +! extern int fwrite(char *, int, int, FILE *); + #endif + extern int fflush(FILE *); + extern int fclose(FILE *); + extern int pclose(FILE *); + #ifndef MSDOS +! extern int fputs(char *, FILE *); + #endif + extern void abort(); + extern int isatty(int); + extern void exit(int); + extern int system(char *); + extern int sscanf(/* char *, char *, ... */); + + extern double atof(char *); + extern int fstat(int, struct stat *); +--- 80,104 ---- + extern char *memset(char *, int, int); + + /* extern int fprintf(FILE *, char *, ...); */ +! /* extern int fprintf(); XXXL */ + extern int vfprintf(); + #ifndef MSDOS +! /* extern int fwrite(char *, int, int, FILE *); XXXL */ + #endif + extern int fflush(FILE *); + extern int fclose(FILE *); + extern int pclose(FILE *); + #ifndef MSDOS +! /* extern int fputs(char *, FILE *); XXXL */ + #endif + extern void abort(); + extern int isatty(int); + extern void exit(int); + extern int system(char *); ++ #if 0 ++ /* XXXL */ + extern int sscanf(/* char *, char *, ... */); ++ #endif + + extern double atof(char *); + extern int fstat(int, struct stat *); +*************** +*** 100,110 **** + extern off_t lseek(int, off_t, int); + extern int fseek(FILE *, long, int); + extern int close(int); +! extern int open(); + extern int pipe(int *); + extern int dup2(int, int); + #ifndef MSDOS +! extern int unlink(char *); + #endif + extern int fork(); + extern int execl(/* char *, char *, ... */); +--- 105,115 ---- + extern off_t lseek(int, off_t, int); + extern int fseek(FILE *, long, int); + extern int close(int); +! /* extern int open(); XXXL */ + extern int pipe(int *); + extern int dup2(int, int); + #ifndef MSDOS +! /* extern int unlink(char *); XXXL */ + #endif + extern int fork(); + extern int execl(/* char *, char *, ... */); +*** 1.1 1991/12/11 16:29:17 +--- awk.y 1991/12/11 17:08:04 +*************** +*** 96,102 **** + + %type func_name + %token FUNC_CALL NAME REGEXP +! %token ERROR + %token NUMBER YSTRING + %token RELOP APPEND_OP + %token ASSIGNOP MATCHOP NEWLINE CONCAT_OP +--- 96,102 ---- + + %type func_name + %token FUNC_CALL NAME REGEXP +! %token ERROR_TOK + %token NUMBER YSTRING + %token RELOP APPEND_OP + %token ASSIGNOP MATCHOP NEWLINE CONCAT_OP +*************** +*** 386,401 **** + + nls + : NEWLINE +! { $$ = NULL; } + | nls NEWLINE +! { $$ = NULL; } + ; + + opt_nls + : /* empty */ +! { $$ = NULL; } + | nls +! { $$ = NULL; } + ; + + input_redir +--- 386,401 ---- + + nls + : NEWLINE +! { $$ = (NODETYPE) NULL; } + | nls NEWLINE +! { $$ = (NODETYPE) NULL; } + ; + + opt_nls + : /* empty */ +! { $$ = (NODETYPE) NULL; } + | nls +! { $$ = (NODETYPE) NULL; } + ; + + input_redir +*************** +*** 953,959 **** + case '\\': + if (*lexptr++ == '\0') { + yyerror("unterminated regexp ends with \\"); +! return ERROR; + } else if (lexptr[-1] == '\n') + goto retry; + break; +--- 953,959 ---- + case '\\': + if (*lexptr++ == '\0') { + yyerror("unterminated regexp ends with \\"); +! return ERROR_TOK; + } else if (lexptr[-1] == '\n') + goto retry; + break; +*************** +*** 969,975 **** + case '\0': + lexptr--; /* so error messages work */ + yyerror("unterminated regexp"); +! return ERROR; + } + } + } +--- 969,975 ---- + case '\0': + lexptr--; /* so error messages work */ + yyerror("unterminated regexp"); +! return ERROR_TOK; + } + } + } +*************** +*** 1163,1169 **** + case '\n': + lexptr--; + yyerror("unterminated string"); +! return ERROR; + case '"': + yylval.nodeval = make_str_node(tokstart + 1, + lexptr-tokstart-2, esc_seen); +--- 1163,1169 ---- + case '\n': + lexptr--; + yyerror("unterminated string"); +! return ERROR_TOK; + case '"': + yylval.nodeval = make_str_node(tokstart + 1, + lexptr-tokstart-2, esc_seen); +*************** +*** 1171,1177 **** + return YSTRING; + } + } +! return ERROR; + + case '-': + if (*lexptr == '=') { +--- 1171,1177 ---- + return YSTRING; + } + } +! return ERROR_TOK; + + case '-': + if (*lexptr == '=') { +*************** +*** 1256,1262 **** + } + return LEX_AND; + } +! return ERROR; + + case '|': + if (*lexptr == '|') { +--- 1256,1262 ---- + } + return LEX_AND; + } +! return ERROR_TOK; + + case '|': + if (*lexptr == '|') { +*************** +*** 1279,1285 **** + + if (c != '_' && ! isalpha(c)) { + yyerror("Invalid char '%c' in expression\n", c); +! return ERROR; + } + + /* it's some type of name-type-thing. Find its length */ +--- 1279,1285 ---- + + if (c != '_' && ! isalpha(c)) { + yyerror("Invalid char '%c' in expression\n", c); +! return ERROR_TOK; + } + + /* it's some type of name-type-thing. Find its length */ diff --git a/Linux-0.11/patchs/hosts.h b/Linux-0.11/patchs/hosts.h new file mode 100644 index 00000000..b1f4b663 --- /dev/null +++ b/Linux-0.11/patchs/hosts.h @@ -0,0 +1,73 @@ +#ifndef __HOST_H__ + #define __HOSTS_H__ + +/* + File hosts.h + SCSI host adapter include file. +*/ + +#define MAX_SCSI_HOSTS 1 + +/* + The Scsi_Host type has all that is needed to interface with a SCSI + host in a device independant matter. +*/ + +typedef struct + { + /* + The name pointer is a pointer to the name of the SCSI + device detected. + */ + + char *name; + + /* + The detect function shall return non zero on detection, + and initialize all data necessary for this particular + SCSI driver. + */ + + int (* detect)(void); + + /* + The info function will return whatever useful + information the developer sees fit. + */ + + char * (* info)(void); + + /* + The command function shall return the SCSI return + code in the low 8 bits, a driver error in the high 8 + bits. Target is the target ID, IN normal numbers - not a + bit. The cmnd is the variable length command to + be sent, + buff a pointer to the buffer which will be read from / + written to, and bufflen the length of that buffer + */ + + int (* command)(unsigned char target, const void *cmnd, + void *buff, int bufflen); + + /* + present contains a flag as to weather we are present - + so we don't have to call detect multiple times. + */ + + unsigned char present; + } Scsi_Host; + +/* + The scsi_hosts array is the array containing the data for all + possible scsi hosts. +*/ + +extern Scsi_Host scsi_hosts[MAX_SCSI_HOSTS]; + +/* + scsi_init initializes the scsi hosts. +*/ + +void scsi_init(void); +#endif diff --git a/Linux-0.11/patchs/inwrite.cdif b/Linux-0.11/patchs/inwrite.cdif new file mode 100644 index 00000000..f4664b77 --- /dev/null +++ b/Linux-0.11/patchs/inwrite.cdif @@ -0,0 +1,71 @@ +*** cons.c.bad Wed Dec 25 02:12:18 1991 +--- console.c Wed Dec 25 02:06:44 1991 +*************** +*** 530,535 **** +--- 530,537 ---- + } + + ++ static int in_conwrite = 0; ++ + void con_write(struct tty_struct * tty) + { + int nr; +*************** +*** 537,542 **** +--- 539,546 ---- + + int currcons; + ++ in_conwrite++; ++ + for (currcons = 0; currcons<=NR_CONSOLES; currcons++) + if (tty == TTY_TABLE(currcons)) + break; +*************** +*** 772,777 **** +--- 776,782 ---- + } + } + set_cursor(currcons); ++ in_conwrite--; + } + + /* +*************** +*** 1004,1009 **** +--- 1009,1018 ---- + + void blank_screen() + { ++ if (in_conwrite) ++ { blankcount = HZ*20; ++ return; ++ } + if (blanked_fg > -1) + return; + blanked_fg = fg_console; +*************** +*** 1015,1020 **** +--- 1024,1033 ---- + + void unblank_screen() + { ++ if (in_conwrite) ++ { blankcount = HZ*20; ++ return; ++ } + if (blanked_fg <= -1) + return; + fg_console = blanked_fg; +*************** +*** 1051,1056 **** +--- 1064,1071 ---- + */ + + int new_console, old_console; ++ if (in_conwrite) ++ return; + + if (num >= NR_CONSOLES) return; + diff --git a/Linux-0.11/patchs/kybd.cdif.Z b/Linux-0.11/patchs/kybd.cdif.Z new file mode 100644 index 00000000..11caafb9 Binary files /dev/null and b/Linux-0.11/patchs/kybd.cdif.Z differ diff --git a/Linux-0.11/patchs/lp.tar.Z b/Linux-0.11/patchs/lp.tar.Z new file mode 100644 index 00000000..246ab7ff Binary files /dev/null and b/Linux-0.11/patchs/lp.tar.Z differ diff --git a/Linux-0.11/patchs/lvc.tar.Z b/Linux-0.11/patchs/lvc.tar.Z new file mode 100644 index 00000000..e12d49ed Binary files /dev/null and b/Linux-0.11/patchs/lvc.tar.Z differ diff --git a/Linux-0.11/patchs/mtools.tar.Z b/Linux-0.11/patchs/mtools.tar.Z new file mode 100644 index 00000000..ead4bd32 Binary files /dev/null and b/Linux-0.11/patchs/mtools.tar.Z differ diff --git a/Linux-0.11/patchs/scsi.h b/Linux-0.11/patchs/scsi.h new file mode 100644 index 00000000..5f294ec4 --- /dev/null +++ b/Linux-0.11/patchs/scsi.h @@ -0,0 +1,132 @@ + +#ifndef __SCSI_H__ + #define __SCSI_H__ +/* + For documentation on the OPCODES, MESSAGES, and SENSE values, + please consult the SCSI standard. +*/ + +/* + SCSI opcodes +*/ + +#define TEST_UNIT_READY 0x00 +#define REZERO_UNIT 0x01 +#define REQUEST_SENSE 0x03 +#define FORMAT_UNIT 0x04 +#define REASSIGN_BLOCKS 0x07 +#define READ_6 0x08 +#define WRITE_6 0x0a +#define SEEK 0x0b +#define INQUIRY 0x12 +#define MODE_SELECT 0x15 +#define RESERVE 0x16 +#define RELEASE 0x17 +#define COPY 0x18 +#define MODE_SENSE 0x1a +#define START_STOP 0x1b +#define RECIEVE_DAIGNOSTIC 0x1c +#define SEND_DIAGNOSTIC 0x1d +#define ALLOW_MEDIUM_REMOVAL 0x1e + +#define READ_CAPACITY 0x25 +#define READ_10 0x28 +#define WRITE_10 0x2a +#define SEEK_10 0x2b +#define WRITE_VERIFY 0x2e +#define VERIFY 0x2f +#define SEARCH_HIGH 0x30 +#define SEARCH_EQUAL 0x31 +#define SEARCH_LOW 0x32 +#define SET_LIMITS 0x33 +#define COMPARE 0x39 +#define COPY_VERIFY 0x3a + +/* + MESSAGE CODES +*/ + +#define COMMAND_COMPLETE 0x00 +#define EXTENDED_MESSAGE 0x01 +#define SAVE_POINTERS 0x02 +#define RESTORE_POINTERS 0x03 +#define DISCONNECT 0x04 +#define INITIATOR_ERROR 0x05 +#define ABORT 0x06 +#define MESAGE_REJECT 0x07 +#define NOP 0x08 +#define MSG_PARITY_ERROR 0x09 +#define LINKED_CMD_COMPLETE 0x0a +#define LINKED_FLG_CMD_COMPLETE 0x0b +#define BUS_DEVICE_RESET 0x0c +#define IDENTIFY 0x80 + +/* + Our errors returned by OUR driver, NOT SCSI message. Orr'd with + SCSI message passed back to driver . +*/ + +/* NO error */ +#define DID_OK 0x0000 +/* Couldn't connect before timeout period */ +#define DID_NO_CONNECT 0x0100 +/* BUS stayed busy through time out period */ +#define DID_BUS_BUSY 0x0200 +/* TIMED OUT for other reason */ +#define DID_TIME_OUT 0x0300 +/* ERROR from TARGET */ +#define DID_TERROR 0x0400 +/* TARGET was busy */ +#define DID_TBUSY 0x0500 +/* TARGET disconnected prematurely */ +#define DID_TDISCONNECT 0x0600 +/* TARGET was off line */ +#define DID_TOFFLINE 0x0700 +/* TARGET wants US to send IT a message */ +#defibe DID_TREQ_MSG_OUT 0x0800 +/* TARGET parity error */ +#define DID_TPARITY 0x0900 +/* TARGET requested reselect */ +#define DID_TRESELECT 0x0A00 +/* TARGET was not in the range 0-6 inlclusive */ +#define DID_BAD_TARGET 0x0B00 + +/* + SENSE KEYS +*/ + +#define NO_SENSE 0x00 +#define RECOVERED_ERROR 0x01 +#define NOT_READY 0x02 +#define MEDIUM_ERROR 0x03 +#define HARDWARE_ERROR 0x04 +#define ILLEGAL_REQUEST 0x05 +#define UNIT_ATTENTION 0x06 +#define DATA_PROTECT 0x07 +#define BLANK_CHECK 0x08 +#define COPY_ABORTED 0x0a +#define ABORTED_COMMAND 0x0b +#define VOLUME_OVERFLOW 0x0d +#define MISCOMPARE 0x0e + + +/* + DEVICE TYPES + +*/ + +#define TYPE_DISK 0x00 +#define TYPE_TAPE 0x01 +#define TYPE_WORM 0x04 /* Treated as ROM by our system */ +#define TYPE_ROM 0x05 +#define TYPE_NO_LUN 0x7f +/* + Every SCSI command starts with a one byte OP-code. + The next byte's high three bits are the LUN of the + device. Any multi-byte quantities are stored high byte + first, and may have a 5 bit MSB in the same byte + as the LUN. +*/ + + +#endif diff --git a/Linux-0.11/patchs/sel.tar.Z b/Linux-0.11/patchs/sel.tar.Z new file mode 100644 index 00000000..5f74a09d Binary files /dev/null and b/Linux-0.11/patchs/sel.tar.Z differ diff --git a/Linux-0.11/patchs/slpat.Z b/Linux-0.11/patchs/slpat.Z new file mode 100644 index 00000000..64fc6cc9 Binary files /dev/null and b/Linux-0.11/patchs/slpat.Z differ diff --git a/Linux-0.11/patchs/svga.tar.Z b/Linux-0.11/patchs/svga.tar.Z new file mode 100644 index 00000000..21e30d96 Binary files /dev/null and b/Linux-0.11/patchs/svga.tar.Z differ diff --git a/Linux-0.11/patchs/tcapdif b/Linux-0.11/patchs/tcapdif new file mode 100644 index 00000000..4971c809 --- /dev/null +++ b/Linux-0.11/patchs/tcapdif @@ -0,0 +1,39 @@ +*** /A/etc/termcap Sun Dec 8 13:58:19 1991 +--- termcap Fri Dec 20 06:10:07 1991 +*************** +*** 52,54 **** +--- 52,85 ---- + :it#8:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ + :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=\EM:vt#3:xn:\ + :sc=\E7:rc=\E8:cs=\E[%i%d;%dr: ++ ++ # ++ # Now - like console, but with function keys ++ # ++ # Standard key code definitions: ++ # ku,kd,kl,kr sent by up-, down-, left-, right-arrow ++ # kb sent by backspace ++ # k1..k9,k0 sent by function key 1..10 ++ # K1..5 sent by keypad upper left,upper right,centre,lower left,lower right ++ # ka,kt,kB sent by clear-all-tabs,clear-tab,backtab ++ # kT sent by set-tab-stop ++ # kC,kE,kS sent by clear-screen,clear-to-eol,clear-to-eos ++ # kD,kL sent by delete-character,delete-line ++ # kh,kH sent by home,home-down ++ # kI,kA sent by insert char/enter-insert-mode,insert-line ++ # kM sent by exit-insert-mode ++ # kN,kP sent by next-page,previous-page ++ # kF,kR sent by scroll-forward,scroll-backwards ++ memacs:\ ++ :do=^J:co#80:li#25:cl=\E[H\E[J:sf=\ED:\ ++ :le=^H:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ ++ :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ ++ :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:is=\E[1;25r\E[25;1H:\ ++ :it#8:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ ++ :ho=\E[H:kP=\E[5~:kN=\E[6~:kH=\E[Y:kh=\E[H:kD=\E[3~:kI=\E[2~:\ ++ :k1=\E[[A:k2=\E[[B:k3=\E[[C:k4=\E[[D:k5=\E[[E:k6=\E[[F:\ ++ :k7=\E[[G:k8=\E[[H:k9=\E[[I:k0=\E[[J:\ ++ :K1=\E[[K:K2=\E[[L:\ ++ :pt:sr=\EM:vt#3:xn:\ ++ :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:\ ++ # diff --git a/Linux-0.11/patchs/termcap.diff b/Linux-0.11/patchs/termcap.diff new file mode 100644 index 00000000..23401f0d --- /dev/null +++ b/Linux-0.11/patchs/termcap.diff @@ -0,0 +1,39 @@ +*** /A/etc/termcap Sun Dec 8 13:58:19 1991 +--- termcap Fri Dec 20 06:10:07 1991 +*************** +*** 52,54 **** +--- 52,85 ---- + :it#8:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ + :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=\EM:vt#3:xn:\ + :sc=\E7:rc=\E8:cs=\E[%i%d;%dr: ++ ++ # ++ # Now - like console, but with function keys ++ # ++ # Standard key code definitions: ++ # ku,kd,kl,kr sent by up-, down-, left-, right-arrow ++ # kb sent by backspace ++ # k1..k9,k0 sent by function key 1..10 ++ # K1..5 sent by keypad upper left,upper right,centre,lower left,lower right ++ # ka,kt,kB sent by clear-all-tabs,clear-tab,backtab ++ # kT sent by set-tab-stop ++ # kC,kE,kS sent by clear-screen,clear-to-eol,clear-to-eos ++ # kD,kL sent by delete-character,delete-line ++ # kh,kH sent by home,home-down ++ # kI,kA sent by insert char/enter-insert-mode,insert-line ++ # kM sent by exit-insert-mode ++ # kN,kP sent by next-page,previous-page ++ # kF,kR sent by scroll-forward,scroll-backwards ++ memacs:\ ++ :do=^J:co#80:li#25:cl=\E[H\E[J:sf=\ED:\ ++ :le=^H:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ ++ :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ ++ :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:is=\E[1;25r\E[25;1H:\ ++ :it#8:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ ++ :ho=\E[H:kP=\E[5~:kN=\E[6~:kH=\E[Y:kh=\E[H:kD=\E[3~:kI=\E[2~:\ ++ :k1=\E[[A:k2=\E[[B:k3=\E[[C:k4=\E[[D:k5=\E[[E:k6=\E[[F:\ ++ :k7=\E[[G:k8=\E[[H:k9=\E[[I:k0=\E[[J:\ ++ :K1=\E[[K:K2=\E[[L:\ ++ :pt:sr=\EM:vt#3:xn:\ ++ :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:\ ++ # diff --git a/Linux-0.11/patchs/vc.shar b/Linux-0.11/patchs/vc.shar new file mode 100644 index 00000000..39d7eac3 --- /dev/null +++ b/Linux-0.11/patchs/vc.shar @@ -0,0 +1,2281 @@ +echo x - README +sed '/^X/s///' > README << '/' +XFollowing are patches to allow Linux to have Virtual Consoles. +X +XFor those not in the know, VCs allow swapping screen images +Xwith just the touch of a function key, between virtual sessions. +X +XBefore you go any further, this has been tested on only my +Xmachine! Through this door, you enter the world of BETA land. +X +X----------------------------------------------------------------- +X +XVC comes configure to use 50 line mode of a VGA which requires +Xthe use of the shoelace patches that I posted some time ago. +XYou can probably find them on nic.funet.fi or tsx-11. +XI only ever compiled them under minix, so I don't know. +X +XIf you don't have a VGA, or shoelace or you just don't want 50 line +Xmode, then change in kernel/chr_dev/console.c the constant: +XORIG_VIDEO_LINES from 50 back to 25. You can also save some +Xkernel space by change MAX_SCR_ROWS back to 25 from 50. +XMe, I like 50 lines, even with virtual console (claustaphobia). +X +XAnyways the steps are: +X +X 0 - Backup your system. +X +X 1 - Apply patches: move vc.cdif to your source directory /usr/src +X or whatever. kernel, fs, init, and include must be right +X below this. Now: +X +X patch -p0 < vc.cdif +X +X 2 - If you are not using 50 lines (as above), edit console.c now. +X If you are using 50 lines, make sure termcap entry is in /etc. +X Also, I change TERM=console50 in my .profile. +X +X 3 - Recompile +X +X 4 - Compile setterm.c and and doshell.c and put executables in +X /usr/local/bin +X +X 5 - Assuming that you already have tty1 and tty2 done, the following +X ttys must be created as follows: +X +X mknod /dev/tty3 c 4 3 +X mknod /dev/tty4 c 4 4 +X mknod /dev/tty64 c 4 64 +X mknod /dev/tty65 c 4 65 +X +X 6 - Reboot with the new Image. +X +X 7 - chmod u+x startcons +X +X 8 - Execute startcons +X +X 9 - If you were using serial ports before (tty1/tty2) they +X are now renamed to tty64/tty65. +X +XYou should now have four virtual consoles, selectable with F1-F4. +XIf you want, you can modify NR_CONSOLES in include/linux/tty.h +Xto an appropriate value and recompile. With this implementation, +X12 is the limit since there is not toggle key. But more than 11 +Xmeans no dumping processes. +X +X +XTechnical notes. +X +X The ttys are changed: tty0 is always the current window, while +X ttyn is virtual terminal n selected with function key Fn. +X tty64/tty65 are now the serial ports. +X Startcons can be started from /etc/rc, but TERM=dumb. +X +XProblems: +X +X Standout seems not to work with less, vi, em ,etc; even though +X setterm shows it to be working fine. +X +X Function keys escape sequences were not being caught by console +X (even before my patches), and resulted in characters and beeping. +X Therefore, I have disabled their interpretation in keyboard.S. +X Assembler is not my bag, and I don't know why keystrokes, which +X are infrequent events, need to be handled in assembler. +X +X Leds and caps/num locks are not saved/restored currently. +X +XGoal: +X +X Quantity not quality. +X +XAcknowledgement: +X +X Gordon Irlam of course, for the original. +X +X +X +X +X******************************************************************** +X +Xpmacdona@sol.uvic.ca +XPeter.MacDonald@bcsystems.gov.bc.ca +X +/ +echo x - doshell.c +sed '/^X/s///' > doshell.c << '/' +X#include +X#include +X#include +X +Xextern char *sys_errlist[]; +X +Xmain(int argc, char *argv[]) +X{ +X +X if (argc != 3) { +X fprintf(stderr, "usage: doshell &\n"); +X exit(1); +X } +X +X /* close down fd's */ +X close(0); +X close(1); +X close(2); +X +X /* detach from parent process's group */ +X setsid(); +X +X /* open new tty */ +X if (open(argv[1], O_RDWR, 0) == -1) +X exit(2); +X dup(0); +X dup(0); +X execlp(argv[2], "-", 0); +X /* should appear on new tty...: */ +X fprintf(stderr, "can't exec shell: %s\n", sys_errlist[errno]); +X exit(3); +X} +X +/ +echo x - setterm.c +sed '/^X/s///' > setterm.c << '/' +X/* setterm.c, set terminal attributes. +X * +X * Copyright (C) 1990 Gordon Irlam (gordoni@cs.ua.oz.au). Conditions of use, +X * modification, and redistribution are contained in the file COPYRIGHT that +X * forms part of this distribution. +X * +X * +X * Syntax: +X * +X * setterm +X * [ -term terminal_name ] +X * [ -reset ] +X * [ -initialize ] +X * [ -cursor [on|off] ] +X * [ -keyboard pc|olivetti|dutch|extended ] +X * [ -linewrap [on|off] ] +X * [ -snow [on|off] ] +X * [ -softscroll [on|off] ] +X * [ -default ] +X * [ -foreground black|red|green|yellow|blue|magenta|cyan|white|default ] +X * [ -background black|red|green|yellow|blue|magenta|cyan|white|default ] +X * [ -bold [on|off] ] +X * [ -blink [on|off] ] +X * [ -reverse [on|off] ] +X * [ -underline [on|off] ] +X * [ -store ] +X * [ -clear [all|rest] ] +X * +X * +X * Semantics: +X * +X * Setterm writes to standard output a character string that will invoke the +X * specified terminal capabilities. Where possibile termcap is consulted to +X * find the string to use. Some options however do not corresponding to a +X * termcap capability. In this case if the terminal type is "minix-vc", or +X * "minix-vcam" the string that invokes the specified capabilities on the PC +X * Minix virtual console driver is output. Options that are not implemented +X * by the terminal are ignored. +X * +X * The following options are non-obvious. +X * +X * -term can be used to override the TERM environment variable. +X * +X * -reset displays the terminal reset string, which typically resets the +X * terminal to its power on state. +X * +X * -initialize displays the terminal initialization string, which typically +X * sets the terminal's rendering options, and other attributes to the +X * default values. +X * +X * -default sets the terminal's rendering options to the default values. +X * +X * -store stores the terminal's current rendering options as the default +X * values. +X */ +X +X#include +X#include +X#include +X +X/* Constants. */ +X +X/* Known special terminal types. */ +X#define VCTERM "console" +X#define VCTERM_AM "minix-vcam" +X +X/* Termcap constants. */ +X#define TC_BUF_SIZE 1024 /* Size of termcap(3) buffer. */ +X#define TC_ENT_SIZE 50 /* Size of termcap(3) entry buffer. */ +X +X/* General constants. */ +X#define TRUE 1 +X#define FALSE 0 +X +X/* Keyboard types. */ +X#define PC 0 +X#define OLIVETTI 1 +X#define DUTCH 2 +X#define EXTENDED 3 +X +X/* Colors. */ +X/* +X#define BLACK 0 +X#define RED 1 +X#define GREEN 2 +X#define YELLOW 3 +X#define BLUE 4 +X#define MAGENTA 5 +X#define CYAN 6 +X#define WHITE 7 +X#define DEFAULT 9 */ +X/* Colors. */ +X#define BLACK 0 +X#define BLUE 1 +X#define GREEN 2 +X#define CYAN 3 +X#define RED 4 +X#define MAGENTA 5 +X#define YELLOW 6 +X#define WHITE 7 +X#define DEFAULT 9 +X +X/* Control sequences. */ +X#define ESC "\033" +X#define DCS "\033P" +X#define ST "\033\\" +X +X/* Static variables. */ +X +Xchar tc_buf[TC_BUF_SIZE]; /* Termcap buffer. */ +X +X/* Option flags. Set if the option is to be invoked. */ +Xint opt_term, opt_reset, opt_initialize, opt_cursor, opt_keyboard; +Xint opt_linewrap, opt_snow, opt_softscroll, opt_default, opt_foreground; +Xint opt_background, opt_bold, opt_blink, opt_reverse, opt_underline; +Xint opt_store, opt_clear; +X +X/* Option controls. The variable names have been contracted to ensure +X * uniqueness. +X */ +Xchar *opt_te_terminal_name; /* Terminal name. */ +Xint opt_cu_on, opt_li_on, opt_sn_on, opt_so_on, opt_bo_on, opt_bl_on; +Xint opt_re_on, opt_un_on; /* Boolean switches. */ +Xint opt_ke_type; /* Keyboard type. */ +Xint opt_fo_color, opt_ba_color; /* Colors. */ +Xint opt_cl_all; /* Clear all or rest. */ +X +X/* Command line parsing routines. +X * +X * Note that it is an error for a given option to be invoked more than once. +X */ +X +Xvoid parse_term(argc, argv, option, opt_term, bad_arg) +Xint argc; /* Number of arguments for this option. */ +Xchar *argv[]; /* Arguments for this option. */ +Xint *option; /* Term flag to set. */ +Xchar **opt_term; /* Terminal name to set. */ +Xint *bad_arg; /* Set to true if an error is detected. */ +X{ +X/* Parse a -term specification. */ +X +X if (argc != 1 || *option) *bad_arg = TRUE; +X *option = TRUE; +X if (argc == 1) { +X *opt_term = argv[0]; +X } +X} +X +Xvoid parse_none(argc, argv, option, bad_arg) +Xint argc; /* Number of arguments for this option. */ +Xchar *argv[]; /* Arguments for this option. */ +Xint *option; /* Option flag to set. */ +Xint *bad_arg; /* Set to true if an error is detected. */ +X{ +X/* Parse a parameterless specification. */ +X +X if (argc != 0 || *option) *bad_arg = TRUE; +X *option = TRUE; +X} +X +Xvoid parse_switch(argc, argv, option, opt_on, bad_arg) +Xint argc; /* Number of arguments for this option. */ +Xchar *argv[]; /* Arguments for this option. */ +Xint *option; /* Option flag to set. */ +Xint *opt_on; /* Boolean option switch to set or reset. */ +Xint *bad_arg; /* Set to true if an error is detected. */ +X{ +X/* Parse a boolean (on/off) specification. */ +X +X if (argc > 1 || *option) *bad_arg = TRUE; +X *option = TRUE; +X if (argc == 1) { +X if (strcmp(argv[0], "on") == 0) +X *opt_on = TRUE; +X else if (strcmp(argv[0], "off") == 0) +X *opt_on = FALSE; +X else +X *bad_arg = TRUE; +X } else { +X *opt_on = TRUE; +X } +X} +X +Xvoid parse_keyboard(argc, argv, option, opt_keyboard, bad_arg) +Xint argc; /* Number of arguments for this option. */ +Xchar *argv[]; /* Arguments for this option. */ +Xint *option; /* Keyboard flag to set. */ +Xint *opt_keyboard; /* Keyboard type to set. */ +Xint *bad_arg; /* Set to true if an error is detected. */ +X{ +X/* Parse a -keyboard specification. */ +X +X if (argc != 1 || *option) *bad_arg = TRUE; +X *option = TRUE; +X if (argc == 1) { +X if (strcmp(argv[0], "pc") == 0) +X *opt_keyboard = PC; +X else if (strcmp(argv[0], "olivetti") == 0) +X *opt_keyboard = OLIVETTI; +X else if (strcmp(argv[0], "dutch") == 0) +X *opt_keyboard = DUTCH; +X else if (strcmp(argv[0], "extended") == 0) +X *opt_keyboard = EXTENDED; +X else +X *bad_arg = TRUE; +X } +X} +X +Xvoid par_color(argc, argv, option, opt_color, bad_arg) +Xint argc; /* Number of arguments for this option. */ +Xchar *argv[]; /* Arguments for this option. */ +Xint *option; /* Color flag to set. */ +Xint *opt_color; /* Color to set. */ +Xint *bad_arg; /* Set to true if an error is detected. */ +X{ +X/* Parse a -foreground or -background specification. */ +X +X if (argc != 1 || *option) *bad_arg = TRUE; +X *option = TRUE; +X if (argc == 1) { +X if (strcmp(argv[0], "black") == 0) +X *opt_color = BLACK; +X else if (strcmp(argv[0], "red") == 0) +X *opt_color = RED; +X else if (strcmp(argv[0], "green") == 0) +X *opt_color = GREEN; +X else if (strcmp(argv[0], "yellow") == 0) +X *opt_color = YELLOW; +X else if (strcmp(argv[0], "blue") == 0) +X *opt_color = BLUE; +X else if (strcmp(argv[0], "magenta") == 0) +X *opt_color = MAGENTA; +X else if (strcmp(argv[0], "cyan") == 0) +X *opt_color = CYAN; +X else if (strcmp(argv[0], "white") == 0) +X *opt_color = WHITE; +X else if (strcmp(argv[0], "default") == 0) +X *opt_color = DEFAULT; +X else +X *bad_arg = TRUE; +X } +X} +X +Xvoid parse_clear(argc, argv, option, opt_all, bad_arg) +Xint argc; /* Number of arguments for this option. */ +Xchar *argv[]; /* Arguments for this option. */ +Xint *option; /* Clear flag to set. */ +Xint *opt_all; /* Clear all switch to set or reset. */ +Xint *bad_arg; /* Set to true if an error is detected. */ +X{ +X/* Parse a -clear specification. */ +X +X if (argc > 1 || *option) *bad_arg = TRUE; +X *option = TRUE; +X if (argc == 1) { +X if (strcmp(argv[0], "all") == 0) +X *opt_all = TRUE; +X else if (strcmp(argv[0], "rest") == 0) +X *opt_all = FALSE; +X else +X *bad_arg = TRUE; +X } else { +X *opt_all = TRUE; +X } +X} +X +Xvoid parse_option(option, argc, argv, bad_arg) +Xchar *option; /* Option with leading '-' removed. */ +Xint argc; /* Number of arguments for this option. */ +Xchar *argv[]; /* Arguments for this option. */ +Xint *bad_arg; /* Set to true if an error is detected. */ +X{ +X/* Parse a single specification. */ +X +X if (strcmp(option, "term") == 0) +X parse_term(argc, argv, &opt_term, &opt_te_terminal_name, bad_arg); +X else if (strcmp(option, "reset") == 0) +X parse_none(argc, argv, &opt_reset, bad_arg); +X else if (strcmp(option, "initialize") == 0) +X parse_none(argc, argv, &opt_initialize, bad_arg); +X else if (strcmp(option, "cursor") == 0) +X parse_switch(argc, argv, &opt_cursor, &opt_cu_on, bad_arg); +X else if (strcmp(option, "keyboard") == 0) +X parse_keyboard(argc, argv, &opt_keyboard, &opt_ke_type, bad_arg); +X else if (strcmp(option, "linewrap") == 0) +X parse_switch(argc, argv, &opt_linewrap, &opt_li_on, bad_arg); +X else if (strcmp(option, "snow") == 0) +X parse_switch(argc, argv, &opt_snow, &opt_sn_on, bad_arg); +X else if (strcmp(option, "softscroll") == 0) +X parse_switch(argc, argv, &opt_softscroll, &opt_so_on, bad_arg); +X else if (strcmp(option, "default") == 0) +X parse_none(argc, argv, &opt_default, bad_arg); +X else if (strcmp(option, "foreground") == 0) +X par_color(argc, argv, &opt_foreground, &opt_fo_color, bad_arg); +X else if (strcmp(option, "background") == 0) +X par_color(argc, argv, &opt_background, &opt_ba_color, bad_arg); +X else if (strcmp(option, "bold") == 0) +X parse_switch(argc, argv, &opt_bold, &opt_bo_on, bad_arg); +X else if (strcmp(option, "blink") == 0) +X parse_switch(argc, argv, &opt_blink, &opt_bl_on, bad_arg); +X else if (strcmp(option, "reverse") == 0) +X parse_switch(argc, argv, &opt_reverse, &opt_re_on, bad_arg); +X else if (strcmp(option, "underline") == 0) +X parse_switch(argc, argv, &opt_underline, &opt_un_on, bad_arg); +X else if (strcmp(option, "store") == 0) +X parse_none(argc, argv, &opt_store, bad_arg); +X else if (strcmp(option, "clear") == 0) +X parse_clear(argc, argv, &opt_clear, &opt_cl_all, bad_arg); +X else +X *bad_arg = TRUE; +X} +X +X/* End of command line parsing routines. */ +X +Xvoid usage(prog_name) +Xchar *prog_name; /* Name of this program. */ +X{ +X/* Print error message about arguments, and the command's syntax. */ +X +X fprintf(stderr, "%s: Argument error, usage\n", prog_name); +X fprintf(stderr, "\n"); +X fprintf(stderr, "%s\n", prog_name); +X fprintf(stderr, " [ -term terminal_name ]\n"); +X fprintf(stderr, " [ -reset ]\n"); +X fprintf(stderr, " [ -initialize ]\n"); +X fprintf(stderr, " [ -cursor [on|off] ]\n"); +X fprintf(stderr, " [ -keyboard pc|olivetti|dutch|extended ]\n"); +X fprintf(stderr, " [ -linewrap [on|off] ]\n"); +X fprintf(stderr, " [ -snow [on|off] ]\n"); +X fprintf(stderr, " [ -softscroll [on|off] ]\n"); +X fprintf(stderr, " [ -default ]\n"); +X fprintf(stderr, " [ -foreground black|red|green|yellow|blue|magenta"); +X fprintf(stderr, "|cyan|white|default ]\n"); +X fprintf(stderr, " [ -background black|red|green|yellow|blue|magenta"); +X fprintf(stderr, "|cyan|white|default ]\n"); +X fprintf(stderr, " [ -bold [on|off] ]\n"); +X fprintf(stderr, " [ -blink [on|off] ]\n"); +X fprintf(stderr, " [ -reverse [on|off] ]\n"); +X fprintf(stderr, " [ -underline [on|off] ]\n"); +X fprintf(stderr, " [ -store ]\n"); +X fprintf(stderr, " [ -clear [all|rest] ]\n"); +X} +X +Xchar tc_ent_buf[TC_ENT_SIZE]; /* Buffer for storing a termcap entry. */ +X +Xchar *tc_entry(name) +Xchar *name; /* Termcap capability string to lookup. */ +X{ +X/* Return the specified termcap string, or an empty string if no such termcap +X * capability exists. +X */ +X +X char *buf_ptr; +X +X buf_ptr = tc_ent_buf; +X if (tgetstr(name, &buf_ptr) == NULL) tc_ent_buf[0] = '\0'; +X return tc_ent_buf; +X} +X +Xvoid perform_sequence(vcterm) +Xint vcterm; /* Set if terminal is a virtual console. */ +X{ +X/* Perform the selected options. */ +X +X /* -reset. */ +X if (opt_reset) { +X printf("%s", tc_entry("rs")); +X } +X +X /* -initialize. */ +X if (opt_initialize) { +X printf("%s", tc_entry("is")); +X } +X +X /* -cursor [on|off]. */ +X if (opt_cursor) { +X if (opt_cu_on) +X printf("%s", tc_entry("ve")); +X else +X printf("%s", tc_entry("vi")); +X } +X +X /* -keyboard pc|olivetti|dutch|extended. Vc only. */ +X if (opt_keyboard && vcterm) { +X switch (opt_ke_type) { +X case PC: +X printf("%s%s%s", DCS, "keyboard.pc", ST); +X break; +X case OLIVETTI: +X printf("%s%s%s", DCS, "keyboard.olivetti", ST); +X break; +X case DUTCH: +X printf("%s%s%s", DCS, "keyboard.dutch", ST); +X break; +X case EXTENDED: +X printf("%s%s%s", DCS, "keyboard.extended", ST); +X break; +X } +X } +X +X /* -linewrap [on|off]. Vc only. */ +X if (opt_linewrap && vcterm) { +X if (opt_li_on) +X printf("%s%s%s", DCS, "linewrap.on", ST); +X else +X printf("%s%s%s", DCS, "linewrap.off", ST); +X } +X +X /* -snow [on|off]. Vc only. */ +X if (opt_snow && vcterm) { +X if (opt_sn_on) +X printf("%s%s%s", DCS, "snow.on", ST); +X else +X printf("%s%s%s", DCS, "snow.off", ST); +X } +X +X /* -softscroll [on|off]. Vc only. */ +X if (opt_softscroll && vcterm) { +X if (opt_so_on) +X printf("%s%s%s", DCS, "softscroll.on", ST); +X else +X printf("%s%s%s", DCS, "softscroll.off", ST); +X } +X +X /* -default. Vc sets default rendition, otherwise clears all +X * attributes. +X */ +X if (opt_default) { +X if (vcterm) +X printf("%s%s", ESC, "[0m"); +X else +X printf("%s", tc_entry("me")); +X } +X +X /* -foreground black|red|green|yellow|blue|magenta|cyan|white|default. +X * Vc only. +X */ +X if (opt_foreground && vcterm) { +X printf("%s%s%c%s", ESC, "[3", '0' + opt_fo_color, "m"); +X } +X +X /* -background black|red|green|yellow|blue|magenta|cyan|white|default. +X * Vc only. +X */ +X if (opt_background && vcterm) { +X printf("%s%s%c%s", ESC, "[4", '0' + opt_ba_color, "m"); +X } +X +X /* -bold [on|off]. Vc behaves as expected, otherwise off turns off +X * all attributes. +X */ +X if (opt_bold) { +X if (opt_bo_on) +X printf("%s", tc_entry("md")); +X else { +X if (vcterm) +X printf("%s%s", ESC, "[22m"); +X else +X printf("%s", tc_entry("me")); +X } +X } +X +X /* -blink [on|off]. Vc behaves as expected, otherwise off turns off +X * all attributes. +X */ +X if (opt_blink) { +X if (opt_bl_on) +X printf("%s", tc_entry("mb")); +X else { +X if (vcterm) +X printf("%s%s", ESC, "[25m"); +X else +X printf("%s", tc_entry("me")); +X } +X } +X +X /* -reverse [on|off]. Vc behaves as expected, otherwise off turns +X * off all attributes. +X */ +X if (opt_reverse) { +X if (opt_re_on) +X printf("%s", tc_entry("mr")); +X else { +X if (vcterm) +X printf("%s%s", ESC, "[27m"); +X else +X printf("%s", tc_entry("me")); +X } +X } +X +X /* -underline [on|off]. */ +X if (opt_underline) { +X if (opt_un_on) +X printf("%s", tc_entry("us")); +X else +X printf("%s", tc_entry("ue")); +X } +X +X /* -store. Vc only. */ +X if (opt_store && vcterm) { +X printf("%s%s%s", DCS, "rendition.set", ST); +X } +X +X /* -clear [all|rest]. */ +X if (opt_clear) { +X if (opt_cl_all) +X printf("%s", tc_entry("cl")); +X else +X printf("%s", tc_entry("cd")); +X } +X} +X +Xvoid main(argc, argv) +Xint argc; +Xchar *argv[]; +X{ +X int bad_arg; /* Set if error in arguments. */ +X int arg, modifier; +X char *term; /* Terminal type. */ +X int vcterm; /* Set if terminal is a virtual console. */ +X +X int bag_arg = FALSE; +X +X if (argc < 2) bad_arg = TRUE; +X +X /* Parse arguments. */ +X +X for (arg = 1; arg < argc;) { +X if (*argv[arg] == '-') { +X +X /* Parse a single option. */ +X +X for (modifier = arg + 1; modifier < argc; modifier++) { +X if (*argv[modifier] == '-') break; +X } +X parse_option(argv[arg] + 1, modifier - arg - 1, +X &argv[arg + 1], &bad_arg); +X arg = modifier; +X } else { +X +X bad_arg = TRUE; +X arg++; +X } +X } +X +X /* Display syntax message if error in arguments. */ +X +X if (bad_arg) { +X usage(argv[0]); +X exit(1); +X } +X +X /* Find out terminal name. */ +X +X if (opt_term) { +X term = opt_te_terminal_name; +X } else { +X term = getenv("TERM"); +X if (term == NULL) { +X fprintf(stderr, "%s: $TERM is not defined.\n", argv[0]); +X exit(1); +X } +X } +X +X /* Find termcap entry. */ +X +X if (tgetent(tc_buf, term) != 1) { +X fprintf(stderr, "%s: Could not find termcap entry for %s.\n", +X argv[0], term); +X exit(1); +X } +X +X /* See if the terminal is a virtual console terminal. */ +X +X vcterm = (strcmp(term, VCTERM) == 0) || (strcmp(term, VCTERM_AM) == 0); +X +X /* Perform the selected options. */ +X +X perform_sequence(vcterm); +X +X exit(0); +X} +/ +echo x - startcons +sed '/^X/s///' > startcons << '/' +X/usr/local/bin/doshell /dev/tty2 /bin/sh & +X/usr/local/bin/doshell /dev/tty3 /bin/sh & +X/usr/local/bin/doshell /dev/tty4 /bin/sh & +X/usr/local/bin/setterm -term console -foreground black -background cyan \ +X -clear rest > /dev/tty1 +X/usr/local/bin/setterm -term console -foreground white -background blue \ +X -clear all > /dev/tty2 +X/usr/local/bin/setterm -term console -foreground blue -background cyan \ +X -clear all > /dev/tty3 +X/usr/local/bin/setterm -term console -foreground cyan -background blue \ +X -clear all > /dev/tty4 +/ +echo x - termcap +sed '/^X/s///' > termcap << '/' +Xd3|vt300|vt320|dec vt300 series:\ +X :tc=vt200: +Xdl|vt200|vt220|vt200-js|vt220-js|dec vt200 series with jump scroll:\ +X :im=\E[4h:ei=\E[4l:mi:dc=\E[P:dm=:ed=:al=\E[L:dl=\E[M:\ +X :cs=\E[%i%d;%dr:sf=\ED:sr=\EM:sb=\EM:\ +X :ce=\E[K:cl=\E[H\E[J:cd=\E[J:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ +X :so=\E[7m:se=\E[27m:us=\E[4m:ue=\E[24m:\ +X :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:\ +X :is=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H:\ +X :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:\ +X :tc=vt100: +Xd0|vt100|vt100-am|vt100am|dec vt100:\ +X :do=^J:co#80:li#24:cl=50\E[;H\E[2J:sf=5\ED:\ +X :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ +X :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ +X :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:is=\E[1;24r\E[24;1H:\ +X :rf=/usr/share/lib/tabset/vt100:\ +X :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:\ +X :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\ +X :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3:xn:\ +X :sc=\E7:rc=\E8:cs=\E[%i%d;%dr: +X# +X# ok, Linux hasn't yet a complete vt100, so we just use the features +X# available. This should hopefully change. Note! We also change the +X# nr of lines to 25. We don't need no steenking waits either (and I +X# don't think we even could handle them, either in the termcap or in +X# the console driver) +X# +X# cl - clear screen +X# sf - scroll forward +X# le - left +X# am - auto-wrap (flag) +X# xn - ignore nl at end of line (flag) +X# ce - clear to end of line +X# cd - clear down +X# cm - cursor move +X# nd - next d? (right) +X# up - up +X# do - down +X# us - underline set +X# ue - underline off +X# so - reverse +X# se - normal +X# md - dim +X# mr - reverse +X# mb - bold +Xdumb|console:\ +X :do=^J:co#80:li#25:cl=\E[H\E[J:sf=\ED:\ +X :le=^H:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ +X :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ +X :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:is=\E[1;25r\E[25;1H:\ +X :it#8:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ +X :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=\EM:vt#3:xn:\ +X :sc=\E7:rc=\E8:cs=\E[%i%d;%dr: +X# +Xdumb50|console50:\ +X :do=^J:co#80:li#50:cl=\E[H\E[J:sf=\ED:\ +X :le=^H:bs:am:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ +X :ce=\E[K:cd=\E[J:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:\ +X :md=\E[1m:mr=\E[7m:mb=\E[5m:me=\E[m:is=\E[1;50r\E[50;1H:\ +X :it#8:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=^H:\ +X :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=\EM:vt#3:xn:\ +X :sc=\E7:rc=\E8:cs=\E[%i%d;%dr: +/ +echo x - vc.cdif +sed '/^X/s///' > vc.cdif << '/' +X*** kernel/chr_drv/console.c.orig Tue Dec 10 00:53:28 1991 +X--- kernel/chr_drv/console.c Mon Dec 23 22:56:39 1991 +X*************** +X*** 31,36 **** +X--- 31,37 ---- +X #include +X #include +X #include +X+ #include +X +X /* +X * These are set up by the setup-routine at boot-time: +X*************** +X*** 41,47 **** +X #define ORIG_VIDEO_PAGE (*(unsigned short *)0x90004) +X #define ORIG_VIDEO_MODE ((*(unsigned short *)0x90006) & 0xff) +X #define ORIG_VIDEO_COLS (((*(unsigned short *)0x90006) & 0xff00) >> 8) +X! #define ORIG_VIDEO_LINES (25) +X #define ORIG_VIDEO_EGA_AX (*(unsigned short *)0x90008) +X #define ORIG_VIDEO_EGA_BX (*(unsigned short *)0x9000a) +X #define ORIG_VIDEO_EGA_CX (*(unsigned short *)0x9000c) +X--- 42,48 ---- +X #define ORIG_VIDEO_PAGE (*(unsigned short *)0x90004) +X #define ORIG_VIDEO_MODE ((*(unsigned short *)0x90006) & 0xff) +X #define ORIG_VIDEO_COLS (((*(unsigned short *)0x90006) & 0xff00) >> 8) +X! #define ORIG_VIDEO_LINES (50) +X #define ORIG_VIDEO_EGA_AX (*(unsigned short *)0x90008) +X #define ORIG_VIDEO_EGA_BX (*(unsigned short *)0x9000a) +X #define ORIG_VIDEO_EGA_CX (*(unsigned short *)0x9000c) +X*************** +X*** 57,80 **** +X +X static unsigned char video_type; /* Type of display being used */ +X static unsigned long video_num_columns; /* Number of text columns */ +X static unsigned long video_size_row; /* Bytes per row */ +X static unsigned long video_num_lines; /* Number of test lines */ +X static unsigned char video_page; /* Initial video page */ +X- static unsigned long video_mem_start; /* Start of video RAM */ +X- static unsigned long video_mem_end; /* End of video RAM (sort of) */ +X static unsigned short video_port_reg; /* Video register select port */ +X static unsigned short video_port_val; /* Video register value port */ +X! static unsigned short video_erase_char; /* Char+Attrib to erase with */ +X +X! static unsigned long origin; /* Used for EGA/VGA fast scroll */ +X! static unsigned long scr_end; /* Used for EGA/VGA fast scroll */ +X! static unsigned long pos; +X! static unsigned long x,y; +X! static unsigned long top,bottom; +X! static unsigned long state=0; +X! static unsigned long npar,par[NPAR]; +X! static unsigned long ques=0; +X! static unsigned char attr=0x07; +X +X static void sysbeep(void); +X +X--- 58,118 ---- +X +X static unsigned char video_type; /* Type of display being used */ +X static unsigned long video_num_columns; /* Number of text columns */ +X+ static unsigned long video_mem_base; /* Base of video memory */ +X+ static unsigned long video_mem_term; /* End of video memory */ +X static unsigned long video_size_row; /* Bytes per row */ +X static unsigned long video_num_lines; /* Number of test lines */ +X static unsigned char video_page; /* Initial video page */ +X static unsigned short video_port_reg; /* Video register select port */ +X static unsigned short video_port_val; /* Video register value port */ +X! static int candocolor = 0; +X +X! #define MAX_SCR_ROWS 50 +X! #define MAX_SCR_COLS 80 +X! #define SCR_CHARS (MAX_SCR_ROWS * MAX_SCR_COLS) +X! #define SCR_SIZE (video_size_row*video_num_lines) +X! static struct { +X! unsigned char vc_attr; +X! unsigned char vc_def_attr; +X! unsigned long vc_ques; +X! unsigned long vc_state; +X! unsigned long vc_origin; /* Used for EGA/VGA fast scroll */ +X! unsigned long vc_scr_end; /* Used for EGA/VGA fast scroll */ +X! unsigned long vc_pos; +X! unsigned long vc_x,vc_y; +X! unsigned long vc_top,vc_bottom; +X! unsigned long vc_npar,vc_par[NPAR]; +X! unsigned long vc_video_mem_start; /* Start of video RAM */ +X! unsigned long vc_video_mem_end; /* End of video RAM (sort of) */ +X! unsigned vc_saved_x; +X! unsigned vc_saved_y; +X! unsigned short vc_video_erase_char; +X! int vc_iscolor; +X! } vc_cons [NR_CONSOLES]; +X! static struct { +X! unsigned short screen[SCR_CHARS]; +X! } vc_scrbuf[NR_CONSOLES]; +X! +X! #define origin (vc_cons[currcons].vc_origin) +X! #define scr_end (vc_cons[currcons].vc_scr_end) +X! #define pos (vc_cons[currcons].vc_pos) +X! #define top (vc_cons[currcons].vc_top) +X! #define bottom (vc_cons[currcons].vc_bottom) +X! #define x (vc_cons[currcons].vc_x) +X! #define y (vc_cons[currcons].vc_y) +X! #define state (vc_cons[currcons].vc_state) +X! #define npar (vc_cons[currcons].vc_npar) +X! #define par (vc_cons[currcons].vc_par) +X! #define ques (vc_cons[currcons].vc_ques) +X! #define attr (vc_cons[currcons].vc_attr) +X! #define saved_x (vc_cons[currcons].vc_saved_x) +X! #define saved_y (vc_cons[currcons].vc_saved_y) +X! #define video_mem_start (vc_cons[currcons].vc_video_mem_start) +X! #define video_mem_end (vc_cons[currcons].vc_video_mem_end) +X! #define def_attr (vc_cons[currcons].vc_def_attr) +X! #define video_erase_char (vc_cons[currcons].vc_video_erase_char) +X! #define iscolor (vc_cons[currcons].vc_iscolor) +X! int fg_console = 0; +X +X static void sysbeep(void); +X +X*************** +X*** 85,91 **** +X #define RESPONSE "\033[?1;2c" +X +X /* NOTE! gotoxy thinks x==video_num_columns is ok */ +X! static inline void gotoxy(unsigned int new_x,unsigned int new_y) +X { +X if (new_x > video_num_columns || new_y >= video_num_lines) +X return; +X--- 123,129 ---- +X #define RESPONSE "\033[?1;2c" +X +X /* NOTE! gotoxy thinks x==video_num_columns is ok */ +X! static inline void gotoxy(int currcons, int new_x,unsigned int new_y) +X { +X if (new_x > video_num_columns || new_y >= video_num_lines) +X return; +X*************** +X*** 94,100 **** +X pos=origin + y*video_size_row + (x<<1); +X } +X +X! static inline void set_origin(void) +X { +X cli(); +X outb_p(12, video_port_reg); +X--- 132,138 ---- +X pos=origin + y*video_size_row + (x<<1); +X } +X +X! static inline void set_origin(int currcons) +X { +X cli(); +X outb_p(12, video_port_reg); +X*************** +X*** 104,112 **** +X sti(); +X } +X +X! static void scrup(void) +X { +X! if (video_type == VIDEO_TYPE_EGAC || video_type == VIDEO_TYPE_EGAM) +X { +X if (!top && bottom == video_num_lines) { +X origin += video_size_row; +X--- 142,151 ---- +X sti(); +X } +X +X! static void scrup(int currcons) +X { +X! if ((currcons == fg_console) && +X! ((video_type == VIDEO_TYPE_EGAC || video_type == VIDEO_TYPE_EGAM))) +X { +X if (!top && bottom == video_num_lines) { +X origin += video_size_row; +X*************** +X*** 136,142 **** +X "D" (scr_end-video_size_row) +X :"cx","di"); +X } +X! set_origin(); +X } else { +X __asm__("cld\n\t" +X "rep\n\t" +X--- 175,181 ---- +X "D" (scr_end-video_size_row) +X :"cx","di"); +X } +X! set_origin(currcons); +X } else { +X __asm__("cld\n\t" +X "rep\n\t" +X*************** +X*** 167,175 **** +X } +X } +X +X! static void scrdown(void) +X { +X! if (video_type == VIDEO_TYPE_EGAC || video_type == VIDEO_TYPE_EGAM) +X { +X __asm__("std\n\t" +X "rep\n\t" +X--- 206,215 ---- +X } +X } +X +X! static void scrdown(int currcons) +X { +X! if ((currcons == fg_console) && +X! ((video_type == VIDEO_TYPE_EGAC || video_type == VIDEO_TYPE_EGAM))) +X { +X __asm__("std\n\t" +X "rep\n\t" +X*************** +X*** 201,207 **** +X } +X } +X +X! static void lf(void) +X { +X if (y+1top) { +X y--; +X--- 248,257 ---- +X pos += video_size_row; +X return; +X } +X! scrup(currcons); +X } +X +X! static void ri(int currcons) +X { +X if (y>top) { +X y--; +X*************** +X*** 218,233 **** +X pos -= video_size_row; +X return; +X } +X! scrdown(); +X } +X +X! static void cr(void) +X { +X pos -= x<<1; +X x=0; +X } +X +X! static void del(void) +X { +X if (x) { +X pos -= 2; +X--- 258,273 ---- +X pos -= video_size_row; +X return; +X } +X! scrdown(currcons); +X } +X +X! static void cr(int currcons) +X { +X pos -= x<<1; +X x=0; +X } +X +X! static void del(int currcons) +X { +X if (x) { +X pos -= 2; +X*************** +X*** 236,247 **** +X } +X } +X +X! static void csi_J(int par) +X { +X long count __asm__("cx"); +X long start __asm__("di"); +X +X! switch (par) { +X case 0: /* erase from cursor to end of display */ +X count = (scr_end-pos)>>1; +X start = pos; +X--- 276,287 ---- +X } +X } +X +X! static void csi_J(int currcons, int vpar) +X { +X long count __asm__("cx"); +X long start __asm__("di"); +X +X! switch (vpar) { +X case 0: /* erase from cursor to end of display */ +X count = (scr_end-pos)>>1; +X start = pos; +X*************** +X*** 265,276 **** +X :"cx","di"); +X } +X +X! static void csi_K(int par) +X { +X long count __asm__("cx"); +X long start __asm__("di"); +X +X! switch (par) { +X case 0: /* erase from cursor to end of line */ +X if (x>=video_num_columns) +X return; +X--- 305,316 ---- +X :"cx","di"); +X } +X +X! static void csi_K(int currcons, int vpar) +X { +X long count __asm__("cx"); +X long start __asm__("di"); +X +X! switch (vpar) { +X case 0: /* erase from cursor to end of line */ +X if (x>=video_num_columns) +X return; +X*************** +X*** 296,317 **** +X :"cx","di"); +X } +X +X! void csi_m(void) +X { +X int i; +X +X for (i=0;i<=npar;i++) +X switch (par[i]) { +X! case 0:attr=0x07;break; +X! case 1:attr=0x0f;break; +X! case 4:attr=0x0f;break; +X! case 7:attr=0x70;break; +X! case 27:attr=0x07;break; +X } +X } +X +X! static inline void set_cursor(void) +X { +X cli(); +X outb_p(14, video_port_reg); +X outb_p(0xff&((pos-video_mem_start)>>9), video_port_val); +X--- 336,379 ---- +X :"cx","di"); +X } +X +X! void csi_m(int currcons ) +X { +X int i; +X +X for (i=0;i<=npar;i++) +X switch (par[i]) { +X! case 0: attr=(iscolor?def_attr:0x07);break; /* default */ +X! case 1: attr=(iscolor?def_attr|0x08:0x0f);break; /* bold */ +X! case 4: attr=(iscolor?def_attr|0x08:0x0f);break; /* underline */ +X! case 7: attr=(iscolor?(def_attr<<4)|(def_attr>>4):0x70);break; /* negative */ +X! case 22: /* not bold */ +X! case 24: /* not underline */ +X! case 25: /* not blinking */ +X! break; +X! case 27: attr=(iscolor?def_attr:0x07);break; /* positive image */ +X! case 39: if (iscolor) attr=(attr & 0xf0) | (def_attr & 0x0f); break; +X! case 49: if (iscolor) attr=(attr & 0x0f) | (def_attr & 0xf0); break; +X! default: +X! if (!candocolor) +X! break; +X! iscolor = 1; +X! if ((par[i]>=30) && (par[i]<=38)) +X! def_attr = (def_attr & 0xf0) | (par[i]-30); +X! else /* Background color */ +X! if ((par[i]>=40) && (par[i]<=48)) +X! { def_attr = (def_attr & 0x0f) | ((par[i]-40)<<4); +X! video_erase_char = (video_erase_char&0x0ff) | (def_attr<<8); +X! } +X! else +X! break; +X! attr = def_attr; +X } +X } +X +X! static inline void set_cursor(int currcons) +X { +X+ if (currcons != fg_console) +X+ return; +X cli(); +X outb_p(14, video_port_reg); +X outb_p(0xff&((pos-video_mem_start)>>9), video_port_val); +X*************** +X*** 320,326 **** +X sti(); +X } +X +X! static void respond(struct tty_struct * tty) +X { +X char * p = RESPONSE; +X +X--- 382,388 ---- +X sti(); +X } +X +X! static void respond(int currcons, struct tty_struct * tty) +X { +X char * p = RESPONSE; +X +X*************** +X*** 333,339 **** +X copy_to_cooked(tty); +X } +X +X! static void insert_char(void) +X { +X int i=x; +X unsigned short tmp, old = video_erase_char; +X--- 395,401 ---- +X copy_to_cooked(tty); +X } +X +X! static void insert_char(int currcons) +X { +X int i=x; +X unsigned short tmp, old = video_erase_char; +X*************** +X*** 347,353 **** +X } +X } +X +X! static void insert_line(void) +X { +X int oldtop,oldbottom; +X +X--- 409,415 ---- +X } +X } +X +X! static void insert_line(int currcons) +X { +X int oldtop,oldbottom; +X +X*************** +X*** 355,366 **** +X oldbottom=bottom; +X top=y; +X bottom = video_num_lines; +X! scrdown(); +X top=oldtop; +X bottom=oldbottom; +X } +X +X! static void delete_char(void) +X { +X int i; +X unsigned short * p = (unsigned short *) pos; +X--- 417,428 ---- +X oldbottom=bottom; +X top=y; +X bottom = video_num_lines; +X! scrdown(currcons); +X top=oldtop; +X bottom=oldbottom; +X } +X +X! static void delete_char(int currcons) +X { +X int i; +X unsigned short * p = (unsigned short *) pos; +X*************** +X*** 375,381 **** +X *p = video_erase_char; +X } +X +X! static void delete_line(void) +X { +X int oldtop,oldbottom; +X +X--- 437,443 ---- +X *p = video_erase_char; +X } +X +X! static void delete_line(int currcons) +X { +X int oldtop,oldbottom; +X +X*************** +X*** 383,394 **** +X oldbottom=bottom; +X top=y; +X bottom = video_num_lines; +X! scrup(); +X top=oldtop; +X bottom=oldbottom; +X } +X +X! static void csi_at(unsigned int nr) +X { +X if (nr > video_num_columns) +X nr = video_num_columns; +X--- 445,456 ---- +X oldbottom=bottom; +X top=y; +X bottom = video_num_lines; +X! scrup(currcons); +X top=oldtop; +X bottom=oldbottom; +X } +X +X! static void csi_at(int currcons, unsigned int nr) +X { +X if (nr > video_num_columns) +X nr = video_num_columns; +X*************** +X*** 395,404 **** +X else if (!nr) +X nr = 1; +X while (nr--) +X! insert_char(); +X } +X +X! static void csi_L(unsigned int nr) +X { +X if (nr > video_num_lines) +X nr = video_num_lines; +X--- 457,466 ---- +X else if (!nr) +X nr = 1; +X while (nr--) +X! insert_char(currcons); +X } +X +X! static void csi_L(int currcons, unsigned int nr) +X { +X if (nr > video_num_lines) +X nr = video_num_lines; +X*************** +X*** 405,414 **** +X else if (!nr) +X nr = 1; +X while (nr--) +X! insert_line(); +X } +X +X! static void csi_P(unsigned int nr) +X { +X if (nr > video_num_columns) +X nr = video_num_columns; +X--- 467,476 ---- +X else if (!nr) +X nr = 1; +X while (nr--) +X! insert_line(currcons); +X } +X +X! static void csi_P(int currcons, unsigned int nr) +X { +X if (nr > video_num_columns) +X nr = video_num_columns; +X*************** +X*** 415,424 **** +X else if (!nr) +X nr = 1; +X while (nr--) +X! delete_char(); +X } +X +X! static void csi_M(unsigned int nr) +X { +X if (nr > video_num_lines) +X nr = video_num_lines; +X--- 477,486 ---- +X else if (!nr) +X nr = 1; +X while (nr--) +X! delete_char(currcons); +X } +X +X! static void csi_M(int currcons, unsigned int nr) +X { +X if (nr > video_num_lines) +X nr = video_num_lines; +X*************** +X*** 425,452 **** +X else if (!nr) +X nr=1; +X while (nr--) +X! delete_line(); +X } +X +X! static int saved_x=0; +X! static int saved_y=0; +X! +X! static void save_cur(void) +X { +X saved_x=x; +X saved_y=y; +X } +X +X! static void restore_cur(void) +X { +X! gotoxy(saved_x, saved_y); +X } +X +X void con_write(struct tty_struct * tty) +X { +X int nr; +X char c; +X +X nr = CHARS(tty->write_q); +X while (nr--) { +X GETCH(tty->write_q,c); +X--- 487,525 ---- +X else if (!nr) +X nr=1; +X while (nr--) +X! delete_line(currcons); +X } +X +X! static void save_cur(int currcons) +X { +X saved_x=x; +X saved_y=y; +X } +X +X! static void restore_cur(int currcons) +X { +X! gotoxy(currcons,saved_x, saved_y); +X } +X +X+ static int myattr; +X void con_write(struct tty_struct * tty) +X { +X int nr; +X char c; +X +X+ int currcons; +X+ +X+ for (currcons = 0; currcons<=NR_CONSOLES; currcons++) +X+ if (tty == TTY_TABLE(currcons)) +X+ break; +X+ if (currcons>NR_CONSOLES) +X+ panic("con_write: illegal tty"); +X+ if (!currcons) /* tty0 always writes to the current one. */ +X+ currcons = fg_console; +X+ else +X+ currcons--; +X+ +X+ myattr = attr; +X nr = CHARS(tty->write_q); +X while (nr--) { +X GETCH(tty->write_q,c); +X*************** +X*** 456,464 **** +X if (x>=video_num_columns) { +X x -= video_num_columns; +X pos -= video_size_row; +X! lf(); +X } +X! __asm__("movb _attr,%%ah\n\t" +X "movw %%ax,%1\n\t" +X ::"a" (c),"m" (*(short *)pos) +X :"ax"); +X--- 529,537 ---- +X if (x>=video_num_columns) { +X x -= video_num_columns; +X pos -= video_size_row; +X! lf(currcons); +X } +X! __asm__("movb _myattr,%%ah\n\t" +X "movw %%ax,%1\n\t" +X ::"a" (c),"m" (*(short *)pos) +X :"ax"); +X*************** +X*** 467,477 **** +X } else if (c==27) +X state=1; +X else if (c==10 || c==11 || c==12) +X! lf(); +X else if (c==13) +X! cr(); +X else if (c==ERASE_CHAR(tty)) +X! del(); +X else if (c==8) { +X if (x) { +X x--; +X--- 540,550 ---- +X } else if (c==27) +X state=1; +X else if (c==10 || c==11 || c==12) +X! lf(currcons); +X else if (c==13) +X! cr(currcons); +X else if (c==ERASE_CHAR(tty)) +X! del(currcons); +X else if (c==8) { +X if (x) { +X x--; +X*************** +X*** 484,490 **** +X if (x>video_num_columns) { +X x -= video_num_columns; +X pos -= video_size_row; +X! lf(); +X } +X c=9; +X } else if (c==7) +X--- 557,563 ---- +X if (x>video_num_columns) { +X x -= video_num_columns; +X pos -= video_size_row; +X! lf(currcons); +X } +X c=9; +X } else if (c==7) +X*************** +X*** 495,511 **** +X if (c=='[') +X state=2; +X else if (c=='E') +X! gotoxy(0,y+1); +X else if (c=='M') +X! ri(); +X else if (c=='D') +X! lf(); +X else if (c=='Z') +X! respond(tty); +X else if (x=='7') +X! save_cur(); +X else if (x=='8') +X! restore_cur(); +X break; +X case 2: +X for(npar=0;npar>6)&2) | ((mode>>5)&4)); +X+ +X+ #ifdef PS_TWO +X+ if (ps) { +X+ data_port = 0x68; +X+ status_port = 0x72; +X+ } else +X+ #endif +X+ { +X+ data_port = 0x60; +X+ status_port = 0x64; +X+ } +X+ +X+ kb_wait(status_port); +X+ outb_p(data_port, 0xED); +X+ kb_ack(data_port); +X+ +X+ kb_wait(status_port); +X+ outb_p(data_port, leds); +X+ kb_ack(data_port); +X+ } */ +X+ +X+ +X+ static void get_scrmem(int currcons) +X+ { +X+ if ((video_type == VIDEO_TYPE_EGAC || video_type == VIDEO_TYPE_EGAM) && +X+ (origin != video_mem_start)) +X+ { unsigned long i; +X+ i = scr_end-origin; +X+ memcpy((void *)vc_scrbuf[fg_console].screen, (void *)origin, i ); +X+ memcpy( (void*)(((char*)vc_scrbuf[fg_console].screen)+i), +X+ (void *)video_mem_base, SCR_SIZE-i); +X+ } +X+ else +X+ memcpy((void *)vc_scrbuf[fg_console].screen, +X+ (void *)video_mem_base, SCR_SIZE); +X+ origin = +X+ video_mem_start = (unsigned long)vc_scrbuf[fg_console].screen; +X+ video_mem_end = video_mem_start+sizeof(vc_scrbuf[0]); +X+ scr_end = video_mem_start + video_num_lines * video_size_row; +X+ top = 0; +X+ pos=origin + y*video_size_row + (x<<1); +X+ bottom = video_num_lines; +X+ } +X+ +X+ static void set_scrmem(int currcons) +X+ { +X+ video_mem_start = video_mem_base; +X+ video_mem_end = video_mem_term; +X+ origin = video_mem_start; +X+ scr_end = video_mem_start + video_num_lines * video_size_row; +X+ top = 0; +X+ bottom = video_num_lines; +X+ pos=origin + y*video_size_row + (x<<1); +X+ memcpy((void *)video_mem_base, (void *)vc_scrbuf[fg_console].screen, +X+ SCR_SIZE); +X+ } +X+ +X+ static void swap_screen(int num) +X+ { +X+ if (num == fg_console) +X+ return; +X+ cli(); +X+ get_scrmem(fg_console); +X+ fg_console = num; +X+ table_list[0] = &tty_table[num+1].read_q; +X+ table_list[1] = &tty_table[num+1].write_q; +X+ set_scrmem(fg_console); +X+ sti(); +X+ if (video_type == VIDEO_TYPE_EGAC || video_type == VIDEO_TYPE_EGAM) +X+ set_origin(fg_console); +X+ set_cursor(num); +X+ } +X+ +X+ static void change_console(int num) +X+ { +X+ /* Bring virtual console num to the foreground, or cycle to next console if +X+ * num is -1. +X+ */ +X+ +X+ int new_console, old_console; +X+ +X+ if (num >= NR_CONSOLES) return; +X+ +X+ old_console = new_console = fg_console; +X+ +X+ /* Value of fg_console is accessed asynchronously by keyboard() interrupt +X+ * routine, need to perform lock because update can't be guaranteed to be +X+ * atomic. +X+ */ +X+ if (num == -1) { +X+ new_console++; +X+ if (new_console >= NR_CONSOLES) new_console = 0; +X+ } else +X+ new_console = num; +X+ +X+ /* Set leds and display for new console. */ +X+ /* set_leds(new_console,old_console); */ +X+ swap_screen(new_console); +X+ } +X+ +X+ +X+ extern void show_stat(void); +X+ +X+ void display_stat( long regeax ) +X+ { +X+ if (regeaxexecutable); +X current->executable=NULL; +X if (current->leader && current->tty >= 0) +X! tty_table[current->tty].pgrp = 0; +X if (last_task_used_math == current) +X last_task_used_math = NULL; +X if (current->leader) +X--- 122,128 ---- +X iput(current->executable); +X current->executable=NULL; +X if (current->leader && current->tty >= 0) +X! TTY_TABLE(current->tty)->pgrp = 0; +X if (last_task_used_math == current) +X last_task_used_math = NULL; +X if (current->leader) +X*** kernel/chr_drv/keyboard.S.orig Wed Dec 4 15:07:59 1991 +X--- kernel/chr_drv/keyboard.S Mon Dec 23 21:59:12 1991 +X*************** +X*** 208,222 **** +X * this routine handles function keys +X */ +X func: +X! pushl %eax +X pushl %ecx +X pushl %edx +X! call _show_stat +X popl %edx +X popl %ecx +X! popl %eax +X! subb $0x3B,%al +X! jb end_func +X cmpb $9,%al +X jbe ok_func +X subb $18,%al +X--- 208,223 ---- +X * this routine handles function keys +X */ +X func: +X! subb $0x3B,%al +X! jb end_func +X pushl %ecx +X pushl %edx +X! pushl %eax +X! call _display_stat +X! popl %eax +X popl %edx +X popl %ecx +X! jmp end_func +X cmpb $9,%al +X jbe ok_func +X subb $18,%al +X*** init/main.c.orig Sun Dec 22 19:54:50 1991 +X--- init/main.c Mon Dec 23 09:33:02 1991 +X*************** +X*** 170,176 **** +X int pid,i; +X +X setup((void *) &drive_info); +X! (void) open("/dev/tty0",O_RDWR,0); +X (void) dup(0); +X (void) dup(0); +X printf("%d buffers = %d bytes buffer space\n\r",NR_BUFFERS, +X--- 170,176 ---- +X int pid,i; +X +X setup((void *) &drive_info); +X! (void) open("/dev/tty1",O_RDWR,0); +X (void) dup(0); +X (void) dup(0); +X printf("%d buffers = %d bytes buffer space\n\r",NR_BUFFERS, +X*************** +X*** 194,200 **** +X if (!pid) { +X close(0);close(1);close(2); +X setsid(); +X! (void) open("/dev/tty0",O_RDWR,0); +X (void) dup(0); +X (void) dup(0); +X _exit(execve("/bin/sh",argv,envp)); +X--- 194,200 ---- +X if (!pid) { +X close(0);close(1);close(2); +X setsid(); +X! (void) open("/dev/tty1",O_RDWR,0); +X (void) dup(0); +X (void) dup(0); +X _exit(execve("/bin/sh",argv,envp)); +X*** fs/open.c.orig Mon Dec 16 13:37:40 1991 +X--- fs/open.c Sun Dec 22 23:07:07 1991 +X*************** +X*** 164,170 **** +X if (MAJOR(inode->i_zone[0])==4) { +X if (current->leader && current->tty<0) { +X current->tty = MINOR(inode->i_zone[0]); +X! tty_table[current->tty].pgrp = current->pgrp; +X } +X } else if (MAJOR(inode->i_zone[0])==5) +X if (current->tty<0) { +X--- 164,170 ---- +X if (MAJOR(inode->i_zone[0])==4) { +X if (current->leader && current->tty<0) { +X current->tty = MINOR(inode->i_zone[0]); +X! TTY_TABLE(current->tty)->pgrp = current->pgrp; +X } +X } else if (MAJOR(inode->i_zone[0])==5) +X if (current->tty<0) { +X*** kernel/chr_drv/serial.c.orig Mon Dec 16 13:30:34 1991 +X--- kernel/chr_drv/serial.c Mon Dec 16 13:34:06 1991 +X*************** +X*** 38,45 **** +X { +X set_intr_gate(0x24,rs1_interrupt); +X set_intr_gate(0x23,rs2_interrupt); +X! init(tty_table[1].read_q.data); +X! init(tty_table[2].read_q.data); +X outb(inb_p(0x21)&0xE7,0x21); +X } +X +X--- 38,45 ---- +X { +X set_intr_gate(0x24,rs1_interrupt); +X set_intr_gate(0x23,rs2_interrupt); +X! init(TTY_TABLE(FIRST_SERIAL_DEV)->read_q.data); +X! init(TTY_TABLE(FIRST_SERIAL_DEV+1)->read_q.data); +X outb(inb_p(0x21)&0xE7,0x21); +X } +X +X*** include/linux/tty.h.orig Mon Dec 16 13:40:23 1991 +X--- include/linux/tty.h Sun Dec 22 18:30:38 1991 +X*************** +X*** 21,26 **** +X--- 21,33 ---- +X char buf[TTY_BUF_SIZE]; +X }; +X +X+ #define NR_SERIAL 2 +X+ #define NR_CONSOLES 4 +X+ #define NR_TTYS (NR_SERIAL+NR_CONSOLES+1) +X+ #define FIRST_SERIAL_DEV 64 +X+ #define TTY_TABLE(ttynum) (((ttynum) < FIRST_SERIAL_DEV) ? tty_table+(ttynum) :\ +X+ tty_table+(ttynum)+NR_CONSOLES-FIRST_SERIAL_DEV+1) +X+ +X #define INC(a) ((a) = ((a)+1) & (TTY_BUF_SIZE-1)) +X #define DEC(a) ((a) = ((a)-1) & (TTY_BUF_SIZE-1)) +X #define EMPTY(a) ((a).head == (a).tail) +X*************** +X*** 53,58 **** +X--- 60,66 ---- +X }; +X +X extern struct tty_struct tty_table[]; +X+ extern struct tty_queue *table_list[]; +X +X /* intr=^C quit=^| erase=del kill=^U +X eof=^D vtime=\0 vmin=\1 sxtc=\0 +X*** kernel/chr_drv/tty_io.c.orig Mon Dec 16 12:59:00 1991 +X--- kernel/chr_drv/tty_io.c Mon Dec 23 23:05:44 1991 +X*************** +X*** 48,54 **** +X #define O_NLRET(tty) _O_FLAG((tty),ONLRET) +X #define O_LCUC(tty) _O_FLAG((tty),OLCUC) +X +X! struct tty_struct tty_table[] = { +X { +X {ICRNL, /* change incoming CR to NL */ +X OPOST|ONLCR, /* change outgoing NL to CRNL */ +X--- 48,54 ---- +X #define O_NLRET(tty) _O_FLAG((tty),ONLRET) +X #define O_LCUC(tty) _O_FLAG((tty),OLCUC) +X +X! struct tty_struct tty_table[NR_TTYS] = { +X { +X {ICRNL, /* change incoming CR to NL */ +X OPOST|ONLCR, /* change outgoing NL to CRNL */ +X*************** +X*** 90,96 **** +X {0,0,0,0,""} +X } +X }; +X- +X /* +X * these are the tables used by the machine code handlers. +X * you can implement pseudo-tty's or something by changing +X--- 90,95 ---- +X*************** +X*** 137,145 **** +X sti(); +X } +X +X void wait_for_keypress(void) +X { +X! sleep_if_empty(&tty_table[0].secondary); +X } +X +X void copy_to_cooked(struct tty_struct * tty) +X--- 136,145 ---- +X sti(); +X } +X +X+ extern int fg_console; +X void wait_for_keypress(void) +X { +X! sleep_if_empty(&tty_table[fg_console+1].secondary); +X } +X +X void copy_to_cooked(struct tty_struct * tty) +X*************** +X*** 227,232 **** +X--- 227,236 ---- +X wake_up(&tty->secondary.proc_list); +X } +X +X+ #define IS_A_SERIAL(chan) (((chan)>=FIRST_SERIAL_DEV) && ((chan)<=(FIRST_SERIAL_DEV+1))) +X+ #define IS_A_CONSOLE(chan) ((chan)<=NR_CONSOLES) +X+ #define IS_A_TTY(chan) (IS_A_SERIAL(chan) || IS_A_CONSOLE(chan)) +X+ +X int tty_read(unsigned channel, char * buf, int nr) +X { +X struct tty_struct * tty; +X*************** +X*** 234,241 **** +X int minimum,time,flag=0; +X long oldalarm; +X +X! if (channel>2 || nr<0) return -1; +X! tty = &tty_table[channel]; +X oldalarm = current->alarm; +X time = 10L*tty->termios.c_cc[VTIME]; +X minimum = tty->termios.c_cc[VMIN]; +X--- 238,245 ---- +X int minimum,time,flag=0; +X long oldalarm; +X +X! if ((!IS_A_TTY(channel)) || nr<0) return -1; +X! tty = TTY_TABLE(channel); +X oldalarm = current->alarm; +X time = 10L*tty->termios.c_cc[VTIME]; +X minimum = tty->termios.c_cc[VMIN]; +X*************** +X*** 293,300 **** +X struct tty_struct * tty; +X char c, *b=buf; +X +X! if (channel>2 || nr<0) return -1; +X! tty = channel + tty_table; +X while (nr>0) { +X sleep_if_full(&tty->write_q); +X if (current->signal) +X--- 297,304 ---- +X struct tty_struct * tty; +X char c, *b=buf; +X +X! if ((!IS_A_TTY(channel)) || nr<0) return -1; +X! tty = TTY_TABLE(channel); +X while (nr>0) { +X sleep_if_full(&tty->write_q); +X if (current->signal) +X*************** +X*** 340,349 **** +X * totally innocent. +X */ +X void do_tty_interrupt(int tty) +X! { +X! copy_to_cooked(tty_table+tty); +X } +X +X void chr_dev_init(void) +X { +X } +X--- 344,368 ---- +X * totally innocent. +X */ +X void do_tty_interrupt(int tty) +X! { if (tty == 0) +X! tty = fg_console+1; +X! else +X! if ((tty>=1) && (tty<=2)) +X! tty = tty + NR_CONSOLES; +X! copy_to_cooked(TTY_TABLE(tty)); +X } +X +X void chr_dev_init(void) +X { +X+ int i; +X+ for (i=NR_SERIAL; i>0; i--) /* Move serial ports up. */ +X+ tty_table[NR_CONSOLES+i] = tty_table[i]; +X+ for (i=1; i<=NR_CONSOLES; i++) +X+ tty_table[i] = tty_table[0]; +X+ table_list[0] = &(TTY_TABLE(1)->read_q); +X+ table_list[1] = &(TTY_TABLE(1)->write_q); +X+ table_list[2] = &(TTY_TABLE(FIRST_SERIAL_DEV)->read_q); +X+ table_list[3] = &(TTY_TABLE(FIRST_SERIAL_DEV)->write_q); +X+ table_list[4] = &(TTY_TABLE(FIRST_SERIAL_DEV+1)->read_q); +X+ table_list[5] = &(TTY_TABLE(FIRST_SERIAL_DEV+1)->write_q); +X } +/ diff --git a/Linux-0.11/ports/find-3.2-diffs b/Linux-0.11/ports/find-3.2-diffs new file mode 100644 index 00000000..245f4b87 --- /dev/null +++ b/Linux-0.11/ports/find-3.2-diffs @@ -0,0 +1,8 @@ +70c70 +< DEFS = -DDIRENT -DST_BLOCKS_MISSING -DSTDC_HEADERS -DPOSIX -DUSG +--- +> DEFS = -DDIRENT -DST_BLOCKS_MISSING -DSTDC_HEADERS -DPOSIX -DUSG -D_POSIX_SOURCE +80c80 +< bindir = $(prefix)/gnubin +--- +> bindir = $(prefix)/bin diff --git a/Linux-0.11/ports/gawk-diffs b/Linux-0.11/ports/gawk-diffs new file mode 100644 index 00000000..52d4434e --- /dev/null +++ b/Linux-0.11/ports/gawk-diffs @@ -0,0 +1,329 @@ +*** 1.1 1991/12/11 16:13:13 +--- Makefile 1991/12/11 17:07:11 +*************** +*** 64,71 **** + # MISSING = -DSPRINTF_INT -DBLKSIZE_MISSING -DSTRERROR_MISSING -DRANDOM_MISSING + + # VAX running Ultrix 3.x +- MISSING = -DSTRERROR_MISSING + + # A generic 4.2 BSD machine + # (eliminate GETOPT_MISSING for 4.3 release) + # (eliminate STRCASE_MISSING and TMPNAM_MISSING for Tahoe release) +--- 64,75 ---- + # MISSING = -DSPRINTF_INT -DBLKSIZE_MISSING -DSTRERROR_MISSING -DRANDOM_MISSING + + # VAX running Ultrix 3.x + ++ # LINUX ++ MISSING = -DSPRINTF_INT -DTMPNAM_MISSING -DBLKSIZE_MISSING -DSTRCASE_MISSING \ ++ -Dalloca=__builtin_alloca -DGCVT_MISSING -DRANDOM_MISSING \ ++ -DBCOPY_MISSING -DSTRTOD_MISSING ++ + # A generic 4.2 BSD machine + # (eliminate GETOPT_MISSING for 4.3 release) + # (eliminate STRCASE_MISSING and TMPNAM_MISSING for Tahoe release) +*************** +*** 80,92 **** + + # Comment out the next line if you don't have gcc. + # Also choose just one of -g and -O. +! #CC= gcc + +! #OPTIMIZE= -O -g + PROFILE= #-pg + DEBUG= #-DDEBUG #-DMEMDEBUG #-DFUNC_TRACE #-DMPROF + DEBUGGER= #-g -Bstatic +! WARN= #-W -Wunused -Wimplicit -Wreturn-type -Wcomment # for gcc only + + # Parser to use on grammar -- if you don't have bison use the first one + #PARSER = yacc +--- 84,96 ---- + + # Comment out the next line if you don't have gcc. + # Also choose just one of -g and -O. +! CC= gcc + +! OPTIMIZE= -O #-g + PROFILE= #-pg + DEBUG= #-DDEBUG #-DMEMDEBUG #-DFUNC_TRACE #-DMPROF + DEBUGGER= #-g -Bstatic +! WARN= -W -Wunused -Wimplicit -Wreturn-type -Wcomment # for gcc only + + # Parser to use on grammar -- if you don't have bison use the first one + #PARSER = yacc +*************** +*** 154,160 **** + + # rules to build gawk + gawk: $(ALLOBJS) $(GNUOBJS) +! $(CC) -o gawk $(CFLAGS) $(ALLOBJS) $(GNUOBJS) -lm + + $(AWKOBJS): awk.h + +--- 158,164 ---- + + # rules to build gawk + gawk: $(ALLOBJS) $(GNUOBJS) +! $(CC) -o gawk $(CFLAGS) $(ALLOBJS) $(GNUOBJS) #-lm + + $(AWKOBJS): awk.h + +*** 1.1 1991/12/11 16:18:17 +--- awk.h 1991/12/11 17:07:45 +*************** +*** 42,51 **** + extern char *alloca(); + #endif + #else + extern char *alloca(); + #endif + #ifdef SPRINTF_INT +! extern int sprintf(); + #else /* not USG */ + /* nasty nasty berkelixm */ + #define setjmp _setjmp +--- 42,53 ---- + extern char *alloca(); + #endif + #else ++ #ifndef alloca + extern char *alloca(); + #endif ++ #endif + #ifdef SPRINTF_INT +! /* extern int sprintf(); XXX LINUX */ + #else /* not USG */ + /* nasty nasty berkelixm */ + #define setjmp _setjmp +*************** +*** 78,99 **** + extern char *memset(char *, int, int); + + /* extern int fprintf(FILE *, char *, ...); */ +! extern int fprintf(); + extern int vfprintf(); + #ifndef MSDOS +! extern int fwrite(char *, int, int, FILE *); + #endif + extern int fflush(FILE *); + extern int fclose(FILE *); + extern int pclose(FILE *); + #ifndef MSDOS +! extern int fputs(char *, FILE *); + #endif + extern void abort(); + extern int isatty(int); + extern void exit(int); + extern int system(char *); + extern int sscanf(/* char *, char *, ... */); + + extern double atof(char *); + extern int fstat(int, struct stat *); +--- 80,104 ---- + extern char *memset(char *, int, int); + + /* extern int fprintf(FILE *, char *, ...); */ +! /* extern int fprintf(); XXXL */ + extern int vfprintf(); + #ifndef MSDOS +! /* extern int fwrite(char *, int, int, FILE *); XXXL */ + #endif + extern int fflush(FILE *); + extern int fclose(FILE *); + extern int pclose(FILE *); + #ifndef MSDOS +! /* extern int fputs(char *, FILE *); XXXL */ + #endif + extern void abort(); + extern int isatty(int); + extern void exit(int); + extern int system(char *); ++ #if 0 ++ /* XXXL */ + extern int sscanf(/* char *, char *, ... */); ++ #endif + + extern double atof(char *); + extern int fstat(int, struct stat *); +*************** +*** 100,110 **** + extern off_t lseek(int, off_t, int); + extern int fseek(FILE *, long, int); + extern int close(int); +! extern int open(); + extern int pipe(int *); + extern int dup2(int, int); + #ifndef MSDOS +! extern int unlink(char *); + #endif + extern int fork(); + extern int execl(/* char *, char *, ... */); +--- 105,115 ---- + extern off_t lseek(int, off_t, int); + extern int fseek(FILE *, long, int); + extern int close(int); +! /* extern int open(); XXXL */ + extern int pipe(int *); + extern int dup2(int, int); + #ifndef MSDOS +! /* extern int unlink(char *); XXXL */ + #endif + extern int fork(); + extern int execl(/* char *, char *, ... */); +*** 1.1 1991/12/11 16:29:17 +--- awk.y 1991/12/11 17:08:04 +*************** +*** 96,102 **** + + %type func_name + %token FUNC_CALL NAME REGEXP +! %token ERROR + %token NUMBER YSTRING + %token RELOP APPEND_OP + %token ASSIGNOP MATCHOP NEWLINE CONCAT_OP +--- 96,102 ---- + + %type func_name + %token FUNC_CALL NAME REGEXP +! %token ERROR_TOK + %token NUMBER YSTRING + %token RELOP APPEND_OP + %token ASSIGNOP MATCHOP NEWLINE CONCAT_OP +*************** +*** 386,401 **** + + nls + : NEWLINE +! { $$ = NULL; } + | nls NEWLINE +! { $$ = NULL; } + ; + + opt_nls + : /* empty */ +! { $$ = NULL; } + | nls +! { $$ = NULL; } + ; + + input_redir +--- 386,401 ---- + + nls + : NEWLINE +! { $$ = (NODETYPE) NULL; } + | nls NEWLINE +! { $$ = (NODETYPE) NULL; } + ; + + opt_nls + : /* empty */ +! { $$ = (NODETYPE) NULL; } + | nls +! { $$ = (NODETYPE) NULL; } + ; + + input_redir +*************** +*** 953,959 **** + case '\\': + if (*lexptr++ == '\0') { + yyerror("unterminated regexp ends with \\"); +! return ERROR; + } else if (lexptr[-1] == '\n') + goto retry; + break; +--- 953,959 ---- + case '\\': + if (*lexptr++ == '\0') { + yyerror("unterminated regexp ends with \\"); +! return ERROR_TOK; + } else if (lexptr[-1] == '\n') + goto retry; + break; +*************** +*** 969,975 **** + case '\0': + lexptr--; /* so error messages work */ + yyerror("unterminated regexp"); +! return ERROR; + } + } + } +--- 969,975 ---- + case '\0': + lexptr--; /* so error messages work */ + yyerror("unterminated regexp"); +! return ERROR_TOK; + } + } + } +*************** +*** 1163,1169 **** + case '\n': + lexptr--; + yyerror("unterminated string"); +! return ERROR; + case '"': + yylval.nodeval = make_str_node(tokstart + 1, + lexptr-tokstart-2, esc_seen); +--- 1163,1169 ---- + case '\n': + lexptr--; + yyerror("unterminated string"); +! return ERROR_TOK; + case '"': + yylval.nodeval = make_str_node(tokstart + 1, + lexptr-tokstart-2, esc_seen); +*************** +*** 1171,1177 **** + return YSTRING; + } + } +! return ERROR; + + case '-': + if (*lexptr == '=') { +--- 1171,1177 ---- + return YSTRING; + } + } +! return ERROR_TOK; + + case '-': + if (*lexptr == '=') { +*************** +*** 1256,1262 **** + } + return LEX_AND; + } +! return ERROR; + + case '|': + if (*lexptr == '|') { +--- 1256,1262 ---- + } + return LEX_AND; + } +! return ERROR_TOK; + + case '|': + if (*lexptr == '|') { +*************** +*** 1279,1285 **** + + if (c != '_' && ! isalpha(c)) { + yyerror("Invalid char '%c' in expression\n", c); +! return ERROR; + } + + /* it's some type of name-type-thing. Find its length */ +--- 1279,1285 ---- + + if (c != '_' && ! isalpha(c)) { + yyerror("Invalid char '%c' in expression\n", c); +! return ERROR_TOK; + } + + /* it's some type of name-type-thing. Find its length */ diff --git a/Linux-0.11/ports/mtools-patches.tar b/Linux-0.11/ports/mtools-patches.tar new file mode 100644 index 00000000..c6cece77 Binary files /dev/null and b/Linux-0.11/ports/mtools-patches.tar differ diff --git a/Linux-0.11/ports/shoelace.patch.1 b/Linux-0.11/ports/shoelace.patch.1 new file mode 100644 index 00000000..8625b641 --- /dev/null +++ b/Linux-0.11/ports/shoelace.patch.1 @@ -0,0 +1,332 @@ +[0029] daemon@ATHENA.MIT.EDU (Peter MacDonald) Linux_Activists 11/10/91 19:38 (329 lines) +Subject: patch to use shoelace with linux + fsck and mkfs +Date: Sun, 10 Nov 91 16:21:27 PST +From: pmacdona@sol.UVic.CA (Peter MacDonald) +To: linux-activists@joker.cs.hut.fi + + +Following are patches to shoelace to allow it to boot the Linux +image (sorry, no building by parts cause there are no parts). +This also means that the fsck function of shoelace is available, +including fsck -m, or mkfs, which I have not tested. Please note +that by using strip on the shoelace executable, I was able to fsck +a 20Meg partition. 64Meg partitions, I doubt it can handle. +In this way, both minix and linux can be run from the same partition, +with a bit of mv'ing of directories like bin. + +You will need minix to build these because of the 16bit assembler. +I also have not tried compiling laceup under linux yet (no disk space). +Perhaps some kind soul can do this and post executables for non-minixers. +If you are not already familiar with and using shoelace, please install +and learn it first!!! The following assumes this. + + +To use: + - Get shoelace from plains or wherever. + - Apply the mxvid50 patches (may not have to, but my diffs are against them) + - Copy makefile.bcc to makefile and then apply the patches in shoelace.pat. + - Put the bootsect.x file in the shoelace dir. + - Type make and cross fingers. + - Use strip, ie: strip shoelace + - Copy new shoelace to your root. (Might wish to try floppy first). + - Reboot, hit enter when shoelace prompt appears and type "load /bootimage" or + - If you want an automatic boot, edit /etc/config and set "load /bootimage" + You must also ensure config doesn't allow shoelace to find system, + fs, mm and init or it will boot from them by default. Either + move the executables or set them to a bogus path. + +Why Use Shoelace: + 1) has fsck and mkfs. + 2) doesn't require a seperate boot partition. + 3) allows passing environment variables to kernel (like video mode). + 4) doesn't require kernel patch (byte 508) to indicate root device. + 5) allow you to dynamically boot different partitions and different + images in the same partition. + + +Disclaimer: + This patch is a bit of a hack. You can set your rootdev in the config + file and it should work. But I didn't implement the bootdev. + I also did not try to pass on the environment to linux. + +Acknowledgment: + Earl Chew for shoelace. + +pmacdona@sol.uvic.ca + + +table + !"#$%&'()*+,-./0123456789:;<=>? +@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ +begin 644 slpat.Z +M'YV09<:@>0,"#X@6(,2\>4-G3D Z+O H<$@&Q(D77K"\F/.BXPD0/A(N;/@Pz +M(@@>/"R^.*$ "Y^6?!(H9.AP#,0Y"1*@&)("1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K!):J 'z +M) ";?UX*\JU0*<\"Y^M\NM06N )=L6) ?R30E2I(\ U^K,ZF"K^N-/PY ?.=y +M1<<' 1\?X=--C&]W!"K'/R@>O^+3)>Y=]4U^U5?Y8?_&MWRLP% R?LQG3D?Hx +M6:2+H;O2UQW/%_H['];DA:6_[GY^&@CZ8B#GA_RB3P:.OM\W'2OB\8I1G.B;w +M6QW>GGM:/^H?E,!&]2F_U9_\6%_LA_JC?XK- .??3!*?(&1]4SKV1[[E-_N6v +M7^6+?I9/EUP^)K8[,C_QTWQ@,@5N?1+ EZ:H"LQ1%0U_M%*u +MGZ'^G%CXG[_RVYV(C_E'O_'OFA_%\NM3RQ_Z,S_(+_T()/FW$:UP\E/_=SCZt +G'S] /'_7K_UC_]68^[*?A+N VG]!;G_N7R4$@??_CG47$8"_ B@Gs + r +end +--[0029]-- diff --git a/Linux-0.11/ports/shoelace.patch.2 b/Linux-0.11/ports/shoelace.patch.2 new file mode 100644 index 00000000..bd82fab0 --- /dev/null +++ b/Linux-0.11/ports/shoelace.patch.2 @@ -0,0 +1,42 @@ +[0030] daemon@ATHENA.MIT.EDU (Peter MacDonald) Linux_Activists 11/10/91 20:34 (39 lines) +Subject: shoelace patch #2 +Date: Sun, 10 Nov 91 16:57:48 PST +From: pmacdona@sol.UVic.CA (Peter MacDonald) +To: linux-activists@joker.cs.hut.fi + + +There is a big difference between floppy the device numbers on linux and +on minix. In particular linux has fd0 as 0x208 while minix uses 0x200. +ie. linux /dev/fd0 == minix /dev/fd0-dshd5in + +The following patch will keep linux from using 0x200, which it doesn't +know about and instead use 0x208 and 0x21c. +Apply this after all other patches. + +pmacdona@sol.uvic.ca + + + +*** shoe.c.bad Thu Nov 7 08:43:30 1991 +--- shoe.c Thu Nov 7 08:52:27 1991 +*************** +*** 638,646 **** + longjmp(errjmp, 1);*/ + unsigned *myptr = (unsigned int *) (&((char *) bp)[508]); + char *myroot = getenvs(SaveConfigPtr,"rootdev"); +! if (strcmp(myroot,"bootdev")) +! *myptr = atoi(myroot); +! else + *myptr = 0; + if (*myptr == 0) + { if (diskcode) +--- 638,645 ---- + longjmp(errjmp, 1);*/ + unsigned *myptr = (unsigned int *) (&((char *) bp)[508]); + char *myroot = getenvs(SaveConfigPtr,"rootdev"); +! *myptr = atoi(myroot); +! if (0x200 == *myptr) + *myptr = 0; + if (*myptr == 0) + { if (diskcode) +--[0030]-- diff --git a/Linux-0.11/ports/shoelace.patch.3 b/Linux-0.11/ports/shoelace.patch.3 new file mode 100644 index 00000000..c2dec336 --- /dev/null +++ b/Linux-0.11/ports/shoelace.patch.3 @@ -0,0 +1,38 @@ +[0043] daemon@ATHENA.MIT.EDU (Peter MacDonald) Linux_Activists 11/11/91 14:06 (35 lines) +Subject: shoelace patch#3: put environment ptr where linux can find it. +Date: Mon, 11 Nov 91 10:58:22 PST +From: pmacdona@sol.UVic.CA (Peter MacDonald) +To: linux-activists@joker.cs.hut.fi + +I know, I know. Three patches in 24 hours... I plead end of term +instability. The following one line patch puts the environment +offset relative to the shoelace corpse which is located at segment 0x80000. +Thus, an offset of 0x1234 would put the address of the env at 0x81234. +This offset is stored at location 0x90506: ie. in the word before the +root device word (508) in the bootsect.s corpse. + +By including the shoelace header file shoeconf.h, the linux kernel +could now read in any of the environment variables it wanted (including +scr_cols and scr_rows ;-) + +BTW: Given Bruce Evans comments about shoelace:fsck ties to minix, +we may wish to remove it from the code. Who wants a facility that +only works with ~20Meg or less partitions anyways :-) + + +pmacdona@sol.uvic.ca + +--PULL_TAB_HERE ------------------------------- +*** shoe.c.bad2 Thu Nov 7 09:33:34 1991 +--- shoe.c Thu Nov 7 09:45:28 1991 +*************** +*** 650,655 **** +--- 650,656 ---- + else + *myptr = 0x21c; + } ++ *--myptr=(unsigned int)SaveConfigPtr; + Linux = 1; + LoadPoint = 0x90000; + bpinx = 0; +--[0043]-- diff --git a/Linux-0.11/ports/shoelace.tar.Z b/Linux-0.11/ports/shoelace.tar.Z new file mode 100644 index 00000000..6876723a Binary files /dev/null and b/Linux-0.11/ports/shoelace.tar.Z differ diff --git a/Linux-0.11/sources/libs/README.curses b/Linux-0.11/sources/libs/README.curses new file mode 100644 index 00000000..cff95b28 --- /dev/null +++ b/Linux-0.11/sources/libs/README.curses @@ -0,0 +1,10 @@ +curses.tar.Z contains the curses library from bsd-net-2, with +pre-installed diffs & RCS files for linux changes. +You'll need to use 'pmake' to build it, or reconstruct the Makefile. + +I'm not completely certain that I got all of the raw(), crmode() etc +stuff right. If you have applications that use curses, try them out and +send back patches if you find bugs. + +John Kohl + diff --git a/Linux-0.11/sources/libs/curses.tar.Z b/Linux-0.11/sources/libs/curses.tar.Z new file mode 100644 index 00000000..5191c2c0 Binary files /dev/null and b/Linux-0.11/sources/libs/curses.tar.Z differ diff --git a/Linux-0.11/sources/sbin/df.c b/Linux-0.11/sources/sbin/df.c new file mode 100644 index 00000000..729d3975 --- /dev/null +++ b/Linux-0.11/sources/sbin/df.c @@ -0,0 +1,103 @@ +/* df.c: Copywrite (92) Peter MacDonald: distribute freely, don't restrict. */ + +#include +#include +#include +#include +#include +#include +#include + +char *hdr1="\n inodes inodes inodes blocks blocks blocks mount"; +char *hdr2= "device total used free total used free point"; +char *hdr3= "--------------------------------------------------------------------"; +char *fmt = "%-9s %-7d %-7d %-7d %-7d %-7d %-7d %s\n"; + +void do_df(char *dev, char *dir); + +int main(int argc, char *argv[]) +{ int i; + + sync(); + puts(hdr1); + puts(hdr2); + puts(hdr3); + if (argc != 1) + for (i=1; i= (8*BLOCK_SIZE)) + { + end = BLOCK_SIZE; + numbits -= 8*BLOCK_SIZE; + } + else + { int tmp; + end = numbits >> 3; + numbits &= 0x7; + tmp = buf[end] & ((1<>4)&0xf]; + numbits = 0; + } + for (j=0; j>4)&0xf]; + } + return(sum); +} + +void do_df(char *dev, char *dir) +{ int it,iu,bt,bu; + struct super_block supstruct; + + if ((fd=open(dev,O_RDONLY))<0) + oops("df can't open device: %s",dev); + + lseek(fd,BLOCK_SIZE,SEEK_SET); + if (read(fd,(char*)&supstruct,sizeof(struct super_block)) + != sizeof(struct super_block)) + oops("super block unreadable: %s",dev); + + lseek(fd,BLOCK_SIZE*2,SEEK_SET); + if (supstruct.s_magic != SUPER_MAGIC) + oops("not a valid file system: %s",dev); + + it = supstruct.s_ninodes; + iu = count(supstruct.s_imap_blocks,supstruct.s_ninodes+1); + + bt = supstruct.s_nzones << supstruct.s_log_zone_size; + bu = count(supstruct.s_zmap_blocks,supstruct.s_nzones) << + supstruct.s_log_zone_size; + + printf(fmt,dev,it,iu,it-iu,bt,bu,bt-bu,dir); +} diff --git a/Linux-0.11/sources/sbin/fsck.c b/Linux-0.11/sources/sbin/fsck.c new file mode 100644 index 00000000..a639badb --- /dev/null +++ b/Linux-0.11/sources/sbin/fsck.c @@ -0,0 +1,645 @@ +/* + * fsck.c - a file system consistency checker for Linux. + * + * (C) 1991 Linus Torvalds. This file may be redistributed as per + * the Linux copyright. + */ + +/* + * 09.11.91 - made the first rudimetary functions + * + * 10.11.91 - updated, does checking, no repairs yet. + * Sent out to the mailing-list for testing. + * + * 14.11.91 - Testing seems to have gone well. Added some + * correction-code, and changed some functions. + * + * 15.11.91 - More correction code. Hopefully it notices most + * cases now, and tries to do something about them. + * + * 16.11.91 - More corrections (thanks to Matti Jalava). Most + * things seem to work now. + * + * I've had no time to add comments - hopefully the function names + * are comments enough. As with all file system checkers, this assumes + * the file system is quiescent - don't use it on a mounted device + * unless you can be sure nobody is writing to it (and remember that the + * kernel can write to it when it searches for files). + * + * Usuage: fsck [-larvsm] device + * -l for a listing of all the filenames + * -a for automatic repairs (not implemented) + * -r for repairs (interactive) (not implemented) + * -v for verbose (tells how many files) + * -s for super-block info + * -m for minix-like "mode not cleared" warnings + * + * The device may be a block device or a image of one, but this isn't + * enforced (but it's not much fun on a character device :-). + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifndef __GNUC__ +#error "needs gcc for the bitop-__asm__'s" +#endif + +#ifndef __linux__ +#define volatile +#endif + +#define ROOT_INO 1 + +#define UPPER(size,n) ((size+((n)-1))/(n)) +#define INODE_SIZE (sizeof(struct d_inode)) +#define INODE_BLOCKS UPPER(INODES,INODES_PER_BLOCK) +#define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE) + +#define BITS_PER_BLOCK (BLOCK_SIZE<<3) + +static char * program_name = "fsck"; +static char * device_name = NULL; +static int IN; +static int repair=0, automatic=0, verbose=0, list=0, show=0, warn_mode=0; +static int directory=0, regular=0, blockdev=0, chardev=0, links=0, total=0; + +/* this is used to implement the (coming) two-pass zone checking. */ +static int trust_zone_bit_map=0; + +static int changed = 0; /* flags if the filesystem has been changed */ + +/* File-name data */ +#define MAX_DEPTH 50 +static int name_depth = 0; +static char name_list[MAX_DEPTH][NAME_LEN+1]; + +static char * inode_buffer = NULL; +#define Inode (((struct d_inode *) inode_buffer)-1) +static char super_block_buffer[BLOCK_SIZE]; +#define Super (*(struct super_block *)super_block_buffer) +#define INODES ((unsigned long)Super.s_ninodes) +#define ZONES ((unsigned long)Super.s_nzones) +#define IMAPS ((unsigned long)Super.s_imap_blocks) +#define ZMAPS ((unsigned long)Super.s_zmap_blocks) +#define FIRSTZONE ((unsigned long)Super.s_firstdatazone) +#define ZONESIZE ((unsigned long)Super.s_log_zone_size) +#define MAXSIZE ((unsigned long)Super.s_max_size) +#define MAGIC (Super.s_magic) +#define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS) + +static char inode_map[BLOCK_SIZE * I_MAP_SLOTS]; +static char zone_map[BLOCK_SIZE * Z_MAP_SLOTS]; + +static unsigned char * inode_count = NULL; +static unsigned char * zone_count = NULL; + +void recursive_check(unsigned int ino); + +#define bitop(name,op) \ +static inline int name(char * addr,unsigned int nr) \ +{ \ +int __res; \ +__asm__("bt" op " %1,%2; adcl $0,%0" \ +:"=g" (__res) \ +:"r" (nr),"m" (*(addr)),"0" (0)); \ +return __res; \ +} + +bitop(bit,"") +bitop(setbit,"s") +bitop(clrbit,"c") + +#define inode_in_use(x) (bit(inode_map,(x))) +#define zone_in_use(x) (bit(zone_map,(x)-FIRSTZONE+1)) + +#define mark_inode(x) (setbit(inode_map,(x)),changed=1) +#define unmark_inode(x) (clrbit(inode_map,(x)),changed=1) + +#define mark_zone(x) (setbit(zone_map,(x)-FIRSTZONE+1),changed=1) +#define unmark_zone(x) (clrbit(zone_map,(x)-FIRSTZONE+1),changed=1) + +/* + * Volatile to let gcc know that this doesn't return. When trying + * to compile this under minix, volatile gives a warning, as + * exit() isn't defined as volatile under minix. + */ +volatile void fatal_error(const char * fmt_string) +{ + fprintf(stderr,fmt_string,program_name,device_name); + exit(1); +} + +#define usage() fatal_error("Usage: %s [-larvsm] /dev/name\n") +#define die(str) fatal_error("%s: " str "\n") + +/* + * This simply goes through the file-name data and prints out the + * current file. + */ +void print_current_name(void) +{ + int i=0; + + while (i= ZONES) + printf("Zone nr > ZONES in file `"); + else + return 0; + print_current_name(); + printf("'."); + if (ask("Remove block",1)) { + *nr=0; + changed = 1; + return 1; + } + return 0; +} + +/* + * read-block reads block *nr into the buffer at addr. It returns + * 0 if the *nr is unchanged, 1 if it was changed. + */ +int read_block(unsigned short * nr, char * addr) +{ + int blk_chg = check_zone_nr(nr); + + if (!*nr || *nr >= ZONES) { + memset(addr,0,BLOCK_SIZE); + return changed; + } + if (BLOCK_SIZE*(*nr) != lseek(IN, BLOCK_SIZE*(*nr), SEEK_SET)) + die("seek failed in read_block"); + if (BLOCK_SIZE != read(IN, addr, BLOCK_SIZE)) { + printf("Read error: bad block in file '"); + print_current_name(); + printf("'\n"); + memset(addr,0,BLOCK_SIZE); + } + return blk_chg; +} + +/* + * write_block writes block nr to disk. + */ +inline void write_block(unsigned int nr, char * addr) +{ + if (!nr) + return; + if (nr < FIRSTZONE || nr >= ZONES) { + printf("Internal error: trying to write bad block\n" + "Write request ignored\n"); + return; + } + if (BLOCK_SIZE*nr != lseek(IN, BLOCK_SIZE*nr, SEEK_SET)) + die("seek failed in write_block"); + if (BLOCK_SIZE != write(IN, addr, BLOCK_SIZE)) { + printf("Write error: bad block in file '"); + print_current_name(); + printf("'\n"); + } +} + +/* + * mapped-read-block reads block nr blknr from the specified file. + * it returns 1 if the inode has been changed due to bad zone nrs + */ +inline int mapped_read_block(struct d_inode * inode, + unsigned int blknr, char * addr) +{ + unsigned short ind[BLOCK_SIZE>>1]; + unsigned short dind[BLOCK_SIZE>>1]; + int result; + + if (blknr<7) + return read_block(blknr + inode->i_zone,addr); + blknr -= 7; + if (blknr<512) { + result = read_block(7 + inode->i_zone, (char *) ind); + if (read_block(blknr + ind,addr)) + write_block(inode->i_zone[7], (char *) ind); + return result; + } + blknr -= 512; + result = read_block(8 + inode->i_zone, (char *) dind); + if (read_block(blknr/512 + dind, (char *) ind)) + write_block(inode->i_zone[8], (char *) dind); + if (read_block(blknr%512 + ind,addr)) + write_block(dind[blknr/512], (char *) ind); + return result; +} + +void write_tables(void) +{ + if (BLOCK_SIZE != lseek(IN, BLOCK_SIZE, SEEK_SET)) + die("seek failed in write_tables"); + if (BLOCK_SIZE != write(IN, super_block_buffer, BLOCK_SIZE)) + die("unable to write super-block"); + if (IMAPS*BLOCK_SIZE != write(IN,inode_map,IMAPS*BLOCK_SIZE)) + die("Unable to write inode map"); + if (ZMAPS*BLOCK_SIZE != write(IN,zone_map,ZMAPS*BLOCK_SIZE)) + die("Unable to write zone map"); + if (INODE_BUFFER_SIZE != write(IN,inode_buffer,INODE_BUFFER_SIZE)) + die("Unable to write inodes"); +} + +void read_tables(void) +{ + memset(inode_map,0,sizeof(inode_map)); + memset(zone_map,0,sizeof(zone_map)); + if (BLOCK_SIZE != lseek(IN, BLOCK_SIZE, SEEK_SET)) + die("seek failed"); + if (BLOCK_SIZE != read(IN, super_block_buffer, BLOCK_SIZE)) + die("unable to read super block"); + if (MAGIC != SUPER_MAGIC) + die("bad magic number in super-block"); + if (ZONESIZE != 0 || BLOCK_SIZE != 1024) + die("Only 1k blocks/zones supported"); + if (!IMAPS || IMAPS > I_MAP_SLOTS) + die("bad s_imap_blocks field in super-block"); + if (!ZMAPS || ZMAPS > Z_MAP_SLOTS) + die("bad s_zmap_blocks field in super-block"); + inode_buffer = malloc(INODE_BUFFER_SIZE); + if (!inode_buffer) + die("Unable to allocate buffer for inodes"); + inode_count = malloc(INODES); + if (!inode_count) + die("Unable to allocate buffer for inode count"); + zone_count = malloc(ZONES); + if (!zone_count) + die("Unable to allocate buffer for zone count"); + if (IMAPS*BLOCK_SIZE != read(IN,inode_map,IMAPS*BLOCK_SIZE)) + die("Unable to read inode map"); + if (ZMAPS*BLOCK_SIZE != read(IN,zone_map,ZMAPS*BLOCK_SIZE)) + die("Unable to read zone map"); + if (INODE_BUFFER_SIZE != read(IN,inode_buffer,INODE_BUFFER_SIZE)) + die("Unable to read inodes"); + if (NORM_FIRSTZONE != FIRSTZONE) + printf("Warning: Firstzone != Norm_firstzone\n"); + if (show) { + printf("%d inodes\n",INODES); + printf("%d blocks\n",ZONES); + printf("Firstdatazone=%d (%d)\n",FIRSTZONE,NORM_FIRSTZONE); + printf("Zonesize=%d\n",BLOCK_SIZE< INODES) + return NULL; + total++; + inode = Inode + nr; + if (!inode_count[nr]) { + if (!inode_in_use(nr)) { + printf("Inode %d marked not used, but used for file '", + nr); + print_current_name(); + printf("'\n"); + if (repair) + if (ask("Mark in use",1)) + mark_inode(nr); + } + if (S_ISDIR(inode->i_mode)) + directory++; + else if (S_ISREG(inode->i_mode)) + regular++; + else if (S_ISCHR(inode->i_mode)) + chardev++; + else if (S_ISBLK(inode->i_mode)) + blockdev++; + } else + links++; + if (!++inode_count[nr]) { + printf("Warning: inode count too big.\n"); + inode_count[nr]--; + } + return inode; +} + +void check_root(void) +{ + struct d_inode * inode = Inode + ROOT_INO; + + if (!inode || !S_ISDIR(inode->i_mode)) + die("root inode isn't a directory"); +} + +static int add_zone(unsigned short * znr) +{ + int result; + + result=check_zone_nr(znr); + if (!*znr || *znr >= ZONES) + return result; + if (zone_count[*znr]) { + printf("Block has been used before. Now in file `"); + print_current_name(); + printf("'."); + if (ask("Clear",1)) { + *znr = 0; + changed = 1; + } + } + if (!*znr || *znr >= ZONES) + return result; + if (!zone_in_use(*znr)) { + printf("Block %d in file `",*znr); + print_current_name(); + printf("' is marked not in use."); + if (ask("Correct",1)) + mark_zone(*znr); + } + if (!++zone_count[*znr]) + zone_count[*znr]--; + return result; +} + +static int add_zone_ind(unsigned short * znr) +{ + static char blk[BLOCK_SIZE]; + int i, result, chg_blk=0; + + result = add_zone(znr); + if (!*znr || *znr>=ZONES) + return result; + read_block(znr,blk); + for (i=0 ; i < (BLOCK_SIZE>>1) ; i++) + chg_blk |= add_zone(i + (unsigned short *) blk); + if (chg_blk) + write_block(*znr,blk); + return result; +} + +static int add_zone_dind(unsigned short * znr) +{ + static char blk[BLOCK_SIZE]; + int i, result, blk_chg=0; + + result = add_zone(znr); + if (!*znr || *znr >= ZONES) + return result; + read_block(znr,blk); + for (i=0 ; i < (BLOCK_SIZE>>1) ; i++) + blk_chg |= add_zone_ind(i + (unsigned short *) blk); + if (blk_chg) + write_block(*znr,blk); + return result; +} + +void check_zones(unsigned int i) +{ + struct d_inode * inode; + + if (!i || i >= INODES) + return; + if (inode_count[i] > 1) /* have we counted this file already? */ + return; + inode = Inode + i; + if (!S_ISDIR(inode->i_mode) && !S_ISREG(inode->i_mode)) + return; + for (i=0 ; i<7 ; i++) + add_zone(i + inode->i_zone); + add_zone_ind(7 + inode->i_zone); + add_zone_dind(8 + inode->i_zone); +} + +void check_file(struct d_inode * dir, unsigned int offset) +{ + static char blk[BLOCK_SIZE]; + struct d_inode * inode; + int ino; + char * name; + + changed |= mapped_read_block(dir,offset/BLOCK_SIZE,blk); + name = blk + (offset % BLOCK_SIZE) + 2; + ino = * (unsigned short *) (name-2); + inode = get_inode(ino); + if (!offset) + if (!inode || strcmp(".",name)) { + print_current_name(); + printf(": bad directory: '.' isn't first\n"); + } else return; + if (offset == 16) + if (!inode || strcmp("..",name)) { + print_current_name(); + printf(": bad directory: '..' isn't second\n"); + } else return; + if (!inode) + return; + if (name_depth < MAX_DEPTH) + strncpy(name_list[name_depth],name,14); + name_depth++; + if (list) { + if (verbose) + printf("%6d %07o ",ino,inode->i_mode); + print_current_name(); + if (S_ISDIR(inode->i_mode)) + printf(":\n"); + else + printf("\n"); + } + check_zones(ino); + if (inode && S_ISDIR(inode->i_mode)) + recursive_check(ino); + name_depth--; + return; +} + +void recursive_check(unsigned int ino) +{ + struct d_inode * dir; + unsigned int offset; + + dir = Inode + ino; + if (!S_ISDIR(dir->i_mode)) + die("internal error"); + for (offset = 0 ; offset < dir->i_size ; offset += 16) + check_file(dir,offset); +} + +void check_counts(void) +{ + int i; + + for (i=1 ; i < INODES ; i++) { + if (!inode_in_use(i) && Inode[i].i_mode && warn_mode) { + printf("Inode %d mode not cleared.",i); + if (ask("Clear",1)) { + Inode[i].i_mode = 0; + changed = 1; + } + } + if (inode_in_use(i)*Inode[i].i_nlinks == inode_count[i]) + continue; + if (!inode_count[i]) { + printf("Inode %d not used, marked used in the bitmap.", + i); + if (ask("Clear",1)) + unmark_inode(i); + } else if (!inode_in_use(i)) { + printf("Inode %d used, marked unused in the bitmap.", + i); + if (ask("Set",1)) + mark_inode(i); + } + if (inode_in_use(i) && Inode[i].i_nlinks != inode_count[i]) { + printf("Inode %d, i_nlinks=%d, counted=%d.", + i,Inode[i].i_nlinks,inode_count[i]); + if (ask("Set i_nlinks to count",1)) { + Inode[i].i_nlinks=inode_count[i]; + changed=1; + } + } + } + for (i=FIRSTZONE ; i < ZONES ; i++) { + if (zone_in_use(i) == zone_count[i]) + continue; + printf("Zone %d: %s in use, counted=%d\n", + i,zone_in_use(i)?"":"not",zone_count[i]); + } +} + +void check(void) +{ + memset(inode_count,0,INODES*sizeof(*inode_count)); + memset(zone_count,0,ZONES*sizeof(*zone_count)); + check_zones(ROOT_INO); + recursive_check(ROOT_INO); + check_counts(); +} + +int main(int argc, char ** argv) +{ + struct termios termios,tmp; + + if (argc && *argv) + program_name = *argv; + if (INODE_SIZE * INODES_PER_BLOCK != BLOCK_SIZE) + die("bad inode size"); + while (argc-- > 1) { + argv++; + if (argv[0][0] != '-') + if (device_name) + usage(); + else + device_name = argv[0]; + else while (*++argv[0]) + switch (argv[0][0]) { + case 'l': list=1; break; + case 'a': automatic=1; repair=1; break; + case 'r': automatic=0; repair=1; break; + case 'v': verbose=1; break; + case 's': show=1; break; + case 'm': warn_mode=1; break; + default: usage(); + } + } + if (!device_name) + usage(); + if (repair && !automatic) { + if (!isatty(0) || !isatty(1)) + die("need terminal for interactive repairs"); + tcgetattr(0,&termios); + tmp = termios; + tmp.c_lflag &= ~(ICANON|ECHO); + tcsetattr(0,TCSANOW,&tmp); + } + IN = open(device_name,repair?O_RDWR:O_RDONLY); + if (IN < 0) + die("unable to open '%s'"); + read_tables(); + check_root(); + check(); + if (verbose) { + int i, free; + + for (i=1,free=0 ; i +#include +#include + +#define ERR 2 +const char *usagestr = "usage: kill [-signal] pid ...\n"; + +void oops(void) +{ write(ERR,usagestr,strlen(usagestr)); + exit(1); +} + +void oops2(char *str1, char *str2) +{ + write(ERR,str1,strlen(str1)); + write(ERR,str2,strlen(str2)); + write(ERR,"\n",1); + exit(1); +} + +char *itoa(int num) +{ int sign = 0; + static char buf[15]; + char *cp = buf+sizeof(buf)-1; + if (num<0) + { sign = 1; + num = -num; + } + do + { + *cp-- = '0'+num%10; + num /= 10; + } while (num); + if (sign) + *cp-- = '-'; + return(cp+1); +} + +const char *signames[] = { + "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "UNUSED", + "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", + "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", 0 }; + +int main(int argc, char *argv[]) +{ + int i, signum = SIGTERM; + + if (argc < 2) + oops(); + if ((argc>1) && ('-' == *argv[1])) + { + if ('?' == argv[1][1]) + for (i=0; iNSIG)) + oops(); + argc--; + argv++; + } + + while (--argc) + { + argv++; + if ((i = atoi(*argv)) <= 3) + oops(); + if (kill(i,signum)) + oops2( "kill: no such process ", itoa(i)); + } + return(0); +} + + diff --git a/Linux-0.11/sources/sbin/mkfs.c b/Linux-0.11/sources/sbin/mkfs.c new file mode 100644 index 00000000..d04bb536 --- /dev/null +++ b/Linux-0.11/sources/sbin/mkfs.c @@ -0,0 +1,365 @@ +/* + * mkfs.c - make a linux (minix) file-system. + * + * (C) 1991 Linus Torvalds. This file may be redistributed as per + * the Linux copyright. + */ + +/* + * 24.11.91 - time began. Used the fsck sources to get started. + * + * 25.11.91 - corrected some bugs. Added support for ".badblocks" + * The algorithm for ".badblocks" is a bit weird, but + * it should work. Oh, well. + * + * Usuage: mkfs [-c] device size-in-blocks + * + * -c for readablility checking (SLOW!) + * + * The device may be a block device or a image of one, but this isn't + * enforced (but it's not much fun on a character device :-). + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifndef __GNUC__ +#error "needs gcc for the bitop-__asm__'s" +#endif + +#ifndef __linux__ +#define volatile +#endif + +#define ROOT_INO 1 +#define BAD_INO 2 + +#define TEST_BUFFER_BLOCKS 32 +#define MAX_GOOD_BLOCKS 512 + +#define UPPER(size,n) ((size+((n)-1))/(n)) +#define INODE_SIZE (sizeof(struct d_inode)) +#define INODE_BLOCKS UPPER(INODES,INODES_PER_BLOCK) +#define INODE_BUFFER_SIZE (INODE_BLOCKS * BLOCK_SIZE) + +#define BITS_PER_BLOCK (BLOCK_SIZE<<3) + +static char * program_name = "mkfs"; +static char * device_name = NULL; +static int DEV = -1; +static long BLOCKS = 0; +static int check = 0; +static int badblocks = 0; + +#define ROOT_INO_STRING "\001\000" +#define BAD_INO_STRING "\002\000" + +static char root_block[BLOCK_SIZE] = +ROOT_INO_STRING ".\0\0\0\0\0\0\0\0\0\0\0\0\0" +ROOT_INO_STRING "..\0\0\0\0\0\0\0\0\0\0\0\0" +BAD_INO_STRING ".badblocks\0\0\0\0"; + +static char * inode_buffer = NULL; +#define Inode (((struct d_inode *) inode_buffer)-1) +static char super_block_buffer[BLOCK_SIZE]; +#define Super (*(struct super_block *)super_block_buffer) +#define INODES ((unsigned long)Super.s_ninodes) +#define ZONES ((unsigned long)Super.s_nzones) +#define IMAPS ((unsigned long)Super.s_imap_blocks) +#define ZMAPS ((unsigned long)Super.s_zmap_blocks) +#define FIRSTZONE ((unsigned long)Super.s_firstdatazone) +#define ZONESIZE ((unsigned long)Super.s_log_zone_size) +#define MAXSIZE ((unsigned long)Super.s_max_size) +#define MAGIC (Super.s_magic) +#define NORM_FIRSTZONE (2+IMAPS+ZMAPS+INODE_BLOCKS) + +static char inode_map[BLOCK_SIZE * I_MAP_SLOTS]; +static char zone_map[BLOCK_SIZE * Z_MAP_SLOTS]; + +static unsigned short good_blocks_table[MAX_GOOD_BLOCKS]; +static int used_good_blocks = 0; + +#define bitop(name,op) \ +static inline int name(char * addr,unsigned int nr) \ +{ \ +int __res; \ +__asm__ __volatile__("bt" op " %1,%2; adcl $0,%0" \ +:"=g" (__res) \ +:"r" (nr),"m" (*(addr)),"0" (0)); \ +return __res; \ +} + +bitop(bit,"") +bitop(setbit,"s") +bitop(clrbit,"r") + +#define inode_in_use(x) (bit(inode_map,(x))) +#define zone_in_use(x) (bit(zone_map,(x)-FIRSTZONE+1)) + +#define mark_inode(x) (setbit(inode_map,(x))) +#define unmark_inode(x) (clrbit(inode_map,(x))) + +#define mark_zone(x) (setbit(zone_map,(x)-FIRSTZONE+1)) +#define unmark_zone(x) (clrbit(zone_map,(x)-FIRSTZONE+1)) + +/* + * Volatile to let gcc know that this doesn't return. When trying + * to compile this under minix, volatile gives a warning, as + * exit() isn't defined as volatile under minix. + */ +volatile void fatal_error(const char * fmt_string) +{ + fprintf(stderr,fmt_string,program_name,device_name); + exit(1); +} + +#define usage() fatal_error("Usage: %s [-c] /dev/name blocks\n") +#define die(str) fatal_error("%s: " str "\n") + +void write_tables(void) +{ + if (BLOCK_SIZE != lseek(DEV, BLOCK_SIZE, SEEK_SET)) + die("seek failed in write_tables"); + if (BLOCK_SIZE != write(DEV, super_block_buffer, BLOCK_SIZE)) + die("unable to write super-block"); + if (IMAPS*BLOCK_SIZE != write(DEV,inode_map,IMAPS*BLOCK_SIZE)) + die("Unable to write inode map"); + if (ZMAPS*BLOCK_SIZE != write(DEV,zone_map,ZMAPS*BLOCK_SIZE)) + die("Unable to write zone map"); + if (INODE_BUFFER_SIZE != write(DEV,inode_buffer,INODE_BUFFER_SIZE)) + die("Unable to write inodes"); +} + +void write_block(int blk, char * buffer) +{ + if (blk*BLOCK_SIZE != lseek(DEV, blk*BLOCK_SIZE, SEEK_SET)) + die("seek failed in write_block"); + if (BLOCK_SIZE != write(DEV, buffer, BLOCK_SIZE)) + die("write failed in write_block"); +} + +int get_free_block(void) +{ + int blk; + + if (used_good_blocks+1 >= MAX_GOOD_BLOCKS) + die("too many bad blocks"); + if (used_good_blocks) + blk = good_blocks_table[used_good_blocks-1]+1; + else + blk = FIRSTZONE; + while (blk < ZONES && zone_in_use(blk)) + blk++; + if (blk >= ZONES) + die("not enough good blocks"); + good_blocks_table[used_good_blocks] = blk; + used_good_blocks++; + return blk; +} + +void mark_good_blocks(void) +{ + int blk; + + for (blk=0 ; blk < used_good_blocks ; blk++) + mark_zone(good_blocks_table[blk]); +} + +inline int next(int zone) +{ + if (!zone) + zone = FIRSTZONE-1; + while (++zone < ZONES) + if (zone_in_use(zone)) + return zone; + return 0; +} + +void make_bad_inode(void) +{ + struct d_inode * inode = &Inode[BAD_INO]; + int i,j,zone; + int ind=0,dind=0; + unsigned short ind_block[BLOCK_SIZE>>1]; + unsigned short dind_block[BLOCK_SIZE>>1]; + +#define NEXT_BAD (zone = next(zone)) + + if (!badblocks) + return; + mark_inode(BAD_INO); + inode->i_nlinks = 1; + inode->i_time = time(NULL); + inode->i_mode = S_IFREG + 0000; + inode->i_size = badblocks*BLOCK_SIZE; + zone = next(0); + for (i=0 ; i<7 ; i++) { + inode->i_zone[i] = zone; + if (!NEXT_BAD) + goto end_bad; + } + inode->i_zone[7] = ind = get_free_block(); + memset(ind_block,0,BLOCK_SIZE); + for (i=0 ; i<512 ; i++) { + ind_block[i] = zone; + if (!NEXT_BAD) + goto end_bad; + } + inode->i_zone[8] = dind = get_free_block(); + memset(dind_block,0,BLOCK_SIZE); + for (i=0 ; i<512 ; i++) { + write_block(ind,(char *) ind_block); + dind_block[i] = ind = get_free_block(); + memset(ind_block,0,BLOCK_SIZE); + for (j=0 ; j<512 ; j++) { + ind_block[j] = zone; + if (!NEXT_BAD) + goto end_bad; + } + } + die("too many bad blocks"); +end_bad: + if (ind) + write_block(ind, (char *) ind_block); + if (dind) + write_block(dind, (char *) dind_block); +} + +void make_root_inode(void) +{ + struct d_inode * inode = &Inode[ROOT_INO]; + + mark_inode(ROOT_INO); + inode->i_zone[0] = get_free_block(); + inode->i_nlinks = 2; + inode->i_time = time(NULL); + if (badblocks) + inode->i_size = 48; + else + inode->i_size = 32; + inode->i_mode = S_IFDIR + 0755; + write_block(inode->i_zone[0],root_block); +} + +void setup_tables(void) +{ + int i; + + memset(inode_map,0xff,sizeof(inode_map)); + memset(zone_map,0xff,sizeof(zone_map)); + memset(super_block_buffer,0,BLOCK_SIZE); + MAGIC = SUPER_MAGIC; + ZONESIZE = 0; + MAXSIZE = (7+512+512*512)*1024; + ZONES = BLOCKS; +/* some magic nrs: 1 inode / 3 blocks */ + INODES = BLOCKS/3; +/* I don't want some off-by-one errors, so this hack... */ + if ((INODES & 8191) > 8188) + INODES -= 5; + if ((INODES & 8191) < 10) + INODES -= 20; + IMAPS = UPPER(INODES,BITS_PER_BLOCK); + ZMAPS = 0; + while (ZMAPS != UPPER(BLOCKS - NORM_FIRSTZONE,BITS_PER_BLOCK)) + ZMAPS = UPPER(BLOCKS - NORM_FIRSTZONE,BITS_PER_BLOCK); + FIRSTZONE = NORM_FIRSTZONE; + for (i = FIRSTZONE ; i ZONES) + try = ZONES-current_block; + got = read(DEV, buffer, try * BLOCK_SIZE); + if (got<0) + got = 0; + if (got & (BLOCK_SIZE-1)) + printf("Weird values in check_blocks: probably bugs\n"); + got /= BLOCK_SIZE; + current_block += got; + if (got == try) + continue; + if (current_block < FIRSTZONE) + die("bad blocks before data-area: cannot make fs"); + mark_zone(current_block); + badblocks++; + current_block++; + } + if (badblocks) + printf("%d bad block%s\n",badblocks,(badblocks>1)?"s":""); +} + +int main(int argc, char ** argv) +{ + char * tmp; + struct stat statbuf; + + if (argc && *argv) + program_name = *argv; + if (INODE_SIZE * INODES_PER_BLOCK != BLOCK_SIZE) + die("bad inode size"); + while (argc-- > 1) { + argv++; + if (argv[0][0] != '-') + if (device_name) { + BLOCKS = strtol(argv[0],&tmp,0); + if (*tmp) + usage(); + } else + device_name = argv[0]; + else while (*++argv[0]) + switch (argv[0][0]) { + case 'c': check=1; break; + default: usage(); + } + } + if (!device_name || BLOCKS<10 || BLOCKS > 65536) + usage(); + DEV = open(device_name,O_RDWR); + if (DEV<0) + die("unable to open %s"); + if (fstat(DEV,&statbuf)<0) + die("unable to stat %s"); + if (!S_ISBLK(statbuf.st_mode)) + check=0; + else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0305) + die("Will not try to make filesystem on '%s'"); + setup_tables(); + if (check) + check_blocks(); + make_root_inode(); + make_bad_inode(); + mark_good_blocks(); + write_tables(); + return 0; +} diff --git a/Linux-0.11/sources/sbin/mount.c.Z b/Linux-0.11/sources/sbin/mount.c.Z new file mode 100644 index 00000000..516a8851 Binary files /dev/null and b/Linux-0.11/sources/sbin/mount.c.Z differ diff --git a/Linux-0.11/sources/sbin/nice.c b/Linux-0.11/sources/sbin/nice.c new file mode 100644 index 00000000..112f8490 --- /dev/null +++ b/Linux-0.11/sources/sbin/nice.c @@ -0,0 +1,54 @@ +/* nice.c: copywrite (92) Peter MacDonald: Distribute freely, don't restrict */ +#include +#include +#include + +/* link nice to renice to change running processes priorities. */ + +int is_nice; + +void usage() +{ + if (is_nice) + puts("usage: nice [-n] command"); + else + puts("usage: renice [-n] pid"); + exit(-1); +} + +int renice(int priority, int pid) +{ + puts("renice system call not yet implemented"); + return(0); +} + +int main(int argc, char *argv[]) +{ + int priority = 10; + + is_nice = (strcmp(*argv+strlen(*argv)-6,"renice")); + + if ((argc>1) && (argv[1][0] == '-')) + { priority = atoi(argv[1]+1); + if ((priority>19) || (priority<-20)) + usage(); + argc--; + argv++; + } + + if (argc<2) + usage(); + + if (!is_nice) + if (renice(priority,atoi(argv[1]))) + usage(); + else + return(0); + + if (nice(priority)) + usage(); + + execvp(argv[1], argv+1); + puts("can not execute"); + exit(-1); +} diff --git a/Linux-0.11/sources/sbin/setroot.c b/Linux-0.11/sources/sbin/setroot.c new file mode 100644 index 00000000..2dc70b4a --- /dev/null +++ b/Linux-0.11/sources/sbin/setroot.c @@ -0,0 +1,481 @@ +From: hns@regent.e-technik.tu-muenchen.dbp.de (Henning Spruth) +Newsgroups: alt.os.linux +Subject: DOS program to set root device +Date: 25 Mar 92 09:06:28 GMT + +Here is a small DOS program I hacked using Turbo C to be able to +conveniently set the root partition. It is quite primitive, as it +requires major/minor device numbers and can only access a boot disk in +drive A:, but it works. Using it, installing Linux can be done in +these steps: + + 1. boot the Linux boot disk + 2. make HD file system + 3. run install script + 4. sync + 5. boot DOS + 6. run setroot.exe to set root file system to HD + 7. boot the Linux boot disk again + +Here's the source: + +------------------------- begin setroot.c ------------------------------ +#include +#include +#include + +char buffer[512]; + +void check(int res) +{ + if(res==0) return; + printf("Disk error status: %x\n",res); + exit(1); +} + +main() +{ + int result,x; + char in[80]; + unsigned int major, minor; + printf("\n\nInsert Linux boot disk into drive A: and hit a key ..."); + getch(); + printf("\n"); + printf("Resetting controller ...\n"); + result=biosdisk(0,0,0,0,1,1,buffer); + check(result); + printf("Loading boot sector ...\n"); + result=biosdisk(2,0,0,0,1,1,buffer); + if(result==6) result=biosdisk(2,0,0,0,1,1,buffer); + check(result); + printf("Current major boot device: %d\n",buffer[509]); + printf("Current minor boot device: %d\n",buffer[508]); + printf("\n"); + printf("New device values:\n"); + printf("Enter new major device: "); + gets(in); + sscanf(in,"%d",&major); + printf("Enter new minor device: "); + gets(in); + sscanf(in,"%d",&minor); + printf("\nCheck: changing root disk to major %d, minor %d\n",major,minor); + printf("Is this OK (y/n)? "); + x=getch(); printf("\n"); + if(x!='y') + { printf("Aborting ...\n"); + exit(0); + } + buffer[508]=minor; + buffer[509]=major; + printf("Writing boot sector ...\n"); + result=biosdisk(3,0,0,0,1,1,buffer); + check(result); + printf("Root device changed!\n"); +} +------------------------- end setroot.c ------------------------------ + + +Here is the uuencoded executable: + +------------------------- begin setroot.uue ---------------------------- +begin 664 setroot.exe +M35KP 1D P @ ___W H /@ $ ^S!J<@ +M ! W@ ! ! +M +M +M +M +M +M +M +M +M +M "Z;0(NB18U K0PS2&++@( BQXL ([:HY C :. +M (D>B@")+J8 Z#T!Q#Z( (O'B]BY_W_\\J[C84,F. 5U]H#-@/?9B0Z( +D! +M -/C@\,(@^/XB1Z, (S:*^J+/K@$@?\ G,'OP "B3ZX!(''G@AR* ,^L 1R +M(K$$T^]'.^]R&8,^N 0 = >#/K $ '4.OP 0.^]W!XO]ZP/IA &+WP/:B1Z> +M (D>H@"AC@ KV([ M$I7S2%?T^?ZCM*+Y_LSP"Z.!C4"OUH&N9X(*\_\\ZJT +M ,T:B1:4 (D.E@ S[;AL H[8O@ OPP Z.H +HX>-0+_-H8 _S:$ /\V@@#H +M6P$NQ@;G 7(NQ@;6 0!0Z$8$N&P"CMB^# "_# #HN NCAXU O\60@/_%D0# +M_Q9& RZ.'C4"Z'( ,\"+\+DM ($@-0 1N+X+:4,= FY&0"Z+0#HQ0"+[+1, +MBD8"S2&Y#@"Z1@#IP0 >N US2&)'G( C 9T +@$- "X!37- +M(8D>>@",!GP N 8US2&)'GX C : +@ )8S*CMJZ7 '-(1_#'K@ )<46<@#- +M(1\>N 0EQ19V ,TA'QZX!27%%GH S2$?'K@&)<46?@#-(1_#M/^+UXO>.]]T +M%( __W0*.&-0)T!R;_ +M7P(?Z\4F_U<"'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