Browse Source

Plan 9 from Bell Labs 2010-11-05

David du Colombier 13 years ago
parent
commit
84454b08b8
5 changed files with 73 additions and 19 deletions
  1. 5 1
      sys/man/4/kfs
  2. 31 13
      sys/man/8/prep
  3. 3 3
      sys/man/8/venti
  4. 5 0
      sys/src/9/omap/words
  5. 29 2
      sys/src/cmd/ip/tftpd.c

+ 5 - 1
sys/man/4/kfs

@@ -25,7 +25,7 @@ kfs \- disk file system
 ]
 .SH DESCRIPTION
 .I Kfs
-is a local user-level file server for a Plan 9 terminal with a disk.
+is an old, local user-level file server for a Plan 9 terminal with a disk.
 It maintains a hierarchical Plan 9 file system on the disk
 and offers
 9P (see
@@ -120,6 +120,7 @@ Default file holding blocks.
 .SH SOURCE
 .B /sys/src/cmd/disk/kfs
 .SH "SEE ALSO"
+.IR fossil (4),
 .IR kfscmd (8),
 .IR mkfs (8),
 .IR prep (8),
@@ -130,3 +131,6 @@ For the moment,
 serves both the old (third edition) and new (fourth
 edition) versions of 9P, deciding which to serve by sniffing the first packet on each
 connection.
+.LP
+.I Kfs
+doesn't allow creating files with component names longer than 28 bytes.

+ 31 - 13
sys/man/8/prep

@@ -188,6 +188,8 @@ works in units of disk sectors, which are almost always 512 bytes.
 and
 .I prep
 share most of their options:
+.TF -a
+.PD
 .TP
 .B -a
 Automatically partition the disk.
@@ -305,6 +307,8 @@ secondary partitions cannot exceed four.
 The commands are as follows.
 In the descriptions, read ``sector'' as ``cylinder'' when using
 .IR fdisk .
+.TF ".\fI newdot
+.PD
 .TP
 .B "a\fR \fIname\fR [ \fIstart\fR [ \fIend\fR ] ]"
 Create a partition named
@@ -457,6 +461,8 @@ again will quit the program.
 .PP
 .I Fdisk
 also has the following commands.
+.TF "t \fR[\fI type \fR]
+.PD
 .TP
 .BI A " name
 Set the named partition active.
@@ -704,26 +710,38 @@ disk/format -b /386/pbslba -d -r 2 /dev/sdC0/9fat \e
 .EE
 .PP
 Create a bootable USB disk or flash-memory device to be booted
-via the BIOS and containing only a FAT
-.I fdisk
-partition.
+via the BIOS and containing only a FAT Plan 9 partition.
 .IP
 .EX
 mount /srv/usb /n/usb
-ls /n/usb/sdU*			# note the sdU* number
-disk/partfs /n/usb/sdU13.0/data
-disk/mbr -m /386/mbr /dev/sdXX/data
-disk/fdisk -baw /dev/sdXX/data
-disk/fdisk /dev/sdXX/data
-# delete p1 and create a new FAT16 p1 of about 100MB,
-# and mark it active.  write and quit.
-disk/format -b /386/pbslba -d -r 2 /dev/sdXX/dos \e
-	/386/9load /386/9pcf /tmp/plan9.ini
+ls -d /n/usb/sdU*		# note the name, normally sdU0.0
+disk/partfs /n/usb/sdU0.0/data
+cd /dev/sdXX
+disk/mbr -m /386/mbr data
+disk/fdisk -baw data
+disk/prep -bw -a^(9fat nvram fossil) plan9
+cp /386/9loadusb /tmp/9load  # force format to use the name `9load'
+disk/format -b /386/pbslba -d -r 2 9fat /tmp/9load \e
+	/386/9pccpuf /tmp/plan9.ini
 .EE
+.SH FILES
+.TF /386/mbr.bootmgr
+.TP
+.B /386/mbr
+.TP
+.B /386/mbr.bootmgr
+self-configuring `smart boot manager'
 .SH SOURCE
+.TF /sys/src/cmd/disk/prep
+.TP
 .B /sys/src/cmd/disk/prep
-.br
+.TP
 .B /sys/src/boot/pc
+.TP
+.B /n/sources/extra/bootmgr.tgz
+source for
+.BR /386/mbr.bootmgr ;
+compilable on (l)unix
 .SH SEE ALSO
 .IR floppy (3),
 .IR sd (3),

+ 3 - 3
sys/man/8/venti

@@ -476,12 +476,12 @@ bloom /tmp/disks/bloom
 .EE
 .PP
 Format the index sections, the arena partition,
-the bloom filter, and 
+the bloom filter, and
 finally the main index:
 .IP
 .EX
-% venti/fmtisect isect0. /tmp/disks/isect0 &
-% venti/fmtisect isect1. /tmp/disks/isect1 &
+% venti/fmtisect isect0. /tmp/disks/isect0
+% venti/fmtisect isect1. /tmp/disks/isect1
 % venti/fmtarenas arenas0. /tmp/disks/arenas &
 % venti/fmtbloom /tmp/disks/bloom &
 % wait

+ 5 - 0
sys/src/9/omap/words

@@ -101,6 +101,11 @@ might be changed.  Writing to /dev/dssctl (e.g., echo 1024x768x16
 use the rfbi since it seems like an unnecessary optimisation at this
 point.  Per Odlund wrote the first draft of the video driver for a
 Google Summer of Code project.
+
+Stray Interrupts
+
+IRQs 56 and 57 are I2C.  83, 86 and 94 are MMC.
+
 ___
 
 The code is fairly heavy-handed with the use of barrier instructions

+ 29 - 2
sys/src/cmd/ip/tftpd.c

@@ -43,6 +43,17 @@ enum
 
 	Defsegsize	= 512,
 	Maxsegsize	= 65464,	/* from rfc2348 */
+
+	/*
+	 * bandt (viaduct) tunnels use smaller mtu than ether's
+	 * (1400 bytes for tcp mss of 1300 bytes).
+	 */
+	Bandtmtu	= 1400,
+	/*
+	 * maximum size of block's data content, excludes hdrs,
+	 * notably IP/UDP and TFTP, using worst-case (IPv6) sizes.
+	 */
+	Bandtblksz	= Bandtmtu - 40 - 8,
 };
 
 typedef struct Opt Opt;
@@ -58,11 +69,12 @@ int	restricted;
 int	pid;
 
 /* options */
-int	blksize = Defsegsize;
+int	blksize = Defsegsize;		/* excluding 4-byte header */
 int	timeout = 5;			/* seconds */
 int	tsize;
 static Opt option[] = {
 	"timeout",	&timeout,	1,	255,
+	/* see "hack" below */
 	"blksize",	&blksize,	8,	Maxsegsize,
 	"tsize",	&tsize,		0,	~0UL >> 1,
 };
@@ -264,8 +276,23 @@ options(int fd, char *buf, char *file, ushort oper, char *p, int dlen)
 				sprint(bp, "%lld", size);
 				syslog(dbg, flog, "tftpd %d %s tsize is %,lld",
 					pid, file, size);
+			}
+			/*
+			 * hack: bandt (viaducts) uses smaller mtu than ether's
+			 * (1400 bytes for tcp mss of 1300 bytes),
+			 * so offer at most bandt's mtu minus headers,
+			 * to avoid failure of pxe booting via viaduct.
+			 */
+			else if (oper == Tftp_READ &&
+			    cistrcmp(p, "blksize") == 0 &&
+			    blksize > Bandtblksz) {
+				blksize = Bandtblksz;
+				sprint(bp, "%d", blksize);
+				syslog(dbg, flog,
+					"tftpd %d overriding blksize to %d",
+					pid, blksize);
 			} else
-				sprint(bp, "%s", val); /* use value asked for */
+				strcpy(bp, val);  /* use requested value */
 			bp += strlen(bp) + 1;
 		}
 		p = val + vallen;