Browse Source

[contrib] Move most contrib content to a separate repository

Most of the content that was previously in this directory has been
moved to a separate git repository:

    http://git.etherboot.org/?p=contrib.git;a=summary

or the Etherboot Project wiki:

    http://etherboot.org/
tags/v1.0.0-rc1
Marty Connor 11 years ago
parent
commit
330abebddf
100 changed files with 9 additions and 14187 deletions
  1. 0
    9
      contrib/3c90xutil/Makefile
  2. 0
    80
      contrib/3c90xutil/README
  3. 0
    254
      contrib/3c90xutil/bromutil.c
  4. 0
    259
      contrib/3c90xutil/cromutil.c
  5. 0
    104
      contrib/3c90xutil/ocromutil.c
  6. 0
    36
      contrib/3c90xutil/romutil.txt
  7. 0
    537
      contrib/Diskless-From-NT/Config.txt
  8. 0
    565
      contrib/Diskless-From-NT/Diskless-From-NT.txt
  9. 0
    82
      contrib/Diskless-From-NT/furtmayr.html
  10. 9
    0
      contrib/README
  11. 0
    40
      contrib/auto-default/mail
  12. 0
    55
      contrib/auto-default/main.c.patch
  13. 0
    2
      contrib/award_plugin_roms/README
  14. 0
    341
      contrib/award_plugin_roms/award_plugin_roms.pl
  15. 0
    475
      contrib/baremetal/Makefile
  16. 0
    1119
      contrib/baremetal/main.c
  17. 0
    52
      contrib/baremetal/marini.txt
  18. 0
    351
      contrib/baremetal/misc.c
  19. 0
    756
      contrib/baremetal/startmpcc.S
  20. 0
    9
      contrib/bin2intelhex/Makefile
  21. 0
    148
      contrib/bin2intelhex/bin2intelhex.c
  22. 0
    74
      contrib/bin2intelhex/bin2intelhex.c.simple
  23. 0
    7
      contrib/bochs/.gitignore
  24. 0
    10
      contrib/bochs/Makefile
  25. 0
    95
      contrib/bochs/README
  26. 0
    79
      contrib/bochs/README.qemu
  27. 0
    31
      contrib/bochs/README.windows-ris
  28. 0
    20
      contrib/bochs/bochs-writable-ROM-patch
  29. 0
    750
      contrib/bochs/bochsrc.txt
  30. 0
    26
      contrib/bochs/qemu-patch
  31. 0
    278
      contrib/bochs/serial-console
  32. 0
    191
      contrib/bochs/serial-console.1
  33. 0
    113
      contrib/bochs/tunctl.c
  34. 0
    42
      contrib/bootptodhcp/bootptodhcp.pl
  35. 0
    23
      contrib/compressor/COPYING
  36. 0
    58
      contrib/compressor/algorithm.doc
  37. 0
    14
      contrib/compressor/loader.h
  38. 0
    764
      contrib/compressor/lzhuf.c
  39. 0
    16
      contrib/dhcpdconfeg/dhcpd.conf
  40. 0
    140
      contrib/dhcpdconfeg/vendorclassid.txt
  41. 0
    884
      contrib/dhcpid/dhcpid.txt
  42. 0
    73
      contrib/eepro100notes/flash-1.txt
  43. 0
    149
      contrib/eepro100notes/flash-2.txt
  44. 0
    57
      contrib/eepro100notes/flash-3.txt
  45. 0
    29
      contrib/flashimg/Makefile
  46. 0
    497
      contrib/flashimg/flashimg.asm
  47. BIN
      contrib/flashimg/flashimg.img
  48. 0
    15
      contrib/hdload/Makefile
  49. 0
    162
      contrib/hdload/hdload.S
  50. 0
    175
      contrib/hdload/petr.msg
  51. 0
    46
      contrib/initrd/ChangeLog
  52. 0
    187
      contrib/initrd/Makefile
  53. 0
    15
      contrib/initrd/Manifest
  54. 0
    37
      contrib/initrd/README
  55. 0
    207
      contrib/initrd/dhcpd.conf.etherboot.include
  56. 0
    63
      contrib/initrd/include-modules
  57. 0
    7
      contrib/initrd/linux-wlan.cfg
  58. 0
    76
      contrib/initrd/linuxrc
  59. 0
    165
      contrib/initrd/mkinitrd-net
  60. 0
    112
      contrib/initrd/mkinitrd-net.spec
  61. 0
    200
      contrib/initrd/mknbi-set
  62. 0
    27
      contrib/initrd/mknbi-set.conf
  63. 0
    11
      contrib/initrd/script.c.patch
  64. 0
    25
      contrib/initrd/udhcpc-post
  65. 0
    92
      contrib/linux-2.0-transname.lsm
  66. 0
    24
      contrib/linux-3c503-patch/3c503.patch
  67. 0
    7
      contrib/linux-3c503-patch/README
  68. 0
    339
      contrib/mini-slamd/COPYING
  69. 0
    8
      contrib/mini-slamd/Makefile
  70. 0
    521
      contrib/mini-slamd/mini-slamd.c
  71. 0
    10
      contrib/mkQNXnbi/Makefile
  72. 0
    36
      contrib/mkQNXnbi/README
  73. 0
    29
      contrib/mkQNXnbi/examples/bootptab
  74. 0
    22
      contrib/mkQNXnbi/examples/ws.etherboot
  75. 0
    22
      contrib/mkQNXnbi/examples/ws.etherboot.on-the-fly
  76. 0
    196
      contrib/mkQNXnbi/mkQNXnbi.c
  77. 0
    76
      contrib/mkffwnb/2.0.10/linuxrc
  78. 0
    43
      contrib/mkffwnb/Extendinitrd.pm
  79. 0
    69
      contrib/mkffwnb/README
  80. 0
    226
      contrib/mkffwnb/mkffwnb.pl
  81. 0
    4
      contrib/mklrpnb/README.txt
  82. 0
    191
      contrib/mklrpnb/extractdach.pl
  83. 0
    45
      contrib/mklrpnb/mklrpnb
  84. 0
    97
      contrib/mntnbi/mntnbi.pl
  85. 0
    2
      contrib/nfs-swap/README
  86. 0
    10
      contrib/p910nd-0.8/Makefile
  87. 0
    9
      contrib/p910nd-0.8/banner.pl
  88. 0
    58
      contrib/p910nd-0.8/client.pl
  89. 0
    93
      contrib/p910nd-0.8/p910nd.8
  90. 0
    420
      contrib/p910nd-0.8/p910nd.c
  91. 0
    39
      contrib/p910nd-0.8/p910nd.sh
  92. 0
    67
      contrib/ppmtoansi/Makefile
  93. 0
    1
      contrib/ppmtoansi/demo/dos.ansi
  94. 0
    51
      contrib/ppmtoansi/demo/dos.ppm
  95. 0
    29
      contrib/ppmtoansi/demo/dos.xpm
  96. BIN
      contrib/ppmtoansi/demo/etherboot.ansi
  97. 0
    99
      contrib/ppmtoansi/demo/etherboot.ppm
  98. 0
    27
      contrib/ppmtoansi/demo/etherboot.xpm
  99. 0
    1
      contrib/ppmtoansi/demo/flash.ansi
  100. 0
    0
      contrib/ppmtoansi/demo/flash.ppm

+ 0
- 9
contrib/3c90xutil/Makefile View File

@@ -1,9 +0,0 @@
1
-FILES = cromutil ocromutil bromutil
2
-
3
-INCLUDEDIR = /usr/include
4
-CFLAGS = -O2 -fomit-frame-pointer -Wall -I$(INCLUDEDIR)
5
-
6
-all: $(FILES)
7
-
8
-clean:
9
-	rm -f $(FILES) *~ core

+ 0
- 80
contrib/3c90xutil/README View File

@@ -1,80 +0,0 @@
1
-This utility was apparently writen by John Finlay and came to me
2
-via Richard Schroeder who got it from Greg Beeley. John, if you want
3
-to be credited with your full address or whatever in the Etherboot
4
-documentation, please contact me (Etherboot maintainer).
5
-
6
-1/18/2000 Marty Connor (mdc@thinguin.org) added code for the 3C905C
7
-with AT49BV512 Flash memory, and created cromutil and bromutil to
8
-differentiate the versions.  cromutil is for 3C905C and bromutil is
9
-for 3C905B.
10
-
11
-8.28.2005 I am adding a new version from Jorge L. deLyra that will
12
-replace cromutil.c.  I will rename cromutil.c to ocromutil.c
13
-
14
-  From:	        delyra@fma.if.usp.br
15
-  Subject:	Improved version of cromutil.c.
16
-  Date:		June 22, 2004 12:19:00 AM EDT
17
-  To:		mdc@thinguin.org
18
-
19
-  Dear Marty,
20
-
21
-       Below you will find a new version of the cronutil.c program. Since
22
-  the changes were quite large I am sending the program rather than a patch.
23
-  I added support for 3C905CX cards with a page-mode super-flash EEPROM, and
24
-  included several informative messages, a programming progress report and a
25
-  detailed help message. I did all the tests I could with it and it seems to
26
-  work correctly for the 3C905CX with either type of EEPROM chip.
27
-
28
-  A question: is there a similar program for Intel eepro100 cards or for the
29
-  Intel or 3COM Gbit cards?
30
-					  Cheers,
31
-
32
-  ----------------------------------------------------------------
33
-	  Jorge L. deLyra,  Associate Professor of Physics
34
-	      The University of Sao Paulo,  IFUSP-DFMA
35
-	 For more information: finger delyra@latt.if.usp.br
36
-  ----------------------------------------------------------------
37
-
38
-12/4/2009 The new cromutil version from Jorge L. deLyra can be found in
39
-cromutil.c, whereas the old version can be found in ocromutil.c.
40
-
41
-bromutil.c now supports enabling a bootrom workaround that was previously
42
-implemented in the old 3c90x driver. Some 3c90xB cards refuse to load gPXE
43
-after the ROM is burned. The gPXE banner is likely to appear, but gPXE will
44
-crash soon after.
45
-If this is the case try the following commands. It is assumed that you replace
46
-0x6600 with the I/O address of your card which can be acquired with:
47
-(look for a line like 'I/O ports at e400')
48
- $ lspci -v
49
-
50
-    $ make
51
-    $ ./bromutil 0x6600 bootrom
52
-
53
-This command will write into the settings EEPROM of the network card. In case
54
-the network card shows any unexpected behavior it is possible to restore the
55
-EEPROM settings with a 3COm provided tool called '3c90xcfg.exe'(google it for
56
-mirrors).
57
-
58
-  -- Thomas Miletich
59
-
60
-Be careful. You can easily erase your Flash memory using these
61
-utilities.  Make *sure* to back them up first using the "read"
62
-command. You must "erase" before using "prog" to program the chip with
63
-Etherboot code.  This code comes with NO WARRANTY, and you take sole
64
-responsibility and liability for whatever it does.  Read the
65
-"romutil.txt" file for more information on commands.
66
-
67
-That being said, if you are programming a 3C905C-TXM (for example)
68
-you would do something like this:
69
-
70
-    $ cd etherboot-x.x.x/contrib
71
-    $ tar -zxvf n3c905xutil.tar.gz
72
-    $ cd n3c905xutil
73
-    $ make
74
-    # replace 0x6600 with whatever the IO Addr for your card is!!!!
75
-    $ ./cromutil 0x6600 read > 905cbackup.bin
76
-    $ ./cromutil 0x6600 erase
77
-    $ ./cromutil 0x6600 prog < 3c90x.lzrom
78
-
79
-You should now have an Etherboot-enabled 3c905C-TXM.
80
-

+ 0
- 254
contrib/3c90xutil/bromutil.c View File

@@ -1,254 +0,0 @@
1
-/* 
2
- * readutil.c - perform various control ops on the 3c509b bios rom
3
- *
4
- */
5
-
6
-#ifndef __i386__
7
-#  error "This program can't compile or run on non-intel computers"
8
-#else
9
-
10
-#include <stdio.h>
11
-#include <stdlib.h>
12
-#include <unistd.h>
13
-#include <string.h>
14
-
15
-#ifdef __FreeBSD__
16
-
17
-#include <fcntl.h>
18
-#include <machine/cpufunc.h>
19
-
20
-#define OUTB(data, port) 	outb(port, data)
21
-#define OUTW(data, port) 	outw(port, data)
22
-#define OUTL(data, port) 	outl(port, data)
23
-
24
-#else
25
-
26
-#include <sys/io.h>
27
-
28
-#define OUTB(data, port) 	outb(data, port)
29
-#define OUTW(data, port) 	outw(data, port)
30
-#define OUTL(data, port) 	outl(data, port)
31
-
32
-#endif
33
-
34
-/*
35
- * write_eeprom() and enum definitions are copied from vortex-diag.c,
36
- * Copyright 1997-2004 by Donald Becker.
37
- *	This software may be used and distributed according to the terms of
38
- *	the GNU General Public License (GPL), incorporated herein by reference.
39
- *	Contact the author for use under other terms.
40
- */
41
-
42
-enum vortex_cmd {
43
-	TotalReset = 0<<11, SelectWindow = 1<<11, StartCoax = 2<<11,
44
-	RxDisable = 3<<11, RxEnable = 4<<11, RxReset = 5<<11,
45
-	UpStall = 6<<11, UpUnstall = (6<<11)+1,
46
-	DownStall = (6<<11)+2, DownUnstall = (6<<11)+3,
47
-	RxDiscard = 8<<11, TxEnable = 9<<11, TxDisable = 10<<11, TxReset = 11<<11,
48
-	FakeIntr = 12<<11, AckIntr = 13<<11, SetIntrEnb = 14<<11,
49
-	SetStatusEnb = 15<<11, SetRxFilter = 16<<11, SetRxThreshold = 17<<11,
50
-	SetTxThreshold = 18<<11, SetTxStart = 19<<11,
51
-	StartDMAUp = 20<<11, StartDMADown = (20<<11)+1, StatsEnable = 21<<11,
52
-	StatsDisable = 22<<11, StopCoax = 23<<11, SetFilterBit = 25<<11,
53
-};
54
-
55
-enum Window0 {
56
-	Wn0EepromCmd = 10,		/* Window 0: EEPROM command register. */
57
-	Wn0EepromData = 12,		/* Window 0: EEPROM results register. */
58
-	IntrStatus=0x0E,		/* Valid in all windows. */
59
-};
60
-
61
-enum Win0_EEPROM_cmds {
62
-	EEPROM_Read = 2, EEPROM_WRITE = 1, EEPROM_ERASE = 3,
63
-	EEPROM_EWENB = 0xC,		/* Enable erasing/writing for 10 msec. */
64
-	EEPROM_EWDIS = 0x0,		/* Disable EWENB before 10 msec timeout. */
65
-};
66
-
67
-#define debug 1
68
-static void write_eeprom(long ioaddr, int addrlen, int index, int value)
69
-{
70
-	int timer;
71
-
72
-	/* Verify that the EEPROM is idle. */
73
-	for (timer = 1620; inw(ioaddr + Wn0EepromCmd) & 0x8000;)
74
-		if (--timer < 0)
75
-			goto error_return;
76
-	/* Enable writing: EEPROM_EWENB | 110000.... */
77
-	OUTW(3 << (addrlen-2), ioaddr + Wn0EepromCmd);
78
-	for (timer = 400; inw(ioaddr + Wn0EepromCmd) & 0x8000;) {
79
-		if (--timer < 0)
80
-			goto error_return;
81
-	}
82
-	if (debug)
83
-		fprintf(stderr, "EEPROM write enable took %d ticks!\n", 400 - timer);
84
-	OUTW((EEPROM_ERASE << addrlen) + index, ioaddr + Wn0EepromCmd);
85
-	for (timer = 16000; inw(ioaddr + Wn0EepromCmd) & 0x8000;)
86
-		if (--timer < 0) {
87
-			fprintf(stderr, "EEPROM failed to erase index %d!\n", index);
88
-			return;
89
-		}
90
-	if (debug)
91
-		fprintf(stderr, "EEPROM erased index %d after %d ticks!\n",
92
-				index, 16000-timer);
93
-	OUTW(3 << (addrlen-2), ioaddr + Wn0EepromCmd);
94
-	for (timer = 400; inw(ioaddr + Wn0EepromCmd) & 0x8000;) {
95
-		if (--timer < 0)
96
-			goto error_return;
97
-	}
98
-	if (debug)
99
-		fprintf(stderr, "EEPROM write enable took %d ticks!\n", 400-timer);
100
-	OUTW(value, ioaddr + Wn0EepromData);
101
-	OUTW((EEPROM_WRITE << addrlen) + index, ioaddr + Wn0EepromCmd);
102
-	for (timer = 16000; inw(ioaddr + Wn0EepromCmd) & 0x8000;)
103
-		if (--timer < 0)
104
-			goto error_return;
105
-	if (debug)
106
-		fprintf(stderr, "EEPROM wrote index %d with 0x%4.4x after %d ticks!\n",
107
-				index, value, 16000-timer);
108
-	return;
109
-error_return:
110
-	fprintf(stderr, "Failed to write EEPROM location %d with 0x%4.4x!\n",
111
-			index, value);
112
-}
113
-
114
-int main(int argc, char **argv)
115
-{
116
-	unsigned int i, j, n;
117
-	unsigned int ioaddr;
118
-	unsigned long recvrstat;
119
-	unsigned char buf[128];
120
-	unsigned char b;
121
-
122
-	if (argc != 3) {
123
-		printf
124
-		    ("Usage: romid ioaddr [erase|protect|unprotect|id|bootrom|read >file|prog <file]\n");
125
-		exit(-1);
126
-	}
127
-#ifdef __FreeBSD__
128
-	/* get permissions for in/out{blw} */
129
-	open("/dev/io", O_RDONLY, 0);
130
-#else
131
-	setuid(0);		/* if we're setuid, do it really */
132
-	if (iopl(3)) {
133
-		perror("iopl()");
134
-		exit(1);
135
-	}
136
-#endif
137
-
138
-	sscanf(argv[1], "%x", &ioaddr);
139
-	/* Set the register window to 3 for the 3c905b */
140
-	OUTW(0x803, ioaddr + 0xe);
141
-	recvrstat = inl(ioaddr);	/* save the receiver status */
142
-	/* set the receiver type to MII so the full bios rom address space
143
-	   can be accessed */
144
-	OUTL((recvrstat & 0xf00fffff) | 0x00600000, ioaddr);
145
-
146
-	/* Set the register window to 0 for the 3c905b */
147
-	OUTW(0x800, ioaddr + 0xe);
148
-
149
-	if (strcmp(argv[2], "erase") == 0) {
150
-		/* do the funky chicken to erase the rom contents */
151
-		OUTL(0x5555, ioaddr + 0x4);
152
-		OUTB(0xaa, ioaddr + 0x8);
153
-		OUTL(0x2aaa, ioaddr + 0x4);
154
-		OUTB(0x55, ioaddr + 0x8);
155
-		OUTL(0x5555, ioaddr + 0x4);
156
-		OUTB(0x80, ioaddr + 0x8);
157
-		OUTL(0x5555, ioaddr + 0x4);
158
-		OUTB(0xaa, ioaddr + 0x8);
159
-		OUTL(0x2aaa, ioaddr + 0x4);
160
-		OUTB(0x55, ioaddr + 0x8);
161
-		OUTL(0x5555, ioaddr + 0x4);
162
-		OUTB(0x10, ioaddr + 0x8);
163
-		printf("Bios ROM at %04x has been erased\n", ioaddr);
164
-	} else if (strcmp(argv[2], "protect") == 0) {
165
-		OUTL(0x5555, ioaddr + 0x4);
166
-		OUTB(0xaa, ioaddr + 0x8);
167
-		OUTL(0x2aaa, ioaddr + 0x4);
168
-		OUTB(0x55, ioaddr + 0x8);
169
-		OUTL(0x5555, ioaddr + 0x4);
170
-		OUTB(0xa0, ioaddr + 0x8);
171
-		printf
172
-		    ("Software Data Protection for Bios ROM at %04x has been enabled\n",
173
-		     ioaddr);
174
-	} else if (strcmp(argv[2], "unprotect") == 0) {
175
-		OUTL(0x5555, ioaddr + 0x4);
176
-		OUTB(0xaa, ioaddr + 0x8);
177
-		OUTL(0x2aaa, ioaddr + 0x4);
178
-		OUTB(0x55, ioaddr + 0x8);
179
-		OUTL(0x5555, ioaddr + 0x4);
180
-		OUTB(0x80, ioaddr + 0x8);
181
-		OUTL(0x5555, ioaddr + 0x4);
182
-		OUTB(0xaa, ioaddr + 0x8);
183
-		OUTL(0x2aaa, ioaddr + 0x4);
184
-		OUTB(0x55, ioaddr + 0x8);
185
-		OUTL(0x5555, ioaddr + 0x4);
186
-		OUTB(0x20, ioaddr + 0x8);
187
-		printf
188
-		    ("Software Data Protection for Bios ROM at %04x has been disabled\n",
189
-		     ioaddr);
190
-	} else if (strcmp(argv[2], "id") == 0) {
191
-		OUTL(0x5555, ioaddr + 0x4);
192
-		OUTB(0xaa, ioaddr + 0x8);
193
-		OUTL(0x2aaa, ioaddr + 0x4);
194
-		OUTB(0x55, ioaddr + 0x8);
195
-		OUTL(0x5555, ioaddr + 0x4);
196
-		OUTB(0x90, ioaddr + 0x8);
197
-		/* 10ms delay needed */
198
-		printf("Manufacturer ID - ");
199
-		/* manuf. id */
200
-		OUTL(0x0000, ioaddr + 0x4);
201
-		printf("%02x\n", inb(ioaddr + 0x8));
202
-		/* device id */
203
-		OUTL(0x0001, ioaddr + 0x4);
204
-		printf("Device ID - %02x\n", inb(ioaddr + 0x8));
205
-		/* undo the funky chicken */
206
-		OUTL(0x5555, ioaddr + 0x4);
207
-		OUTB(0xaa, ioaddr + 0x8);
208
-		OUTL(0x2aaa, ioaddr + 0x4);
209
-		OUTB(0x55, ioaddr + 0x8);
210
-		OUTL(0x5555, ioaddr + 0x4);
211
-		OUTB(0xf0, ioaddr + 0x8);
212
-	} else if(strcmp(argv[2], "bootrom") == 0) {
213
-		printf("bootrom fix\n");
214
-		write_eeprom(ioaddr, 6, 19, 0x160);
215
-	} else if (strcmp(argv[2], "read") == 0) {
216
-		for (i = 0; i < 65536; i++) {
217
-			OUTL(i, ioaddr + 0x4);
218
-			b = inb(ioaddr + 0x8);
219
-			write(1, &b, 1);
220
-		}
221
-	} else if (strcmp(argv[2], "prog") == 0) {
222
-		/* program the rom in 128 bute chunks */
223
-		for (i = 0, n = 0; i < 65536; i += n) {
224
-			n = read(0, buf, 128);
225
-			if (n == 0)
226
-				break;
227
-			if (n < 0) {
228
-				perror("File Error");
229
-				exit(-3);
230
-			}
231
-			/* disable SDP temporarily for programming a sector */
232
-			OUTL(0x5555, ioaddr + 0x4);
233
-			OUTB(0xaa, ioaddr + 0x8);
234
-			OUTL(0x2aaa, ioaddr + 0x4);
235
-			OUTB(0x55, ioaddr + 0x8);
236
-			OUTL(0x5555, ioaddr + 0x4);
237
-			OUTB(0xa0, ioaddr + 0x8);
238
-			for (j = 0; j < n; j++) {
239
-				OUTL(i + j, ioaddr + 0x4);
240
-				OUTB(buf[j], ioaddr + 0x8);
241
-			}
242
-			/* wait for the programming of this sector to coomplete */
243
-			while (inb(ioaddr + 0x8) != buf[j - 1]);
244
-		}
245
-	}
246
-
247
-	/* Set the register window to 3 for the 3c905b */
248
-	OUTW(0x803, ioaddr + 0xe);
249
-	/* restore the receiver status */
250
-	OUTL(recvrstat, ioaddr);
251
-	return 0;
252
-}
253
-
254
-#endif				/* __i386__ */

+ 0
- 259
contrib/3c90xutil/cromutil.c View File

@@ -1,259 +0,0 @@
1
-/*
2
- * JLdL 21Jun04.
3
- *
4
- * cromutil.c
5
- *
6
- * Perform various control operations on the flash EEPROM of
7
- * _ the 3COM models 3C905C or 3C905CX network cards, in order
8
- * _ to write a boot program such as Etherboot into it.
9
- *
10
- * This program is meant for the Linux operating system only,
11
- * _ and only for the i386 architecture.
12
- *
13
- * The flash EEPROM usually used in these cards is the AT49BV512
14
- * _ chip, which has 512 Kbit (64 KByte). Another possible chip,
15
- * _ which is equivalent to this one, is the SST39VF512.
16
- *
17
- * Added alternative read128 and prog128 commands for cards with
18
- * _ the SST29EE020 fast page-write (super-)flash EEPROM, which
19
- * _ has 2 Mbit (256 KByte), and which has to be programmed in
20
- * _ a 128-byte page mode. NOTE: it seems that the card can
21
- * _ address only the first half of the memory in this chip,
22
- * _ so only 128 Kbytes are actually available for use.
23
- *
24
- * Added a few informative messages and a detailed help message.
25
- *
26
- */
27
-
28
-#ifndef __i386__
29
-#  error "This program can't compile or run on non-Intel computers"
30
-#else
31
-
32
-#include <stdio.h>
33
-#include <stdlib.h>
34
-#include <unistd.h>
35
-#include <sys/io.h>
36
-#include <string.h>
37
-
38
-int main(int argc, char **argv)
39
-{
40
-  /* Counters. */
41
-  unsigned int i, j, n;
42
-  /* For ROM chips larger than 64 KB, a long integer
43
-     _ is needed for the global byte counter. */
44
-  unsigned long k;
45
-  /* The I/O address of the card. */
46
-  unsigned int ioaddr;
47
-  /* Storage for a byte. */
48
-  unsigned char b;
49
-  /* Storage for a page. */
50
-  unsigned char buf[128];
51
-
52
-  /* Initialize a few things to avoid compiler warnings. */
53
-  i=0; j=0; n=0; k=0;
54
-
55
-  /* Verify the command-line parameters; write
56
-     _ out an usage message if needed. */
57
-  if (argc != 3) {
58
-    /* Exactly 2 command line parameters are needed. */
59
-    printf("Usage: ./cromutil ioaddr command [(>|<) file]\n");
60
-    printf(" (try './cromutil 0x0000 help' for details)\n");
61
-    exit(-1);
62
-  }
63
-
64
-  /* Set the UID to root if possible. */
65
-  setuid(0);
66
-
67
-  /* Get port-access permissions for in{blw}/out{blw}. */
68
-  if (iopl(3)) {
69
-    perror("iopl()");
70
-    exit(1);
71
-  }
72
-
73
-  /* Pass the I/O address of the card to a variable. */
74
-  sscanf(argv[1],"%x",&ioaddr);
75
-
76
-  /* Set the register window to 0. */
77
-  outw(0x800, ioaddr+0xe);
78
-
79
-  /*
80
-   * Execute the requested command.
81
-   *
82
-   * "id": get and write out the ID numbers.
83
-   */
84
-  if (strcmp(argv[2], "id") == 0) {
85
-    /* Software ID entry command sequence. */
86
-    outl(0x5555, ioaddr+0x4); outb(0xaa, ioaddr+0x8);
87
-    outl(0x2aaa, ioaddr+0x4); outb(0x55, ioaddr+0x8);
88
-    outl(0x5555, ioaddr+0x4); outb(0x90, ioaddr+0x8);
89
-    /* A 10 ms delay is needed. */
90
-    usleep(10000);
91
-    /* Get the manufacturer id. */
92
-    outl(0x0000, ioaddr+0x4);
93
-    printf("Manufacturer ID - %02x\n", inb(ioaddr+0x8));
94
-    /* Get the device id. */
95
-    outl(0x0001, ioaddr+0x4);
96
-    printf("Device ID - %02x\n", inb(ioaddr+0x8));
97
-    /* Software ID exit command sequence. */
98
-    outl(0x5555, ioaddr+0x4); outb(0xaa, ioaddr+0x8);
99
-    outl(0x2aaa, ioaddr+0x4); outb(0x55, ioaddr+0x8);
100
-    outl(0x5555, ioaddr+0x4); outb(0xf0, ioaddr+0x8);
101
-  }
102
-  /*
103
-   * "read": read data from the 512 Kbit ROM.
104
-   */
105
-  else if (strcmp(argv[2], "read") == 0) {
106
-    /* Loop over the whole ROM. */
107
-    for (k = 0; k < 65536; k++) {
108
-      outl(k, ioaddr+0x4);
109
-      b = inb(ioaddr+0x8);
110
-      write(1, &b, 1);
111
-    }
112
-    /* Write out an informative message. */
113
-    perror("Read 65536 bytes from ROM");
114
-  }
115
-  /*
116
-   * "read128": this alternative is for the 2 Mbit ROM.
117
-   */
118
-  else if (strcmp(argv[2], "read128") == 0) {
119
-    /* Loop over the accessible part of the ROM. */
120
-    for (k = 0; k < 131072; k++) {
121
-      outl(k, ioaddr+0x4);
122
-      b = inb(ioaddr+0x8);
123
-      write(1, &b, 1);
124
-    }
125
-    /* Write out an informative message. */
126
-    perror("Read 131072 bytes from ROM");
127
-  }
128
-  /*
129
-   * "erase": erase the ROM contents.
130
-   */
131
-  else if (strcmp(argv[2], "erase") == 0) {
132
-    /* Software chip-erase command sequence. */
133
-    outl(0x5555, ioaddr+0x4); outb(0xaa, ioaddr+0x8);
134
-    outl(0x2aaa, ioaddr+0x4); outb(0x55, ioaddr+0x8);
135
-    outl(0x5555, ioaddr+0x4); outb(0x80, ioaddr+0x8);
136
-    outl(0x5555, ioaddr+0x4); outb(0xaa, ioaddr+0x8);
137
-    outl(0x2aaa, ioaddr+0x4); outb(0x55, ioaddr+0x8);
138
-    outl(0x5555, ioaddr+0x4); outb(0x10, ioaddr+0x8);
139
-    /* Wait a bit. */
140
-    sleep(1);
141
-    /* Write out an informative message. */
142
-    printf("Bios ROM at %04x has been erased: Success\n", ioaddr);
143
-  }
144
-  /*
145
-   * "prog": program the 512 Kbit ROM.
146
-   */
147
-  else if (strcmp(argv[2], "prog") == 0) {
148
-    /* Loop over the bytes in pages, to
149
-       _ allow for a progress report. */
150
-    for (j = 0; j < 512; j++) {
151
-      for (i = 0; i < 128; i++) {
152
-	/* If this program is to run on a diskless node,
153
-	   _ must read in the byte _before_ changing the
154
-	   _ mode of the chip, or NFS may block. */
155
-	n = read(0, &b, 1);
156
-	/* At EOF exit the inner loop. */
157
-	if (n == 0)
158
-	  break;
159
-	if (n < 0) {
160
-	  perror("Input File Error");
161
-	  exit(-3);
162
-	}
163
-	/* Disable SDP temporarily for programming a byte. */
164
-	outl(0x5555, ioaddr+0x4); outb(0xaa, ioaddr+0x8);
165
-	outl(0x2aaa, ioaddr+0x4); outb(0x55, ioaddr+0x8);
166
-	outl(0x5555, ioaddr+0x4); outb(0xA0, ioaddr+0x8);
167
-	/* Calculate the address of the byte. */
168
-	k=i+128*j;
169
-	/* Program this byte. */
170
-	outl(k, ioaddr+0x4); outb(b, ioaddr+0x8);
171
-	/* Wait for the programming of this byte to complete. */
172
-	while (inb(ioaddr+0x8) != b)
173
-	  ;
174
-      }
175
-      /* At EOF exit the outer loop. */
176
-      if (n == 0)
177
-	break;
178
-      /* Write out a progress report. */
179
-      printf("."); fflush(NULL);
180
-    }
181
-    /* Write out an informative message. */
182
-    printf("\nWrote %ld bytes to ROM: Success\n", k);
183
-  }
184
-  /*
185
-   * "prog128": this alternative is for the 2 Mbit ROM.
186
-   */
187
-  else if (strcmp(argv[2], "prog128") == 0) {
188
-    /* Loop over the accessible pages; the card can
189
-       _ access only the first half of the chip. */
190
-    for (j = 0; j < 1024; j++) {
191
-      /* If this program is to run on a diskless node,
192
-	 _ must read in the page _before_ changing the
193
-	 _ mode of the chip, or NFS may block. */
194
-      n = read(0, buf, 128);
195
-      /* At EOF exit the loop. */
196
-      if (n == 0)
197
-	break;
198
-      if (n < 0) {
199
-	perror("Input File Error");
200
-	exit(-3);
201
-      }
202
-      /* Disable SDP temporarily for programming a page. */
203
-      outl(0x5555, ioaddr+0x4); outb(0xaa, ioaddr+0x8);
204
-      outl(0x2aaa, ioaddr+0x4); outb(0x55, ioaddr+0x8);
205
-      outl(0x5555, ioaddr+0x4); outb(0xA0, ioaddr+0x8);
206
-      /* Loop over the bytes in a page. */
207
-      for (i = 0; i < n; i++) {
208
-	/* Calculate the address of the byte. */
209
-	k=i+128*j;
210
-	/* Program this byte. */
211
-	outl(k, ioaddr+0x4); outb(buf[i], ioaddr+0x8);
212
-      }
213
-      /* Wait for the programming of this page to complete. */
214
-      while (inb(ioaddr+0x8) != buf[i-1])
215
-	;
216
-      /* Write out a progress report. */
217
-      printf("."); fflush(NULL);
218
-    }
219
-    /* Write out an informative message. */
220
-    printf("\nWrote %d pages to ROM: Success\n", j);
221
-  }
222
-  /*
223
-   * "help": write out a detailed help message.
224
-   */
225
-  else if (strcmp(argv[2], "help") == 0) {
226
-    printf("This utility can be used to write data, usually boot loaders\n");
227
-    printf("  such as Etherboot, to the flash EEPROM of the 3COM models\n");
228
-    printf("  3C905C and 3C905CX network cards. You use it like this:\n");
229
-    printf("        ./cromutil ioaddr command [(>|<) file]\n");
230
-    printf("Here ioaddr is the hexadecimal I/O address of the card, such\n");
231
-    printf("  as 0xA123, in some cases you need input/output redirection\n");
232
-    printf("  from/to a file, and the command can be one of these:\n");
233
-    printf("  id               get the ID numbers of the card;\n");
234
-    printf("  read > file      read the contents of the ROM into a file;\n");
235
-    printf("  read128 > file   read the contents of the ROM into a file;\n");
236
-    printf("  erase            erase the whole ROM to the 1 state;\n");
237
-    printf("  prog < file      write the contents of a file into the ROM;\n");
238
-    printf("  prog128 < file   write the contents of a file into the ROM.\n");
239
-    printf("You can get the I/O address of the card using the commands\n");
240
-    printf("  'lspci -v', 'cat /proc/pci', or 'dmesg | grep -i 3C905C'.\n");
241
-    printf("The read and prog commands are to be used if the card has a\n");
242
-    printf("  traditional 512 Kb (64 KB) flash EEPROM chip, such as:\n");
243
-    printf("  | AT49BV512 | SST39VF512 |\n");
244
-    printf("The read128 and prog128 versions are for cards with a 2 Mb\n");
245
-    printf("  (128 KB usable) page-write flash EEPROM chip, such as:\n");
246
-    printf("  | SST29EE020 |\n");
247
-  }
248
-  /*
249
-   * Write out the usage message if an unknown command is used.
250
-   */
251
-  else {
252
-    printf("Usage: ./cromutil ioaddr command [(>|<) file]\n");
253
-    printf("(try './cromutil 0x0000 help' for details)\n");
254
-    exit(-1);
255
-  }
256
-  return 0;
257
-}
258
-
259
-#endif /* __i386__ */

+ 0
- 104
contrib/3c90xutil/ocromutil.c View File

@@ -1,104 +0,0 @@
1
-/*
2
- * 3c905cutil.c - perform various control ops on the 3C905C bios rom
3
- *             which we assume to be an AT49BV512
4
- *
5
- */
6
-
7
-#ifndef __i386__
8
-#  error "This program can't compile or run on non-intel computers"
9
-#else
10
-
11
-#include <stdio.h>
12
-#include <stdlib.h>
13
-#include <unistd.h>
14
-#include <sys/io.h>
15
-#include <string.h>
16
-
17
-int main(int argc, char **argv)
18
-{
19
-  unsigned int ioaddr, i, n;
20
-  unsigned char b;
21
-
22
-  setuid(0); /* if we're setuid, do it really */
23
-  if (argc != 3) {
24
-    printf("Usage: romid ioaddr [erase|id|read >file|prog <file]\n");
25
-    exit(-1);
26
-  }
27
-  if (iopl(3)) {
28
-    perror("iopl()");
29
-    exit(1);
30
-  }
31
-  sscanf(argv[1],"%x",&ioaddr);
32
-
33
-  /* Set the register window to 0 for the 3C905C */
34
-  outw(0x800, ioaddr+0xe);
35
-
36
-  if (strcmp(argv[2], "erase") == 0) {
37
-    /* do the funky chicken to erase the rom contents */
38
-    outl(0x5555, ioaddr+0x4);
39
-    outb(0xaa, ioaddr+0x8);
40
-    outl(0x2aaa, ioaddr+0x4);
41
-    outb(0x55, ioaddr+0x8);
42
-    outl(0x5555, ioaddr+0x4);
43
-    outb(0x80, ioaddr+0x8);
44
-    outl(0x5555, ioaddr+0x4);
45
-    outb(0xaa, ioaddr+0x8);
46
-    outl(0x2aaa, ioaddr+0x4);
47
-    outb(0x55, ioaddr+0x8);
48
-    outl(0x5555, ioaddr+0x4);
49
-    outb(0x10, ioaddr+0x8);
50
-    sleep (1);
51
-    printf("Bios ROM at %04x has been erased\n", ioaddr);
52
-  } else if (strcmp(argv[2], "id") == 0) {
53
-    outl(0x5555, ioaddr+0x4);
54
-    outb(0xaa, ioaddr+0x8);
55
-    outl(0x2aaa, ioaddr+0x4);
56
-    outb(0x55, ioaddr+0x8);
57
-    outl(0x5555, ioaddr+0x4);
58
-    outb(0x90, ioaddr+0x8);
59
-    /* 10ms delay needed */
60
-    printf("Manufacturer ID - ");
61
-    /* manuf. id */
62
-    outl(0x0000, ioaddr+0x4);
63
-    printf("%02x\n", inb(ioaddr+0x8));
64
-    /* device id */
65
-    outl(0x0001, ioaddr+0x4);
66
-    printf("Device ID - %02x\n", inb(ioaddr+0x8));
67
-    /* undo the funky chicken */
68
-    outl(0x5555, ioaddr+0x4);
69
-    outb(0xaa, ioaddr+0x8);
70
-    outl(0x2aaa, ioaddr+0x4);
71
-    outb(0x55, ioaddr+0x8);
72
-    outl(0x5555, ioaddr+0x4);
73
-    outb(0xf0, ioaddr+0x8);
74
-  } else if (strcmp(argv[2], "read") == 0) {
75
-    for (i = 0; i < 65536; i++) {
76
-      outl(i, ioaddr+0x4);
77
-      b = inb(ioaddr+0x8);
78
-      write(1, &b, 1);
79
-    }
80
-  } else if (strcmp(argv[2], "prog") == 0) {
81
-    for (i = 0; i < 65536; i++) {
82
-      n = read(0, &b, 1);
83
-      if (n == 0)
84
-	break;
85
-      if (n < 0) {
86
-	perror("File Error");
87
-	exit(-3);
88
-      }
89
-      outl(0x5555, ioaddr+0x4);
90
-      outb(0xaa, ioaddr+0x8);
91
-      outl(0x2aaa, ioaddr+0x4);
92
-      outb(0x55, ioaddr+0x8);
93
-      outl(0x5555, ioaddr+0x4);
94
-      outb(0xA0, ioaddr+0x8);
95
-      outl(i, ioaddr+0x4);
96
-      outb(b, ioaddr+0x8);
97
-      while (inb(ioaddr+0x8) != b)
98
-	;
99
-    }
100
-  }
101
-  return 0;
102
-}
103
-
104
-#endif /* __i386__ */

+ 0
- 36
contrib/3c90xutil/romutil.txt View File

@@ -1,36 +0,0 @@
1
-I wrote the attached little util program to try out the basic approach
2
-and thought that you might find it useful as well as providing some
3
-simple testing. It isn't a final solution so the interface is rough. The
4
-program must be run as root on an Intel based machine.
5
-
6
-The key point is that the IO address needs to be entered - I grab it
7
-from the dmesg output:
8
-
9
-eth0: 3Com 3c905B Cyclone 100baseTx at 0xe400,  00:10:4b:d2:5e:0d, IRQ
10
-11
11
-
12
-or "cat /proc/pci" to find the "I/O at XXXXXX" for your 3Com Card.
13
-
14
-Some example commands are:
15
-
16
-romutil 0xe400 erase            - erases the ROM contents
17
-romutil 0xe400 protect            - enables the Software Data Protection
18
-on the ROM [3c905B only]
19
-romutil 0xe400 unprotect       - disables the Software Data Protection
20
-on the ROM [3c905B only]
21
-romutil 0xe400 id                    - displays the manufacturer and
22
-device IDs
23
-romutil 0xe400 read >file    - writes the contents of the ROM to stdout
24
-romutil 0xe400 prog <file    - writes the contents of the stdin into the
25
-ROM (<64k)
26
-
27
-I tried reading and writing the ROM while doing large ftp transfers and
28
-experienced no problems. I didn't spend much time worrying about the
29
-possible race conditions. My system has lots of resources (450MHx P2,
30
-128MB RAM) so it might not provide the best test candidate.
31
-
32
-Let me know what results you get if you try it out.
33
-
34
-Thanks
35
-
36
-John

+ 0
- 537
contrib/Diskless-From-NT/Config.txt View File

@@ -1,537 +0,0 @@
1
-#
2
-# Automatically generated make config: don't edit
3
-#
4
-CONFIG_X86=y
5
-CONFIG_ISA=y
6
-# CONFIG_SBUS is not set
7
-CONFIG_UID16=y
8
-
9
-#
10
-# Code maturity level options
11
-#
12
-CONFIG_EXPERIMENTAL=y
13
-
14
-#
15
-# Loadable module support
16
-#
17
-CONFIG_MODULES=y
18
-# CONFIG_MODVERSIONS is not set
19
-# CONFIG_KMOD is not set
20
-
21
-#
22
-# Processor type and features
23
-#
24
-CONFIG_M386=y
25
-# CONFIG_M486 is not set
26
-# CONFIG_M586 is not set
27
-# CONFIG_M586TSC is not set
28
-# CONFIG_M586MMX is not set
29
-# CONFIG_M686 is not set
30
-# CONFIG_M686FXSR is not set
31
-# CONFIG_MPENTIUM4 is not set
32
-# CONFIG_MK6 is not set
33
-# CONFIG_MK7 is not set
34
-# CONFIG_MCRUSOE is not set
35
-# CONFIG_MWINCHIPC6 is not set
36
-# CONFIG_MWINCHIP2 is not set
37
-# CONFIG_MWINCHIP3D is not set
38
-# CONFIG_X86_CMPXCHG is not set
39
-CONFIG_X86_L1_CACHE_SHIFT=4
40
-# CONFIG_TOSHIBA is not set
41
-# CONFIG_MICROCODE is not set
42
-# CONFIG_X86_MSR is not set
43
-# CONFIG_X86_CPUID is not set
44
-CONFIG_NOHIGHMEM=y
45
-# CONFIG_HIGHMEM4G is not set
46
-# CONFIG_HIGHMEM64G is not set
47
-CONFIG_MATH_EMULATION=y
48
-CONFIG_MTRR=y
49
-# CONFIG_SMP is not set
50
-# CONFIG_X86_UP_IOAPIC is not set
51
-
52
-#
53
-# General setup
54
-#
55
-CONFIG_NET=y
56
-# CONFIG_VISWS is not set
57
-CONFIG_PCI=y
58
-# CONFIG_PCI_GOBIOS is not set
59
-# CONFIG_PCI_GODIRECT is not set
60
-CONFIG_PCI_GOANY=y
61
-CONFIG_PCI_BIOS=y
62
-CONFIG_PCI_DIRECT=y
63
-# CONFIG_PCI_NAMES is not set
64
-CONFIG_EISA=y
65
-# CONFIG_MCA is not set
66
-CONFIG_HOTPLUG=y
67
-
68
-#
69
-# PCMCIA/CardBus support
70
-#
71
-# CONFIG_PCMCIA is not set
72
-CONFIG_SYSVIPC=y
73
-# CONFIG_BSD_PROCESS_ACCT is not set
74
-CONFIG_SYSCTL=y
75
-CONFIG_KCORE_ELF=y
76
-# CONFIG_KCORE_AOUT is not set
77
-# CONFIG_BINFMT_AOUT is not set
78
-CONFIG_BINFMT_ELF=y
79
-CONFIG_BINFMT_MISC=m
80
-CONFIG_PM=y
81
-# CONFIG_ACPI is not set
82
-# CONFIG_APM is not set
83
-
84
-#
85
-# Memory Technology Devices (MTD)
86
-#
87
-# CONFIG_MTD is not set
88
-
89
-#
90
-# Parallel port support
91
-#
92
-CONFIG_PARPORT=y
93
-CONFIG_PARPORT_PC=y
94
-CONFIG_PARPORT_PC_FIFO=y
95
-# CONFIG_PARPORT_PC_SUPERIO is not set
96
-# CONFIG_PARPORT_AMIGA is not set
97
-# CONFIG_PARPORT_MFC3 is not set
98
-# CONFIG_PARPORT_ATARI is not set
99
-# CONFIG_PARPORT_SUNBPP is not set
100
-# CONFIG_PARPORT_OTHER is not set
101
-# CONFIG_PARPORT_1284 is not set
102
-
103
-#
104
-# Plug and Play configuration
105
-#
106
-# CONFIG_PNP is not set
107
-
108
-#
109
-# Block devices
110
-#
111
-CONFIG_BLK_DEV_FD=m
112
-# CONFIG_BLK_DEV_XD is not set
113
-# CONFIG_PARIDE is not set
114
-# CONFIG_BLK_CPQ_DA is not set
115
-# CONFIG_BLK_CPQ_CISS_DA is not set
116
-# CONFIG_BLK_DEV_DAC960 is not set
117
-# CONFIG_BLK_DEV_LOOP is not set
118
-# CONFIG_BLK_DEV_NBD is not set
119
-CONFIG_BLK_DEV_RAM=y
120
-CONFIG_BLK_DEV_RAM_SIZE=4096
121
-# CONFIG_BLK_DEV_INITRD is not set
122
-
123
-#
124
-# Multi-device support (RAID and LVM)
125
-#
126
-# CONFIG_MD is not set
127
-
128
-#
129
-# Networking options
130
-#
131
-# CONFIG_PACKET is not set
132
-# CONFIG_NETLINK is not set
133
-# CONFIG_NETFILTER is not set
134
-# CONFIG_FILTER is not set
135
-CONFIG_UNIX=y
136
-CONFIG_INET=y
137
-# CONFIG_IP_MULTICAST is not set
138
-# CONFIG_IP_ADVANCED_ROUTER is not set
139
-CONFIG_IP_PNP=y
140
-# CONFIG_IP_PNP_BOOTP is not set
141
-# CONFIG_IP_PNP_RARP is not set
142
-# CONFIG_NET_IPIP is not set
143
-# CONFIG_NET_IPGRE is not set
144
-# CONFIG_INET_ECN is not set
145
-# CONFIG_SYN_COOKIES is not set
146
-# CONFIG_IPV6 is not set
147
-# CONFIG_KHTTPD is not set
148
-# CONFIG_ATM is not set
149
-
150
-#
151
-#  
152
-#
153
-# CONFIG_IPX is not set
154
-# CONFIG_ATALK is not set
155
-# CONFIG_DECNET is not set
156
-# CONFIG_BRIDGE is not set
157
-# CONFIG_X25 is not set
158
-# CONFIG_LAPB is not set
159
-# CONFIG_LLC is not set
160
-# CONFIG_NET_DIVERT is not set
161
-# CONFIG_ECONET is not set
162
-# CONFIG_WAN_ROUTER is not set
163
-# CONFIG_NET_FASTROUTE is not set
164
-# CONFIG_NET_HW_FLOWCONTROL is not set
165
-
166
-#
167
-# QoS and/or fair queueing
168
-#
169
-# CONFIG_NET_SCHED is not set
170
-
171
-#
172
-# Telephony Support
173
-#
174
-# CONFIG_PHONE is not set
175
-
176
-#
177
-# ATA/IDE/MFM/RLL support
178
-#
179
-# CONFIG_IDE is not set
180
-# CONFIG_BLK_DEV_IDE_MODES is not set
181
-# CONFIG_BLK_DEV_HD is not set
182
-
183
-#
184
-# SCSI support
185
-#
186
-# CONFIG_SCSI is not set
187
-
188
-#
189
-# IEEE 1394 (FireWire) support
190
-#
191
-# CONFIG_IEEE1394 is not set
192
-
193
-#
194
-# I2O device support
195
-#
196
-# CONFIG_I2O is not set
197
-
198
-#
199
-# Network device support
200
-#
201
-CONFIG_NETDEVICES=y
202
-
203
-#
204
-# ARCnet devices
205
-#
206
-# CONFIG_ARCNET is not set
207
-# CONFIG_DUMMY is not set
208
-# CONFIG_BONDING is not set
209
-# CONFIG_EQUALIZER is not set
210
-# CONFIG_TUN is not set
211
-# CONFIG_NET_SB1000 is not set
212
-
213
-#
214
-# Ethernet (10 or 100Mbit)
215
-#
216
-CONFIG_NET_ETHERNET=y
217
-# CONFIG_NET_VENDOR_3COM is not set
218
-# CONFIG_LANCE is not set
219
-# CONFIG_NET_VENDOR_SMC is not set
220
-# CONFIG_NET_VENDOR_RACAL is not set
221
-# CONFIG_AT1700 is not set
222
-# CONFIG_DEPCA is not set
223
-# CONFIG_HP100 is not set
224
-CONFIG_NET_ISA=y
225
-# CONFIG_E2100 is not set
226
-# CONFIG_EEXPRESS is not set
227
-# CONFIG_EEXPRESS_PRO is not set
228
-# CONFIG_HPLAN_PLUS is not set
229
-# CONFIG_HPLAN is not set
230
-# CONFIG_ETH16I is not set
231
-CONFIG_NE2000=y
232
-# CONFIG_SK_G16 is not set
233
-# CONFIG_NET_PCI is not set
234
-# CONFIG_NET_POCKET is not set
235
-
236
-#
237
-# Ethernet (1000 Mbit)
238
-#
239
-# CONFIG_ACENIC is not set
240
-# CONFIG_HAMACHI is not set
241
-# CONFIG_YELLOWFIN is not set
242
-# CONFIG_SK98LIN is not set
243
-# CONFIG_FDDI is not set
244
-# CONFIG_HIPPI is not set
245
-# CONFIG_PLIP is not set
246
-# CONFIG_PPP is not set
247
-# CONFIG_SLIP is not set
248
-
249
-#
250
-# Wireless LAN (non-hamradio)
251
-#
252
-# CONFIG_NET_RADIO is not set
253
-
254
-#
255
-# Token Ring devices
256
-#
257
-# CONFIG_TR is not set
258
-# CONFIG_NET_FC is not set
259
-# CONFIG_RCPCI is not set
260
-# CONFIG_SHAPER is not set
261
-
262
-#
263
-# Wan interfaces
264
-#
265
-# CONFIG_WAN is not set
266
-
267
-#
268
-# Amateur Radio support
269
-#
270
-# CONFIG_HAMRADIO is not set
271
-
272
-#
273
-# IrDA (infrared) support
274
-#
275
-# CONFIG_IRDA is not set
276
-
277
-#
278
-# ISDN subsystem
279
-#
280
-# CONFIG_ISDN is not set
281
-
282
-#
283
-# Old CD-ROM drivers (not SCSI, not IDE)
284
-#
285
-# CONFIG_CD_NO_IDESCSI is not set
286
-
287
-#
288
-# Input core support
289
-#
290
-# CONFIG_INPUT is not set
291
-
292
-#
293
-# Character devices
294
-#
295
-CONFIG_VT=y
296
-CONFIG_VT_CONSOLE=y
297
-CONFIG_SERIAL=y
298
-# CONFIG_SERIAL_CONSOLE is not set
299
-# CONFIG_SERIAL_EXTENDED is not set
300
-# CONFIG_SERIAL_NONSTANDARD is not set
301
-CONFIG_UNIX98_PTYS=y
302
-CONFIG_UNIX98_PTY_COUNT=256
303
-CONFIG_PRINTER=m
304
-# CONFIG_LP_CONSOLE is not set
305
-# CONFIG_PPDEV is not set
306
-
307
-#
308
-# I2C support
309
-#
310
-# CONFIG_I2C is not set
311
-
312
-#
313
-# Mice
314
-#
315
-# CONFIG_BUSMOUSE is not set
316
-CONFIG_MOUSE=y
317
-CONFIG_PSMOUSE=y
318
-# CONFIG_82C710_MOUSE is not set
319
-# CONFIG_PC110_PAD is not set
320
-
321
-#
322
-# Joysticks
323
-#
324
-
325
-#
326
-# Game port support
327
-#
328
-
329
-#
330
-# Gameport joysticks
331
-#
332
-
333
-#
334
-# Serial port support
335
-#
336
-
337
-#
338
-# Serial port joysticks
339
-#
340
-
341
-#
342
-# Parallel port joysticks
343
-#
344
-# CONFIG_QIC02_TAPE is not set
345
-
346
-#
347
-# Watchdog Cards
348
-#
349
-# CONFIG_WATCHDOG is not set
350
-# CONFIG_INTEL_RNG is not set
351
-# CONFIG_NVRAM is not set
352
-# CONFIG_RTC is not set
353
-# CONFIG_DTLK is not set
354
-# CONFIG_R3964 is not set
355
-# CONFIG_APPLICOM is not set
356
-
357
-#
358
-# Ftape, the floppy tape device driver
359
-#
360
-# CONFIG_FTAPE is not set
361
-CONFIG_AGP=m
362
-CONFIG_AGP_INTEL=y
363
-CONFIG_AGP_I810=y
364
-CONFIG_AGP_VIA=y
365
-# CONFIG_AGP_AMD is not set
366
-# CONFIG_AGP_SIS is not set
367
-# CONFIG_AGP_ALI is not set
368
-# CONFIG_DRM is not set
369
-
370
-#
371
-# Multimedia devices
372
-#
373
-# CONFIG_VIDEO_DEV is not set
374
-
375
-#
376
-# File systems
377
-#
378
-# CONFIG_QUOTA is not set
379
-# CONFIG_AUTOFS_FS is not set
380
-# CONFIG_AUTOFS4_FS is not set
381
-# CONFIG_ADFS_FS is not set
382
-# CONFIG_AFFS_FS is not set
383
-# CONFIG_HFS_FS is not set
384
-# CONFIG_BFS_FS is not set
385
-CONFIG_FAT_FS=m
386
-CONFIG_MSDOS_FS=m
387
-# CONFIG_UMSDOS_FS is not set
388
-CONFIG_VFAT_FS=m
389
-# CONFIG_EFS_FS is not set
390
-CONFIG_JFFS_FS_VERBOSE=0
391
-# CONFIG_CRAMFS is not set
392
-# CONFIG_RAMFS is not set
393
-# CONFIG_ISO9660_FS is not set
394
-# CONFIG_MINIX_FS is not set
395
-# CONFIG_NTFS_FS is not set
396
-# CONFIG_HPFS_FS is not set
397
-CONFIG_PROC_FS=y
398
-CONFIG_DEVFS_FS=y
399
-CONFIG_DEVFS_MOUNT=y
400
-# CONFIG_DEVFS_DEBUG is not set
401
-# CONFIG_DEVPTS_FS is not set
402
-# CONFIG_QNX4FS_FS is not set
403
-# CONFIG_ROMFS_FS is not set
404
-CONFIG_EXT2_FS=y
405
-# CONFIG_SYSV_FS is not set
406
-# CONFIG_UDF_FS is not set
407
-# CONFIG_UFS_FS is not set
408
-
409
-#
410
-# Network File Systems
411
-#
412
-# CONFIG_CODA_FS is not set
413
-CONFIG_NFS_FS=y
414
-CONFIG_NFS_V3=y
415
-CONFIG_ROOT_NFS=y
416
-# CONFIG_NFSD is not set
417
-CONFIG_SUNRPC=y
418
-CONFIG_LOCKD=y
419
-CONFIG_LOCKD_V4=y
420
-# CONFIG_SMB_FS is not set
421
-# CONFIG_NCP_FS is not set
422
-
423
-#
424
-# Partition Types
425
-#
426
-# CONFIG_PARTITION_ADVANCED is not set
427
-CONFIG_MSDOS_PARTITION=y
428
-# CONFIG_SMB_NLS is not set
429
-CONFIG_NLS=y
430
-
431
-#
432
-# Native Language Support
433
-#
434
-CONFIG_NLS_DEFAULT="iso8859-1"
435
-# CONFIG_NLS_CODEPAGE_437 is not set
436
-# CONFIG_NLS_CODEPAGE_737 is not set
437
-# CONFIG_NLS_CODEPAGE_775 is not set
438
-# CONFIG_NLS_CODEPAGE_850 is not set
439
-# CONFIG_NLS_CODEPAGE_852 is not set
440
-# CONFIG_NLS_CODEPAGE_855 is not set
441
-# CONFIG_NLS_CODEPAGE_857 is not set
442
-# CONFIG_NLS_CODEPAGE_860 is not set
443
-# CONFIG_NLS_CODEPAGE_861 is not set
444
-# CONFIG_NLS_CODEPAGE_862 is not set
445
-# CONFIG_NLS_CODEPAGE_863 is not set
446
-# CONFIG_NLS_CODEPAGE_864 is not set
447
-# CONFIG_NLS_CODEPAGE_865 is not set
448
-# CONFIG_NLS_CODEPAGE_866 is not set
449
-# CONFIG_NLS_CODEPAGE_869 is not set
450
-# CONFIG_NLS_CODEPAGE_874 is not set
451
-# CONFIG_NLS_CODEPAGE_932 is not set
452
-# CONFIG_NLS_CODEPAGE_936 is not set
453
-# CONFIG_NLS_CODEPAGE_949 is not set
454
-# CONFIG_NLS_CODEPAGE_950 is not set
455
-CONFIG_NLS_ISO8859_1=m
456
-# CONFIG_NLS_ISO8859_2 is not set
457
-# CONFIG_NLS_ISO8859_3 is not set
458
-# CONFIG_NLS_ISO8859_4 is not set
459
-# CONFIG_NLS_ISO8859_5 is not set
460
-# CONFIG_NLS_ISO8859_6 is not set
461
-# CONFIG_NLS_ISO8859_7 is not set
462
-# CONFIG_NLS_ISO8859_8 is not set
463
-# CONFIG_NLS_ISO8859_9 is not set
464
-# CONFIG_NLS_ISO8859_14 is not set
465
-# CONFIG_NLS_ISO8859_15 is not set
466
-# CONFIG_NLS_KOI8_R is not set
467
-# CONFIG_NLS_UTF8 is not set
468
-
469
-#
470
-# Console drivers
471
-#
472
-CONFIG_VGA_CONSOLE=y
473
-# CONFIG_VIDEO_SELECT is not set
474
-# CONFIG_MDA_CONSOLE is not set
475
-
476
-#
477
-# Frame-buffer support
478
-#
479
-# CONFIG_FB is not set
480
-
481
-#
482
-# Sound
483
-#
484
-CONFIG_SOUND=m
485
-# CONFIG_SOUND_CMPCI is not set
486
-# CONFIG_SOUND_EMU10K1 is not set
487
-# CONFIG_SOUND_FUSION is not set
488
-# CONFIG_SOUND_CS4281 is not set
489
-# CONFIG_SOUND_ES1370 is not set
490
-CONFIG_SOUND_ES1371=m
491
-# CONFIG_SOUND_ESSSOLO1 is not set
492
-# CONFIG_SOUND_MAESTRO is not set
493
-# CONFIG_SOUND_SONICVIBES is not set
494
-# CONFIG_SOUND_TRIDENT is not set
495
-# CONFIG_SOUND_MSNDCLAS is not set
496
-# CONFIG_SOUND_MSNDPIN is not set
497
-CONFIG_SOUND_VIA82CXXX=m
498
-CONFIG_SOUND_OSS=m
499
-# CONFIG_SOUND_TRACEINIT is not set
500
-# CONFIG_SOUND_DMAP is not set
501
-# CONFIG_SOUND_AD1816 is not set
502
-# CONFIG_SOUND_SGALAXY is not set
503
-# CONFIG_SOUND_ADLIB is not set
504
-# CONFIG_SOUND_ACI_MIXER is not set
505
-# CONFIG_SOUND_CS4232 is not set
506
-# CONFIG_SOUND_SSCAPE is not set
507
-# CONFIG_SOUND_GUS is not set
508
-# CONFIG_SOUND_ICH is not set
509
-# CONFIG_SOUND_VMIDI is not set
510
-# CONFIG_SOUND_TRIX is not set
511
-# CONFIG_SOUND_MSS is not set
512
-# CONFIG_SOUND_MPU401 is not set
513
-# CONFIG_SOUND_NM256 is not set
514
-# CONFIG_SOUND_MAD16 is not set
515
-# CONFIG_SOUND_PAS is not set
516
-# CONFIG_SOUND_PSS is not set
517
-CONFIG_SOUND_SB=m
518
-# CONFIG_SOUND_AWE32_SYNTH is not set
519
-# CONFIG_SOUND_WAVEFRONT is not set
520
-# CONFIG_SOUND_MAUI is not set
521
-CONFIG_SOUND_YM3812=m
522
-# CONFIG_SOUND_OPL3SA1 is not set
523
-# CONFIG_SOUND_OPL3SA2 is not set
524
-# CONFIG_SOUND_YMPCI is not set
525
-# CONFIG_SOUND_YMFPCI is not set
526
-# CONFIG_SOUND_UART6850 is not set
527
-# CONFIG_SOUND_AEDSP16 is not set
528
-
529
-#
530
-# USB support
531
-#
532
-# CONFIG_USB is not set
533
-
534
-#
535
-# Kernel hacking
536
-#
537
-# CONFIG_MAGIC_SYSRQ is not set

+ 0
- 565
contrib/Diskless-From-NT/Diskless-From-NT.txt View File

@@ -1,565 +0,0 @@
1
-
2
-
3
-The Diskless Terminal running from NT server Mini-HOWTO
4
-Pavel Tkatchouk, ptkatcho@portal.ca
5
-v0.1, June 19th 1999
6
-
7
-Table of Contents
8
-
9
-1. Introduction.
10
-
11
-   1.1 What is it for?
12
-   1.2 Do we need this HOWTO?
13
-   1.3 A bit of History.
14
-
15
-2. Project description.
16
-
17
-   2.1 Packaging.
18
-   2.2 Image.
19
-      2.2.1 Kernel.
20
-      2.2.2 MRFS.
21
-      2.2.3 Building MRFS.
22
-   2.3 Remotefs.
23
-   2.4 Booting sequence.
24
-      2.4.1 BOOTP, TFTP.
25
-   2.5 Bootprom.
26
-
27
-3. Resources.
28
-
29
-4. Copyright.
30
-
31
-5. Feedback and credits.
32
-
33
-
34
-1. Introduction.
35
-
36
-
37
-1.1. What is it for?
38
-
39
-This document describes how to build software distribution to run Java client on diskless 
40
-terminal booted from Microsoft Windows 95/98/NT workstation. Package can also be easily 
41
-modified to be used as Linux terminal or X Windows terminal's software. I found it also 
42
-convenient for setup over the Ethernet of floppyless PS's, hard disk of which for some 
43
-reason can not be accessed (sealed case under warranty, etc.).
44
-
45
-
46
-1.2. Do we need this HOWTO?
47
-
48
-To be honest, I'm not sure. There are few excellent HOWTO's (see 3. Recources) that up until 
49
-recently I considered quite sufficient to build what I've done two years ago. But since my 
50
-project uses MS Windows as a file server vs. traditional NFS there were some know-how's 
51
-involved which number of people wanted to see in some formal document.
52
-
53
-
54
-1.3. A bit of history.
55
-
56
-My project at that time (1996) was to find OS/JVM that will allow to run Java application 
57
-on hardware we manufacture. Hardware is practically generic x86 PC except it has no keyboard, 
58
-hard drive, floppy drive, mouse, but touchscreen over LCD, plus some POS specific peripherals 
59
-(badge reader, credit card reader, etc.). Due to cost consideration it had no any significant 
60
-storage, so OS and Java client along with support binaries, libraries etc. had to be loaded 
61
-remotely. Because our clients are exclusively Windows shops, Server had to be Windows as well. 
62
-During evaluation of different commercial OS'es along with JVM's available it become apparent 
63
-to my surprise that most promising solution was GPL one - Linux.
64
-
65
-
66
-2. Project description.
67
-
68
-2.1. Packaging.
69
-
70
-The whole distribution consists of remote file system (RemoteFS) residing on MS Windows
71
-server (NT Workstation, NT Server or Windows9x) and tagged bootable image. 
72
-
73
-
74
-2.2. Image.
75
-
76
-Image (~1.5MB) is generated by mknbi utility that comes with Etherboot package
77
-<http://etherboot.sourceforge.net>. It can include minimal root file system (MRFS) 
78
-like in my case (since I had to boot client from MS Windows server and Linux kernel doesn't 
79
-support SMBFS-Root, only NFS-Root. So I had to keep rootfs in the ramdisk). To generate 
80
-image the following script can be used.
81
-
82
-#!/bin/sh
83
-# mkrootnet: makes tagged netbootable image
84
-# This image includes kernel and minimal root filesystem
85
-# to do initial boot.
86
-#
87
-# Copyright (c) Pavel Tkatchouk 1996. All rights reserved.
88
-# Permission is granted for this material to be freely
89
-# used and distributed, provided the source is acknowledged.
90
-# No warranty of any kind is provided. You use this material
91
-# at your own risk.
92
-#
93
-DEVICEFILENAME="/tmp/file"		# temporary file to be used as device
94
-FSBLOCKS=4096   				# uncompressed filesystem size in K
95
-BOOTDISKDIR="/usr/BOOT/ROOTFS"	# root filesystem model
96
-MOUNT="/mnt2"				# temporary mount point
97
-ROOTFS="/tmp/rootfs"			# root filesystem image
98
-ROOTFSGZ="/tmp/rootfs.gz"		# compressed root filesystem image
99
-KERNEL="/usr/KERNELS/vmlinuz-nt"	# kernel image
100
-KERNELTMP="/tmp/vmlinuz"		# temporary copy of kernel image
101
-BOOTIMAGE="/tmp/img"			# tagged image to be booted by client
102
-# if you want ramisk more than default 4096 set CMDLINE, don't forget to
103
-# adjust $FSBLOCKS 
104
-# CMDLINE="ramdisk_size=8192"		# parameters to pass to the kernel
105
-# 
106
-echo "check:"
107
-echo "- if tftp server's download dir mounted to /mnt"
108
-echo "- loopback device is built-in or loaded"
109
-echo "\n press Enter when done"
110
-read tmp 
111
-UPLOAD="/mnt/tmp"				# tftp server's dir to upload bootimage
112
-echo -e "\nZeroing $DEVICEFILENAME of $FSBLOCKS k"
113
-echo "to be used as device for root filesystem model"
114
-dd if=/dev/zero of=$DEVICEFILENAME bs=1k count=$FSBLOCKS
115
-echo -e "\nMaking file system on $DEVICEFILENAME"
116
-mke2fs -m 0 $DEVICEFILENAME
117
-echo "Mounting $DEVICEFILENAME as a loopback device"
118
-mount -o loop -t ext2 $DEVICEFILENAME $MOUNT
119
-curdir=`pwd`
120
-cd $BOOTDISKDIR
121
-echo -e "Copying files from $BOOTDISKDIR to $DEVICEFILENAME, please wait"
122
-find . -print|cpio -pmd $MOUNT
123
-echo "Unmounting $MOUNT"
124
-umount $MOUNT
125
-cd $curdir
126
-echo "Copying $DEVICEFILENAME to $ROOTFS"
127
-dd if=$DEVICEFILENAME of=$ROOTFS bs=1k
128
-echo "Compressing $ROOTFS, it may take a while"
129
-echo "Please wait..."
130
-if [ -f $ROOTFSGZ ];then
131
-	rm -f $ROOTFSGZ
132
-fi
133
-gzip -c $ROOTFS>$ROOTFSGZ
134
-rm -f $ROOTFS
135
-echo -e "\nCreating netbootable image"
136
-cp $KERNEL $KERNELTMP
137
-mknbi -d ram -i rom -r $ROOTFSGZ -k $KERNELTMP -a $CMDLINE -o $BOOTIMAGE
138
-echo "Uploading $BOOTIMAGE to $UPLOAD"
139
-cp $BOOTIMAGE $UPLOAD
140
-echo "Cleaning after ourselves"
141
-rm -f $KERNELTMP $DEVICEFILENAME $BOOTIMAGE
142
-echo "All done"
143
-
144
-
145
-In the above script actual image is generated by the following comand
146
-
147
-#mknbi -d ram -i rom -r rootfs.gz -k vmlinuz-nt -o img
148
-
149
-where:
150
-	rootfs.gz - minimal root file system (MRFS);
151
-	vmlinuz-nt   - kernel;
152
-	img       - resulting image.
153
-
154
-
155
-Note:
156
-Default ramdisk size is 4096. It was enough for RedHat4.1 based minimal file system, but 
157
-apparently not enough for 5.2 based. When this happens "end request:I/O error, dev 01:00 ..." 
158
-error shows up. To fix that either use "mknbi -a ramdisk_size=8192" to pass parameter to the 
159
-kernel (doesn't require kernel recompilation), or change /usr/src/linux/drivers/block/rd.c: 
160
-int rd_size= from 4096 to 8192 or whatever and rebuild the kernel.                                                    
161
-
162
-
163
-2.2.1. Kernel.
164
-
165
-Kernels 2.0.30 and 2.0.36 have been used by author, although nothing is preventing you from
166
-experimenting with others. Kernel should include ramdisk support. The following 
167
-<link to .config> configuration has been used to build <link to binary (kernel 2.0.30)>. 
168
-You may find some components unnecessary, just exclude them and rebuild. 
169
-
170
-Don't forget to change root device after you built the kernel (rdev vmlinuz /dev/rd).
171
-
172
-Gotcha's: apparently smbfs is broken in 2.2.x kernels. Symptoms: remote share is mounted
173
-just fine but after a while fails with "smb_request: result = -32" errmsg. I've heard
174
-SuSe has fix for that.
175
-
176
-2.2.2. MRFS.
177
-
178
-Minimal root file system is required to get Linux up and running along with networking until 
179
-it can mount remote file system to run X/Java from there. After image gets loaded from the 
180
-server MRFS is decompressed into ramdisk. If you can afford a lot of ram on your terminal the 
181
-entire remote file system can be moved to rootfs.gz. That will make your terminal more 
182
-responsive.
183
-
184
-
185
-2.2.3. Building MRFS.  
186
-
187
-Some folks found it easier to start from scratch, others use known "minimal" Linux distributions
188
-(Linux Router, tomsrtbt, etc.), yet others prefer to start from "big" Linuces like I did. Every
189
-path has it's pro and contras.
190
-
191
-Pruning standard distribution (RedHat, Debian, etc.) to your needs might be very time consuming.
192
-To ease that painful process I have used remotely booted diskless client with NFS-Root (see 
193
-Etherboot's Readme, NFS-Root and NFS-Root-Client mini-HOWTO's, Diskless-HOWTO):
194
-
195
-- setup minimal RedHat4.1 install (networked workstation, X, no development, mail, etc., ~117MB);
196
-- find . -print|cpio -pmd /usr/NFS/ROOTFS - copy entire fs tree to NFS exported dir;
197
-- mknod /usr/NFS/ROOTFS/dev/nfsroot b 0 255;
198
-- build vmlinuz-nfs kernel according to NFS-Howto (built-in bootp,rarp,NFS,NFS root,NIC 
199
-  driver,RAM disk);
200
-- rdev vmlinuz-nfs /dev/nfsroot - to set NFS root device; 
201
-- build image for NFS-Root fs:
202
-  #mknbi -d rom -i rom -k vmlinuz-nfs -o nfsImage;
203
-- boot client while monitoring NFS file requests (by Solaris snoop);
204
-- copy files from /usr/NFS/ROOTFS to /usr/BOOT/ROOTFS (MRFS model) according to snoop's
205
-  filelist;
206
-- generate image by mkrootnet script (don't forget to point to the right kernel vmlinuz-nt).
207
-
208
-The above trick not only allows to determine the sought files set but also debug boot process 
209
-analyzing NFS messages. I found it convenient to put "read tmp" statements into init scripts
210
-for debugging. Tracking files up until issuing login gives you <link to rootfs.gz> MRFS (~1MB) 
211
-that can be used to boot Linux from ROM (flash, eprom, DiskOnChip, SanDisk, etc.) as well. All 
212
-the other files requested by client (during starting X, Java, Java client) were put into (link 
213
-to remotefs.zip, ~9MB).
214
-
215
-
216
-To restore MRFS model on your PC from the above rootfs.gz:
217
-- #cd /tmp
218
-- #gunzip rootfs.gz
219
-- #mount -o loop -t ext2 /tmp/rootfs /mnt
220
-- #cd /mnt
221
-- #find . -print|cpio -pmd /usr/BOOT/ROOTFS
222
-- #umount /mnt
223
-
224
-Note: 
225
-
226
-You will have to change attributes of some dirs, files (/etc/mtab, /etc/mtab~, /var/lock/subsys/*, 
227
-/var/run/*, /dev/tty*, etc.) against standard. This is because with standard attribs diskless 
228
-client refused to work. For example I had to change /dev/tty* ownerships to 99:99 from original 
229
-0:0 or 0:5, to get rid of errmsg "INIT: Id "1" respawning too fast: disabled for 5 minutes". 
230
-Being admin illiterate I just chmod them to 777 and chown to 99:99 to make life easier. 
231
-THIS IS SERIOUS SECURITY VIOLATION!!! Using keyboardless terminal with no daemons running in 
232
-my case reduces the risk, yet I would appreciate very much those more experienced who will help 
233
-to restore the right attribs while keeping the distribution working.
234
-
235
-Some "gotcha's" to watch for during MRFS building:
236
-- standard attributes/ownership of some files don't work;
237
-- rdev must be set (non-tagged image didn't work, so couldn't use config file to pass parrs 
238
-  to the kernel);
239
-- diskless client writes 99:99 ownership on generated files;
240
-- "password incorrect" for root, but any other OK and su OK too.
241
-
242
-
243
-2.3. RemoteFS.
244
-
245
-Remotefs.zip file includes everything required by the system that can be located on
246
-remote file system, i.e after booting has been complete and remote file system mounted.
247
-In my case it is X Windows System and Java binaries, libraries etc. To use that file on
248
-MS Windows NT:
249
-- unzip remotefs.zip to some directory;
250
-- share this directory read-only as "usr" (or share as some other name and pass this name to
251
-  the client through bootptab configuration file for BOOTP server;
252
-- create an account username=root, password=linux on NT (can be set in bootptab).
253
-
254
-Note:
255
-There's no symbolic links on NTFS, so UNIX links must be replaced by copies on NTFS. 
256
-To determine potential troublmakers one could use the following:
257
-- first copy required subset (according to snoop's intercept) from /usr/NFS/ROOTFS to 
258
-  /usr/BOOT/REMOTEFS;
259
-- mount some share from NTFS to /mnt;
260
-- /usr/BOOT/REMOTEFS#find . -print|cpio -pmd /mnt 2>links;
261
-In the links file you will find names to work with.
262
-
263
-
264
-2.4. Booting sequence.
265
-
266
-Boot occurs in the following sequence:
267
-- bootprom sends bootp request,
268
-- bootp server responds with subnet mask, client's name, client's IP, TFTP server's IP, 
269
-  bootfile name and some optional parameters (like NT's username/password to use it's share,
270
-  you could pass some other share name here as say T104="somedir");
271
-- bootprom downloads image from TFTP server;
272
-- kernel starts;
273
-- kernel decompresses MRFS in RAM;
274
-- system starts init using ramdisk root,
275
-- mounts remote file system from NT via SMBFS;
276
-- automatically logins;
277
-- starts xstart script located on remotefs (/usr/sbin) where you can start any of your
278
-  programs, change parameters, etc. without rebuilding the image.
279
-
280
-Below are some config/init sample files from <rootfs.gz>, <remotefs.zip>:
281
-
282
-<bootptab, change to link>
283
-t1:sm=255.255.255.0:sa=192.168.33.150:bf=img:T100="pavelnt4":T101="root":T102="linux"
284
-touch1:hn=touch1:tc=t1:ha=00A0F00035CD:ip=192.168.33.127
285
-
286
-</etc/fstab, change to link>:
287
-/dev/ram  /      ext2    defaults    1 1
288
-/proc     /proc  proc    defaults    0 0
289
-
290
-</etc/rc.d/rc.bootp, change to link later>:
291
-#!/bin/sh
292
-# Written to simply set the IP stuff up from the
293
-# bootpc data.
294
-# Last updated : Mon Mar 10 15:17:01 1997
295
-#
296
-# Variables
297
-
298
-BOOTPC=/sbin/bootpc
299
-IFCONFIG=/sbin/ifconfig
300
-ROUTE=/sbin/route
301
-BINHOST=/bin/hostname
302
-DEV=eth0
303
-ASKSERVER="255.255.255.255"
304
-TW="--timeoutwait 320"
305
-RIF="--returniffail"
306
-RIFMESSAGE="Bootp failed -- disabling network."
307
-RCONF=/etc/resolv.conf
308
-EHOSTS=/etc/hosts
309
-LHOSTS=/etc/hosts.local
310
-TMPFILE=/tmp/bootp
311
-# Functions
312
-# Remove the networking by taking down the interface
313
-netdown() {
314
-  ${ROUTE} del default
315
-  ${IFCONFIG} ${DEV} down
316
-}
317
-## End of the functions
318
-
319
-## Start of the actual work
320
-# Bring up minimal networking use 0.0.0.0 as our address as we don't
321
-# know it yet (Means "Me but I don't know my address or network")
322
-${IFCONFIG} ${DEV} up 0.0.0.0
323
-${ROUTE} add default dev ${DEV}
324
-
325
-# Perform the bootp  --  doesn't return unless it gets an answer
326
-if ${BOOTPC} --dev ${DEV} --server ${ASKSERVER} ${RIF} ${TW} > ${TMPFILE}
327
-then
328
-# Take down networking (use the 0.0.0.0 for as short a time as possible)
329
-  netdown
330
-# Read in the values   
331
-  . ${TMPFILE}
332
-
333
-# To use in mountsmb script later
334
-SMBSERVER=${T100}
335
-# And delete the temporary file
336
-#  rm ${TMPFILE}
337
-else
338
-# Take down networking (use the 0.0.0.0 for as short a time as possible)
339
-  netdown
340
-# give message and quit
341
-  echo ${RIFMESSAGE}
342
-  exit 1
343
-fi
344
-
345
-# Start the loopback interface and add a route to it
346
-# It's already set by standard init?
347
-${IFCONFIG} lo 127.0.0.1
348
-${ROUTE} add -net 127.0.0.0
349
-
350
-# Setup of IP stuff needs doing first
351
-#
352
-if [ -z "${NETMASK}" ] ; then
353
-# No netmask info, all this is guessed from the IP number
354
-# If this is wrong for your network FIX the bootpd to know
355
-# what it should send in the RFC1497 cookie!  11/02/94 JSP
356
-#
357
-  ${IFCONFIG} ${DEV} up ${IPADDR} broadcast ${BROADCAST} 
358
-  ${ROUTE} -n add -net ${NETWORK} dev ${DEV}
359
-else
360
-# We will have NETMASK, BROADCAST, and NETWORK defined 
361
-  ${IFCONFIG} ${DEV} up ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK} 
362
-  ${ROUTE} -n add -net ${NETWORK} dev ${DEV}
363
-fi
364
-
365
-# Set the hostname from what we got via bootp or reverse lookup
366
-
367
-echo "127.0.0.1	loopback localhost">${EHOSTS}
368
-${BINHOST} "${HOSTNAME}"
369
-echo "${IPADDR}	${HOSTNAME}" >>${EHOSTS}
370
-echo "${SERVER} ${SMBSERVER}" >>${EHOSTS}
371
-
372
-
373
-</etc/rc.d/rc.local, change to link>:
374
-#!/bin/sh
375
-# This script will be executed *after* all the other init scripts.
376
-# You can put your own initialization stuff in here if you don't
377
-# want to do the full Sys V style init stuff.
378
-#
379
-# 07/02/97 Pavel Tkatchouk
380
-#
381
-echo "Start networking"
382
-insmod /lib/8390.o
383
-insmod /lib/ne.o io=0x300 irq=9
384
-echo "Install serial"
385
-insmod /lib/serial.o
386
-echo "Install touch"
387
-insmod /lib/touch.o
388
-echo "Install smbfs"
389
-insmod /lib/smbfs.o
390
-echo "Getting TCP/IP parameters from bootp server"
391
-echo "and start networking"
392
-/etc/rc.d/rc.bootp
393
-if [ -f /etc/squirrel-release ]; then
394
-	R=$(cat /etc/squirrel-release)
395
-else
396
-	R="release 0.02"
397
-fi
398
-echo "Mounting remote fs"
399
-/sbin/mountsmb
400
-echo "XYZ Inc. Diskless Linux $R"
401
-echo "Starting X and Java client without login"
402
-su -c /sbin/xstart root
403
-
404
-
405
-</usr/sbin/xstart, change to link>:
406
-#!/bin/bash
407
-#
408
-# Script to start X and Java client
409
-# 08/07/97 Pavel Tkatchouk
410
-#
411
-# Read bootps response first
412
-. /tmp/bootp
413
-# -s 0 to disable screen-saver
414
-/usr/X11R6/bin/X -s 0 &
415
-export DISPLAY=:0.0
416
-# /usr is share mounted from Windows workstation
417
-cd /usr/program/
418
-java SomeJavaApp 
419
-
420
-
421
-</sbin/mountsmb, change to link>:
422
-#!/bin/bash
423
-# mountsmb: mounts remote filesystems from NT workstation 
424
-# using Microsoft's SMB protocol 
425
-# 
426
-# Copyright (c) Pavel Tkatchouk 1997. All rights reserved.
427
-# Permission is granted for this material to be freely
428
-# used and distributed, provided the source is acknowledged.
429
-# No warranty of any kind is provided. You use this material
430
-# at your own risk.
431
-#
432
-# Last edit June 29 8:30 1997
433
-#
434
-MOUNTDIR="usr"
435
-SHRDIR="usr"
436
-BOOTPRES="/tmp/bootp"
437
-# Read botpc response
438
-. ${BOOTPRES}
439
-# Sharename from NT server, uncomment if you want to use 
440
-# non-hardcoded "usr" but from bootptab
441
-#SHRDIR=${T104} 
442
-SMBSRV="//${T100}"
443
-CLIENT="${HOSTNAME}"
444
-USER="${T101}"
445
-PASSWORD="${T102}"
446
-echo -e "\nMounting $SMBSRV/$SHRDIR to /$MOUNTDIR"
447
-smbmount $SMBSRV/$SHRDIR $MOUNTDIR -c $CLIENT -U $USER -P $PASSWORD
448
-echo -e "\nDone"
449
-
450
-Gotcha's:
451
-Looks like smbmount client from smbfs package used to mount remote Windows shares to local 
452
-Linux dirs in pre 2.2.x era isn't maintained anymore so you should use one coming with 
453
-Samba package. Also binary smbmount won't work with 2.2.x, so you have to recompile with 
454
-2.2.x headers following Samba's readme. Yet even that won't guarantee reliable work until
455
-somebody fixes kernel's smbfs module.
456
-
457
-2.4.1. BOOTP, TFTP.
458
-
459
-There are number of BOOTP, TFTP servers for Windows on the market. You could find them
460
-here:
461
-
462
-- www.walusoft.co.uk (Walusoft's tftp);
463
-- ftp.coast.net/simtel/nt/internet/tftpds12.zip (Millwood AB's tftp);
464
-- ftp.cabletron.com/pub/snmp/bootftp/boottft2.zip (Cabletron's bootp/tftp combo);
465
-- www.tellurian.au.com (Tellurian's bootp, tftp, dhcp servers).
466
-- www.metainfo.com (Metainfo's DHCP server)
467
-- www.nts.com (Network Telesystems's DHCP server in IPserver package)
468
-
469
-My choice was Tellurian's products - very reliable, simple to install, attractively priced
470
-(fully capable evaluation versions are available).
471
-
472
-2.5. Bootprom.
473
-
474
-Ken Yap's Etherboot <etherboot.sourceforge.net> will tell you everything about bootprom. 
475
-Here I just want to mention that normally you would have to put bootprom's code into network
476
-adapter's PROM. But if your hardware like mine has BIOS programmed in flash you could 
477
-re-program it to add bootprom (some BIOS requires special programmer to do that, others don't)
478
-as BIOS extension.
479
-
480
-This is what I did to add ne.rom (bootprom generated by Etherboot's makerom for NE2000 clone) 
481
-to AMI BIOS on my flash:
482
-
483
-- read flash content by programmer into bios.bin binary file;
484
-- use one of available binary editors (say www.simtel.net/Win95/editors/hxp3005.zip to add
485
-  ne.rom to bios.bin (and to edit ne.rom if necessary);
486
-- write new bios.bin back to flash.
487
-
488
-Notes:
489
-- makerom generates bootprom for standard EPROM sizes (8k, 16k, 32k, etc.), so if you tight on 
490
-  space use -s flag to adjust size (or cut it manually to multiple of 512 bytes blocks, just
491
-  don't forget to adjust extension's length which is coded in Byte 2 and checksum to 8 bits 
492
-  of zero;
493
-- valid absolute addresses for BIOS extensions are from 0xC8000 to 0xF4000 (check with 
494
-  motherboard's manufacturer how flash is mapped onto system memory space);
495
-- Byte 0 must be 0x55, Byte 1 must be 0xAA, Byte 2 must be extension's length in 512 bytes 
496
-  blocks;
497
-- extension BIOS has to start at a 2k boundary;
498
-
499
-
500
-3. Resources.
501
-
502
-FAQ's:
503
-- tomsrtbt.FAQ (www.toms.net);
504
-
505
-HOWTO's:
506
-- Paul Moody's miniHOWTO (www.linuxembedded.com/pmhowto.html)
507
-- Diskless;
508
-- Diskless-HOWTO;
509
-- NFS-Root;
510
-- NFS-Root-Client;
511
-- Bootdisk-HOWTO;
512
-- BootPrompt-HOWTO;
513
-- NCD-X-Terminal;
514
-- Remote-Boot;
515
-- Remote-X-Apps;
516
-
517
-Web:
518
-- etherboot.sourceforge.net/
519
-- www.waste.org/~zanshin
520
-- www.tellurian.com.au.
521
-- www.toms.net
522
-- www.trinux.org
523
-- www.linux.org.uk/ELKS-Home
524
-- www.embedded.com
525
-- www.linuxembedded.com
526
-- www.thinlinux.org
527
-- www.linuxrouter.org
528
-- linux-mandrake.com
529
-- www.disklessworkstations.com
530
-
531
-Newsgroups:
532
-- comp.arch.embedded
533
-
534
-Lists:
535
-- netboot-owner@baghira.han.de
536
-- linux-embedded@waste.org
537
-
538
-Magazines:
539
-- Circuit Cellar #100 - 105
540
-
541
-
542
-4. Copyright.
543
-
544
-Copyright (c) Pavel Tkatchouk 1999.
545
-Permission is granted for this material to be freely used and distributed, provided the source 
546
-is acknowledged. Copyright policy is GPL as published by the Free Software Foundation.
547
-
548
-No warranty of any kind is provided. You use this material at your own risk.
549
-
550
- 
551
-
552
-5. Feedback and credits.
553
-
554
-Since I am neither have a lot of Linux experience nor native English speaker, there would be 
555
-errors in this document. I would accept any help with gratitude whether in form of proof-reading, 
556
-techical corrections or otherwise. Please send your comments, suggestions and questions to Pavel 
557
-Tkatchouk (ptkatcho@portal.ca)
558
-
559
-I wish to thank Pierre Mondie who convinced me to start this document. I'm also very much in 
560
-debt to all those who's work made this project possible:
561
-
562
-Ken Yap 		<ken_yap@users.sourceforge.net>	(Etherboot)
563
-David Newall 	<www.tellurian.com.au>	(Bootpdnt/Ftpdnt)
564
-(to be continued)
565
-

+ 0
- 82
contrib/Diskless-From-NT/furtmayr.html View File

@@ -1,82 +0,0 @@
1
-<html>
2
-
3
-<head>
4
-<title>Free TFTP / Syslog / NFS Servers for Windows</title>
5
-</head>
6
-
7
-<body>
8
-
9
-<h3 align="center">Free TFTP / Syslog / NFS Servers for Windows</h3>
10
-<div align="center"><center>
11
-
12
-<address>
13
-  Stefan Furtmayr (<a href="mailto:sf@paf.net">sf@paf.net</a>) 
14
-</address>
15
-</center></div>
16
-
17
-<p>Feel free to send me your comments about these programs or some additions.</p>
18
-
19
-<p>Also have a look at the <a
20
-href="http://www.ltsp.org/contrib/diskless-windows-howto.htm">&quot;Diskless Windows
21
-Cookbook &quot;</a> in the <a href="http://www.ltsp.org/contrib/">LTSP Contrib Area</a>.</p>
22
-
23
-<p><small>From this list I have only used the W2K-TFTP once for a customer with the <a
24
-href="http://support.3com.com/infodeli/tools/nic/mba.htm">3Com MBA Utility Disk</a>, while
25
-it can be used as well with <a href="http://etherboot.sourceforge.net">Etherboot</a>
26
-tagged images for other NIC brands.</small><br>
27
-<small>The solution used a netbooted DOS with MS Client 3.0 to easily restore disk images
28
-with <a href="http://www.ghost.com/">Symantec Ghost</a> (see <a
29
-href="http://appdeploy.com/tools/imaging.shtml">appdeploy.com</a> for similar tools).</small><br>
30
-<small>Sure there are several possibilities to do this with Linux but for cloning NT4/W2K
31
-the NTFS support is rather experimental and automatically changing the SID is another
32
-issue.</small></p>
33
-
34
-<h4>TFTP Servers:</h4>
35
-
36
-<p>In Autumn 2000 i tested some different TFTP servers and found out that most of them do
37
-not install/run as a service, especially under W2K. 
38
-
39
-<ul>
40
-  <li>TFTP server included with Windows 2000 (remote installation services need to be
41
-    installed)<br>
42
-    The path for the images has to be specified via registry:<br>
43
-    Q232115 - Changing the Drive or Volume on Which Remote Installation Images Reside:<br>
44
-    <a href="http://support.microsoft.com/support/kb/articles/Q232/1/15.ASP">http://support.microsoft.com/support/kb/articles/Q232/1/15.ASP</a></li>
45
-  <li>3CDaemon version 2.0 revision 10. Freeware. Integrated TFTP/FTP/Syslog Daemon for
46
-    Windows 95/98/NT<br>
47
-    <a href="ftp://ftp.3com.com/pub/utilbin/win32/3cdv2r10.zip">ftp://ftp.3com.com/pub/utilbin/win32/3cdv2r10.zip</a><br>
48
-    - Windows 2000 Server: does not run as service!<br>
49
-    - Windows NT Server 4.0: not tested</li>
50
-  <li>The TFTP Server portion of 3CServer, altered to run as a system Service under Windows NT<br>
51
-    <a href="ftp://ftp.3com.com/pub/utilbin/win32/3CTftpSvc.zip">ftp://ftp.3com.com/pub/utilbin/win32/3CTftpSvc.zip</a><br>
52
-    - Windows 2000 Server: only working in debug mode, does not run as service!<br>
53
-    - Windows NT Server 4.0: not tested</li>
54
-  <li>Cisco TFTP Server v.1.1<br>
55
-    <a href="http://www.cisco.com/pcgi-bin/tablebuild.pl/tftp">http://www.cisco.com/pcgi-bin/tablebuild.pl/tftp</a><br>
56
-    Does not provide an option itself to install as service.</li>
57
-  <li><a href="http://solarwinds.net/Tools/Free_Tools/TFTP_Server/">http://solarwinds.net/Tools/Free_Tools/TFTP_Server/</a><br>
58
-    Does not provide an option itself to install as service.</li>
59
-</ul>
60
-
61
-<p><em>Untested:</em></p>
62
-
63
-<p>found on <a href="http://www.nonags.com/nonags/servd32.html">http://www.nonags.com/nonags/servd32.html</a><br>
64
-- <a href="http://www.klever.net/kin/pumpkin.html">http://www.klever.net/kin/pumpkin.html</a><br>
65
-- <a href="http://membres.tripod.fr/phjounin//P_tftpd32.htm">http://membres.tripod.fr/phjounin//P_tftpd32.htm</a></p>
66
-
67
-<h4>Syslog Servers:</h4>
68
-
69
-<ul>
70
-  <li>3Com Software Library - Utilities for 32 bit Windows<br>
71
-    <a href="http://support.3com.com/software/utilities_for_windows_32_bit.htm">http://support.3com.com/software/utilities_for_windows_32_bit.htm</a></li>
72
-  <li><a href="http://www.netal.com/download.htm#SL4NT03">http://www.netal.com/download.htm#SL4NT03</a>
73
-    (works as service) </li>
74
-</ul>
75
-
76
-<h4>NFS Servers:</h4>
77
-
78
-<ul>
79
-  <li>War NFS Daemon: <a href="http://www.jgaa.com">http://www.jgaa.com</a> (untested)</li>
80
-</ul>
81
-</body>
82
-</html>

+ 9
- 0
contrib/README View File

@@ -0,0 +1,9 @@
1
+Most of the content that was previously in this directory has been
2
+moved to a separate git repository:
3
+
4
+    http://git.etherboot.org/?p=contrib.git;a=summary
5
+
6
+or the Etherboot Project wiki:
7
+
8
+    http://etherboot.org/
9
+

+ 0
- 40
contrib/auto-default/mail View File

@@ -1,40 +0,0 @@
1
-Date:        11/9/2001 3:56 PM
2
-Received:    11/9/2001 4:05 PM
3
-From:        Steve Tilden, stilden@sicom-sys.com
4
-
5
-...
6
-
7
-2)  I have added conditional code to main.c from Etherboot 5.0.4 to add
8
-a new default boot option and I have included the modified main.c as an
9
-attachment to this message.
10
-
11
-As I received Etherboot 5.0.4, in the Config file, if you select
12
-ASK_BOOT with a non zero time-out option, then you also get to set
13
-ANS_DEFAULT = ANS_NETWORK or ANS_DEFAULT = ANS_LOCAL to determine what
14
-will happen if the operator does not respond to the prompt.   I have now
15
-added conditional code in main.c such that if you set ANS_DEFAULT =
16
-ANS_AUTO, the default answer will be set according to whether or not
17
-there is a hard disk in the system (as detected by the BIOS).  If a hard
18
-disk is present, then if the operator does nothing, the system will boot
19
-from it.  If a hard disk does not exist, then again if the operator does
20
-nothing, the system will boot via the network.  Either way, for our
21
-particular environment, the operator has to do nothing to get it to boot
22
-correctly.  Yet the operator can still override the default selection
23
-to, for example, allow a unit without a hard disk, to boot directly from
24
-a floppy rather than the network, or to allow a unit with a hard disk,
25
-to boot from the network.
26
-
27
-I don't know it the code I have added might be correct for a future
28
-production version of Etherboot, but I thought I'd send it to you and
29
-let you get it into the system if you feel it might be appropriate.
30
-
31
-Thanks,
32
-
33
-Steve Tilden
34
-Sicom Systems Inc.
35
-stilden@sicom-sys.com
36
-
37
-[Ed: On a compliant BIOS, it will actually boot the next device in the
38
-BIOS list if local is selected, either explicitly or by timeout, which
39
-may or may not be the hard disk, which is why it's less than general and
40
-not included in the distribution by default.]

+ 0
- 55
contrib/auto-default/main.c.patch View File

@@ -1,55 +0,0 @@
1
---- main.c	Mon Nov  5 18:58:30 2001
2
-+++ main.c.new	Thu Nov 15 01:45:12 2001
3
-@@ -149,21 +151,49 @@
4
- static unsigned short ipchksum(unsigned short *ip, int len);
5
- static unsigned short udpchksum(struct iphdr *packet);
6
- 
7
-+
8
-+#if defined(ASK_BOOT) && ASK_BOOT > 0 && (ANS_DEFAULT == ANS_AUTO)
9
-+/*
10
-+ * Read Installed Hard Disk Count from BIOS memory at 0:0475
11
-+ */
12
-+static int hdsk_cnt(void)
13
-+{
14
-+	int retv;
15
-+	__asm__ __volatile__(
16
-+       "xorw %%ax,%%ax\n\t"
17
-+       "movb 0x475,%%al\n"
18
-+       : "=a" (retv)
19
-+       : /* no inputs */
20
-+       : "ax", "cc", "memory"
21
-+	);
22
-+	return(retv);
23
-+}
24
-+#endif /* ASK_BOOT && ANS_AUTO */
25
-+
26
-+
27
- static inline void ask_boot(void)
28
- {
29
- #if defined(ASK_BOOT) && ASK_BOOT > 0
30
- 	while(1) {
31
--		int c;
32
-+		int c, deflt;
33
- 		unsigned long time;
34
-+#if defined(ASK_BOOT) && ASK_BOOT > 0 && (ANS_DEFAULT == ANS_AUTO)
35
-+		if (hdsk_cnt() != 0)
36
-+			deflt = ANS_LOCAL;
37
-+		else
38
-+			deflt = ANS_NETWORK;
39
-+#else
40
-+		deflt = ANS_DEFAULT;
41
-+#endif
42
- 		printf(ASK_PROMPT);
43
- 		for (time = currticks() + ASK_BOOT*TICKS_PER_SEC; !iskey(); )
44
- 			if (currticks() > time) {
45
--				c = ANS_DEFAULT;
46
-+				c = deflt;
47
- 				goto done;
48
- 			}
49
- 		c = getchar();
50
- 		if ((c >= 'a') && (c <= 'z')) c &= 0x5F;
51
--		if (c == '\n') c = ANS_DEFAULT;
52
-+		if (c == '\n') c = deflt;
53
- done:
54
- 		if ((c >= ' ') && (c <= '~')) putchar(c);
55
- 		putchar('\n');

+ 0
- 2
contrib/award_plugin_roms/README View File

@@ -1,2 +0,0 @@
1
-An Award BIOS ROM lister in Perl contributed by Eric W. Biederman
2
-<ebiederman@lnxi.com>.

+ 0
- 341
contrib/award_plugin_roms/award_plugin_roms.pl View File

@@ -1,341 +0,0 @@
1
-#!/usr/bin/perl -w
2
-use strict;
3
-use FileHandle;
4
-use integer;
5
-
6
-sub unsigned_little_endian_to_value
7
-{
8
-	# Assumes the data is initially little endian
9
-	my ($buffer) = @_;
10
-	my $bytes = length($buffer);
11
-	my $value = 0;
12
-	my $i;
13
-	for($i = $bytes -1; $i >= 0; $i--) {
14
-		my $byte = unpack('C', substr($buffer, $i, 1));
15
-		$value = ($value * 256) + $byte;
16
-	}
17
-	return $value;
18
-}
19
-
20
-sub decode_fixed_string
21
-{
22
-	my ($data, $bytes) = @_;
23
-	return $data;
24
-}
25
-
26
-sub decode_pstring
27
-{
28
-	my ($buf_ref, $offset_ref) = @_;
29
-	# Decode a pascal string
30
-	my $offset = ${$offset_ref};
31
-	my $len = unpack('C',substr(${$buf_ref}, $offset, 1));
32
-	my $data = substr(${$buf_ref}, $offset +1,  $len);
33
-	${$offset_ref} = $offset + $len +1;
34
-	return $data;
35
-}
36
-
37
-sub decode_cstring
38
-{
39
-	# Decode a c string
40
-	my ($buf_ref, $offset_ref) = @_;
41
-	my ($data, $byte);
42
-	my $index = ${$offset_ref};
43
-	while(1) {
44
-		$byte = substr(${$buf_ref}, $index, 1);
45
-		if (!defined($byte) || ($byte eq "\0")) {
46
-			last;
47
-		}
48
-		$data .= $byte;
49
-		$index++;
50
-	}
51
-	${$offset_ref} = $index;
52
-	return $data;
53
-}
54
-
55
-sub type_size
56
-{
57
-	my ($entry) = @_;
58
-	my %type_length = (
59
-		byte => 1,
60
-		half => 2,
61
-		word => 4,
62
-		xword => 8,
63
-		'fixed-string' => $entry->[2],
64
-		pstring => 0,
65
-		cstring => 0,
66
-	);
67
-	my $type = $entry->[0];
68
-	if (!exists($type_length{$type})) {
69
-		 die "unknown type $type";
70
-	 }
71
-	my $length = $type_length{$type};
72
-	return $length;
73
-}
74
-
75
-sub decode_fixed_type
76
-{
77
-	my ($type, $data, $bytes) = @_;
78
-	my %decoders = (
79
-		'byte' => \&unsigned_little_endian_to_value,
80
-		'half' => \&unsigned_little_endian_to_value,
81
-		'word' => \&unsigned_little_endian_to_value,
82
-		'xword' => \&unsigned_little_endian_to_value,
83
-		'fixed-string' => \&decode_fixed_string,
84
-	);
85
-	my $decoder = $decoders{$type} or die "unknow fixed type $type";
86
-	return $decoder->($data, $bytes);
87
-}
88
-
89
-sub decode_variable_type
90
-{
91
-	my ($type, $buf_ref, $offset_ref) = @_;
92
-	my %decoders = (
93
-		'pstring' => \&decode_pstring,
94
-		'cstring' => \&decode_cstring,
95
-	);
96
-	my $decoder = $decoders{$type} or die "unknow variable type $type";
97
-	return $decoder->($buf_ref, $offset_ref);
98
-}
99
-
100
-sub decode_struct
101
-{
102
-	my ($buf_ref, $offset, $layout) = @_;
103
-	my $initial_offset = $offset;
104
-	my ($entry, %results);
105
-	foreach $entry (@$layout) {
106
-		my ($type, $name) = @$entry;
107
-		my $bytes = type_size($entry);
108
-		if ($bytes > 0) {
109
-			my $data = substr(${$buf_ref}, $offset, $bytes);
110
-			$results{$name} = decode_fixed_type($type, $data, $bytes);
111
-			$offset += $bytes;
112
-		} else {
113
-			$results{$name} = decode_variable_type($type, $buf_ref, \$offset);
114
-		}
115
-	}
116
-	return (\%results, $offset - $initial_offset);
117
-}
118
-
119
-sub print_big_hex
120
-{
121
-	my ($min_digits, $value) = @_;
122
-	my @digits;
123
-	while($min_digits > 0 || ($value > 0)) {
124
-		my $digit = $value%16;
125
-		$value /= 16;
126
-		unshift(@digits, $digit);
127
-		$min_digits--;
128
-	}
129
-	my $digit;
130
-	foreach $digit (@digits) {
131
-		printf("%01x", $digit);
132
-	}
133
-}
134
-
135
-
136
-
137
-my %lha_signatures = (
138
-	'-com-' => 1,	
139
-	'-lhd-'	=> 1,
140
-	'-lh0-'	=> 1,
141
-	'-lh1-'	=> 1,
142
-	'-lh2-'	=> 1,
143
-	'-lh3-'	=> 1,
144
-	'-lh4-'	=> 1,
145
-	'-lh5-'	=> 1,
146
-	'-lzs-' => 1,
147
-	'-lz4-' => 1,
148
-	'-lz5-' => 1,
149
-	'-afx-'	=> 1,
150
-	'-lzf-'	=> 1,
151
-);
152
-
153
-my %lha_os = (
154
-	'M' => 'MS-DOS',
155
-	'2' => 'OS/2',
156
-	'9' => 'OS9',
157
-	'K' => 'OS/68K',
158
-	'3' => 'OS/386',
159
-	'H' => 'HUMAN',
160
-	'U' => 'UNIX',
161
-	'C' => 'CP/M',
162
-	'F' => 'FLEX',
163
-	'm' => 'Mac',
164
-	'R' => 'Runser',
165
-	'T' => 'TownOS',
166
-	'X' => 'XOSK',
167
-	'A' => 'Amiga',
168
-	'a' => 'atari',
169
-	' ' => 'Award ROM',
170
-);
171
-
172
-
173
-my @lha_level_1_header = (
174
-	[ 'byte',         'header_size' ],    # 1
175
-	[ 'byte',         'header_sum', ],    # 2
176
-	[ 'fixed-string', 'method_id', 5 ],   # 7
177
-	[ 'word',         'skip_size', ],     # 11
178
-	[ 'word',         'original_size' ],  # 15
179
-	[ 'half',         'dos_time' ],       # 17
180
-	[ 'half',         'dos_date' ],       # 19
181
-    	[ 'byte',         'fixed'   ],        # 20
182
-	[ 'byte',         'level'   ],        # 21
183
-	[ 'pstring',      'filename' ],       # 22
184
-	[ 'half',         'crc' ],
185
-	[ 'fixed-string', 'os_id', 1 ],
186
-	[ 'half',         'ext_size' ],		  
187
-);
188
-
189
-# General lha_header
190
-my @lha_header = (
191
-	[ 'byte',         'header_size' ],
192
-	[ 'byte',         'header_sum', ],
193
-	[ 'fixed-string', 'method_id', 5 ],
194
-	[ 'word',         'skip_size', ],
195
-	[ 'word',         'original_size' ],
196
-	[ 'half',         'dos_time' ],
197
-	[ 'half',         'dos_date' ],
198
-	[ 'half',         'rom_addr' ],
199
-	[ 'half',         'rom_flags' ],
200
-    	[ 'byte',         'fixed'   ],
201
-	[ 'byte',         'level'   ],
202
-	[ 'pstring',      'filename' ],
203
-	[ 'half',         'crc' ],
204
-	[ 'lha_os',	  'os_id', 1 ],
205
-	[ 'half',         'ext_size' ],
206
-	[ 'byte',         'zero' ],
207
-	[ 'byte',         'total_checksum' ],
208
-	[ 'half',         'total_size' ],
209
-);
210
-
211
-sub print_struct
212
-{
213
-	my ($layout, $self) = @_;
214
-	my $entry;
215
-	my $width = 0;
216
-	foreach $entry(@$layout) {
217
-		my ($type, $name) = @$entry;
218
-		if (length($name) > $width) {
219
-			$width = length($name);
220
-		}
221
-	}
222
-	foreach $entry (@$layout) {
223
-		my ($type, $name) = @$entry;
224
-		printf("%*s = ", $width, $name);
225
-		my $value = $self->{$name};
226
-		if (!defined($value)) {
227
-			print "undefined";
228
-		}
229
-		elsif ($type eq "lha_os") {
230
-			print "$lha_os{$value}";
231
-		}
232
-		elsif ($type =~ m/string/) {
233
-			print "$value";
234
-		} 
235
-		else {
236
-			my $len = type_size($entry);
237
-			print "0x";
238
-			print_big_hex($len *2, $value);
239
-		}
240
-		print "\n";
241
-	}
242
-}
243
-
244
-sub checksum
245
-{
246
-	my ($buf_ref, $offset, $length) = @_;
247
-	my ($i, $sum);
248
-	$sum = 0;
249
-	for($i = 0; $i < $length; $i++) {
250
-		my $byte = unpack('C', substr($$buf_ref, $offset + $i, 1));
251
-		$sum = ($sum + $byte) %256;
252
-	}
253
-	return $sum;
254
-}
255
-
256
-sub decode_lha_header
257
-{
258
-	my ($buf_ref, $offset) = @_;
259
-	my $level = unpack('C',substr(${$buf_ref}, $offset + 20, 1));
260
-
261
-	my %self;
262
-	my ($struct, $bytes);
263
-	if ($level == 1) {
264
-		($struct, $bytes) 
265
-			= decode_struct($buf_ref, $offset, \@lha_level_1_header);
266
-		%self = %$struct;
267
-		if ($self{fixed} != 0x20) {
268
-			 die "bad fixed value";
269
-		}
270
-		$self{total_size} = $self{header_size} + 2 + $self{skip_size};
271
-		if ($bytes != $self{header_size} +2) {
272
-			die "$bytes != $self{header_size} +2";
273
-		}
274
-		my $checksum = checksum($buf_ref, $offset +2, $self{header_size});
275
-		if ($checksum != $self{header_sum}) {
276
-			printf("WARN: Header bytes checksum to %02lx\n", 
277
-				     $checksum);
278
-		}
279
-		# If we are an award rom...
280
-		if ($self{os_id} eq ' ') {
281
-			@self{qw(zero total_checksum)} = 
282
-			    unpack('CC', substr($$buf_ref, 
283
-				$offset + $self{total_size}, 2));
284
-			if ($self{zero} != 0) {
285
-				warn "Award ROM without trailing zero";
286
-			}
287
-			else {
288
-				$self{total_size}++;
289
-			}
290
-			my $checksum = 
291
-				checksum($buf_ref, $offset, $self{total_size});
292
-			if ($self{total_checksum} != $checksum) {
293
-				printf("WARN: Image bytes checksum to %02lx\n", 
294
-					$checksum);
295
-			}
296
-			else {
297
-				$self{total_size}++;
298
-			}
299
-			$self{rom_addr} = $self{dos_time};
300
-			$self{rom_flags} = $self{dos_date};
301
-			delete @self{qw(dos_time dos_date)};
302
-		}
303
-	}
304
-	else {
305
-		die "Unknown header type";
306
-	}
307
-	return \%self;
308
-}
309
-
310
-sub main
311
-{
312
-	my ($filename, $rom_length) = @_;
313
-	my $fd = new FileHandle;
314
-	if (!defined($rom_length)) {
315
-		my ($dev, $ino, $mode, $nlink, $uid, $gid,$rdev,$size,
316
-			$atime, $mtime, $ctime, $blksize, $blocks)
317
-			= stat($filename);
318
-		$rom_length = $size;
319
-	}
320
-	$fd->open("<$filename") or die "Cannot ope $filename";
321
-	my $data;
322
-	$fd->read($data, $rom_length);
323
-	$fd->close();
324
-	
325
-	my $i;
326
-	for($i = 0; $i < $rom_length; $i++) {
327
-		my $sig = substr($data, $i, 5);
328
-		if (exists($lha_signatures{$sig})) {
329
-			my $start = $i -2;
330
-			my $header = decode_lha_header(\$data, $start);
331
-			
332
-			my $length = $header->{total_size};
333
-			print "AT:  $start - @{[$start + $length -1]},  $length bytes\n";
334
-			print_struct(\@lha_header, $header);
335
-			print "\n";
336
-
337
-		}
338
-	}
339
-}
340
-
341
-main(@ARGV);

+ 0
- 475
contrib/baremetal/Makefile View File

@@ -1,475 +0,0 @@
1
-#
2
-# Makefile for Etherboot
3
-#
4
-# Most of the time you should edit Config
5
-#
6
-# Common options:
7
-#	VERSION=v	- Set the version string
8
-#
9
-# NS8390 options:
10
-#	-DINCLUDE_NE	- Include NE1000/NE2000 support
11
-#	-DNE_SCAN=list	- Probe for NE base address using list of
12
-#			  comma separated hex addresses
13
-#	-DINCLUDE_3C503 - Include 3c503 support
14
-#	  -DT503_SHMEM	- Use 3c503 shared memory mode (off by default)
15
-#	-DINCLUDE_WD	- Include Western Digital/SMC support
16
-#	-DWD_DEFAULT_MEM- Default memory location for WD/SMC cards
17
-#	-DCOMPEX_RL2000_FIX
18
-#
19
-#	If you have a Compex RL2000 PCI 32-bit (11F6:1401),
20
-#	and the bootrom hangs in "Probing...[NE*000/PCI]",
21
-#	try enabling this fix... it worked for me :).
22
-#	In the first packet write somehow it somehow doesn't
23
-#	get back the expected data so it is stuck in a loop.
24
-#	I didn't bother to investigate what or why because it works
25
-#	when I interrupt the loop if it takes more then COMPEX_RL2000_TRIES.
26
-#	The code will notify if it does a abort.
27
-#	SomniOne - somnione@gmx.net
28
-#
29
-# 3C509 option: