├── 195 ├── 211bsd-0-mk-tape.expect ├── 211bsd-0-ts.expect ├── 211bsd-0.ini ├── 211bsd-195-run.ini ├── 211bsd-195.expect ├── 211bsd-195.ini ├── 211bsd-pl0-test.expect ├── mk211p195tape.pl └── script.txt ├── 2.11BSD-ANNOUNCE ├── 2tape.pl ├── LICENSE ├── README.md ├── STATUS.md ├── apout.patch ├── doit ├── fetch-tuhs ├── gen211git ├── hints ├── 0.unshar ├── 1.setup ├── 10.setup ├── 101.unshar ├── 102.unshar ├── 103.unshar ├── 106.unshar ├── 11.setup ├── 118.unpatch ├── 12.setup ├── 121.unshar ├── 122.unshar ├── 123.fixup ├── 123.unpatch ├── 124.unshar ├── 127.unshar ├── 13.setup ├── 132.unshar ├── 134.unshar ├── 136.unshar ├── 137.unshar ├── 14.unshar ├── 141.unshar ├── 142.unshar ├── 143.unshar ├── 149.unshar ├── 15.setup ├── 151.unshar ├── 152.fixup ├── 152.unpatch ├── 153.unpatch ├── 154.unshar ├── 158.unshar ├── 159.unshar ├── 16.unpatch ├── 160.ld.diff ├── 160.unshar ├── 161.unshar ├── 162.unshar ├── 163.unshar ├── 164.unshar ├── 165.unshar ├── 166.unshar ├── 167.unshar ├── 168.unshar ├── 169.unshar ├── 17.unshar ├── 170.unshar ├── 171.unshar ├── 172.unshar ├── 173.ranlib-2.diff ├── 173.ranlib.diff ├── 173.unshar ├── 174.unshar ├── 175.fixup ├── 175.unshar ├── 176.unpatch ├── 178.fixup ├── 178.unpatch ├── 18.setup ├── 180.unshar ├── 184.unpatch ├── 185.unshar ├── 187.unshar ├── 19.setup ├── 1a.unpatch ├── 2.mu ├── 2.tmscpboot.diff ├── 2.unpatch ├── 24.setup ├── 25.setup ├── 26.setup ├── 27.setup ├── 3.unpatch ├── 36.GENERIC-Makefile.diff ├── 36.unpatch ├── 37.setup ├── 37a.unpatch ├── 4.unshar ├── 40.unpatch ├── 42.unpatch ├── 43.unpatch ├── 47.setup ├── 60.setup ├── 72.unshar ├── 75.unshar ├── 78.unpatch ├── 80.fixup ├── 80.unpatch ├── 84.unpatch ├── 9.unshar ├── 93.localopts.diff ├── 93.unpatch ├── KAZOO ├── build.sh ├── build2.sh └── root.cache ├── mk211bsd ├── notes.md ├── paper.md ├── test-p80 ├── tests.md └── vars /195/211bsd-0-mk-tape.expect: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/expect 2 | 3 | # expect script for 2.11p195 install. Newer versions need a diffferent script. 4 | 5 | set tsprompt ": " 6 | set prompt "# " 7 | set disk "ra" 8 | set part "g" 9 | set name "${disk}0${part}" 10 | 11 | set timeout -1 12 | 13 | proc hitreturn {prompt} { 14 | set timeout 1 15 | for {set tries 0} {$tries <= 5} {incr tries} { 16 | expect { 17 | "$prompt" { 18 | set timeout -1 19 | return 0 20 | } 21 | timeout { 22 | send "\r" 23 | } 24 | } 25 | } 26 | 27 | } 28 | 29 | spawn pdp11 211bsd-0.ini 30 | 31 | # create root file system 32 | #nn Boot unix and configure 33 | expect "3Boot" 34 | expect "$tsprompt" {send "${disk}(0,0)unix\r"} 35 | expect "$prompt" {send "fsck -y /dev/ra0a\r"} 36 | expect { 37 | "REBOOT UNIX*# " { 38 | send "/etc/halt\r" 39 | expect "sim> " 40 | send "quit\r" 41 | exit 1 42 | } 43 | "$prompt" { send "\r" } 44 | } 45 | expect "$prompt" {send "fsck -t xxx -y /dev/ra0c\r"} 46 | expect "$prompt" {send "mount /dev/ra0c /usr\r"} 47 | expect "$prompt" {send "cd /dev\r"} 48 | expect "$prompt" {send "rm *mt*\r"} 49 | expect "$prompt" {send "sh ./MAKEDEV tu0\r"} 50 | expect "$prompt" {send "/etc/dump 0f /usr/root.dump /dev/ra0a\r"} 51 | expect "$prompt" {send "cd /sys/pdpstand\r"} 52 | expect "$prompt" {send "make\r"} 53 | expect "$prompt" {send "make distribution\r"} 54 | expect "Switch tapes. Hit CR when second tape is mounted." {send "\005"} 55 | expect "sim> " {send "ATTACH TQ0 ./211bsd-pl0-tape2.tap\r"} 56 | expect "sim> " {send "cont\r"} 57 | hitreturn "cd /usr/src;" 58 | expect "$prompt" {send "\005"} 59 | expect "sim> " {send "ATTACH TQ0 ./211bsd-pl0-tq.tap\r"} 60 | expect "sim> " {send "cont\r"} 61 | hitreturn "$prompt" 62 | send "\r" 63 | expect "$prompt" {send "make tmscptape\r"} 64 | expect "$prompt" {send "/etc/halt\r"} 65 | expect "sim> " {send "quit\r"} 66 | -------------------------------------------------------------------------------- /195/211bsd-0-ts.expect: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/expect 2 | 3 | # expect script for 2.11BSD pl 0 install. Newer versions need a diffferent script. 4 | 5 | set tsprompt ": " 6 | set disk "ra" 7 | set part "c" 8 | set name "${disk}0${part}" 9 | 10 | set timeout -1 11 | 12 | proc hitreturn {prompt} { 13 | set timeout 1 14 | for {set tries 0} {$tries <= 5} {incr tries} { 15 | expect { 16 | "$prompt" { 17 | set timeout -1 18 | return 0 19 | } 20 | timeout { 21 | send "\r" 22 | } 23 | } 24 | } 25 | 26 | } 27 | 28 | spawn pdp11 211bsd-0-test-ts.ini 29 | 30 | expect "sim> " {send "boot ts0\r"} 31 | 32 | # create root file system 33 | expect "$tsprompt" {send "ts(0,1)\r"} 34 | expect "file system: " {send "${disk}(0,0)\r"} 35 | # This is in 1k blocks, disktab is in 512 blocks, so it is pa / 2 36 | expect "file sys size: " {send "7942\r"} 37 | expect "interleaving factor (m; 5 default): " {send "\r"} 38 | expect "interleaving modulus (n; 100 default): " {send "\r"} 39 | 40 | # Restore root filesystem from file 4 41 | expect "$tsprompt" {send "ts(0,2)\r"} 42 | expect "Tape? " {send "ts(0,4)\r"} 43 | expect "Disk? " {send "${disk}(0,0)\r"} 44 | expect "Last chance before scribbling on disk. " {send "\r"} 45 | 46 | # Boot unix and configure 47 | expect "$tsprompt" {send "${disk}(0,0)unix\r"} 48 | # Set the time, toy clock isn't working yet: April 10, 1991 at 11:12am 49 | expect "# " {send "date 9104101112\r"} 50 | # install boot loader 51 | expect "# " {send "dd if=/mdec/rauboot of=/dev/ra0a count=1\r"} 52 | # Fix mt dev nodes to match the ts drive we have 53 | expect "# " {send "cd /dev\r"} 54 | expect "# " {send "rm *mt*\r"} 55 | expect "# " {send "sh ./MAKEDEV ts0\r"} 56 | expect "# " {send "sync\r"} 57 | expect "# " {send "cd /\r"} 58 | # newfs /usr 59 | expect "# " {send "newfs ${name} rd54-rqdx3 93\r"} 60 | expect "# " {send "mount /dev/${name} /usr\r"} 61 | expect "# " {send "cd /usr\r"} 62 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 63 | expect "# " {send "mt -f /dev/rmt12 fsf 5\r"} 64 | expect "# " {send "echo extracting /usr\r"} 65 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 66 | # fixup permissions before extracting src tarballs 67 | expect "# " {send "cd /\r"} 68 | expect "# " {send "rm -f sys\r"} 69 | expect "# " {send "ln -s usr/src/sys sys\r"} 70 | expect "# " {send "cd /usr\r"} 71 | expect "# " {send "mkdir src\r"} 72 | expect "# " {send "cd src\r"} 73 | # Extract /usr/src/{include,sys} 74 | expect "# " {send "echo extracting /usr/src/{sys,include}\r"} 75 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 76 | expect "# " {send "mt -f /dev/rmt12 fsf 6\r"} 77 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 78 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 79 | expect "# " {send "mt -f /dev/rmt12 fsf 7\r"} 80 | # Extracting the rest of /us/rsrc 81 | expect "# " {send "echo extracting /usr/src\r"} 82 | expect "# " {send "\005"} 83 | expect "sim> " {send "ATTACH TS0 ./211bsd-pl0-tape2.tap\r"} 84 | expect "sim> " {send "cont\r"} 85 | hitreturn "# " 86 | send "\r" 87 | expect "# " {send "mt -f /dev/rmt12 status\r"} 88 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 89 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 90 | # Fix some more permissions 91 | expect "# " {send "chmod 755 / /usr /usr/src /usr/src/sys\r"} 92 | # Add /usr to fstab 93 | expect "# " {send "echo /dev/${name}:/usr:rw:1:2 >> /etc/fstab\r"} 94 | expect "# " {send "\r"} 95 | expect "# " {send "echo Done test installing 2.11BSD pl 0....\r"} 96 | # And we're done... 97 | expect "# " {send "sync\r"} 98 | expect "# " {send "sync\r"} 99 | expect "# " {send "sync\r"} 100 | expect "# " {send "halt\r"} 101 | expect "sim> " {send "quit\r"} 102 | -------------------------------------------------------------------------------- /195/211bsd-0.ini: -------------------------------------------------------------------------------- 1 | SET CPU 11/93, 4M 2 | SET CPU IDLE 3 | 4 | SET RQ ENABLE 5 | SET RQ0 ENABLE, RD54, WRITEENABLED 6 | ATTACH RQ0 ./211bsd-0.rd54 7 | 8 | SET TQ ENABLE 9 | SET TQ0 CAPAC=0,WRITEENABLED 10 | ATTACH TQ0 ./211bsd-pl0-tape1.tap 11 | 12 | SET DLI ENABLE 13 | SET DLO0 NODATASET,8B 14 | SHOW DLO0 15 | ; allow vi/more to work 16 | SET CONSOLE PCHAR=01000023600 17 | 18 | echo "At the colon prompt type: ra(0,0)unix" 19 | BOOT RQ0 20 | -------------------------------------------------------------------------------- /195/211bsd-195-run.ini: -------------------------------------------------------------------------------- 1 | SET CPU 11/93, 4M 2 | SET CPU IDLE 3 | 4 | SET RQ ENABLE 5 | SET RQ0 ENABLE, RD54, WRITEENABLED 6 | ATTACH RQ0 ./211bsd-195.rd54 7 | SET RQ1 ENABLE, RD54, WRITEENABLED 8 | ATTACH RQ1 ./211bsd-0.rd54 9 | 10 | ; To run with networking! 11 | ; SET XQ ENABLED 12 | ;SET XQ TYPE=DEQNA 13 | ;SET XQ MAC=08-00-2b-11-07-82 14 | ;ATTACH XQ tap:tap0 15 | 16 | SET TQ ENABLE 17 | SET TQ0 CAPAC=0,LOCKED 18 | ATTACH TQ0 ./src.tap 19 | 20 | SET DLI ENABLE 21 | SET DLO0 NODATASET,8B 22 | SHOW DLO0 23 | ; allow vi/more to work 24 | SET CONSOLE PCHAR=01000023600 25 | show config 26 | 27 | echo "At the colon prompt type: ra(0,0)unix" 28 | BOOT RQ0 29 | -------------------------------------------------------------------------------- /195/211bsd-195.expect: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/expect 2 | 3 | # expect script for 2.11p195 install. Newer versions need a diffferent script. 4 | 5 | set tsprompt ": " 6 | set disk "ra" 7 | set part "g" 8 | set name "${disk}0${part}" 9 | 10 | set timeout 500 11 | 12 | spawn pdp11 211bsd-195.ini 13 | 14 | expect "sim> " {send "boot tq0\r"} 15 | 16 | # create root file system 17 | expect "$tsprompt" {send "tms(0,1)\r"} 18 | expect "file system: " {send "${disk}(0,0)\r"} 19 | # This is in 1k blocks, disktab is in 512 blocks, so it is pa / 2 20 | expect "file sys size: " {send "7942\r"} 21 | expect "interleaving factor (m; 5 default): " {send "\r"} 22 | expect "interleaving modulus (n; 100 default): " {send "\r"} 23 | 24 | # Restore root filesystem from file 4 25 | expect "$tsprompt" {send "tms(0,2)\r"} 26 | expect "Tape? " {send "tms(0,4)\r"} 27 | expect "Disk? " {send "${disk}(0,0)\r"} 28 | expect "Last chance before scribbling on disk. " {send "\r"} 29 | 30 | # Boot unix and configure 31 | expect "$tsprompt" {send "${disk}(0,0)unix\r"} 32 | # install boot loader 33 | expect "# " {send "dd if=/mdec/rauboot of=/dev/ra0a count=1\r"} 34 | # Fix mt dev nodes to match the ts drive we have 35 | expect "# " {send "cd /dev\r"} 36 | expect "# " {send "rm *mt*\r"} 37 | expect "# " {send "./MAKEDEV tu0\r"} 38 | expect "# " {send "sync\r"} 39 | expect "# " {send "cd /\r"} 40 | # newfs /usr 41 | expect "# " {send "newfs ${name} rd54\r"} 42 | expect "# " {send "mount /dev/${name} /usr\r"} 43 | expect "# " {send "cd /usr\r"} 44 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 45 | expect "# " {send "mt -f /dev/rmt12 fsf 5\r"} 46 | expect "# " {send "echo extracting /usr\r"} 47 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 48 | # fixup permissions before extracting src tarballs 49 | expect "# " {send "cd /\r"} 50 | expect "# " {send "rm -f sys\r"} 51 | expect "# " {send "ln -s usr/src/sys sys\r"} 52 | expect "# " {send "cd /usr\r"} 53 | expect "# " {send "mkdir src\r"} 54 | expect "# " {send "cd src\r"} 55 | # Extract /usr/src/{include,sys} 56 | expect "# " {send "echo extracting /usr/src/{sys,include}\r"} 57 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 58 | expect "# " {send "mt -f /dev/rmt12 fsf 6\r"} 59 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 60 | expect "# " {send "mt -f /dev/rmt12 rew\r"} 61 | expect "# " {send "mt -f /dev/rmt12 fsf 7\r"} 62 | # Extracting the rest of /us/rsrc 63 | expect "# " {send "echo extracting /usr/src\r"} 64 | expect "# " {send "tar xpbf 20 /dev/rmt12\r"} 65 | # Sendmail hangs on boot, turn it off... 66 | expect "# " {send "mv /usr/lib/sendmail /usr/lib/sendmail.off\r"} 67 | # Fix some more permissions 68 | expect "# " {send "chmod 755 / /usr /usr/src /usr/src/sys\r"} 69 | # Add /usr to fstab 70 | expect "# " {send "echo /dev/${name}:/usr:rw:1:2 >> /etc/fstab\r"} 71 | expect "# " {send "\r"} 72 | # OK, build and install the SMS kernel 73 | expect "# " {send "cd /sys/SMS && make clean && make && make install\r"} 74 | # And we're done... 75 | expect "# " {send "sync\r"} 76 | expect "# " {send "sync\r"} 77 | expect "# " {send "sync\r"} 78 | expect "# " {send "halt\r"} 79 | expect "sim> " {send "quit\r"} 80 | -------------------------------------------------------------------------------- /195/211bsd-195.ini: -------------------------------------------------------------------------------- 1 | SET CPU 11/93, 4M 2 | SET CPU IDLE 3 | 4 | SET RQ ENABLE 5 | SET RQ0 ENABLE, RD54, WRITEENABLED 6 | ATTACH RQ0 ./211bsd-195.rd54 7 | SET RQ1 ENABLE, RD54, WRITEENABLED 8 | ATTACH RQ1 ./211bsd-0.rd54 9 | 10 | SET TQ ENABLE 11 | SET TQ0 CAPAC=0,LOCKED 12 | ATTACH TQ0 ./211bsd-195.tap 13 | ; ATTACH TQ0 ./src.tap 14 | 15 | SET DLI ENABLE 16 | SET DLO0 NODATASET,8B 17 | SHOW DLO0 18 | ; allow vi/more to work 19 | SET CONSOLE PCHAR=01000023600 20 | 21 | ; echo "At the colon prompt type: ra(0,0)raunix" 22 | ; BOOT RQ0 23 | -------------------------------------------------------------------------------- /195/211bsd-pl0-test.expect: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/expect 2 | 3 | # expect script for using 2.11p195 to bootstrap a 2.11pl0 system 4 | 5 | set startTime [clock seconds] 6 | puts "Started : [clock format $startTime]\n" 7 | 8 | set prompt "root--> " 9 | set timeout 500 10 | 11 | spawn pdp11 211bsd-195-run.ini 12 | 13 | # Bring up multi-user and login as root 14 | expect "93Boot" 15 | expect ": " {send "ra(0,0)unix\r"} 16 | # 17 | # set the time to 3:15pm on March 15th, 1991 18 | # We set the time for all the src files to March 14th at 7:31am when the announcement 19 | # was sent out. This would be a build that happened the next day... The date 20 | # information has been lost, and was likely sometime in late Feb or early March 21 | # but this is as good as we can get and enshrines at least one known date. 22 | # 23 | expect "# " {send "date 9103151515\r"} 24 | expect "# " {send "\004"} 25 | expect "login: " {send "root\r"} 26 | expect "$prompt" {send "newfs ra1a rd54\r"} 27 | expect "$prompt" {send "newfs ra1g rd54\r"} 28 | expect "$prompt" {send "mkdir -p /ur\r"} 29 | expect "$prompt" {send "mount /dev/ra1a /ur\r"} 30 | expect "$prompt" {send "mkdir -p /ur/usr\r"} 31 | expect "$prompt" {send "mount /dev/ra1g /ur/usr\r"} 32 | expect "$prompt" {send "cd /ur\r"} 33 | expect "$prompt" {send "mt -f /dev/rmt12 rew\r"} 34 | expect "$prompt" {send "tar xv\r"} 35 | expect "$prompt" {send "sh -ex ./usr/urbsd/build.sh\r"} 36 | set timeout 3600 37 | expect "$prompt" {send "chroot /ur sh -ex /usr/urbsd/build2.sh\r"} 38 | # Should do something smart on timeout... 39 | 40 | # And we're done... 41 | expect "$prompt" {send "sync\r"} 42 | expect "$prompt" {send "sync\r"} 43 | expect "$prompt" {send "sync\r"} 44 | expect "$prompt" {send "halt\r"} 45 | expect "sim> " {send "quit\r"} 46 | 47 | set endTime [clock seconds] 48 | puts "Ended : [clock format $endTime]\n" 49 | -------------------------------------------------------------------------------- /195/mk211p195tape.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | # Written by Will Senn. Create a bootable SimH tap file to install the system. 4 | # Inspired by various Perl scripts and based on Hellwig Geisse's mktape.c 5 | # 6 | # modified 20171012 binmode required for windows use 7 | # hacked 20200717 by Warner Losh to create a 2.11BSDpl195 tape 8 | 9 | my @files = ("bootstrap", "mkfs.bin", "restor.bin", "icheck.bin", "root.dmp", "usr.tar", "sys.tar", "src.tar"); 10 | my @blkszs = (512, 1024, 1024, 1024, 10240, 10240, 10240, 10240, 10240); 11 | 12 | my $outfile = "211bsd-195.tap"; 13 | 14 | my $EOF = "\x00\x00\x00\x00"; 15 | my $EOT = "\xFF\xFF\xFF\xFF"; 16 | 17 | open(OUTFILE, ">$outfile") || die("Unable to open $outfile: $!\n"); 18 | binmode(OUTFILE); 19 | for(my $i = 0; $i <= $#files; $i++) { 20 | my ($bytes, $blocksize, $buffer, $packedlen, $blockswritten, $file) = 0; 21 | 22 | $file = $files[$i]; 23 | $blocksize = $blkszs[$i]; 24 | $packedlen = pack("V", $blocksize); 25 | 26 | open(INFILE, $file) || die("Unable to open $file: $!\n"); 27 | binmode(INFILE); 28 | while($bytes = read(INFILE, $buffer, $blocksize)) { 29 | $buffer .= $bytes < $blocksize ? "\x00" x ($blocksize - $bytes) : ""; 30 | print OUTFILE $packedlen, $buffer, $packedlen; 31 | $blockswritten++; 32 | } 33 | close(INFILE); 34 | print OUTFILE $EOF; 35 | printf "%s: %d bytes = %d records (blocksize %d bytes)\n", $file, 36 | $blockswritten * $blocksize, $blockswritten, $blocksize; 37 | } 38 | print OUTFILE $EOT 39 | -------------------------------------------------------------------------------- /195/script.txt: -------------------------------------------------------------------------------- 1 | simh> 2 | boot ts0 3 | ; 4 | ts(0,1) 5 | ra(0,0) 6 | 15884 7 | 8 | 9 | : 10 | ts(0,2) 11 | ts(0,4) 12 | ra(0,0) 13 | 14 | : 15 | ra(0,0)unix 16 | # 17 | dd if=/mdec/rauboot of=/dev/ra0a count=1 18 | disk=ra 19 | part=c 20 | name=${disk}0${part} 21 | cd /dev 22 | rm *mt* 23 | ./MAKEDEV ts0 24 | sync 25 | newfs $name rd54 26 | mount /dev/$name /usr 27 | cd /usr 28 | mt rew 29 | mt fsf 5 30 | tar xpbf 20 /dev/rmt12 31 | mt -f /dev/rmt12 fsf 32 | mkdir src 33 | cd src 34 | tar xpbf 20 /dev/rmt12 35 | cd / 36 | chmod 755 / /usr /usr/src /usr/src/sys 37 | rm -f sys 38 | ln -s usr/src/sys sys 39 | cd /usr/src 40 | tar xpbf 20 /dev/rmt12 41 | vi /etc/netstart # fill in hostname, etc 42 | vi /etc/networks # add local network 43 | mv /usr/lib/sendmail /usr/lib/sendmail.off 44 | -------------------------------------------------------------------------------- /2.11BSD-ANNOUNCE: -------------------------------------------------------------------------------- 1 | ath: gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!caen!sdd.hp.com!elroy.jpl.nasa.gov!mahendo!wlbr!news 2 | From: s...@wlv.imsd.contel.com (Steven M. Schultz) 3 | Newsgroups: comp.sys.dec.micro 4 | Subject: 2.11BSD Release Announcement 5 | Message-ID: <1991Mar14.073117.24966@wlbr.imsd.contel.com> 6 | Date: 14 Mar 91 07:31:17 GMT 7 | Sender: n...@wlbr.imsd.contel.com (news) 8 | Organization: Contel Federal Systems 9 | Lines: 114 10 | Nntp-Posting-Host: wlv.imsd.contel.com 11 | 12 | 13 | I know there was a discussion a while back about whether 11/73s 14 | (93s, 83s, 53s) were "dec.micro" or not. My (non-ECC;-) memory recalls 15 | that they are, so i'm posting this announcement here as well as 16 | comp.bugs.2bsd (the front panel of my 11/73 says Micro-Pdp on it 17 | after all). 18 | 19 | Steven M. Schultz 20 | s...@wlv.imsd.contel.com 21 | --------------------------------------------------------------------------- 22 | Second Distribution of Berkeley PDP-11 Software for UNIX 23 | Release 2.11 24 | (Revised January 1991) 25 | 26 | 27 | The USENIX Association is pleased to announce the distribution of 28 | a new release of the "Second Berkeley Software Distribution" 29 | (2.11BSD). 30 | 31 | This release will be handled by USENIX, and is available to all 32 | V7, System III, System V, and 2.9BSD licensees. The Association will 33 | continue to maintain the non-profit price of $200. The release will 34 | consist of two 2400 ft. 1600 bpi tapes or one TK50 tape cartridge 35 | (approximately 80M) and approximately 100 pages of documentation. 36 | 37 | If you have questions about the distribution of the release, or 38 | require 800 bpi tapes, please contact USENIX. USENIX's address and 39 | phone number is as follows: 40 | 41 | 2.11BSD 42 | USENIX Association 43 | 2560 Ninth St. Suite 215 44 | Berkeley, CA 94710 45 | +1-415-528-8649 46 | 47 | USENIX may also be contacted by electronic mail at: 48 | 49 | {ucbvax,decvax}!usenix!office 50 | 51 | If you have technical questions about the release, please contact 52 | Steven M. Schultz at: 53 | 54 | s...@wlv.imsd.contel.com 55 | wlbr!wlv!sms 56 | 57 | This release is in celebration of the 20th anniversary of the 58 | PDP-11! Work has been ongoing since the release of 2.10.1BSD in Janu- 59 | ary 1989. This release incorporates all fixes and changes posted to 60 | the USENET newsgroup comp.bugs.2bsd since 2.10.1BSD was released. 61 | 62 | Present in this release are several more missing pieces from the 63 | 4.3BSD distribution: 64 | 65 | o 1) the kernel logger (/dev/klog) 66 | 67 | o 2) the namei cache and argument encapsulation calling 68 | sequence 69 | 70 | o 3) readv(2)/writev(2) as system calls rather than 71 | emulation/compatibility routines 72 | 73 | o 4) shadow password file implementation (the May 1989 4.3BSD 74 | update) 75 | 76 | o 5) a TMSCP (TK50/TU81) driver with standalone support (boot- 77 | block and standalone driver) 78 | 79 | o 6) Pronet and LH/DH IMP networking support 80 | 81 | o 7) the portable ascii archive file format (ar, ranlib) 82 | 83 | o 8) the Unibus Mapping Register (UMR) handling of the network 84 | was rewritten to avoid allocating excessive UMRs. 85 | 86 | o 9) the necessary mods to the IP portion of the networking 87 | were made to allow traceroute (which is present in 2.11BSD) 88 | to run 89 | 90 | o 10) long filenames in the file system 91 | 92 | This last addition is the reason a coldstart kit is necessary. 93 | The 4.3BSD on-disk directory structure has been ported (along with the 94 | utilities that know about on-disk directories via the raw filesystem: 95 | fsck, ncheck, icheck, dcheck, etc.) and is not compatible with previ- 96 | ous versions of UNIX for the PDP-11. 97 | 98 | A limited amount of filesystem backward compatibility with ear- 99 | lier versions of 2BSD (2.9BSD, 2.10BSD and 2.10.1BSD) is present in a 100 | version of dump(8) which can read old filesystems. The disk partition 101 | sizes have not changed from 2.10.1BSD (the urge to standardize the 102 | haphazard partition sizes was suppressed in the interest of backwards 103 | compatibility). The restor(8) utility automatically converts old dump 104 | tapes to the new format on input. 105 | 106 | The constant MAXNAMLEN is now 63 instead of 14. While it is pos- 107 | sible the limit could be higher, with MAXPATHLEN at 256 a MAXNAMLEN of 108 | 63 was judged sufficient. 109 | 110 | MANY other fixes and changes have also been made, see the 111 | ``Changes To The Kernel'' document which describes the changes made to 112 | both the kernel and the application programs. 113 | 114 | 115 | Steven M. Schultz 116 | Contel Federal Systems 117 | 31717 La Tienda Drive 118 | Westlake Village CA 91359 119 | s...@wlv.imsd.contel.com 120 | wlbr!wlv!sms 121 | _________________________ 122 | 123 | DEC, PDP, Unibus and VAX are trademarks of Digital Equipment Corporation 124 | 125 | UNIX is a trademark of Bell Laboratories 126 | -------------------------------------------------------------------------------- /2tape.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | # Written by Will Senn. Create a bootable SimH tap file to install the system. 4 | # Inspired by various Perl scripts and based on Hellwig Geisse's mktape.c 5 | # 6 | # modified 20171012 binmode required for windows use 7 | # This is just a hack to mount tapes for the 2.11 project 8 | 9 | my @files = ("src.tar"); 10 | my @blkszs = (10240); 11 | 12 | my $outfile = "src.tap"; 13 | 14 | my $EOF = "\x00\x00\x00\x00"; 15 | my $EOT = "\xFF\xFF\xFF\xFF"; 16 | 17 | open(OUTFILE, ">$outfile") || die("Unable to open $outfile: $!\n"); 18 | binmode(OUTFILE); 19 | for(my $i = 0; $i <= $#files; $i++) { 20 | my ($bytes, $blocksize, $buffer, $packedlen, $blockswritten, $file) = 0; 21 | 22 | $file = $files[$i]; 23 | $blocksize = $blkszs[$i]; 24 | $packedlen = pack("V", $blocksize); 25 | 26 | open(INFILE, $file) || die("Unable to open $file: $!\n"); 27 | binmode(INFILE); 28 | while($bytes = read(INFILE, $buffer, $blocksize)) { 29 | $buffer .= $bytes < $blocksize ? "\x00" x ($blocksize - $bytes) : ""; 30 | print OUTFILE $packedlen, $buffer, $packedlen; 31 | $blockswritten++; 32 | } 33 | close(INFILE); 34 | print OUTFILE $EOF; 35 | printf "%s: %d bytes = %d records (blocksize %d bytes)\n", $file, $blockswritten * $blocksize, $blockswritten, $blocksize; 36 | } 37 | print OUTFILE $EOT 38 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2020, Warner Losh 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 19 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 21 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 2.11BSD Recovery Project 2 | 3 | Almost all of the BSD releases survive to the present. Except one major on: 2.11BSD. 4 | 5 | But wait, 2.11BSD is everywhere today. That's true. But it's 2.11BSD pl 470 or 6 | some other patched version. The original release has been lost in the sands of 7 | time. We have all the patches? what gives? 8 | 9 | Why? Well, the 2BSD series was released for the PDP-11. It only ran on the 10 | PDP-11 (until modern times when RetroBSD used it to run on MIPS-based PIC 11 | microcontrollers). The PDP-11 were low-end mini computers once the VAX were 12 | released. They had very little disk space, and tapes were expensive. This meant 13 | that tapes were reused, and disk contents were pruned often. Adding to the 14 | confusion is that the 2.11BSD tapes were expensive when originally released. One 15 | needed to but an AT&T Unix license, which was hundreds of dollars. 16 | 17 | So, these factors have conspired to mena that 2.11BSD pl 195 is the earliest 18 | surviving 2.11BSD. We have 2.10BSD and 2.10.1BSD, but nothing until the 19 | 2.11BSDpl195. A big reason for this is that in the 160s or so in the patch 20 | stream the compiler was modernized and nobody wanted the older version because 21 | the amount of software that could be compiled was diminishing year by year. 22 | 23 | So the goal is to recreate a git repo with all the patches from 2.11BSD as 24 | released (or as close as we can get) to 2.11BSD pl 470 (or whatever the latest 25 | is). It would be nice to produce boot tapes for 2.11BSD as released, even if 26 | they are a bit speculative in places (more on that later) 27 | 28 | ## Why? 29 | 30 | But can't you run the patches backwards? We have them all? Why is this project 31 | even needed? 32 | 33 | Good question. The "patches" in the 2.11BSD series weren't modern unified diffs 34 | that retained all the info, even when deleting files. Oftne times, they were 35 | shell scripts that removed the files. Or did other things that destroyed 36 | information. Destroyed information is impossible to recover, so it's hopeless. 37 | 38 | ## But is it? 39 | 40 | Well, to get a 100% perfect recreation is impossible. But how close can we get? 41 | That's what this project is doing. We know that 95% of the files are the same as 42 | they were in 2.11BSD. We know that many files that were destroyed are the same 43 | as they were in 2.10.1BSD, so we can recover them. Others came from 4.3BSD. Only 44 | a few files need 'restoration' work. 45 | 46 | # Status 47 | 48 | We've worked our way back to 2.11BSD pl 0. Or at least a possible 2.11BSD pl 49 | 0. Now we have to prove it can create a bootable system and all the patches can 50 | apply to it to get back to an identical 2.11BSD pl 195 we have. Work is underway 51 | to roll things forward in an automated way (starting with 2.11BSD pl 195 and 52 | clawing our way back to 2.11BSD pl 0, rebuilding pl 0 and then moving forward). 53 | 54 | Wait, why use 2.11BSD pl 195. Can't you use the latest? There's plenty of 55 | distributions because of the PiDP-11... 56 | 57 | Well. no. 2.11BSD represented a rather eclectic collection of improvements and 58 | old-school binary compatibility. A lot of the comatibility was removed from the 59 | system (both use as well as support) to slim the system down. As a result, 60 | latter-day kernels can't run earlier binaries. So we have to install 2.11BSD pl195. 61 | This is a challenge because the 2.11 instructions for doing this are hard to come 62 | by (but at least possible). And this pre-dates disk labels, so you have to learn 63 | about old-school partitioning schemes. 64 | 65 | So why not 2.10.1BSD? That might be possible, but is tricky: the system call 66 | interface changed radically betweent 2.10.1BSD and 2.11BSD, so initital attempts 67 | have hit roadblocks since a number of tool-chain components also changed formats. 68 | 69 | So there' sa lot ot do still to prove this out, and I need to write the paper to 70 | go along with it. 71 | 72 | -------------------------------------------------------------------------------- /apout.patch: -------------------------------------------------------------------------------- 1 | diff --git a/bsdtrap.c b/bsdtrap.c 2 | index 2c450d5..cf06364 100644 3 | --- a/bsdtrap.c 4 | +++ b/bsdtrap.c 5 | @@ -434,6 +434,8 @@ dostat: 6 | case S_CHOWN: /* DONE */ 7 | buf = xlate_filename((char *)&dspace[uarg1]); 8 | i = chown(buf, sarg2, sarg3); break; 9 | + case S_FCHOWN: /* DONE */ 10 | + i = fchown(sarg1, sarg2, sarg3); break; 11 | case S_PIPE: /* DONE */ 12 | i = pipe(pfd); 13 | #ifdef STREAM_BUFFERING 14 | -------------------------------------------------------------------------------- /doit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | date 6 | 7 | sh mk211bsd 8 | cp src.tap 195 9 | cd 195 10 | # Make a pristine 195 system... then bootstrap pl0 11 | expect 211bsd-195.expect 12 | expect 211bsd-pl0-test.expect 13 | # Boot 2.11pl0 to make the tape 14 | expect 211bsd-0-mk-tape.expect 15 | # automated 2.11pl0 install 16 | expect 211bsd-0-ts.expect 17 | 18 | date 19 | -------------------------------------------------------------------------------- /fetch-tuhs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # one time only fetch of the artifacts from TUHS needed for this to run will at 4 | # least get everything locally, may need to hack mk211bsd to point to a 5 | # different TUHS. Takes ~75MB of space, so please be kind to the tuhs mirror and 6 | # don't constantly fetch. 7 | 8 | TUHS=https://www.tuhs.org/Archive/ 9 | UCB=Distributions/UCB 10 | 11 | fetchone() ( 12 | file=$1 13 | dir=$(dirname $1) 14 | mkdir -p $dir 15 | chdir $dir 16 | wget ${TUHS}/$file 17 | ) 18 | 19 | fetchdir() ( 20 | dir=$1 21 | mkdir -p $dir 22 | chdir $dir 23 | wget ${TUHS}/$dir/* 24 | ) 25 | 26 | mkdir tuhs 27 | cd tuhs 28 | fetchone Distributions/Research/Henry_Spencer_v7/v7.tar.gz 29 | fetchone Distributions/Research/Dennis_v1/svntree-20081216.tar.gz 30 | fetchone $UCB/2.11BSD/root.afio.gz 31 | fetchone $UCB/2.11BSD-pl195.tar 32 | fetchone $UCB/2.10.1bsd.tar 33 | fetchone $UCB/4.3BSD/srcsys.tar.gz 34 | fetchone $UCB/4.3BSD/src.tar.gz 35 | ( # Official 2.11 Patches 36 | mkdir -p $UCB/2.11BSD/Patches 37 | cd $UCB/2.11BSD/Patches 38 | wget -L --mirror -nH --cut-dirs=5 https://www.tuhs.org/Archive/Distributions/UCB/2.11BSD/Patches/ -A '[0-9]*' 39 | ) 40 | ( # Usenet 2.10.1 patches for a few things 41 | mkdir -p Usenet/comp.bugs.2bsd 42 | cd Usenet/comp.bugs.2bsd 43 | fetch https://people.freebsd.org/~imp/comp.bugs.2bsd/1989-August.txt.gz 44 | fetch https://people.freebsd.org/~imp/comp.bugs.2bsd/1989-October.txt.gz 45 | fetch https://people.freebsd.org/~imp/comp.bugs.2bsd/1989-December.txt.gz 46 | ) 47 | ( # Not tuhs, but internet archive, to get a few missing bits 48 | mkdir -p archive.org 49 | cd archive.org 50 | fetch https://archive.org/download/usenet-comp/comp.bugs.2bsd.mbox.zip 51 | tar xvf comp.bugs.2bsd.mbox.zip 52 | ) 53 | -------------------------------------------------------------------------------- /gen211git: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | . vars 5 | 6 | # Generate the git repo for the 2.11BSD project. 7 | 8 | # Blow away old git repo 9 | [ -d $GITREPO ] && clean_tree $GITREPO 10 | mkdir -p $GITREPO 11 | 12 | # Initialize the repo 13 | chdir $GITREPO 14 | git init 15 | echo Patch-Level: -1 > PATCH-LEVEL 16 | git checkout -b 211bsd 17 | git add PATCH-LEVEL 18 | git commit -m"2.11BSD history reconstruction project, initial empty commit" 19 | 20 | # Copy the initial tree 21 | # This list is ugly, but not all the src is under /usr/src 22 | (cd $ROOT211; tar cf - GENALLSYS README VERSION dev etc \ 23 | usr/adm usr/lib usr/dict usr/doc usr/guest usr/hosts usr/include \ 24 | usr/pub usr/skel usr/spool usr/src) | tar xvf - 25 | 26 | # Note: XXX 27 | echo Patch-Level: 0 > PATCH-LEVEL 28 | git add * 29 | git commit -m"Import 2.11BSD, as released, as reconstructed" 30 | -------------------------------------------------------------------------------- /hints/0.unshar: -------------------------------------------------------------------------------- 1 | # touch some files to get the dates more correct, 2 | # though this is fraught. 3 | 4 | cd $ROOT211 5 | # We know that there's a bin/copyh that's been in the system a long time (but 6 | # not in 2.10.1). Newest tapes have this: Apr 20 20:22:25 1989 copyh 7 | touch -d 1989-04-20T20:22:25Z $ROOT211/bin/copyh 8 | 9 | # Awk has a temporal abnormality as well. Though the files aren't different 10 | # than 2.10.1, the 195 tape has dates in 1994 on them. Reset them back to 11 | # the 2.10.1BSD dates. It's unclear why they changed on this date, but 12 | # these are the more likely dates that 2.11 shipped with. 13 | # Ditto with two Makefiles that are otherwise identical 14 | # 4 -r--r--r-- 1 imp imp 1119 Dec 10 20:13:12 1988 Makefile 15 | # 4 -rw-r--r-- 1 imp imp 1305 Mar 13 08:24:32 1987 token.c 16 | # 4 -r--r--r-- 1 imp imp 733 Feb 26 01:17:24 1987 usr/src/lib/Makefile 17 | # 4 -r--r--r-- 1 imp imp 625 Aug 12 08:47:05 1988 usr/src/new/crash/Makefile 18 | touch -d 1988-12-10T20:13:12Z usr/src/bin/awk/Makefile 19 | touch -d 1987-03-13T08:24:32Z usr/src/bin/awk/token.c 20 | touch -d 1987-02-26T01:17:24Z usr/src/lib/Makefile 21 | touch -d 1988-09-12T08:47:05Z usr/src/new/crash/Makefile 22 | 23 | # lint was broken in 2.11BSD a bit. It used the 2.10.1 24 | # files because its regeneration wasn't automated. 25 | rm usr/lib/lint/*.ln 26 | rm usr/lib/lint/llib-ltermlib 27 | ln -s llib-termcap usr/lib/lint/llib-ltermlib 28 | cp -va $ROOT2101/usr/lib/lint/*.* usr/lib/lint 29 | 30 | # The 195 tape has wlonex entry, better to use the 2.10.1BSD one 31 | from2.10.1 usr/lib/uucp/L.sys 32 | 33 | # use the aliases file from 2.10.1. The date from the 2.11 reconstruction 34 | # is too new, but there's only one change. 35 | from2.10.1 usr/lib/aliases 36 | 37 | # There's more changes for crontab, but this is a reasonable reconstruction 38 | # since we don't have diffs for the original. 39 | from2.10.1 usr/lib/crontab 40 | -------------------------------------------------------------------------------- /hints/1.setup: -------------------------------------------------------------------------------- 1 | # patch 1 is relative to usr/src/bin, so cd there first 2 | cd $ROOT211/usr/src/bin 3 | -------------------------------------------------------------------------------- /hints/10.setup: -------------------------------------------------------------------------------- 1 | # patch 10 is relative to usr/ucb/Mail 2 | cd $ROOT211/usr/src/ucb/Mail 3 | -------------------------------------------------------------------------------- /hints/101.unshar: -------------------------------------------------------------------------------- 1 | # 101 adds less, remove it 2 | rm -rf $ROOT211/usr/src/local/less 3 | -------------------------------------------------------------------------------- /hints/102.unshar: -------------------------------------------------------------------------------- 1 | # 102 adds welcome, remove it 2 | rm -rf $ROOT211/usr/src/local/welcome 3 | -------------------------------------------------------------------------------- /hints/103.unshar: -------------------------------------------------------------------------------- 1 | # 103 adds popper, remove it 2 | rm -rf $ROOT211/usr/src/local/popper 3 | -------------------------------------------------------------------------------- /hints/106.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 106 patches a bunch of stuff after deleting some man pages and moving 3 | # some others. 4 | # 5 | # mv /usr/src/man/man6/battlestar.6 /usr/src/games/battlestar/battlestar.6 6 | # mv /usr/src/man/man6/sail.6 /usr/src/games/sail/sail.6 7 | # rm /usr/src/new/shar/getopt.3 8 | # rm /usr/src/etc/ftpd/getusershell.3 9 | # rm /usr/src/usr.lib/sendmail/aux/logger.1 10 | # rm /usr/src/usr.lib/sendmail/doc/mailaddr.7 11 | # rm /usr/src/usr.lib/sendmail/doc/sendmail.8 12 | # rm /usr/src/usr.lib/sendmail/aux/vacation.1 13 | # rm /usr/src/man/man8/tftpd.8 14 | cd $ROOT211 15 | patch -V none -R -p1 < $patch 16 | # move these back 17 | mv usr/src/games/battlestar/battlestar.6 usr/src/man/man6/battlestar.6 18 | mv usr/src/games/sail/sail.6 usr/src/man/man6/sail.6 19 | # copy these from the non-redundant location 20 | cp $(find . -name getopt.3) usr/src/new/shar/getopt.3 21 | cp $(find . -name getusershell.3) usr/src/etc/ftpd/getusershell.3 22 | cp $(find . -name logger.1) usr/src/usr.lib/sendmail/aux/logger.1 23 | cp $(find . -name mailaddr.7) usr/src/usr.lib/sendmail/doc/mailaddr.7 24 | cp $(find . -name sendmail.8) usr/src/usr.lib/sendmail/doc/sendmail.8 25 | cp $(find . -name vacation.1) usr/src/usr.lib/sendmail/aux/vacation.1 26 | cp $(find . -name tftpd.8) usr/src/man/man8/tftpd.8 27 | -------------------------------------------------------------------------------- /hints/11.setup: -------------------------------------------------------------------------------- 1 | # 11 2 | cd $ROOT211/usr/src/bin/make 3 | 4 | -------------------------------------------------------------------------------- /hints/118.unpatch: -------------------------------------------------------------------------------- 1 | # 2 | # 118 replaces ucb/Mail, so we snag the old one from 2.10.1 on 3 | # the theory that the main line development happened in 4BSD and 4 | # this wasn't updated in time for 2.11BSD release 5 | # 6 | cd $ROOT211 7 | find usr/src/ucb/Mail -type f | xargs rm 8 | mkdir usr/src/ucb/Mail/misc 9 | for i in $(cd $ROOT2101 ; find usr/src/ucb/Mail -type f); do 10 | from2.10.1 $i 11 | done 12 | cd usr/src/ucb/Mail 13 | # Patch 10 updates this file 14 | patch -V none -p1 < $PATCHDIR/10 15 | -------------------------------------------------------------------------------- /hints/12.setup: -------------------------------------------------------------------------------- 1 | # 12 2 | cd $ROOT211/usr/src/lib/cpp 3 | -------------------------------------------------------------------------------- /hints/121.unshar: -------------------------------------------------------------------------------- 1 | # 121 removes files created by 98 and replaces them. 2 | 3 | chdir $ROOT211 4 | rm $ROOT211/usr/src/sys/pdpif/if_qt.c 5 | rm $ROOT211/usr/src/sys/pdpif/if_qtreg.h 6 | 7 | # 8 | # Snag the files that this reapplaces from patch 98, which was a beta version of 9 | # this driver 10 | # 11 | sed -n -e'/\*\*\* .*if_qt.c.old/,/*\*\* .*\/if_uba.c.old/p' < $PATCHDIR/98 | patch -V none -p1 12 | 13 | # 14 | # While a placeholder qt driver was introduced in patch 98, it didn't work. I am 15 | # going to arbitrarily say the QT kernel config made no sense before here. This stops 16 | # us back-patching it and makes things a little easier. 17 | # XXX going forward, though, we might need to hack this to save off the current state 18 | # XXX so we can recover it since there doesn't appear to be any patches for this. 19 | # 20 | rm -rf usr/src/sys/QT usr/src/sys/conf/QT 21 | -------------------------------------------------------------------------------- /hints/122.unshar: -------------------------------------------------------------------------------- 1 | # 122 brings in rdump, so we need to reverse apply the patch and 2 | # then delete the new file. 3 | 4 | cd $TEMP 5 | sed -n -e '/^sed.*\/tmp\/c/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/c=$TEMP/patchfile=" | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | rm usr/src/etc/dump/dumprmt.c 9 | -------------------------------------------------------------------------------- /hints/123.fixup: -------------------------------------------------------------------------------- 1 | *** /usr/doc/2.10/setup.2.11/4.t.old Wed Dec 30 01:12:05 1992 2 | --- /usr/doc/2.10/setup.2.11/4.t Sat Feb 6 00:29:22 1993 3 | *************** 4 | *** 2,8 **** 5 | .\" All rights reserved. The Berkeley software License Agreement 6 | .\" specifies the terms and conditions for redistribution. 7 | .\" 8 | ! .\" @(#)4.t 2.1 (2.11BSD GTE) Feb 6, 1993 9 | .\" 10 | .de IR 11 | \fI\\$1\fP\|\\$2 12 | --- 2,8 ---- 13 | .\" All rights reserved. The Berkeley software License Agreement 14 | .\" specifies the terms and conditions for redistribution. 15 | .\" 16 | ! .\" @(#)4.t 2.0 (2.11BSD GTE) 12/30/92 17 | .\" 18 | .de IR 19 | \fI\\$1\fP\|\\$2 20 | -------------------------------------------------------------------------------- /hints/123.unpatch: -------------------------------------------------------------------------------- 1 | # Patch 123 updates the docs 2 | # It would appear that that changes to 4.t weren't included in the 3 | # patch, but are part of the patch 195 tape we have. Use this mechanism 4 | # to correct the SCCS id that's in the file. We don't know what else 5 | # changed, but things should be similar enough... 6 | # 7 | # Most of the changes to the OTHER chapters are minor / trivial. The dates of 8 | # the tag matches, so at most we're leaking just a tiny bit of tweaks... 9 | # We can look to the other patches to judge which, if any, of the large 10 | # number of diffs between 2.10 and 2.11 versions of this doc may have been 11 | # included here, but lost. 12 | cd $ROOT211 13 | patch -V none -p1 -R < $patch 14 | patch -V none -p1 < $HINTSDIR/123.fixup 15 | -------------------------------------------------------------------------------- /hints/124.unshar: -------------------------------------------------------------------------------- 1 | # 124 removes files and creates two patches. Reverse apply the patches and copy 2 | # the files from 2.10.1 3 | 4 | cd $TEMP 5 | sed -e '1,/================cut here/d' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -p1 -R < $TEMP/patch.conf 8 | patch -V none -p1 -R < $TEMP/patch.param.c 9 | for i in \ 10 | usr/src/lib/libc/gen/popen.c \ 11 | usr/src/lib/libc/gen/system.c \ 12 | usr/src/lib/libc/pdp/sys/wait.s \ 13 | usr/src/lib/libc/pdp/sys/wait3.s \ 14 | usr/src/man/man2/rtp.2 \ 15 | usr/src/man/man2/wait.2 \ 16 | usr/src/sys/sys/kern_rtp.c; do 17 | from2.10.1 $i 18 | done 19 | 20 | # Tweak name 21 | cp $ROOT2101/usr/src/lib/libc/pdp/com-2.9/rtp.s usr/src/lib/libc/pdp/compat-2.9/rtp.s 22 | echo "Recovering usr/src/lib/libc/pdp/com-2.9/rtp.s to usr/src/lib/libc/pdp/compat-2.9/rtp.sfrom 2.10.1BSD" >> $RECOVERY_LOG 23 | 24 | # Changes to the config / kernel need to be hand applied -- this duplicates what config 25 | # would have done, had we run it. We don't due to the overlay issues. 26 | # Add back the CGL_RTP line to the SMS config file 27 | sed -n -e '/conf.VAX/,/config.old/p;s=VAX=SMS=g' < $TEMP/patch.conf | patch -V none -p1 -R 28 | # Need to update Make.sys and param.c in GENERIC and SMS 29 | cp usr/src/sys/conf/Make.sys usr/src/sys/conf/param.c usr/src/sys/GENERIC 30 | cp usr/src/sys/conf/Make.sys usr/src/sys/conf/param.c usr/src/sys/SMS 31 | # Need to un-mix-in the changes to Make.nsunix, which is only relevant to SMS 32 | sed -n -e '/Make.nsunix/,/Make.sunix/p' < $TEMP/patch.conf | sed -e 's=/conf/Make.nsunix=/SMS/Makefile=' | patch -V none -p1 -R 33 | # Need to un-mix-in the changes to Make.sunix, which is only relevant to GENERIC 34 | sed -n -e '/Make.sunix/,/Make.sys/p' < $TEMP/patch.conf | sed -e 's=/conf/Make.sunix=/GENERIC/Makefile=' | patch -V none -p1 -R 35 | # Make.unix also changed, but nothing uses it 36 | -------------------------------------------------------------------------------- /hints/127.unshar: -------------------------------------------------------------------------------- 1 | # 127 creates some files, so just delete them 2 | 3 | for i in /usr/src/lib/libc/pdp/sys/wait4.s \ 4 | /usr/src/man/man2/wait.2 \ 5 | /usr/src/lib/libc/gen/popen.c \ 6 | /usr/src/lib/libc/gen/system.c \ 7 | /usr/src/lib/libc/gen/wait.c \ 8 | /usr/src/lib/libc/gen/wait3.c \ 9 | /usr/src/lib/libc/gen/waitpid.c; do 10 | rm $ROOT211/$i 11 | done 12 | -------------------------------------------------------------------------------- /hints/13.setup: -------------------------------------------------------------------------------- 1 | # 13 2 | cd $ROOT211/usr/src/sys/sys 3 | -------------------------------------------------------------------------------- /hints/132.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 132 replaces named/tools and has a patch, so undo the patch and just update 3 | # the tools from 2.10.1. The patch describes them as ancient, and 2.10.1 qualifies. 4 | # 5 | sed -e '1,/===cut here===/d' < $patch | sh -x 6 | uudecode c.tar.Z.uu 7 | rm c.tar.Z.uu 8 | uncompress c.tar.Z 9 | cd $ROOT211 10 | patch -V none -R -p1 < $TEMP/c.patch 11 | find usr/src/etc/named/tools -type f | xargs rm 12 | for i in $(cd $ROOT2101 ; find usr/src/etc/named/tools -type f); do 13 | from2.10.1 $i 14 | done 15 | # patch 76 fixes some stuff 16 | patch -V none -p1 < $PATCHDIR/76 17 | # Patch 108 makes some fixes to Makefile, so apply those in too so 108 undoes them 18 | sed -n -e'/\*\*\* .*\/tools\/Makefile.old/,/*\*\* .*\/restor\/Makefile.old/p' < $PATCHDIR/108 | patch -V none -p1 19 | # root.cache came in here. Replace it with the one from 1990 in the CSRG archives. 20 | cp $HINTSDIR/root.cache $ROOT211/usr/src/etc/named/master/root.cache 21 | -------------------------------------------------------------------------------- /hints/134.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 134 has a patch and a share that creates 3 | # /usr/src/lib/libc/pdp/crt/ultof.s 4 | # /usr/src/lib/libc/pdp/crt/ulsh.s 5 | # /usr/src/lib/libc/pdp/crt/ulrem.s 6 | # /usr/src/lib/libc/pdp/crt/uldiv.s 7 | # 8 | cd $ROOT211 9 | patch -V none -R -p1 < $patch 10 | rm $ROOT211/usr/src/lib/libc/pdp/crt/ultof.s 11 | rm $ROOT211/usr/src/lib/libc/pdp/crt/ulsh.s 12 | rm $ROOT211/usr/src/lib/libc/pdp/crt/ulrem.s 13 | rm $ROOT211/usr/src/lib/libc/pdp/crt/uldiv.s 14 | -------------------------------------------------------------------------------- /hints/136.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 136 The shar file creaets 5 patchs. Just apply them all. 3 | # 4 | sed -e '1,/---cut here---/d' < $patch | sh -x 5 | cd $ROOT211 6 | patch -V none -R -p1 < $TEMP/1 7 | patch -V none -R -p1 < $TEMP/5 8 | patch -V none -R -p1 < $TEMP/6 9 | patch -V none -R -p1 < $TEMP/14 10 | -------------------------------------------------------------------------------- /hints/137.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 137 The shar file creaets 5 patchs. Just apply them all. 3 | # 4 | sed -e '1,/---cut here---/d' < $patch | sh -x 5 | cd $ROOT211 6 | patch -V none -R -p1 < $TEMP/3 7 | patch -V none -R -p1 < $TEMP/4 8 | patch -V none -R -p1 < $TEMP/17 9 | patch -V none -R -p1 < $TEMP/18 10 | -------------------------------------------------------------------------------- /hints/14.unshar: -------------------------------------------------------------------------------- 1 | # 14 2 | # cd /usr/src/usr.bin 3 | # rm lint/* 4 | # zcat PORT/lint.tar.Z | tar xf - 5 | # cd lint 6 | # rm :yyfix llib-* 7 | # cp -p /tmp/libs libs 8 | # Then patch makefile, which is really 'take what's there, throw it away and..." so we just need 9 | # to un throw it away. The old stuff doesn't build w/o errors (warnings?), or run, so this is 10 | # our best guess. 11 | cd $ROOT211 12 | # restore all of lint from 2.10.1 13 | rm usr/src/usr.bin/lint/* 14 | for i in $(cd $ROOT2101 ; find usr/src/usr.bin/lint -type f); do 15 | from2.10.1 $i 16 | done 17 | -------------------------------------------------------------------------------- /hints/141.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 141 The shar file creaets 5 patchs. Just apply them all. 3 | # 4 | sed -e '1,/===cut here===/d' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 5 | cd $ROOT211 6 | patch -V none -R -p1 < $TEMP/23 7 | patch -V none -R -p1 < $TEMP/19 8 | -------------------------------------------------------------------------------- /hints/142.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 142 The shar file creaets 5 patchs. Just apply them all. 3 | # and there's instructions to make copies. Remove them instead 4 | # 5 | sed -e '1,/===cut here===/d' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/8 8 | patch -V none -R -p1 < $TEMP/9 9 | patch -V none -R -p1 < $TEMP/10 10 | patch -V none -R -p1 < $TEMP/11 11 | patch -V none -R -p1 < $TEMP/16 12 | rm $ROOT211/sys/pdp/libc_uldiv.s $ROOT211/sys/pdp/libc_ulsh.s 13 | # 14 | # The patch 142 instructions included: 15 | # 16 | # Then for *each* kernel you have configured on your system 17 | # (/sys/GENERIC is one, you probably have others such as 18 | # /sys/KNASE, /sys/FOO, and so on): 19 | # 20 | # cp /sys/conf/Make.pdp /sys/FOO/Make.pdp 21 | # ... 22 | # cp /sys/conf/Make.pdp /sys/GENERIC/Make.pdp 23 | # 24 | # Next you need to update the main 'Makefile' in each configured 25 | # kernel. See the file '16' below - that patch updates the 26 | # GENERIC 'Makefile', you need to do something similar to the 27 | # Makefile in /sys/FOO. You very likely can use the same patch 28 | # (cd /sys/FOO; patch < /tmp/16), all that you need to do is 29 | # add the line: 30 | # libc_uldiv.o libc_ulsh.o \ 31 | # after the line with 'libc_remque.o' in it. 32 | # 33 | # So we have to undo all that here... 34 | cd usr/src/sys 35 | # Copy Make.pdp 36 | for i in [A-Z]*; do 37 | case $i in 38 | OTHER) continue ;; 39 | esac 40 | cp conf/Make.pdp $i/Make.pdp 41 | done 42 | # And now patch the Makefile, generic already done above 43 | for i in [A-Z]*; do 44 | case $i in 45 | OTHER) continue ;; 46 | GENERIC) continue ;; 47 | esac 48 | [ -f $i/Makefile ] || continue 49 | echo Patching $i/Makefile 50 | (cd $i; patch -V none -R < $TEMP/16) 51 | done 52 | -------------------------------------------------------------------------------- /hints/143.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 143 The shar file creaets 5 patchs. Just apply them all. 3 | # 4 | sed -e '1,/===cut here===/d' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 5 | cd $ROOT211 6 | patch -V none -R -p1 < $TEMP/22 7 | patch -V none -R -p1 < $TEMP/12 8 | patch -V none -R -p1 < $TEMP/2 9 | patch -V none -R -p1 < $TEMP/13 10 | patch -V none -R -p1 < $TEMP/20 11 | -------------------------------------------------------------------------------- /hints/149.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 151 has a patch and a new file. Just need to apply it backwards and remove the new file. 4 | rm $ROOT211/usr/src/bin/mkdir.c $ROOT211/usr/src/man/man1/mkdir.1 5 | from2.10.1 usr/src/bin/mkdir.c usr/src/man/man1/mkdir.1 6 | -------------------------------------------------------------------------------- /hints/15.setup: -------------------------------------------------------------------------------- 1 | cd $ROOT211/usr/src/usr.lib/sendmail/src 2 | -------------------------------------------------------------------------------- /hints/151.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 151 has a patch and a new file. Just need to apply it backwards and remove the new file. 4 | cd $TEMP 5 | sed -n -e '/^sed.*\/tmp\/c/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/c=$TEMP/patchfile=" | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | rm $ROOT211/usr/src/sys/pdpstand/toyset.s 9 | -------------------------------------------------------------------------------- /hints/152.fixup: -------------------------------------------------------------------------------- 1 | --- /usr/src/bin/as/as19.s~ 2020-06-05 19:56:36.998209000 -0600 2 | +++ /usr/src/bin/as/as19.s 2020-06-05 21:08:14.848339000 -0600 3 | @@ -193,7 +193,6 @@ 4 | ; 01;0000262 5 | ; 01;0000264 6 | ; 01;0000270 7 | -; 01;0000240 8 | ; 01;0000000 9 | ; 01;0000001 10 | ; 01;0000004 11 | --- /usr/src/bin/as/as29.s~ 2020-06-05 19:56:37.006342000 -0600 12 | +++ /usr/src/bin/as/as29.s 2020-06-05 21:08:26.231997000 -0600 13 | @@ -160,7 +160,6 @@ 14 | 01;0000262 /sev 15 | 01;0000264 /sez 16 | 01;0000270 /sen 17 | -01;0000240 /nop 18 | 01;0000000 /halt 19 | 01;0000001 /wait 20 | 01;0000004 /iot 21 | -------------------------------------------------------------------------------- /hints/152.unpatch: -------------------------------------------------------------------------------- 1 | # Patch 152 and 153 do a lot of work with the assembler. 2 | # It is combined into just 2 files, then patched. Going 3 | # backwards, we'll just copy the 2.10.1 stuff and see if 4 | # it works going back foward and adjust as needed. 5 | # 6 | # So here, we remove as0.s, and copy all the as1?.s 7 | # files. 8 | mkdir -p ${SAVE}/152 9 | rm $ROOT211/usr/src/bin/as/as0.s 10 | for i in 1 2 3 4 5 6 7 8 9; do 11 | from2.10.1 usr/src/bin/as/as1${i}.s 12 | done 13 | # Maybe I should snag the patch from 152 for just Makefile, but 14 | # I'm lazy atm. 15 | from2.10.1 usr/src/bin/as/Makefile 16 | 17 | cd $ROOT211 18 | # Before we start to recover using the changes post 2.11, we need to do the ones between 2.10.1 19 | # and 2.11. These were posted in comp.bugs.2bsd (which the release notes say were applied to 20 | # 2.11). 21 | # 22 | # One bug from 23 Aug 89 fixes nops 23 | # Message-ID: <35363@wlbr.IMSD.CONTEL.COM> 24 | # One bug from 15 Dec 89 fixing 1st phase of assembler not being split I/D friendly 25 | # Message-ID: <42590@wlbr.IMSD.CONTEL.COM> 26 | # One bug from 26 Dec 89 fixes 2nd phase of assembler not being split I/D friendly 27 | # Message-ID: <43068@wlbr.IMSD.CONTEL.COM> 28 | # 29 | # We re-apply them in date order, even though they appear to be backwards in the archive. 30 | ( 31 | cd usr/src/bin/as 32 | 33 | # Message-ID: <35363@wlbr.IMSD.CONTEL.COM> 34 | zcat $TUHS/Usenet/comp.bugs.2bsd/1989-August.txt.gz | \ 35 | sed -n -e '/Index:.bin\/as 2.10BSD/,/^From /p' | \ 36 | patch -V none -p1 37 | 38 | # Message-ID: <42590@wlbr.IMSD.CONTEL.COM> 39 | zcat $TUHS/Usenet/comp.bugs.2bsd/1989-December.txt.gz | \ 40 | sed -n -e '/Index:.bin\/as\/as1\?\.s 2.10BSD/,/^From /p' | \ 41 | patch -V none -p1 42 | 43 | # Message-ID: <43068@wlbr.IMSD.CONTEL.COM> 44 | zcat $TUHS/Usenet/comp.bugs.2bsd/1989-December.txt.gz | \ 45 | sed -n -e '/Index:.bin\/as\/as2\?\.s 2.10BSD/,/^From /p' | \ 46 | patch -V none -p1 47 | ) 48 | 49 | # The August 1989 patch added nop. The nop was already in the table in the wrong 50 | # place, so it needs to be removed to recover what was released in 2.11 51 | patch -V none -p1 < $HINTSDIR/152.fixup 52 | 53 | # 65 patches both as1 and as2 files, so do them both here. Going the other way 54 | # it will be fine so we don't need to be perfect. 55 | patch -V none -p1 < $PATCHDIR/65 56 | 57 | # 71 patches both as1 and as2 files, so do them both here. Going the other way 58 | # it will be fine so we don't need to be perfect. 59 | patch -V none -p1 < $PATCHDIR/71 60 | 61 | # Patch 107 makes some fixes to Makefile, so apply those in too so 107 undoes 62 | # them. 63 | sed -n -e'/\*\*\* .*\/as\/Makefile.old/,/*\*\* .*\/awk\/Makefile.old/p' < $PATCHDIR/107 | patch -V none -p1 64 | 65 | cp $ROOT211/usr/src/bin/as/* ${SAVE}/152 66 | -------------------------------------------------------------------------------- /hints/153.unpatch: -------------------------------------------------------------------------------- 1 | # Patch 152 and 153 do a lot of work with the assembler. 2 | # It is combined into just 2 files, then patched. Going 3 | # backwards, we'll just copy the 2.10.1 stuff and see if 4 | # it works going back foward and adjust as needed. 5 | # 6 | # See 152.unpatch 7 | # 8 | # So here, we remove as2.s, and copy all the as2?.s 9 | # files. 10 | # 11 | # Save p153 version for comparison 12 | mkdir -p ${SAVE}/153 13 | cp $ROOT211/usr/src/bin/as/* ${SAVE}/153 14 | rm $ROOT211/usr/src/bin/as/as2.s 15 | for i in 1 2 3 4 5 6 7 8 9; do 16 | from2.10.1 usr/src/bin/as/as2${i}.s 17 | done 18 | -------------------------------------------------------------------------------- /hints/154.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 154 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # It also creates: 5 | # /usr/src/usr.lib/libvmf/* 6 | # /usr/include/vmf.h 7 | # /usr/src/include/vmf.h 8 | # so remove those too 9 | cd $TEMP 10 | sed -n -e '/^sed.*vmf.patch/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 11 | cd $ROOT211 12 | patch -V none -R -p1 < $TEMP/vmf.patch 13 | rm -rf usr/src/usr.lib/libvmf usr/include/vmf.h usr/src/include/vmf.h 14 | -------------------------------------------------------------------------------- /hints/158.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 158 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # It also does: 5 | # rm -f /usr/include/a.out.h 6 | # rm -f /usr/include/nlist.h 7 | # rm -f /usr/include/ar.h 8 | # rm -f /usr/include/ranlib.h 9 | # rm -f /usr/include/short_names.h 10 | # It also creates: 11 | # /usr/include/a.out.h 12 | # /usr/include/nlist.h 13 | # /usr/include/ar.h 14 | # /usr/include/ranlib.h 15 | # So we can just copy over stuff from 2.10.1BSD or 4.3BSD and not worry about removal. 16 | cd $TEMP 17 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 18 | cd $ROOT211 19 | patch -V none -R -p1 < $TEMP/patchfile 20 | for i in a.out.h nlist.h short_names.h; do 21 | from2.10.1 usr/include/$i 22 | cp -f $ROOT211/usr/include/$i $ROOT211/usr/src/include 23 | done 24 | # But we have concluded that ar and ranlib, at least, came from 4.3BSD in the 2.11BSD 25 | # release for the transition to portable archive format. a.out didn't change from 26 | # 2.10.1 to 2.11, but did change in this series of patches, so we should grab it from 27 | # 2.10.1. 28 | echo "Recovering from 4.3 now" 29 | for i in ar.h ranlib.h; do 30 | from4.3 usr/src/include/$i 31 | cp -f $ROOT211/usr/src/include/$i $ROOT211/usr/include 32 | done 33 | -------------------------------------------------------------------------------- /hints/159.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 159 creates a 2 patch filse you are expected to apply. So extract it and reverse apply. 4 | # Fun twist: they are uuencoded and compressed! 5 | cd $TEMP 6 | sed -e '1,/================cut here/d' < $patch | sh -x 7 | uudecode patchfile1.Z.uu 8 | rm patchfile1.Z.uu 9 | uncompress patchfile1.Z 10 | uudecode patchfile2.Z.uu 11 | rm patchfile2.Z.uu 12 | uncompress patchfile2.Z 13 | cd $ROOT211 14 | patch -V none -R -p1 < $TEMP/patchfile1 15 | patch -V none -R -p1 < $TEMP/patchfile2 16 | # 17 | # Patch 159 has the following instructions: 18 | # 19 | # 5) Several of the files are examples, you need to update any 20 | # local files: 21 | # 22 | # /sys/YOUR_KERNELS/Makefile 23 | # /sys/YOUR_KERNELS/SPLFIX 24 | # /sys/YOUR_KERNELS/NETSPLFIX 25 | # 26 | # Use the patches in the patchfile{1,2} as guides (you will probably 27 | # be able to use them directly). 28 | # 29 | # The changes to the kernel Makefile are to run the 'symorder', 30 | # 'symcompact' and 'strcompact' programs after linking the kernel. 31 | # 32 | # The changes to the SPLFIX and NETSPLFIX scripts deal with the 33 | # longer symbol names ('splclock' was previously truncated to 34 | # 'splcloc' for example). If you do not edit the SPL scripts 35 | # you will have undefined symbols during a kernel recompile. 36 | # 37 | # The change to the GENERIC kernel config file was to increase 38 | # the number of MSCP controllers from 1 to 2. Very useful for 39 | # disaster recovery if more than one MSCP controller is present. 40 | # 41 | # Of course it is possible to simply delete your current kernel 42 | # build directory and re-run the 'config' script again. This 43 | # will set up the Makefile and SPL scripts for you. 44 | # 45 | # Which is a long way of saying that we need to copy over Make.bdp, patch Makefile 46 | # and update SPLFIX and NETSPLFIX. The SMS and QT kernels use the same thing, so 47 | # we hack it a bit. 48 | cd usr/src/sys 49 | # Copy Make.pdp 50 | for i in [A-Z]*; do 51 | case $i in 52 | OTHER) continue ;; 53 | GENERIC) continue ;; 54 | esac 55 | cp conf/Make.pdp $i/Make.pdp 56 | cp conf/spl/:splfix.movb+mfps $i/NETSPLFIX 57 | cp conf/spl/:splfix.mfps $i/SPLFIX 58 | done 59 | # And now patch the Makefile, generic already done above 60 | for i in [A-Z]*; do 61 | case $i in 62 | OTHER) continue ;; 63 | GENERIC) continue ;; 64 | esac 65 | [ -f $i/Makefile ] || continue 66 | echo Patching $i/Makefile 67 | (cd $i; sed -ne '/Makefile/,/FRC/p' < $TEMP/patchfile2 | patch -V none -R) 68 | done 69 | -------------------------------------------------------------------------------- /hints/16.unpatch: -------------------------------------------------------------------------------- 1 | # To apply the following patch: 2 | # 3 | # 1) cd /usr/src/lib 4 | # 2) rm mip/* 5 | # 3) zcat PORT/mip.tar.Z | tar xf - 6 | # 4) cd mip 7 | # 5) patch < the_patch_below 8 | # 9 | # So to unapply, I have to rm stuff 10 | rm $ROOT211/usr/src/lib/mip/* 11 | for i in $(cd $ROOT2101 ; find usr/src/lib/mip -type f); do 12 | from2.10.1 $i 13 | done 14 | -------------------------------------------------------------------------------- /hints/160.ld.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/bin/ld.c+ 1988-08-14 02:09:04.000000000 -0600 2 | +++ /usr/src/bin/ld.c 2020-06-24 20:42:07.847200000 -0600 3 | @@ -254,6 +254,7 @@ 4 | long ladd(); 5 | int delexit(); 6 | long lseek(); 7 | +long atol(); 8 | char *savestr(); 9 | char *malloc(); 10 | char *mktemp(); 11 | @@ -542,9 +543,10 @@ 12 | case 1: 13 | error(-1, 14 | "warning: archive has no table of contents; add one using ranlib(1)"); 15 | - nloc = 1; 16 | + nloc = SARMAG >> 1; 17 | while (step(nloc)) 18 | - nloc += (archdr.ar_size + sizeof(archdr) + 1) >> 1; 19 | + nloc += (sizeof(archdr) + 20 | + atol(archdr.ar_size) + 1) >> 1; 21 | break; 22 | 23 | /* 24 | @@ -555,17 +557,16 @@ 25 | * when there is a table of contents!) 26 | */ 27 | case 2: 28 | - tnum = archdr.ar_size / sizeof(struct tab); 29 | + tnum = atol(archdr.ar_size) / sizeof(struct tab); 30 | if (tnum >= TABSZ) 31 | error(1, "toc buffer too small"); 32 | - lseek(infil, (long)(sizeof(filhdr.a_magic) + sizeof(archdr)), 0); 33 | + lseek(infil, (long)(SARMAG + sizeof(archdr)), 0); 34 | read(infil, (char *)tab, tnum * sizeof(struct tab)); 35 | while (ldrand()) 36 | - ; 37 | + continue; 38 | libp->loc = -1; 39 | libp++; 40 | break; 41 | - 42 | /* 43 | * Table of contents is out of date, so search 44 | * as a normal library (but skip the __.SYMDEF file). 45 | @@ -573,9 +574,10 @@ 46 | case 3: 47 | error(-1, 48 | "warning: table of contents for archive is out of date; rerun ranlib(1)"); 49 | - for (nloc = 1 + ((archdr.ar_size + sizeof(archdr) + 1) >> 1); 50 | - step(nloc); 51 | - nloc += (archdr.ar_size + sizeof(archdr) + 1) >> 1); 52 | + nloc = SARMAG >> 1; 53 | + do 54 | + nloc += (sizeof(archdr) + atol(archdr.ar_size)) >> 1; 55 | + while (step(nloc)); 56 | break; 57 | } 58 | close(infil); 59 | @@ -913,7 +915,7 @@ 60 | } else { /* scan archive members referenced */ 61 | for (lp = libp; lp->loc != -1; lp++) { 62 | dseek(&text, lp->loc, sizeof archdr); 63 | - mget((int *)&archdr, sizeof archdr); 64 | + getarhdr(); 65 | mkfsym(archdr.ar_name); 66 | load2(lp->loc + (sizeof archdr) / 2); 67 | } 68 | @@ -1091,7 +1093,8 @@ 69 | { 70 | register u_int n, *p; 71 | register SYMBOL *sp, *symp; 72 | - 73 | + long before, after; 74 | + 75 | if (numov) { 76 | /* int aovno = adrof("__ovno"); XXX KB */ 77 | int aovhndlr[NOVL+1]; 78 | @@ -1127,6 +1130,9 @@ 79 | copy(&troutb); 80 | copy(&droutb); 81 | } 82 | + 83 | + flush(&toutb); 84 | + before = lseek(toutb.fildes , 0L, 1); 85 | if (sflag==0) { 86 | if (xflag==0) 87 | copy(&soutb); 88 | @@ -1146,7 +1152,27 @@ 89 | p++; 90 | } 91 | } 92 | +/* 93 | + * the following is a workaround ("kludge") to insure that the 94 | + * correct size of the symbol table is written to the header. this 95 | + * was occasioned by noticing that the value of a_syms for /unix showed 96 | + * 0115200 (39552) instead of 0115544 (39780). somewhere 19 symbols were 97 | + * not being counted - (oh where oh where have the symbols gone...?;-)) 98 | + * but they were being written out! Granted, it is not proper to 99 | + * treat the symptom instead of the problem, but this works, and if you 100 | + * fix it for real i'd like a copy of ld.c - Steven M. Schultz 101 | + * 102 | + * I really think this should be calculated anyhow, makes as much sense 103 | + * as trying to maintain counts everywhere else. 104 | +*/ 105 | + 106 | flush(&toutb); 107 | + after = lseek(toutb.fildes, 0L, 1); 108 | + lseek(toutb.fildes, 0L, 0); 109 | + read(toutb.fildes, &filhdr, sizeof (filhdr)); 110 | + filhdr.a_syms = after - before; 111 | + lseek(toutb.fildes, 0L, 0); 112 | + write(toutb.fildes, &filhdr, sizeof (filhdr)); 113 | close(toutb.fildes); 114 | if (!ofilfnd) { 115 | unlink("a.out"); 116 | @@ -1171,6 +1197,18 @@ 117 | 118 | } 119 | 120 | +getarhdr() 121 | +{ 122 | + register char *cp; 123 | + 124 | + mget((char *)&archdr, sizeof archdr); 125 | + for (cp=archdr.ar_name; cp<&archdr.ar_name[sizeof(archdr.ar_name)];) 126 | + if (*cp++ == ' ') { 127 | + cp[-1] = 0; 128 | + return; 129 | + } 130 | +} 131 | + 132 | mget(aloc, an) 133 | int *aloc; 134 | { 135 | @@ -1251,6 +1289,7 @@ 136 | getfile(acp) 137 | char *acp; 138 | { 139 | + char arcmag[SARMAG+1]; 140 | struct stat stb; 141 | 142 | archdr.ar_name[0] = '\0'; 143 | @@ -1266,18 +1305,20 @@ 144 | page[0].nuser = page[1].nuser = 0; 145 | text.pno = reloc.pno = (PAGE *)&fpage; 146 | fpage.nuser = 2; 147 | - dseek(&text, 0L, 2); 148 | + dseek(&text, 0L, SARMAG); 149 | if (text.size <= 0) 150 | error(1, "premature EOF"); 151 | - if (get(&text) != ARMAG) 152 | - return (0); /* regular file */ 153 | - dseek(&text, 1L, sizeof archdr); /* word addressing */ 154 | + mget((char *)arcmag, SARMAG); 155 | + arcmag[SARMAG] = 0; 156 | + if (strcmp(arcmag, ARMAG)) 157 | + return (0); 158 | + dseek(&text, (long)SARMAG>>1, sizeof archdr); /* word addressing */ 159 | if (text.size <= 0) 160 | - return (1); /* regular archive */ 161 | - mget((int *)&archdr, sizeof archdr); 162 | + return (1); 163 | + getarhdr(); 164 | if (strncmp(archdr.ar_name, "__.SYMDEF", sizeof(archdr.ar_name)) != 0) 165 | - return (1); /* regular archive */ 166 | - return (stb.st_mtime > archdr.ar_date ? 3 : 2); 167 | + return (1); 168 | + return (stb.st_mtime > atol(archdr.ar_date) ? 3 : 2); 169 | } 170 | 171 | /* 172 | -------------------------------------------------------------------------------- /hints/160.unshar: -------------------------------------------------------------------------------- 1 | # 160 creates a patch file you are expected to apply. So extract it and reverse apply. 2 | # It also does: 3 | # rm -f /usr/src/bin/csh/shortnames.h 4 | # rm -f /usr/src/bin/ar.c 5 | # rm -f /usr/src/bin/ld.c 6 | # rm -f /usr/src/bin/adb/dummy.c /usr/src/bin/adb/mac.h 7 | # rm -f /usr/src/bin/adb/machine.h /usr/src/bin/adb/mode.h 8 | # rm -rf /usr/src/bin/nm rm /usr/src/bin/ld /usr/src/bin/ar 9 | # mkdir /usr/src/bin/nm /usr/src/bin/ld /usr/src/bin/ar 10 | # chmod 755 /usr/src/bin/nm /usr/src/bin/ld /usr/src/bin/ar 11 | # mv /usr/src/bin/nm.c /usr/src/bin/nm/nm.c 12 | # So add them back from 2.10.1BSD, remove dirs or move nm.c back 13 | cd $TEMP 14 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 15 | cd $ROOT211 16 | patch -V none -R -p1 < $TEMP/patchfile 17 | # need to move this AFTER because the patch patches it in the new place. 18 | mv $ROOT211/usr/src/bin/nm/nm.c $ROOT211/usr/src/bin/nm.c 19 | rm -rf $ROOT211/usr/src/bin/nm 20 | 21 | for i in csh/shortnames.h ld.c adb/dummy.c adb/mac.h adb/machine.h adb/mode.h; do 22 | from2.10.1 usr/src/bin/$i 23 | done 24 | 25 | from4.3 usr/src/bin/ar.c 26 | 27 | # There's one known patch to ld.c that is post 2.10.1 that appeared 28 | # in comp.bugs.2bsd: 29 | # From: sms at wlv.imsd.contel.com (Steven M. Schultz) 30 | # Date: 2 Aug 89 05:40:21 GMT 31 | # Subject: ld symboltable size is wrong 32 | # Message-ID: <34359@wlbr.IMSD.CONTEL.COM> 33 | # 34 | # Index: bin/ld.c 2.10BSD 35 | # extract it and apply. 36 | ##cd $ROOT211/usr/src/bin 37 | ##zcat $TUHS/Usenet/comp.bugs.2bsd/1989-August.txt.gz | \ 38 | ## sed -n -e '/^Index:.*bin\/ld.c/,/^==========/p' | patch -V none -p1 39 | # ld.diff is the putative diffs between 2.10.1 and 2.11, but it's not quite 40 | # right because the offsets aren't quite right. It's closer, but untested. 41 | cd $ROOT211 42 | patch -V none -p1 < $HINTSDIR/160.ld.diff 43 | # And because ld.c was 2.11 pl 141 apply it in as well 44 | cd $TEMP 45 | sed -e '1,/===cut here===/d' < $PATCHDIR/141 | sed -e "s=/tmp/=$TEMP/=" | sh -x 46 | cd $ROOT211 47 | patch -V none -p1 < $TEMP/19 48 | # 23 also in this arcive patches ld.1, which we're not recoverying from 2.10.1 49 | -------------------------------------------------------------------------------- /hints/161.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 161 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/162.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 164 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/163.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 163 creates ld and ar, so we need to remove them. 4 | cd $ROOT211 5 | rm -rf $ROOT211/usr/src/bin/ar $ROOT211/usr/src/bin/ld 6 | -------------------------------------------------------------------------------- /hints/164.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 164 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # It also removes: 5 | # rm -f /usr/src/etc/named/tools/nslookup/shortnames.h 6 | # rm -f /usr/src/etc/named/named/shortnames.h 7 | # rm -f /usr/src/etc/talkd/shortnames.h 8 | # So add them back from 2.10.1BSD 9 | cd $TEMP 10 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 11 | cd $ROOT211 12 | patch -V none -R -p1 < $TEMP/patchfile 13 | from2.10.1 usr/src/etc/named/tools/nslookup/shortnames.h usr/src/etc/named/named/shortnames.h usr/src/etc/talkd/shortnames.h 14 | -------------------------------------------------------------------------------- /hints/165.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 165 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/166.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 166 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/167.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 168 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # Also, it cretes 5 | # /usr/src/lib/libc/gen/nlist.c 6 | # /usr/src/lib/libc/pdp/gen/nsym.c 7 | # and removes 8 | # /usr/src/lib/libc/gen/nlist.c 9 | # /usr/src/lib/libc/gen/nsym.c 10 | # 11 | # nsym.c didn't appear to be there before. It's not in any makefiles before this, 12 | # not in 2.10.1. the new nsym.c is added in the right place, and it's added to the 13 | # right makefile, and nsym.c isn't removed from a different makefile. 14 | cd $TEMP 15 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 16 | cd $ROOT211 17 | patch -V none -R -p1 < $TEMP/patchfile 18 | rm $ROOT211/usr/src/lib/libc/gen/nlist.c 19 | rm $ROOT211/usr/src/lib/libc/pdp/gen/nsym.c 20 | from2.10.1 usr/src/lib/libc/gen/nlist.c 21 | -------------------------------------------------------------------------------- /hints/168.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 168 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | -------------------------------------------------------------------------------- /hints/169.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 169 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | # Also creates three new files: 5 | # /usr/src/man/man1/symorder.1 6 | # /usr/src/man/man1/strcompact.1 7 | # /usr/src/man/man1/symcompact.1 8 | # so delete them to go back... 9 | cd $TEMP 10 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 11 | cd $ROOT211 12 | patch -V none -R -p1 < $TEMP/patchfile 13 | rm $ROOT211/usr/src/man/man1/symorder.1 14 | rm $ROOT211/usr/src/man/man1/strcompact.1 15 | rm $ROOT211/usr/src/man/man1/symcompact.1 16 | -------------------------------------------------------------------------------- /hints/17.unshar: -------------------------------------------------------------------------------- 1 | # 17 2 | # we remove INDEX :rofix fort.h.vax 3 | # cd /usr/src/lib/pcc 4 | # rm INDEX :rofix fort.h.vax 5 | # cp /tmp/stab.c . 6 | # mv macdefs macdefs.h 7 | # mv mac2defs mac2defs.h 8 | # cd .. 9 | # zcat PORT/pcc.tar.Z | tar xvf - pcc/localdefs.h pcc/DEBUGS pcc/INFO 10 | # 11 | sed -n -e '/^sed.*\/tmp\/c/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/c=$TEMP/patchfile=" | sh -x 12 | cd $ROOT211 13 | for i in INDEX :rofix fort.h.vax; do 14 | from2.10.1 usr/src/lib/pcc/$i 15 | done 16 | cd usr/src/lib/pcc/ 17 | patch -V none -p1 -R 1 && strcmp(argv[1], "-t") == 0) { 14 | + just_touch++; 15 | + argc--; 16 | + argv++; 17 | + } 18 | + 19 | --argc; 20 | while(argc--) { 21 | fi = fopen(*++argv,"r"); 22 | @@ -48,6 +56,25 @@ 23 | fprintf(stderr, "archive: %s\n", *argv); 24 | continue; 25 | } 26 | + if (just_touch) { 27 | + register int len; 28 | + 29 | + fseek(fi, (long) sizeof (exp.a_magic), 0); 30 | + if (fread(buf, sizeof arp.ar_name, 1, fi) != 1) { 31 | + fprintf(stderr, "malformed archive: %s\n", 32 | + *argv); 33 | + continue; 34 | + } 35 | + len = strlen(tempnm); 36 | + if (bcmp(buf, tempnm, len) != 0 || 37 | + buf[len] != '\0') { 38 | + fprintf(stderr, "no symbol table: %s\n", *argv); 39 | + continue; 40 | + } 41 | + fclose(fi); 42 | + fixdate(*argv); 43 | + continue; 44 | + } 45 | fseek(fi, (long)SARMAG, 0); 46 | new = tnum = 0; 47 | if(nextel(fi) == 0) 48 | -------------------------------------------------------------------------------- /hints/173.ranlib.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/usr.bin/ranlib.c- 1987-03-11 20:41:22.000000000 -0700 2 | +++ /usr/src/usr.bin/ranlib.c 2020-07-14 05:38:03.523560000 -0600 3 | @@ -19,11 +19,17 @@ 4 | char tempnm[] = "__.SYMDEF"; 5 | char firstname[17]; 6 | long offdelta; 7 | +long arsize; 8 | +long atol(); 9 | +#define OARMAG 0177545 10 | 11 | main(argc, argv) 12 | char **argv; 13 | { 14 | char buf[256]; 15 | + /* magbuf must be an int array so it is aligned on an int-ish 16 | + boundary, so that we may access its first word as an int! */ 17 | + int magbuf[(SARMAG+sizeof(int))/sizeof(int)]; 18 | 19 | --argc; 20 | while(argc--) { 21 | @@ -32,13 +38,17 @@ 22 | fprintf(stderr, "nm: cannot open %s\n", *argv); 23 | continue; 24 | } 25 | - off = sizeof(exp.a_magic); 26 | - fread((char *)&exp, 1, sizeof(MAGIC), fi); /* get magic no. */ 27 | - if (MAGIC != ARMAG) 28 | - { fprintf(stderr, "not archive: %s\n", *argv); 29 | + off = SARMAG; 30 | + fread((char *)magbuf, 1, SARMAG, fi); 31 | + if (strncmp((char *)magbuf, ARMAG, SARMAG)) { 32 | + if (magbuf[0] == OARMAG) 33 | + fprintf(stderr, "old format "); 34 | + else 35 | + fprintf(stderr, "not an "); 36 | + fprintf(stderr, "archive: %s\n", *argv); 37 | continue; 38 | } 39 | - fseek(fi, 0L, 0); 40 | + fseek(fi, (long)SARMAG, 0); 41 | new = tnum = 0; 42 | if(nextel(fi) == 0) 43 | { fclose(fi); 44 | @@ -102,15 +112,20 @@ 45 | FILE *af; 46 | { 47 | register r; 48 | + char *cp; 49 | 50 | oldoff = off; 51 | fseek(af, off, 0); 52 | r = fread((char *)&arp, 1, sizeof(struct ar_hdr), af); /* read archive header */ 53 | if (r <= 0) 54 | return(0); 55 | - if (arp.ar_size & 1) 56 | - ++arp.ar_size; 57 | - off = ftell(af) + arp.ar_size; /* offset to next element */ 58 | + for (cp=arp.ar_name; cp < & arp.ar_name[sizeof(arp.ar_name)]; cp++) 59 | + if (*cp == ' ') 60 | + *cp = '\0'; 61 | + arsize = atol(arp.ar_size); 62 | + if (arsize & 1) 63 | + ++arsize; 64 | + off = ftell(af) + arsize; /* offset to next element */ 65 | return(1); 66 | } 67 | 68 | @@ -129,15 +144,15 @@ 69 | fixsize() 70 | { int i; 71 | offdelta = tnum * sizeof(struct tab) + sizeof(arp); 72 | - off = sizeof(MAGIC); 73 | + off = SARMAG; 74 | nextel(fi); 75 | - if(strncmp(arp.ar_name, tempnm, 14) == 0) 76 | + if(strncmp(arp.ar_name, tempnm, sizeof(arp.ar_name)) == 0) 77 | { new = 0; 78 | - offdelta -= sizeof(arp) + arp.ar_size; 79 | + offdelta -= sizeof(arp) + arsize; 80 | } 81 | else 82 | { new = 1; 83 | - strncpy(firstname, arp.ar_name, 14); 84 | + strncpy(firstname, arp.ar_name, sizeof(arp.ar_name)); 85 | } 86 | for(i=0; i 22 | # But there's a conflict, so i've cached a hand-applied version. 23 | patch -V none -p1 < $HINTSDIR/173.ranlib-2.diff 24 | -------------------------------------------------------------------------------- /hints/174.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 174 creates a patch file you are expected to apply. So extract it and reverse apply. 4 | cd $TEMP 5 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $patch | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/patchfile 8 | # Patch 174 is missing one chunk for sendmail.MX/src/daemon.c, so dig that out of patchfile and apply it. 9 | sed -ne '/sendmail.src.daemon.c.old/,/sendmail.src.conf.h.old/p' < $TEMP/patchfile | \ 10 | sed -e 's=/sendmail/=/sendmail.MX/=' | patch -V none -R -p1 11 | -------------------------------------------------------------------------------- /hints/175.fixup: -------------------------------------------------------------------------------- 1 | Generated by: 2 | sed -n -e '/^sed.*patchfile/,/^SHAR_EOF/p' < $PATCHDIR/158 | sh 3 | sed -e '/^\*\*\* .*Makefile.old/,$d;s=/usr/include/=/usr/src/include/=' < $TEMP/patchfile > $TEMP/p2 4 | And then tweaked to actually work. 5 | 6 | *** /usr/src/include/arpa/inet.h.old Sun Jun 13 22:50:39 1993 7 | --- /usr/src/include/arpa/inet.h Fri Dec 31 21:53:27 1993 8 | *************** 9 | *** 14,20 **** 10 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 11 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12 | * 13 | ! * @(#)inet.h 5.2.1 (2.11BSD GTE) 6/12/93 14 | */ 15 | 16 | /* 17 | --- 14,20 ---- 18 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 19 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 20 | * 21 | ! * @(#)inet.h 5.2.2 (2.11BSD GTE) 12/31/93 22 | */ 23 | 24 | /* 25 | *************** 26 | *** 21,30 **** 27 | * External definitions for 28 | * functions in inet(3N) 29 | */ 30 | - #ifdef BSD2_10 31 | - #include /* Hopefully this will go away soon */ 32 | - #endif 33 | 34 | unsigned long inet_addr(); 35 | char *inet_ntoa(); 36 | struct in_addr inet_makeaddr(); 37 | --- 21,27 ---- 38 | *** /usr/src/include/arpa/nameser.h.old Mon Apr 26 19:52:58 1993 39 | --- /usr/src/include/arpa/nameser.h Mon Jan 10 21:25:21 1994 40 | *************** 41 | *** 14,20 **** 42 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 43 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 44 | * 45 | ! * @(#)nameser.h 5.20 (Berkeley) 10/7/88 46 | */ 47 | 48 | /* 49 | --- 14,20 ---- 50 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 51 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 52 | * 53 | ! * @(#)nameser.h 5.20.1 (2.11BSD GTE) 12/31/93 54 | */ 55 | 56 | /* 57 | *************** 58 | *** 127,133 **** 59 | #define BYTE_ORDER BIG_ENDIAN 60 | #endif 61 | #endif /* BYTE_ORDER */ 62 | ! #if defined(pdp11) || defined(BSD2_10) 63 | #define BYTE_ORDER PDP_ENDIAN 64 | #endif 65 | 66 | --- 127,133 ---- 67 | #define BYTE_ORDER BIG_ENDIAN 68 | #endif 69 | #endif /* BYTE_ORDER */ 70 | ! #if defined(pdp11) 71 | #define BYTE_ORDER PDP_ENDIAN 72 | #endif 73 | 74 | *** /usr/src/include/netdb.h.old Thu Jan 5 21:56:27 1989 75 | --- /usr/src/include/netdb.h Mon Jan 10 21:25:47 1994 76 | *************** 77 | *** 9,21 **** 78 | * software without specific prior written permission. This software 79 | * is provided ``as is'' without express or implied warranty. 80 | * 81 | ! * @(#)netdb.h 5.9 (Berkeley) 4/5/88 82 | */ 83 | 84 | - #ifdef BSD2_10 85 | - #include 86 | - #endif 87 | - 88 | /* 89 | * Structures returned by network 90 | * data base library. All addresses 91 | --- 9,17 ---- 92 | * software without specific prior written permission. This software 93 | * is provided ``as is'' without express or implied warranty. 94 | * 95 | ! * @(#)netdb.h 5.9.1 (2.11BSD GTE) 12/31/93 96 | */ 97 | 98 | /* 99 | * Structures returned by network 100 | * data base library. All addresses 101 | *************** 102 | *** 40,50 **** 103 | char *n_name; /* official name of net */ 104 | char **n_aliases; /* alias list */ 105 | int n_addrtype; /* net address type */ 106 | - #ifdef BSD2_10 107 | - long n_net; /* network # */ 108 | - #else 109 | unsigned long n_net; /* network # */ 110 | - #endif 111 | }; 112 | 113 | struct servent { 114 | --- 36,42 ---- 115 | *************** 116 | *** 76,83 **** 117 | #define NO_DATA 4 /* Valid name, no data record of requested type */ 118 | #define NO_ADDRESS NO_DATA /* no address, look for MX record */ 119 | 120 | - #ifdef BSD2_10 121 | - long gethostid(); 122 | - #else 123 | unsigned long gethostid(); 124 | - #endif 125 | --- 68,71 ---- 126 | *** /usr/src/include/ndbm.h.old Thu Jan 5 21:55:54 1989 127 | --- /usr/src/include/ndbm.h Mon Jan 10 21:26:31 1994 128 | *************** 129 | *** 3,9 **** 130 | * All rights reserved. The Berkeley software License Agreement 131 | * specifies the terms and conditions for redistribution. 132 | * 133 | ! * @(#)ndbm.h 5.1 (Berkeley) 5/30/85 134 | */ 135 | 136 | /* 137 | --- 3,9 ---- 138 | * All rights reserved. The Berkeley software License Agreement 139 | * specifies the terms and conditions for redistribution. 140 | * 141 | ! * @(#)ndbm.h 5.1.1 (2.11BSD GTE) 12/31/93 142 | */ 143 | 144 | /* 145 | *************** 146 | *** 10,24 **** 147 | * Hashed key data base library. 148 | */ 149 | #define PBLKSIZ 1024 150 | ! #ifdef BSD2_10 151 | #define DBLKSIZ 512 152 | #else 153 | #define DBLKSIZ 4096 154 | - #endif 155 | - 156 | - #ifdef BSD2_10 157 | - #define dbm_pagbno dbm_bno /* 8 char limit */ 158 | - #define dbm_dirbno dbm_dno 159 | #endif 160 | 161 | typedef struct { 162 | --- 10,19 ---- 163 | * Hashed key data base library. 164 | */ 165 | #define PBLKSIZ 1024 166 | ! #ifdef pdp11 167 | #define DBLKSIZ 512 168 | #else 169 | #define DBLKSIZ 4096 170 | #endif 171 | 172 | typedef struct { 173 | *** /usr/src/include/setjmp.h.old Tue Jan 6 01:36:13 1987 174 | --- /usr/src/include/setjmp.h Fri Dec 31 23:25:52 1993 175 | *************** 176 | *** 1,7 **** 177 | ! /* setjmp.h 4.1 83/05/03 */ 178 | 179 | typedef int jmp_buf[10]; 180 | - 181 | - #ifdef BSD2_10 182 | - #define longjmperror _ljerr 183 | - #endif BSD2_10 184 | --- 1,3 ---- 185 | ! /* setjmp.h 4.1 93/12/31 */ 186 | 187 | typedef int jmp_buf[10]; 188 | *** /usr/src/include/syscall.h.old Mon Mar 15 18:20:43 1993 189 | --- /usr/src/include/syscall.h Mon Jan 10 21:26:51 1994 190 | *************** 191 | *** 3,9 **** 192 | * All rights reserved. The Berkeley software License Agreement 193 | * specifies the terms and conditions for redistribution. 194 | * 195 | ! * @(#)syscall.h 5.4 (Berkeley) 4/3/86 196 | */ 197 | 198 | #define SYS_exit 1 199 | --- 3,9 ---- 200 | * All rights reserved. The Berkeley software License Agreement 201 | * specifies the terms and conditions for redistribution. 202 | * 203 | ! * @(#)syscall.h 5.4.1 (2.11BSD GTE) 12/31/93 204 | */ 205 | 206 | #define SYS_exit 1 207 | *************** 208 | *** 158,164 **** 209 | #define SYS_getsockname 150 210 | 211 | /* 212 | ! * BSD2.11 special calls 213 | */ 214 | /* 151 is unused */ 215 | #define SYS_nostk 152 216 | --- 158,164 ---- 217 | #define SYS_getsockname 150 218 | 219 | /* 220 | ! * 2BSD special calls 221 | */ 222 | /* 151 is unused */ 223 | #define SYS_nostk 152 224 | -------------------------------------------------------------------------------- /hints/175.unshar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 175 copies a bunch of files from /usr/include to /usr/src/include, but as far as we know 4 | # only patch 158 gets them out of sync. And only for: 5 | # /usr/include/arpa/inet.h 6 | # /usr/include/arpa/nameser.h 7 | # /usr/include/netdb.h 8 | # /usr/include/ndbm.h 9 | # /usr/include/setjmp.h 10 | # /usr/include/syscall.h 11 | # so, if we 2.11BSD shipped with them in sync, that means all we need to do is reach over 12 | # into patch 158, snag those patches and apply them to the /usr/src/include versions 13 | # of those files. All other earlier patches touch both copies, and both 2.10BSD and 14 | # 2.10.1BSD shipped with them in sync. Apply Occam's Razor. 15 | # 16 | # Except there's evidence to suggest that it's more complicated than that, and there 17 | # were bugs post 2.10.1 pre 2.11 that might account for the long list. 18 | # 19 | # The patch trough the line 20 | # X*** /usr/include/Makefile.old Sun May 27 00:45:47 1990 21 | # is all we need to grab, massage and reverse apply. It's easier to grab the whole patch, 22 | # then delete the last bits once we unpack it as part of the massage. 23 | # 24 | 25 | # Note: have to fix the generated patches from 158, so moved to 175.fixup so 26 | # it can evolve as new data comes to light. The number of compressed patches 27 | # in the chain makes it harder to know for sure 'this is it'. The list 28 | # is unusually long and may just be the result of find (eg, I can find no 29 | # evidence of pascal/unixio.h being changed in either the patch train or in 30 | # the 1989 or 1990 comp.bugs.2bsd archive). 31 | cd $ROOT211 32 | patch -V none -R -p1 < $HINTSDIR/175.fixup 33 | from2.10.1 usr/src/include/short_names.h 34 | # 35 | # Here's the full list. 36 | # 37 | # cp -p /usr/include/pascal/unixio.h /usr/src/include/pascal/unixio.h 38 | # cp -p /usr/include/protocols/dumprestor.h /usr/src/include/protocols/dumprestor.h 39 | # cp -p /usr/include/protocols/routed.h /usr/src/include/protocols/routed.h 40 | # cp -p /usr/include/protocols/rwhod.h /usr/src/include/protocols/rwhod.h 41 | # cp -p /usr/include/protocols/talkd.h /usr/src/include/protocols/talkd.h 42 | # cp -p /usr/include/protocols/timed.h /usr/src/include/protocols/timed.h 43 | # cp -p /usr/include/arpa/ftp.h /usr/src/include/arpa/ftp.h 44 | # cp -p /usr/include/arpa/inet.h /usr/src/include/arpa/inet.h 45 | # cp -p /usr/include/arpa/nameser.h /usr/src/include/arpa/nameser.h 46 | # cp -p /usr/include/arpa/telnet.h /usr/src/include/arpa/telnet.h 47 | # cp -p /usr/include/arpa/tftp.h /usr/src/include/arpa/tftp.h 48 | # cp -p /usr/include/a.out.h /usr/src/include/a.out.h 49 | # cp -p /usr/include/ar.h /usr/src/include/ar.h 50 | # cp -p /usr/include/assert.h /usr/src/include/assert.h 51 | # cp -p /usr/include/ctype.h /usr/src/include/ctype.h 52 | # cp -p /usr/include/curses.h /usr/src/include/curses.h 53 | # cp -p /usr/include/dbm.h /usr/src/include/dbm.h 54 | # cp -p /usr/include/OLD/dk.h /usr/src/include/OLD/dk.h 55 | # cp -p /usr/include/OLD/psout.h /usr/src/include/OLD/psout.h 56 | # cp -p /usr/include/disktab.h /usr/src/include/disktab.h 57 | # cp -p /usr/include/errno.h /usr/src/include/errno.h 58 | # cp -p /usr/include/fcntl.h /usr/src/include/fcntl.h 59 | # cp -p /usr/include/frame.h /usr/src/include/frame.h 60 | # cp -p /usr/include/fstab.h /usr/src/include/fstab.h 61 | # cp -p /usr/include/grp.h /usr/src/include/grp.h 62 | # cp -p /usr/include/lastlog.h /usr/src/include/lastlog.h 63 | # cp -p /usr/include/math.h /usr/src/include/math.h 64 | # cp -p /usr/include/memory.h /usr/src/include/memory.h 65 | # cp -p /usr/include/mp.h /usr/src/include/mp.h 66 | # cp -p /usr/include/mtab.h /usr/src/include/mtab.h 67 | # cp -p /usr/include/ndbm.h /usr/src/include/ndbm.h 68 | # cp -p /usr/include/netdb.h /usr/src/include/netdb.h 69 | # cp -p /usr/include/nlist.h /usr/src/include/nlist.h 70 | # cp -p /usr/include/paths.h /usr/src/include/paths.h 71 | # cp -p /usr/include/pcc.h /usr/src/include/pcc.h 72 | # cp -p /usr/include/pwd.h /usr/src/include/pwd.h 73 | # cp -p /usr/include/sgtty.h /usr/src/include/sgtty.h 74 | # cp -p /usr/include/ranlib.h /usr/src/include/ranlib.h 75 | # cp -p /usr/include/regexp.h /usr/src/include/regexp.h 76 | # cp -p /usr/include/resolv.h /usr/src/include/resolv.h 77 | # cp -p /usr/include/vmf.h /usr/src/include/vmf.h 78 | # cp -p /usr/include/setjmp.h /usr/src/include/setjmp.h 79 | # cp -p /usr/include/signal.h /usr/src/include/signal.h 80 | # cp -p /usr/include/stab.h /usr/src/include/stab.h 81 | # cp -p /usr/include/stdio.h /usr/src/include/stdio.h 82 | # cp -p /usr/include/string.h /usr/src/include/string.h 83 | # cp -p /usr/include/strings.h /usr/src/include/strings.h 84 | # cp -p /usr/include/struct.h /usr/src/include/struct.h 85 | # cp -p /usr/include/syscall.h /usr/src/include/syscall.h 86 | # cp -p /usr/include/sysexits.h /usr/src/include/sysexits.h 87 | # cp -p /usr/include/syslog.h /usr/src/include/syslog.h 88 | # cp -p /usr/include/time.h /usr/src/include/time.h 89 | # cp -p /usr/include/ttyent.h /usr/src/include/ttyent.h 90 | # cp -p /usr/include/tzfile.h /usr/src/include/tzfile.h 91 | # cp -p /usr/include/utmp.h /usr/src/include/utmp.h 92 | # cp -p /usr/include/varargs.h /usr/src/include/varargs.h 93 | # cp -p /usr/include/vfont.h /usr/src/include/vfont.h 94 | -------------------------------------------------------------------------------- /hints/176.unpatch: -------------------------------------------------------------------------------- 1 | # Patch 176 is a nop. It's a bookend for the patch train that started in 2 | # 158. Expet nothing to happen, so provide a do nothing shell. 3 | -------------------------------------------------------------------------------- /hints/178.fixup: -------------------------------------------------------------------------------- 1 | *** /usr/src/sys/netinet/ip_acct.h.old Fri Apr 29 19:59:05 1988 2 | --- /usr/src/sys/netinet/ip_acct.h Fri Dec 31 23:46:28 1993 3 | *************** 4 | *** 3,9 **** 5 | * All rights reserved. The Berkeley software License Agreement 6 | * specifies the terms and conditions for redistribution. 7 | * 8 | ! * @(#)ip_acct.h 1.2 (2.11BSD GTE) 12/31/93 9 | */ 10 | 11 | /* 12 | --- 3,9 ---- 13 | * All rights reserved. The Berkeley software License Agreement 14 | * specifies the terms and conditions for redistribution. 15 | * 16 | ! * @(#)ip_acct.h 1.1 (2.10BSD Berkeley) 12/1/86 17 | */ 18 | 19 | /* 20 | *************** 21 | *** 14,21 **** 22 | name. 23 | */ 24 | 25 | ! #ifndef pdp11 26 | ! #define IP_ACCT /* doesn't work in 2.xBSD */ 27 | #endif 28 | 29 | struct ip_acct { 30 | --- 14,21 ---- 31 | name. 32 | */ 33 | 34 | ! #ifndef BSD2_10 35 | ! #define IP_ACCT /* doesn't work in 2.10BSD */ 36 | #endif 37 | 38 | struct ip_acct { 39 | -------------------------------------------------------------------------------- /hints/178.unpatch: -------------------------------------------------------------------------------- 1 | # 2 | # 178.unpatch 3 | # 4 | # A file was removed here. We'll need it later... 5 | # 6 | cd $ROOT211 7 | patch -V none -R -p1 < $patch 8 | from2.10.1 usr/src/sys/netinet/ip_acct.h 9 | # need to apply all the patches 2.11 patch set has already appled to 2.10.1 start 10 | patch -V none -R -p1 < $HINTSDIR/178.fixup 11 | -------------------------------------------------------------------------------- /hints/18.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/bin, so cd there first 2 | chdir $ROOT211/usr/src/bin 3 | -------------------------------------------------------------------------------- /hints/180.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 180 creates new and improved strcompact tools 3 | # 4 | # It creates: 5 | # /usr/src/ucb/symcompact.c 6 | # /usr/src/ucb/symdump.c 7 | # /usr/src/ucb/strcompact.c 8 | # but also removes: 9 | # Xrm -f /usr/src/ucb/symcompact.c 10 | # Xrm -f /usr/src/ucb/symdump.c 11 | # Xrm -f /usr/src/ucb/strcompact.c 12 | # 13 | # And patches usr/src/ucb/Makefile 14 | # 15 | # So, we ned to reverse apply that patch, and get the old sources from 16 | # $SOMEWHERE. They aren't in 2.10.1BSD. 17 | # 18 | # So, {str,sym}compact.c are mentioned in 171, but created in 172. They are 19 | # mentioned in 176, but that's just a list of everything patched in 158 through 175. 20 | # To undo, we just need extract them. 21 | # 22 | # symdump.c is removed in 180, but also created there. It's the only patch file 23 | # it is mentioned in, and it isn't in 2.10.1BSD either. And this patch adds it 24 | # to the Makefile. I conclude it's an extra rm that's not actually needed and 25 | # we create it here, so to undo, we just remove it. 26 | # 27 | # tl;dr: extract and apply patch from 180, extract {str,sym}compact.c from 172 and 28 | # remove symdump.c 29 | # 30 | sed -n -e '/^sed.*\/tmp\/patchfile/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 31 | cd $ROOT211 32 | patch -V none -R -p1 < $TEMP/patchfile 33 | sed -n -e '/^Xsed.*symcompact.c/,/^XSHAR_EOF/p' < $PATCHDIR/172 | sed -e "s=/usr/src/ucb/=$TEMP/=;s/^X//" | sh -x 34 | sed -n -e '/^Xsed.*strcompact.c/,/^XSHAR_EOF/p' < $PATCHDIR/172 | sed -e "s=/usr/src/ucb/=$TEMP/=;s/^X//" | sh -x 35 | cp $TEMP/symcompact.c $ROOT211/usr/src/ucb 36 | cp $TEMP/strcompact.c $ROOT211/usr/src/ucb 37 | rm -f $ROOT211/usr/src/ucb/symdump.c 38 | -------------------------------------------------------------------------------- /hints/184.unpatch: -------------------------------------------------------------------------------- 1 | # 2 | # Patch 184 replaces the temporary files with a shell pipeline for 3 | # all assembler files in the tree. Pretty straight forward, but it 4 | # also deletes a few things. These are compat / low-churn items, so 5 | # it's pretty safe to get them from 2.10.1. 6 | # 7 | # However, the directories we're getting them from were renamed from com-2.9 and 8 | # com-4.1 to compat-2.9 and compat-4.1 respectively so we have to jump through 9 | # some hoops for that to still have proper tracking of the recovery. 10 | # 11 | # So we need to create the compat-4.1 directory, add the SYS.h symlink, add the 12 | # profiled directory. Then we need to change DEFS.h to SYS.h in the files we 13 | # snagged from 2.10.1BSD to reflect the differences between 2.10.1 and 2.11. 14 | # 15 | cd $ROOT211 16 | patch -V none -p1 -R < $patch 17 | pdp=usr/src/lib/libc/pdp 18 | mkdir $pdp/com-4.1 19 | from2.10.1 $pdp/com-4.1/Makefile $pdp/com-4.1/reset.s 20 | mv $pdp/com-4.1 $pdp/compat-4.1 21 | mkdir $pdp/compat-4.1/profiled 22 | ln -s ../sys/SYS.h $pdp/compat-4.1 23 | sed -I.bak -e"s/DEFS.h/SYS.h/g;s/com-4.1/compat-4.1/g" $pdp/compat-4.1/Makefile $pdp/compat-4.1/reset.s 24 | rm $pdp/compat-4.1/*.bak 25 | mkdir $pdp/com-2.9 26 | from2.10.1 $pdp/com-2.9/HEADER 27 | mv $pdp/com-2.9/HEADER $pdp/compat-2.9 28 | rmdir $pdp/com-2.9 29 | -------------------------------------------------------------------------------- /hints/185.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 185 patches the m4 man page and replaces m4. Grab the m4 from 2.10.1BSD on the theory they weren't changed. 3 | # we need to look at the CSRG SCCS archive and the bsd patches group to me sure. 4 | # 5 | sed -n -e '/^sed.*\/tmp\/m4.man.patch/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 6 | cd $ROOT211 7 | patch -V none -R -p1 < $TEMP/m4.man.patch 8 | rm -rf usr/src/usr.bin/m4 9 | mkdir usr/src/usr.bin/m4 10 | from2.10.1 usr/src/usr.bin/m4/Makefile usr/src/usr.bin/m4/m4.c usr/src/usr.bin/m4/m4y.y 11 | # Patch 115 makes some fixes to Makefile, so draw those in too so 115 undoes them 12 | sed -n -e'/\*\*\* .*m4\/Makefile.old/,/*\*\* .*\/prof\/Makefile.old/p' < $PATCHDIR/115 | patch -V none -p1 13 | -------------------------------------------------------------------------------- /hints/187.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 187 adds the fchdir system call. To undo it we just have to apply 3 | # the patch backwards and remove fchdir.s 4 | # 5 | # This introduces some turbulence that we need to hack around, alas 6 | # 7 | sed -n -e '/^sed.*\/tmp\/187/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/=$TEMP/=" | sh -x 8 | cd $ROOT211 9 | patch -V none -R -p1 < $TEMP/187 10 | rm usr/src/lib/libc/pdp/sys/fchdir.s 11 | -------------------------------------------------------------------------------- /hints/19.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/ucb/ex, so cd there first 2 | chdir $ROOT211/usr/src/ucb/ex 3 | -------------------------------------------------------------------------------- /hints/1a.unpatch: -------------------------------------------------------------------------------- 1 | # first, apply the patch 2 | cd $ROOT211 3 | patch -V none -p1 -R < $patch 4 | 5 | # This patch moves the man page, so we have to remove the old man pages and 6 | # popualte the new... this movement isn't in the patch. 7 | from2.10.1 usr/src/man/man1/tftp.1 8 | from2.10.1 usr/src/man/man8/tftpd.8 9 | rm usr/src/etc/tftpd/tftpd.8 10 | rm usr/src/ucb/tftp/tftp.1 11 | 12 | # This wasn't a symlink originally... 13 | rm usr/src/etc/tftpd/tftpsubs.c 14 | cp -p usr/src/ucb/tftp/tftpsubs.c usr/src/etc/tftpd/tftpsubs.c 15 | -------------------------------------------------------------------------------- /hints/2.mu: -------------------------------------------------------------------------------- 1 | --- /usr/src/sys/mdec/bruboot.s.old 2020-06-14 08:25:17.715240000 -0600 2 | +++ /usr/src/sys/mdec/bruboot.s 2020-06-14 08:25:29.172329000 -0600 3 | @@ -45,8 +45,6 @@ 4 | nop / These two lines must be present or DEC 5 | br start / boot ROMs will refuse to run boot block! 6 | start: 7 | - clr r0 / XXX - for Rome 11/70, boot card doesn't work 8 | - mov $176714,r1 / XXX - for Rome 11/70, boot card doesn't work 9 | movb r0,unit+1 / save the unit in high byte (for brcs) 10 | mov r1,csr / and csr from the ROMs (not base addr!) 11 | mov $..,sp 12 | -------------------------------------------------------------------------------- /hints/2.tmscpboot.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/sys/pdpstand/tmscpboot.s- 1991-03-14 00:31:17.000000000 -0700 2 | +++ /usr/src/sys/pdpstand/tmscpboot.s 2020-07-28 02:14:40.793055000 -0600 3 | @@ -1,58 +1,44 @@ 4 | -/ 5 | -////////////////////////////////////////////////////////////////////// 6 | -/ Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. / 7 | -/ All Rights Reserved. / 8 | -/ Reference "/usr/src/COPYRIGHT" for applicable restrictions. / 9 | -////////////////////////////////////////////////////////////////////// 10 | -/ 11 | -/ ULTRIX-11 Block Zero Bootstrap for TMSCP Magtape 12 | -/ 13 | -/ SCCSID: @(#)tkboot.s 3.0 4/21/86 14 | -/ 15 | -/ On entry boot leaves: 16 | -/ r0 = unit # 17 | -/ r1 = aip register address 18 | -/ 19 | -/ magtape boot program to load and transfer 20 | -/ to a unix entry 21 | -/ 22 | -/ Chung_wu Lee 2/8/85 23 | -/ 24 | + /* Reconstructed tmscpboot.s from tkboot.s, lightly edited to work */ 25 | +/* 26 | + * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. 27 | + * All Rights Reserved. 28 | + * Reference "/usr/src/COPYRIGHT" for applicable restrictions. 29 | + * 30 | + * ULTRIX-11 Block Zero Bootstrap for TMSCP Magtape 31 | + * 32 | + * SCCSID: @(#)tkboot.s 3.0 4/21/86 33 | + * 34 | + * Chung_wu Lee 2/8/85 35 | + * 36 | + * Steven M. Schultz (sms@wlv.imsd.contel.com) Aug 20 1990. Port to 2.11BSD 37 | +*/ 38 | + 39 | +NEWLOC = [48.*1024.] / we relocate ourselves to this address 40 | +OURSIZE=512 41 | 42 | nop = 240 43 | s1 = 4000 44 | go = 1 45 | 46 | -core = 28. 47 | -.. = [core*2048.]-512. 48 | +.. = NEWLOC 49 | 50 | / establish sp and check if running below 51 | / intended origin, if so, copy 52 | -/ program up to 'core' K words. 53 | start: 54 | - nop / DEC boot block standard 55 | - br 1f / " 56 | + nop / DEC boot block standard 57 | + br 1f / " " " " 58 | 1: 59 | - mov $..,sp 60 | + mov $NEWLOC,sp / give ourselves a stack to work with 61 | clr r4 62 | mov sp,r5 63 | - cmp pc,r5 64 | - bhis 2f 65 | - cmp (r4),$407 66 | - bne 1f 67 | - mov $20,r4 68 | -1: 69 | - mov (r4)+,(r5)+ 70 | - cmp r5,$end 71 | - blo 1b 72 | - jmp (sp) 73 | - 74 | -/ Clear core to make things clean, 75 | + mov $OURSIZE\/2,r3 / primary boot size in words 76 | 2: 77 | - clr (r4)+ 78 | - cmp r4,sp 79 | - blo 2b 80 | - 81 | + clr OURSIZE(r5) / clear work area (major & TS/MSCP area) 82 | + mov (r4)+,(r5)+ / move primary boot to just above 83 | + sob r3,2b / the stack 84 | + jmp *$3f / bypass the relocation code 85 | +3: 86 | + 87 | / TK initialization 88 | 89 | mov r0,bdunit / save unit # booted from 90 | @@ -104,10 +90,10 @@ 91 | jsr pc,tkrew 92 | clr r1 93 | mov $2,bc 94 | - jsr pc,tkread /* skip the first two blocks 95 | + jsr pc,tkread / skip the first two blocks 96 | clr r1 97 | mov $1,bc 98 | - jsr pc,tkread /* read the first block 99 | + jsr pc,tkread / read the first block 100 | 101 | / Find out how big boot is 102 | mov *$2,r0 / text segment size 103 | -------------------------------------------------------------------------------- /hints/2.unpatch: -------------------------------------------------------------------------------- 1 | chmod +w $TEMP/2 2 | mv $TEMP/2/b.0 $TEMP # b.0 has no patches, so we need to remove 3 | 4 | # This patch actually makes things out of sync. Patch 78 resyncs them. Since we 5 | # copy the pdpdist version of disktab to etc after unpatching there, this turns 6 | # out to not be needed to recover back to patch 0. 7 | rm -f $TEMP/2/b.16 # disktab 8 | 9 | # bruboot.s has 2 extra lines in it that we need to remove before this patch 10 | # will work. Unsure why this is the case, but apparently the 11/70 in Rome 11 | # didn't pass 0 in r0 or csr in r1 as expected. This removes those two 12 | # unexpected lines. 13 | (cd $ROOT211; patch -V none -p1 < $HINTSDIR/2.mu) 14 | 15 | # b.2 has this 16 | # NOTE: Remove 'tmscpboot.s' and 'tmscptape.data' from 17 | # /sys/pdpstand, they are no longer needed. 18 | # so we need to reconstruct these. this is a bit tricky since they were not in 19 | # 2.10.1 at all. However, from hints in the 2.11BSD mtboot.s after this patch, 20 | # it's clear that this code was derived from the ULTRIX-11 bootloader. By 21 | # chance, that's in the tree as /sys/OTHERS/tk/pdpstand/tkboot.s and it almost 22 | # compiles out of box. We apply a patch to it that moves it's load location to 23 | # be consistent with mtboot.s in 2.11BSD pl 0 and makes a couple of other minor 24 | # tweaks to allow it to compile and work. There's a number of ways one could 25 | # speculatively reconstruct this (eg taking mtboot.s and putting the tkstart, 26 | # tkrew and tkread functions into it after ripping out everything 27 | # else). However, that's what patch b.2 does to squeeze it all into 512 bytes, 28 | # so I've opted for minimal likely changes instead. 29 | # 30 | # Plus we need a tweaked maketape.data file for the tmscptape.data which I think 31 | # is the same with tmscpboot replacing mtboot. 32 | # 33 | cp $ROOT211/sys/OTHERS/tk/pdpstand/tkboot.s $ROOT211/sys/pdpstand/tmscpboot.s 34 | (cd $ROOT211; patch -V none -p1 < $HINTSDIR/2.tmscpboot.diff) 35 | sed -e s/mtboot/tmscpboot/g < $ROOT211/sys/pdpstand/maketape.data > $ROOT211/sys/pdpstand/tmscptape.data 36 | 37 | # Need to grab the maketape.data from 2.10.1 since it is unchanged 38 | from2.10.1 sys/pdpstand/maketape.data 39 | -------------------------------------------------------------------------------- /hints/24.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/lib/c2, so cd there first 2 | chdir $ROOT211/usr/src/lib/c2 3 | -------------------------------------------------------------------------------- /hints/25.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/lib/ccom, so cd there first 2 | chdir $ROOT211/usr/src/lib/ccom 3 | -------------------------------------------------------------------------------- /hints/26.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/lib/ccom, so cd there first 2 | chdir $ROOT211/usr/src/lib/ccom 3 | -------------------------------------------------------------------------------- /hints/27.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/lib/ccom, so cd there first 2 | chdir $ROOT211/usr/src/lib/ccom 3 | -------------------------------------------------------------------------------- /hints/3.unpatch: -------------------------------------------------------------------------------- 1 | # 3 has one issues 2 | # 1, MAKEDEV doesn't apply, so don't reverse 3 | # however, it looks like the copy in usr/src/sys/pdpdist/MAKEDEV 4 | # hasn't changed, so assume it is the one that should be in /dev 5 | chmod +wx $TEMP/3 6 | sed -e '88,193d' < $TEMP/3/b.2 > $TEMP/3/new.b.2 7 | cp $TEMP/3/new.b.2 $TEMP/3/b.2 8 | cp $ROOT211/usr/src/sys/pdpdist/MAKEDEV $ROOT211/dev/MAKEDEV 9 | -------------------------------------------------------------------------------- /hints/36.GENERIC-Makefile.diff: -------------------------------------------------------------------------------- 1 | --- /usr/src/sys/GENERIC/Makefile~ 2020-07-22 22:26:06.049375000 -0600 2 | +++ /usr/src/sys/GENERIC/Makefile 2020-07-23 11:39:01.442472000 -0600 3 | @@ -47,19 +47,20 @@ 4 | 5 | BASE= br.o dh.o dhu.o dkbad.o dr.o dz.o hk.o init_sysent.o kern_clock.o \ 6 | kern_descrip.o kern_mman.o kern_proc.o kern_sig.o kern_subr.o \ 7 | - kern_synch.o lp.o machdep.o ra.o ram.o rk.o rl.o rx.o si.o \ 8 | + kern_synch.o lp.o ram.o rk.o rl.o rx.o si.o \ 9 | subr_rmap.o subr_xxx.o sys_inode.o sys_pipe.o trap.o tty.o \ 10 | tty_conf.o tty_subr.o tty_tb.o tty_tty.o ufs_alloc.o ufs_bio.o \ 11 | ufs_bmap.o ufs_dsort.o ufs_fio.o ufs_inode.o ufs_namei.o \ 12 | - ufs_subr.o vm_proc.o vm_sched.o vm_swap.o vm_swp.o vm_text.o xp.o 13 | -OV1= kern_prot.o sys_generic.o ufs_syscalls.o mem.o 14 | + ufs_subr.o vm_proc.o vm_sched.o vm_swap.o vm_text.o xp.o 15 | +OV1= sys_generic.o ufs_syscalls.o mem.o 16 | OV2= kern_acct.o kern_exec.o kern_exit.o kern_fork.o kern_resource.o 17 | -OV3= clock.o cons.o init_main.o kern_pdp.o kern_rtp.o kern_time.o \ 18 | - kern_xxx.o machdep2.o quota_sys.o subr_prf.o sys_process.o \ 19 | - syscalls.o ufs_mount.o 20 | -OV4= tty_pty.o quota_kern.o quota_subr.o quota_ufs.o subr_log.o 21 | +OV3= clock.o init_main.o kern_pdp.o kern_rtp.o kern_time.o \ 22 | + kern_xxx.o quota_sys.o subr_prf.o sys_process.o \ 23 | + syscalls.o ufs_mount.o subr_log.o vm_swp.o 24 | +OV4= tty_pty.o quota_kern.o quota_subr.o quota_ufs.o machdep2.o \ 25 | + ra.o kern_prot.o machdep.o 26 | OV5= ht.o tm.o ts.o 27 | -OV6= tmscp.o 28 | +OV6= tmscp.o cons.o 29 | 30 | KERNOBJ=${CONF} ${BASE} ${OV1} ${OV2} ${OV3} ${OV4} ${OV5} \ 31 | ${OV6} ${OV7} ${OV8} ${OV9} ${OV10} ${OV11} ${OV12} \ 32 | -------------------------------------------------------------------------------- /hints/36.unpatch: -------------------------------------------------------------------------------- 1 | # un-Apply patch 2 | patch -V none -p1 -R < $patch 3 | 4 | # change GENERIC/Makefile to cope with Make.sunix changing. 5 | cd $ROOT211 6 | sed -n -e '/Make.sunix/,/README/p' < $patch | sed -e 's=/conf/Make.sunix=/GENERIC/Makefile=' | patch -V none -p1 -R 7 | # However, there's a note in the patch: 8 | # The GENERIC kernel wouldn't fit using the distributed Make.sunix 9 | # file - this was annoying since the dist kit obviously has a 10 | # GENERIC kernel on it. Also, a reminder is added to both 11 | # the pdpstand/README and the pdpstand/Makefile to install a 12 | # 'generic' version of /etc/dtab when building a GENERIC boot tape. 13 | # So 2 things. (1) do we need to copy the un-patched dtab to /etc now? 14 | # and (2) GENERIC makefile was afu, hence the need for this change, so apply 15 | # our best guess as to how it was AFU'd based on the data we have from patch 16 | # 2 b.1 file. We can't say for sure what BASE, OV1, OV2 and the first line of OV3 17 | # are, so we'll have to test this reconstruction. We can make close guesses, 18 | # though, which is what this patch enshrines. 19 | patch -V none -p1 < $HINTSDIR/36.GENERIC-Makefile.diff 20 | 21 | # And then, we need to fix autoconfig after we've unpatched 22 | # Move the autoconfig routines into the /sys/autoconfig directory: 23 | # cd /sys/autoconfig 24 | # mv ../pdpuba/*auto* . 25 | # mv ../pdp/cnauto.c . 26 | # make tags 27 | # So do the reverse and skip the make tags... With the files moved, make 28 | # automatically adds the -I lines we need to rebuild autoconfig. 29 | cd sys/autoconfig 30 | mv cnauto.c ../pdp 31 | mv *auto* ../pdpuba 32 | -------------------------------------------------------------------------------- /hints/37.setup: -------------------------------------------------------------------------------- 1 | # patch 37 is relative to usr/src/sys/mdec, so cd there first 2 | chdir $ROOT211/usr/src/sys/mdec 3 | -------------------------------------------------------------------------------- /hints/37a.unpatch: -------------------------------------------------------------------------------- 1 | # 2 | # Small message change to backgammon was overlooked. Which is kinda 3 | # stupid because all it changes is the date it was last updated... 4 | # 5 | # This also means that when the time comes for going forward to 195, 6 | # this will also be wrong there :(. 7 | # 8 | cd $ROOT211 9 | sed -I.bak -e "s/Sunday, January 16, 1994/Tuesday, June 5, 1990/g" usr/src/games/backgammon/message.c 10 | rm usr/src/games/backgammon/message.c.bak 11 | 12 | -------------------------------------------------------------------------------- /hints/4.unshar: -------------------------------------------------------------------------------- 1 | # 4 2 | # Applies a patch and Creates: 3 | # spl/:splfix.mfps 4 | # spl/:splfix.movb+mfps 5 | # spl_3com/:splfix.mfps 6 | # spl_3com/:splfix.movb+mfps 7 | # so undo all that. 8 | sed -n -e '/^sed.*\/tmp\/dif/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/dif=$TEMP/patchfile=" | sh -x 9 | cd $ROOT211/usr/src/sys/conf 10 | patch -R -V none < $TEMP/patchfile 11 | rm spl/:splfix.mfps 12 | rm spl/:splfix.movb+mfps 13 | rm spl_3com/:splfix.mfps 14 | rm spl_3com/:splfix.movb+mfps 15 | # Now we need to apply it to our kernels (just GENERIC?) 16 | cp spl/:splfix.movb ../GENERIC/SPLFIX 17 | -------------------------------------------------------------------------------- /hints/40.unpatch: -------------------------------------------------------------------------------- 1 | # This is an announcement for corrupt files. so it's optional. We'll 2 | # recreate the non-currupt tape. 3 | # /usr/src/games/mille/end.c 4 | # /usr/src/games/banner.c 5 | # /usr/src/games/warp/{sig.c,smap.1,smp.5} 6 | # It is impossible to recreate the corruption, so we'll silently assume 7 | # that it's ok to create a non-currupt version of them. 8 | -------------------------------------------------------------------------------- /hints/42.unpatch: -------------------------------------------------------------------------------- 1 | # un-Apply patch 2 | patch -V none -p1 -R < $patch 3 | 4 | # We have to undo these instructions: 5 | # First, move the OTHERS/dhv modules to the right place and remove 6 | # the OTHERS/dhv directory. 7 | # 8 | # mv /sys/OTHERS/dhv/dhv.c /sys/pdpuba/dhv.c 9 | # mv /sys/OTHERS/dhv/dhvreg.h /sys/pdpuba/dhvreg.h 10 | # mv /sys/OTHERS/dhv/dhvauto.c /sys/autoconfig/dhvauto.c 11 | # rm -r /sys/OTHERS/dhv 12 | cd $ROOT211 13 | cd usr/src/sys 14 | mkdir OTHERS/dhv 15 | mv pdpuba/dhv.c OTHERS/dhv 16 | mv pdpuba/dhvreg.h OTHERS/dhv 17 | mv autoconfig/dhvauto.c OTHERS/dhv 18 | 19 | # And then we have to update Make.pdpuba and KAZOO/Makefile 20 | # to cope with Make.nsunix changing and GENERIC/Makefile to 21 | # cope with Make.sunix changing. 22 | cd $ROOT211 23 | sed -n -e '/Make.nsunix/,/Make.pdpuba/p' < $patch | sed -e 's=/conf/Make.nsunix=/KAZOO/Makefile=' | patch -V none -p1 -R 24 | sed -n -e '/Make.sunix/,/Make.unix/p' < $patch | sed -e 's=/conf/Make.sunix=/GENERIC/Makefile=' | patch -V none -p1 -R 25 | # Make.pdpuba changed, we need to copy that into the config areas... 26 | for i in KAZOO GENERIC; do 27 | cp sys/conf/Make.pdpuba sys/$i 28 | done 29 | -------------------------------------------------------------------------------- /hints/43.unpatch: -------------------------------------------------------------------------------- 1 | cd $ROOT211 2 | patch -V none -p1 -R < $patch 3 | cp -p usr/src/ucb/sendbug/bugformat usr/lib 4 | # xxx unsure if this should be done here or in build2.sh 5 | -------------------------------------------------------------------------------- /hints/47.setup: -------------------------------------------------------------------------------- 1 | # patch 47 is relative to usr/src/etc, so cd there first 2 | chdir $ROOT211/usr/src/etc 3 | -------------------------------------------------------------------------------- /hints/60.setup: -------------------------------------------------------------------------------- 1 | # patch 60 is relative to the rshd src dir 2 | cd $ROOT211/usr/src/etc/rshd 3 | -------------------------------------------------------------------------------- /hints/72.unshar: -------------------------------------------------------------------------------- 1 | # 2 | # 72 adds the toy support and toy.o to the prototype makefiles. 3 | # We need to copy stuff over afterwards since it updates the 4 | # prototype Make.xxxx files. 5 | # 6 | cd $TEMP 7 | sed -n -e "/^sed.*SHAR_EOF > 'c'/,/^SHAR_EOF/p" < $patch | sh -x 8 | cd $ROOT211 9 | patch -V none -R -p1 < $TEMP/c 10 | rm usr/src/sys/pdp/toy.s 11 | cp usr/src/sys/conf/Make.pdp usr/src/sys/GENERIC 12 | sed -n -e '/Make.sunix/,/Make.unix/p' < $TEMP/c | sed -e 's=/conf/Make.sunix=/GENERIC/Makefile=' | patch -V none -p1 -R 13 | cp usr/src/sys/conf/Make.pdp usr/src/sys/KAZOO 14 | sed -n -e '/Make.nsunix/,/Make.sunix/p' < $TEMP/c | sed -e 's=/conf/Make.nsunix=/KAZOO/Makefile=' | patch -V none -p1 -R 15 | -------------------------------------------------------------------------------- /hints/75.unshar: -------------------------------------------------------------------------------- 1 | # 75: A few file names were overlooked in the "liberation from the 14 2 | # character limit". 3 | # Sadly, we need to reimprision them. 4 | cd $ROOT211/usr/src/usr.lib/sendmail/cf.named 5 | mv nicregistered.m4 nicregistered. 6 | mv postwriterule.m4 postwriterule. 7 | mv prewriterule.m4 prewriterule.m 8 | -------------------------------------------------------------------------------- /hints/78.unpatch: -------------------------------------------------------------------------------- 1 | pprint 1 "Reverse applying $PATCHDIR/$p" 2 | echo "Reverse applying $PATCHDIR/$p" 3 | patch -V none -R -p1 < $PATCHDIR/$p 4 | # disktab was patched, so we need to copy it to /etc. The 5 | # instructions say merge it in, but since there's no local 6 | # changes for us, cp is all we need to do. 7 | cp ${ROOT211}/usr/src/sys/pdpdist/disktab ${ROOT211}/etc/disktab 8 | # Note: patch 2 touches /etc/disktab as well. However, it 9 | # applies the same sort of patch included here, so that patch 10 | # won't reverse apply. This is OK since the goal is to get back 11 | # to patch level 0, and then walk forward one patch at a time. 12 | -------------------------------------------------------------------------------- /hints/80.fixup: -------------------------------------------------------------------------------- 1 | --- /usr/src/local/Makefile.old 2020-06-02 22:51:21.717212000 -0600 2 | +++ /usr/src/local/Makefile 2020-06-02 22:51:39.289621000 -0600 3 | @@ -10,7 +10,7 @@ 4 | # C programs that live in the current directory and do not need 5 | # explicit make lines. 6 | # 7 | -STD= trace decompr16 8 | +STD= trace 9 | 10 | # C programs that live in the current directory and need explicit make lines. 11 | # 12 | -------------------------------------------------------------------------------- /hints/80.unpatch: -------------------------------------------------------------------------------- 1 | # 80 2 | # 3 | # Patch 80 didn't exist, except it did... usr.update.tar.Z was part of this big patch-kit. 4 | # 5 | # And instead of there being no other patches, it turns out that a number of things were included. 6 | # In email with Steve, prior to patch 195, /usr/src/new and /usr/src/local were unofficial parts 7 | # of the release (included, but not closely tracked), so there's no real patches for this stuff 8 | # so I have to match things up as best I can. 9 | # 10 | # /usr/src/new and /usr/src/local had been unofficial add-ons for various bits of Usenet 11 | # code that had been accumulated. The patchkit resyncrhonized these adding a number of things 12 | # so that proper patches never were generated (the silent replacement issues, which is why 13 | # we need to have a fixup patch here). 14 | 15 | rm $ROOT211/usr/src/local/decompr16.c 16 | rm -rf $ROOT211/usr/src/local/cxref 17 | rm -rf $ROOT211/usr/src/local/mtools 18 | rm -rf $ROOT211/usr/src/local/zmodem 19 | rm -rf $ROOT211/usr/src/new/tcsh 20 | 21 | # Now kermit5.181 wasn't mentioned here (and isn't in the patchkit catchup 22 | # files). However, it popped into the tree at some point. It's only a few weeks 23 | # too early for it (released 23 Nov 92 vs this likely dropping in Sep 92). 24 | # it fits better here, even if there's a bit of a temopral anomaly. 25 | # XXX need to record this with from2.10.1 somehow? fromtree maybe? 26 | rm -rf $ROOT211/usr/src/new/kermit5.188 27 | (cd $ROOT2101/usr/src/new ; tar cf - kermit) | (cd $ROOT211/usr/src/new ; tar xvf -) 28 | 29 | cd $ROOT211 30 | patch -V none -p1 < $HINTSDIR/80.fixup 31 | -------------------------------------------------------------------------------- /hints/84.unpatch: -------------------------------------------------------------------------------- 1 | # un-Apply patch 2 | patch -V none -p1 -R < $patch 3 | 4 | cd $ROOT211 5 | # This patch removed the TMSCP_VEC from the config files. We need to add it back. 6 | grep TMSCP_VEC sys/conf/GENERIC | awk '{printf "#define\tTMSCP_VEC\t%s\n", $2;}' >> sys/GENERIC/tms.h 7 | grep TMSCP_VEC sys/conf/KAZOO | awk '{printf "#define\tTMSCP_VEC\t%s\n", $2;}' >> sys/KAZOO/tms.h 8 | -------------------------------------------------------------------------------- /hints/9.unshar: -------------------------------------------------------------------------------- 1 | # 9 2 | # Applies a patch and Creates: 3 | # /usr/src/local/trace.c 4 | # so undo all that. 5 | sed -n -e '/^sed.*\/tmp\/c/,/^SHAR_EOF/p' < $patch | sed -e "s=/tmp/c=$TEMP/patchfile=" | sh -x 6 | cd $ROOT211 7 | patch -R -V none -p1 < $TEMP/patchfile 8 | rm usr/src/local/trace.c 9 | -------------------------------------------------------------------------------- /hints/93.localopts.diff: -------------------------------------------------------------------------------- 1 | --- /dune/imp/localopts.h~ 2020-08-06 14:53:51.059851000 -0600 2 | +++ /dune/imp/localopts.h 2020-08-06 14:54:12.738637000 -0600 3 | @@ -17,8 +17,8 @@ 4 | #define LINEHZ 60 5 | #ifdef KERNEL 6 | #define NBUF 32 7 | +#define Q22 1 8 | #define UNIBUS_MAP 1 9 | -#define Q22 1 10 | #define VIRUS_VFORK 1 11 | #define UCB_RUSAGE 1 12 | #endif /* KERNEL */ 13 | -------------------------------------------------------------------------------- /hints/93.unpatch: -------------------------------------------------------------------------------- 1 | patch -V none -p1 -R < $patch 2 | cd $ROOT211 3 | cd usr/src/sys 4 | # Move from SMS -> KAZOO with this break 5 | rm -rf GENERIC SMS 6 | cd conf 7 | rm SMS 8 | # KAZOO is best effort... we have not a lot to go on and may not work 9 | ./config KAZOO 10 | ./config GENERIC 11 | cd ../GENERIC 12 | # Sigh, this looks like it was tweaked by hand, all the way back to 2.11 :( 13 | patch -V none < $HINTSDIR/93.localopts.diff 14 | # This is as good a place as any to snag this... 15 | cd $ROOT211 16 | from2.10.1 GENALLSYS 17 | -------------------------------------------------------------------------------- /hints/KAZOO: -------------------------------------------------------------------------------- 1 | # Machine configuration file for 2.11BSD distributed kernel. 2 | # 3 | # Format: 4 | # name value comments 5 | # An item's value may be either numerical, boolean or a string; if it's 6 | # boolean, use "YES" or "NO" to set it or unset it, respectively. Use 7 | # the default value and the comments field as indicators of the type of 8 | # field it is. 9 | 10 | ######################################### 11 | # MACHINE DEPENDENT PARAMETERS # 12 | ######################################### 13 | 14 | # Machine type 15 | # 2.11 runs on: 16 | # 11/44/53/70/73/83/84/93/94 with 22 bit addressing 17 | # 2.11 WILL NOT run on: 18 | # T11, 11/03/04/05/10/15/20/21/23/24/34/35/40/45/50/55 19 | # (45/50/55 because of max memory contraints, the others 20 | # because the MMUs do not have split I/D and/or supervisor) 21 | # Any QBUS machine using an ABLE Microverter should be treated as 22 | # if it were an 11/70. 23 | # 24 | # You should also make a point of having both floating point hardware and 25 | # at least a megabyte of memory, if possible. They aren't that expensive, 26 | # and they make a big difference. 27 | # 28 | # Including UNIBUS map support for machines without a UNIBUS will not cause 29 | # a kernel to die. It simply includes code to support UNIBUS mapping if 30 | # present. 31 | 32 | # The define UNIBUS_MAP implements kernel support for UNIBUS mapped 33 | # machines. However, a kernel compiled with UNIBUS_MAP does *not* have to 34 | # be run on a UNIBUS machine. The define simply includes support for UNIBUS 35 | # mapping if the kernel finds itself on a machine with UNIBUS mapping. 36 | UNIBUS_MAP NO # include support for UNIBUS mapping 37 | # always: 11/44/70/84 38 | # sometimes: 11/24 39 | # never: 11/23/34/35/40/45/50/53/ 40 | # 55/60/73/83 41 | 42 | # The define Q22 states that the configured system is a 22-bit Q-BUS machine 43 | # (if UNIBUS mapping isn't found) and no 18-bit DMA disk or tape devices 44 | # exist. If Q22 is defined and an 18-bit DMA disk or tape does exist, reads 45 | # and writes to the raw devices will cause DMA transfers to and from user 46 | # space which might be above 18-bits (256K) which would cause random 47 | # sections of memory (probably the kernel) to be overwritten (for reads). 48 | # An 18-bit DH isn't a problem since it never does DMA to user space and 49 | # clists (even with UCB_CLIST defined) are never above 18-bits. 50 | # 51 | # Note, the Q22 define is only effective if the kernel finds itself on a 52 | # machine without UNIBUS mapping. Note also that the presence of UNIBUS 53 | # mapping is only tested for if UNIBUS_MAP is defined. 54 | Q22 YES # 22-bit Qbus with no 18-bit devices 55 | # always 11/53/73/83 56 | # sometimes: 11/23 57 | # never: 11/24/34/35/40/44/50/ 58 | # 55/60/70/84 59 | 60 | # Defining NONFP to NO compiles in support for hardware floating point. 61 | # However, this doesn't require that floating point hardware be present. 62 | # Defining NONFP to YES will save you a few hundred bytes of text. 63 | NONFP NO # if no floating point hardware 64 | 65 | # Defining FPSIM to YES compiles a floating point simulator into the kernel 66 | # which will catch floating point instruction traps from user space. Note 67 | # that defining FPSIM to YES will only cost you text space. If you actually 68 | # have floating point hardware, the simulator just won't be used. The floating 69 | # point simulator is automatically compiled in if PDP11 (below) is GENERIC. 70 | FPSIM NO # floating point simulator 71 | 72 | #LINEHZ 50 # clock frequency European 73 | LINEHZ 60 # clock frequency USA 74 | 75 | # To enable profiling, the :splfix script must be changed to use spl6 instead 76 | # of spl7 (see conf/:splfix.profile), also, you have to have a machine with a 77 | # supervisor PAR/PDR pair, i.e. an 11/44/45/50/53/55/70/73/83/84, as well 78 | # as both a KW11-L and a KW11-P. 79 | # 80 | # Note that profiling is not currently working. We don't have any plans on 81 | # fixing it, so this is essentially a non-supported feature. 82 | PROFILE NO # system profiling with KW11P clock 83 | 84 | # PDP-11 machine type; allowable values are GENERIC, 23, 24, 34, 35, 40, 85 | # 44, 45, 50, 53, 55, 60, 70, 73, 83, 84. GENERIC should only be used to 86 | # build a distribution kernel. 87 | #PDP11 GENERIC # distribution kernel 88 | #PDP11 44 # PDP-11/44 89 | #PDP11 70 # PDP-11/70 90 | PDP11 73 # PDP-11/73 91 | 92 | ######################################### 93 | # GENERAL SYSTEM PARAMETERS # 94 | ######################################### 95 | 96 | IDENT KAZOO # machine name 97 | MAXUSERS 10 # maxusers on machine 98 | 99 | # BOOTDEV is the letter combination denoting the autoboot device, 100 | # or NONE if not using the autoboot feature. 101 | #BOOTDEV NONE # don't autoboot 102 | #BOOTDEV dvhp # DIVA Comp/V boot device 103 | #BOOTDEV hk6 # rk06 boot device 104 | #BOOTDEV hk7 # rk07 boot device 105 | BOOTDEV ra # MSCP boot device 106 | #BOOTDEV rl # rl01/02 boot device 107 | #BOOTDEV rm # rm02/03/05 boot device 108 | #BOOTDEV br # Eaton BR1537/BR1711 boot device 109 | #BOOTDEV sc11 # Emulex SC11/B boot device 110 | #BOOTDEV sc21 # Emulex SC21 boot device 111 | #BOOTDEV si # si 9500 boot device 112 | 113 | # Timezone, in minutes west of GMT 114 | #TIMEZONE 300 # EST 115 | #TIMEZONE 360 # CST 116 | #TIMEZONE 420 # WST 117 | TIMEZONE 480 # PST 118 | DST 1 # Daylight Savings Time (1 or 0) 119 | 120 | # Filesystem configuration 121 | # Rootdev, swapdev etc. should be in terms of makedev. For example, 122 | # if you have an SMD drive using the xp driver, rootdev would be xp0a, 123 | # or "makedev(10,0)". Swapdev would be the b partition, xp0b, or 124 | # "makedev(10,1)". The 10 is the major number of the device (the offset 125 | # in the bdevsw table in conf.c) and the 0 and 1 are the minor numbers 126 | # which correspond to the partitions as described in the section 4 manual 127 | # pages. You can also get the major numbers from the MAKEDEV script in 128 | # /dev. 129 | PIPEDEV makedev(5,1) # makedev(10,0) xp0a 130 | ROOTDEV makedev(5,1) # makedev(10,0) xp0a 131 | SWAPDEV makedev(5,2) # makedev(10,1) xp0b 132 | SWAPLO 0 # swap start address, normally 0 133 | 134 | # DUMPROUTINE indicates which dump routine should be used. DUMPDEV 135 | # should be in terms of makedev. If DUMPDEV is NODEV no automatic 136 | # dumps will be taken, and DUMPROUTINE needs to be set to "nulldev" to 137 | # resolve the reference. See param.h and ioconf.c for more information. 138 | # DUMPLO should leave room for the kernel to start swapping without 139 | # overwriting the dump. 140 | DUMPLO 512 # dump start address 141 | DUMPDEV makedev(5,2) # makedev(10,1) xp0b 142 | #DUMPROUTINE nulldev # no dump routine. 143 | #DUMPROUTINE hkdump # hk driver dump routine 144 | #DUMPROUTINE hpdump # hp driver dump routine 145 | DUMPROUTINE radump # ra driver dump routine 146 | #DUMPROUTINE rldump # rl driver dump routine 147 | #DUMPROUTINE rmdump # rm driver dump routine 148 | #DUMPROUTINE brdump # br driver dump routine 149 | #DUMPROUTINE sidump # si driver dump routine 150 | #DUMPROUTINE xpdump # xp driver dump routine 151 | #DUMPROUTINE tmsdump # tms driver dump routine 152 | 153 | # NSWAP should be set to the 512-byte block length of the swap device, e.g. 154 | # 9120 for an RM05 B partition. 155 | #NSWAP 9405 # dvhp?b or xp?b, DIVA COMP V 156 | #NSWAP 5940 # hk?a, RK611, RK06/07 157 | #NSWAP 2376 # hk?b, RK611, RK06/07 158 | #NSWAP 12122 # br?b, Eaton BR1538 or BR1711 159 | #NSWAP 8779 # hp?b or xp?b, RP04/05/06 160 | #NSWAP 4800 # rm?b or xp?b, RM02/03 161 | #NSWAP 9120 # xp?b, RM05 162 | #NSWAP 17300 # rd?b, RD51/52/53 163 | NSWAP 3100 # rd?c, RD51/52/53 164 | #NSWAP 10032 # ra?b, RC25 165 | #NSWAP 33440 # ra?b, RA60/80/81 166 | #NSWAP 16720 # ra?b, RD54, RA82 167 | #NSWAP 10240 # rl?, RL01 168 | #NSWAP 20480 # rl?, RL02 169 | 170 | ######################################### 171 | # KERNEL CONFIGURATION # 172 | ######################################### 173 | 174 | BADSECT NO # bad-sector forwarding 175 | CGL_RTP NO # allow one real time process 176 | EXTERNALITIMES NO # map out inode time values 177 | UCB_CLIST NO # clists moved from kernel data space 178 | UCB_FRCSWAP NO # force swap on expand/fork 179 | NOKA5 NO # KA5 not used except for buffers 180 | # and clists (_end < 0120000); 181 | QUOTA NO # dynamic file system quotas 182 | # NOTE -- *very* expensive 183 | 184 | # UCB_METER is fairly expensive. Unless you really look at the statistics 185 | # that it produces, don't bother running with it on. Suggested usage is 186 | # when you want to tune your system or you're curious about how effective 187 | # some algorithm, for example, the text coremap cacheing, is. UCB_RUSAGE 188 | # isn't nearly as bad, and should probably be included, although it's not 189 | # necessary for anything. 190 | UCB_METER NO # vmstat performance metering 191 | UCB_RUSAGE YES # enable more rusage fields 192 | 193 | # If your system is *seriously* short of memory, and you're doing a lot of 194 | # thrashing, 2.10's implementation of vfork can hurt you. Otherwise, run 195 | # with it on. You do not have to recompile any applications when you change 196 | # it. You should also get rid of any local code that uses VIRUS_VFORK to 197 | # decide whether to call fork or vfork, they should just call vfork. 198 | VIRUS_VFORK YES # include vfork system call 199 | 200 | # NBUF is the size of the buffer cache, and is directly related to the UNIBUS 201 | # mapping registers. There are 32 total mapping registers, of which 30 are 202 | # available. The 0'th is used for CLISTS, and the 31st is used for the I/O 203 | # page on some PDP's. It's suggested that you allow 7 mapping registers 204 | # per UNIBUS character device so that you can move 56K of data on each device 205 | # simultaneously. The rest should be assigned to the block buffer pool. So, 206 | # if you have a DR-11 and a TM-11, you would leave 14 unassigned for them and 207 | # allocate 16 to the buffer pool. Since each mapping register addresses 8 208 | # buffers for a 1K file system, NBUF would be 128. A possible exception would 209 | # be to reduce the buffers to save on data space, as they were 24 bytes per 210 | # header, last time I looked. 211 | # should be 'small' for GENERIC, so room for kernel + large program to run. 212 | NBUF 32 # buffer cache, *must* be <= 240 213 | 214 | # MAXMEM is the maximum core per process is allowed. First number 215 | # is Kb. 216 | MAXMEM (300*16) # 300K max per process ... 217 | 218 | # DIAGNOSTIC does various run-time checks, some of which are pretty 219 | # expensive and at a high priority. Suggested use is when the kernel 220 | # is crashing and you don't know why, otherwise run with it off. 221 | DIAGNOSTIC YES # misc. diagnostic loops and checks 222 | 223 | # The following entries used to be part of the kernel configuration, and, 224 | # for various reasons, are no longer modifiable. They are included here 225 | # for historical information ONLY. If "YES", they are always included in 226 | # the kernel, if "NO", they are never included. 227 | 228 | # ACCT YES # process accounting 229 | # DISPLAY NO # PDP-11/45/70 display routine 230 | # INSECURE NO # don't clear setuid/gid bits on write 231 | # INTRLVE NO # file system/disk interleaving 232 | # MENLO_JCL YES # job control 233 | # MENLO_KOV YES # kernel uses overlaid call sequence 234 | # MENLO_OVLY YES # support user process text overlays 235 | # MPX_FILS NO # hooks for multiplexed files 236 | # OLDTTY YES # old line discipline 237 | # RAND_XO YES # rand file exclusive open (flock(2)) 238 | # SMALL YES # smaller inode, buf, sched queues 239 | # TEXAS_AUTOBAUD YES # tty image mode to support autobauding 240 | # UCB_AUTOBOOT YES # system is able to reboot itself 241 | # UCB_BHASH YES # hashed buffer accessing 242 | # UCB_DBUF YES # use one buffer per disk 243 | # UCB_DEVERR YES # print device errors in mnemonics 244 | # UCB_ECC YES # disk drivers should do ECC 245 | # UCB_FSFIX YES # crash resistant filesystems 246 | # UCB_GRPMAST NO # group master accounts 247 | # UCB_IHASH YES # hashed inode table 248 | # UCB_LOAD YES # load average and uptime 249 | # UCB_LOGIN NO # login sys call 250 | # UCB_NTTY YES # new tty driver 251 | # UCB_PGRP NO # count process limit by process group 252 | # UCB_RENICE YES # renice system call (setpriority(2)) 253 | # UCB_SCRIPT YES # shell scripts can specify interpreter 254 | # UCB_SUBM YES # "submit" processing (stty(1)) 255 | # UCB_SYMLINKS YES # symbolic links 256 | # UCB_UPRINTF YES # send error messages to user 257 | # UCB_VHANGUP YES # revoke control tty access 258 | # UNFAST NO # don't use inline.h macro speedups 259 | 260 | # DISKMON has been absorbed into UCB_METER. 261 | # DISKMON UCB_METER # iostat disk monitoring 262 | 263 | # BSLOP was a #define in param.c for the TIU/Spider. It seems that 264 | # particular printer would DMA a few extra characters for you for free. 265 | # V7 came with a BSLOP of 2, but it was normally set to 0. Add the 266 | # following #defines to param.c, then change all occurrences of BSIZE 267 | # to bsize. 268 | # 269 | # /* BSLOP can be 0 unless you have a TIU/Spider*/ 270 | # #define BSLOP 0 271 | # int bsize = BSIZE + BSLOP; /* size of buffers */ 272 | 273 | # The UCB_NKB flag requires changes to UNIX boot pgms as well as changes to 274 | # dump, restore, icheck, dcheck, ncheck, mkfs. It includes the options 275 | # previously known as UCB_SMINO (smaller inodes, NADDR = 7) and UCB_MOUNT 276 | # (multiple superblocks per internal buffer). It's measured in KB byte 277 | # system buffers, it's not just a boolean. If you're not hearing what 278 | # I'm saying, don't even *think* of changing it. 279 | # UCB_NKB 1 # "n" KB byte system buffers 280 | 281 | ######################################### 282 | # PERIPHERALS: DISK DRIVES # 283 | ######################################### 284 | 285 | NBR 0 # EATON BR1537/BR1711, BR1538A, B, C, D 286 | 287 | NHK 0 # RK611, RK06/07 288 | 289 | NRAC 1 # NRAD controllers 290 | NRAD 1 # RX50, RC25, RD51/52/53, RA60/80/81 291 | 292 | NRK 0 # RK05 293 | 294 | NRL 0 # RL01/02 295 | 296 | NRX 0 # RX02 297 | 298 | NSI 0 # SI 9500 driver for CDC 9766 disks 299 | 300 | # Because the disk drive type registers conflict with other DEC 301 | # controllers, you cannot use XP_PROBE for the Ampex 9300 and 302 | # Diva drives. Read through /sys/pdpuba/hpreg.h and /sys/pdpuba/xp.c 303 | # for information on how to initialize for these drives. 304 | NXPC 0 # NXPD controllers (RH70/RH11 style) 305 | NXPD 0 # RM02/03/05, RP04/05/06, CDC 9766, 306 | # Ampex 9300, Diva, Fuji 160, SI Eagle. 307 | XP_PROBE YES # check drive types at boot 308 | 309 | NRAM 0 # RAM disk size (512-byte blocks) 310 | 311 | ######################################### 312 | # PERIPHERALS: TAPE DRIVES # 313 | ######################################### 314 | 315 | NHT 0 # TE16, TU45, TU77 316 | 317 | # Setting AVIVTM configures the TM driver for the AVIV 800/1600/6250 318 | # controller (the standard DEC TM only supports 800BPI). For more details, 319 | # see /sys/pdpuba/tm.c. 320 | NTM 0 # TM11 321 | AVIVTM YES # AVIV 800/1600/6250 controller 322 | 323 | NTS 0 # TS11 324 | 325 | NTMSCP 0 # TMSCP controllers 326 | NTMS 0 # TMSCP drives 327 | TMSCP_DEBUG YES # debugging code in TMSCP drive (EXPENSIVE) 328 | 329 | ######################################### 330 | # PERIPHERALS: TERMINALS # 331 | ######################################### 332 | 333 | # NKL includes both KL11's and DL11's. 334 | # It should always be at least 1, for the console. 335 | NKL 1 # KL11, DL11 336 | NDH 0 # DH11; NDH is in units of boards (16 each) 337 | NDM 0 # DM11; NDM is in units of boards (16 each) 338 | NDHU 0 # DHU11 339 | NDHV 0 # DHV11 340 | NDZ 1 # DZ11; NDZ is in units of boards (8 each) 341 | 342 | ######################################### 343 | # PERIPHERALS: OTHER # 344 | ######################################### 345 | NDN 0 # DN11 dialer 346 | NLP 0 # Line Printer 347 | LP_MAXCOL 132 # Maximum number of columns on line printers 348 | NDR 0 # DR11-W 349 | 350 | ######################################### 351 | # PSEUDO DEVICES, PROTOCOLS, NETWORKING # 352 | ######################################### 353 | # Networking only works with split I/D and SUPERVISOR space, i.e. with the 354 | # 11/44/45/50/53/55/70/73/83/84. NETHER should be non-zero for networking 355 | # systems using any ethernet. CHECKSTACK makes sure the networking stack 356 | # pointer and the kernel stack pointer don't collide; it's fairly expensive 357 | # at 4 extra instructions for EVERY function call AND return, always left 358 | # NO unless doing serious debugging. 359 | UCB_NET YES # TCP/IP 360 | CHECKSTACK NO # Kernel&Supervisor stack pointer checking 361 | NETHER 1 # ether pseudo-device 362 | 363 | # Note, PTY's and the select(2) system call do not require the kernel to 364 | # be configured for networking (UCB_NET). Note that you can allocate PTY's 365 | # in any number (multiples of 8, of 16, even, odd, prime, whatever). Nothing 366 | # in the kernel cares. PTY's cost 78 bytes apiece in kernel data space. You 367 | # should probably have at least 16 since so many applications use them: 368 | # script, jove, window, rlogin, ... 369 | NPTY 0 # pseudo-terminals - GENERIC sys needs NONE 370 | 371 | # To make the 3Com Ethernet board work correctly, splimp has to be promoted 372 | # to spl6; splfix files that do this are in conf/3Com; the config script 373 | # hopefully does the right thing. 374 | NEC 0 # 3Com Ethernet 375 | NDE 0 # DEUNA/DELUA 376 | NIL 0 # Interlan Ethernet 377 | NSL 1 # Serial Line IP 378 | NQE 1 # DEQNA 379 | NQT 0 # DEQTA (DELQA-YM, DELQA-PLUS) 380 | NACC 0 # ACC LH/DH ARPAnet IMP interface 381 | PLI NO # LH/DH is connected to a PLI 382 | NIMP 0 # ARPAnet IMP 1822 interface 383 | 384 | # The following devices are untested in 2.11BSD; some are untested since 385 | # before 2.9BSD. Some won't even compile. Most will require modification 386 | # of various Makefiles to include the correct source. Good luck. 387 | ENABLE34 NO # if have the ENABLE34 board 388 | 389 | NCSS 0 # DEC/CSS IMP11-A ARPAnet IMP interface 390 | NDMC 0 # DMC11 391 | NEN 0 # Xerox prototype (3 Mb) Ethernet 392 | NHY 0 # Hyperchannel 393 | NS 0 # Xerox NS (XNS) 394 | NSRI 0 # SRI DR11c ARPAnet IMP 395 | NTB 0 # RS232 interface for Genisco/Hitachi tablets 396 | -------------------------------------------------------------------------------- /hints/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Script to build a 2.11BSD pl 0 system from recoverd sources on a 2.11pl195 4 | # system that we have extant. 5 | 6 | R=/ur 7 | S=$R/usr/src 8 | 9 | # The build requires /dev/null to work, so create it. While we're here, go head 10 | # and create all the devices we'll need. 11 | echo Creating devices 12 | cd $R/dev 13 | sh ./MAKEDEV std hk0 hk1 ra0 ra1 ra2 ra3 mt0 mt1 nmt0 nmt1 xp0 xp1 rl0 rl1 pty0 dz0 lp0 local 14 | 15 | # 16 | # Once we have the .o files, we need to link them into binaries. We also need to 17 | # create libraries. ld(1) is what turns .o files into other .o files as well as 18 | # executables. nm(1) is used by the lorder(1) script to create the long list of 19 | # library dependencies, so it has to grok the old formwat too. We don't build 20 | # ar(1) here, though, because the ar(5) format is the same, even if the ar(1) 21 | # program changed to be the one from 4.3BSD in patch 173. 22 | # 23 | echo Bootstrapping ld and nm and faking ranlib 24 | cd $S/bin 25 | cc -o ld -O -i -I$R/usr/include ld.c -lc 26 | cc -o nm -O -i -I$R/usr/include nm.c -lc 27 | mkdir -p $R/bs 28 | cp ld nm as/as as/as2 $R/bs 29 | 30 | # OK, now it's time to jump into the chroot. 31 | echo Launching the chroot build 32 | cd / 33 | #chroot $R sh -c /usr/urbsd/build2.sh 34 | -------------------------------------------------------------------------------- /hints/build2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Note: has to run in 2.11BSDpl195 4 | 5 | # 6 | # Build script meant to be kicked off in the chroot to do all the building w/o 7 | # contaminating the 2.11pl195 host. We'll need to use that host *A*LOT* and I'd 8 | # rather not have to reconfigure it all the time. 9 | # 10 | S=/usr/src 11 | 12 | # 13 | # These files historically have been owned by root as well 14 | # 15 | chown -R root $S 16 | 17 | # 18 | # This is real ugly, but there's a bug in make that has issues with directories 19 | # in the future... so we hack around that by touching all the directories... 20 | # except touch doesn't work on 2.11 on directories, and there's no xargs 21 | # on this system. This is a big hammer, I know, but there's too many date 22 | # issues. The build orchestration scripts will set the date to something 23 | # historically accuate, and this will allow things to work in the face 24 | # of make not descending into a directory that's in the future. 25 | # 26 | for i in `find $S -type d -print` ; do 27 | touch $i/__fred__ && rm $i/__fred__ 28 | done 29 | 30 | # 31 | # Bootstap as to make .s -> .o. That's done in the recovery script due to the 32 | # diffuclty of marshalling all the bits to the 2.11 system. Here we just copy 33 | # the results. We also clean up all the binaries we produced in the hacky way 34 | # so we don't have issues with permissions and/or timestamps later. We'll 35 | # also do a make clean, but this is an abundance of caution move at this staage 36 | # given the turn around time. 37 | # 38 | echo Copying bootstrapped as... 39 | # cd $S/bin/as 40 | # cp as /bin 41 | # cp as2 /lib 42 | # rm -f as as2 *.o 43 | cd /bs 44 | cp as ld nm /bin 45 | cp as2 /lib 46 | 47 | # 48 | # Copy over the bootstrapped nm and ld. 49 | # 50 | # Finally, we do technically need ranlib(1) if we don't want to do a crapton of 51 | # surgery on the source tree, so remove it and copy /bin/true into it's 52 | # place. This will result in slower link times for the first few binaries we 53 | # build, but the binaries will be the same and ranlib(1) will be one of those 54 | # libraries. Except for libc, which has some circular dependencies, so we have 55 | # to list -lc on the command line below to pull in all those cycles. It won't 56 | # actually link things multiple times, though, since it only gets .o's that 57 | # were missed in the first pass. 58 | # 59 | # cd .. 60 | # cp nm ld $R/bin # see above 61 | # rm -f ld nm 62 | rm $R/usr/bin/ranlib 63 | cp $R/bin/true $R/usr/bin/ranlib 64 | 65 | # 66 | # Time to build libc 67 | # 68 | echo Bootstrapping libc 69 | cd $S/lib/libc 70 | make clean 71 | make 72 | make install 73 | make clean 74 | 75 | [ -r /lib/libc.a ] || (echo no libc.a && exit 1) 76 | 77 | # 78 | # Now we can build new binaries. We build ranlib now because in the 2.11pl195 79 | # system, has inconsistent include files that lead to two struct nlist being 80 | # defined. Once we have ranlib built, then all the tools we need for the next 81 | # stage of bootstrapping are there. 82 | # 83 | echo Bootstrapping a real ranlib 84 | cd $S/usr.bin 85 | cc -O -i -o ranlib ranlib.c -lc 86 | cp ranlib /usr/bin 87 | rm -f ranlib 88 | ranlib /lib/libc.a 89 | 90 | # 91 | # Now we need to install a few binaries needed for the rest of the build 92 | # 93 | echo Bootrapping ar and strip 94 | cd $S/bin 95 | make ar strip 96 | cp ar strip /bin 97 | rm ar strip 98 | 99 | # 100 | # Install(1) knows about the format that changed, and so needs to be installed 101 | # before we use 'install -s' or that will fail. 102 | # 103 | echo Bootstrapping install 104 | cd $S/usr.bin 105 | make xinstall 106 | cp xinstall /usr/bin/install 107 | 108 | # 109 | # Build and install the C compiler. Rebuild and install 110 | # the C library. Rebuild and reinstall the C compiler. 111 | # (likely overkill). 112 | # 113 | # Then build and install all the libraries in $S/usr.lib, 114 | # but not the programs, they need these same libraries 115 | # so we'll catch them later. 116 | # 117 | # Finally, do a simple make all. 118 | # 119 | # Make build is almost the same as this (gets details 120 | # wrong about usr.lib), but fails in building libc the 121 | # second time for reasons unknown. This sequence should 122 | # be completely reproducible. 123 | # 124 | cd $S 125 | make clean 126 | ( 127 | cd lib 128 | for i in ccom cpp c2; do 129 | (cd $i; make; make install; make clean) 130 | done 131 | ( 132 | cd libc 133 | # Sometimes we fail to descend for reasons as 134 | # yet unknown -- same name or time of dir? idk 135 | cd pdp/compat-4.1 136 | make 137 | cd .. 138 | make 139 | cd .. 140 | make 141 | make install 142 | make clean 143 | ) 144 | for i in ccom cpp c2; do 145 | (cd $i; make; make install; make clean) 146 | done 147 | ) 148 | ( 149 | cd usr.lib 150 | # We need to only build real libraries here and lib.b 151 | # gets in the way of using the simple lib* here. 152 | for i in lib[0-9A-Za-z]*; do 153 | (cd $i; make; make install) 154 | done 155 | # usr.lib's install does this, since we're bypassing 156 | # that, we need to do the link here. Otherwise things 157 | # fail later. 158 | rm -f /usr/lib/libm.a /usr/lib/libm_p.a 159 | ln /usr/lib/libom.a /usr/lib/libm.a 160 | ln /usr/lib/libom_p.a /usr/lib/libm_p.a 161 | # 162 | # Rebuild these now too, while we're here 163 | # 164 | for i in lpr me sendmail; do 165 | (cd $i; make clean; make ; make install) 166 | done 167 | make getNAME 168 | make makekey 169 | ) 170 | # Build some man pages that aren't otherwise built 171 | # These all have dependencies in their Makefiles... 172 | # still need to work out how best to regenerate all the 173 | # man pages for the release. 174 | (cd bin/chpass; /usr/man/manroff chpass.1 > chpass.0) 175 | (cd bin/passwd; /usr/man/manroff passwd.1 > passwd.0) 176 | (cd etc/chroot; /usr/man/manroff chroot.8 > chroot.0) 177 | (cd etc/fingerd; /usr/man/manroff fingerd.8 > fingerd.0) 178 | (cd etc/ftpd; /usr/man/manroff ftpd.8 > ftpd.0) 179 | (cd etc/mkpasswd; /usr/man/manroff mkpasswd.8 > mkpasswd.0) 180 | (cd etc/vipw; /usr/man/manroff vipw.8 > vipw.0) 181 | (cd ucb/ftp; /usr/man/manroff ftp.1 > ftp.0) 182 | (cd ucb/lock; /usr/man/manroff lock.1 > lock.0) 183 | (cd new/patch; /usr/man/manroff patch.man > patch.0) 184 | 185 | # Now we need to clean out /usr/man/cat?/* and rebuild it 186 | # but the normal way of doing that freaks make out (line too 187 | # long). so we use the helper function to do all that. It 188 | # create the man page directly in /usr/man and then greps 189 | # through the Makefiles to create the hard links. 190 | ( 191 | find /usr/man/cat* -name "*.0" -exec rm {} \; 192 | cd /usr/src/man 193 | DESTDIR= 194 | export DESTDIR 195 | for i in man[1-8]; do 196 | echo doing /usr/src/man/$i 197 | cd /usr/src/man/$i 198 | MDIR=`grep MDIR= Makefile | awk '{print $2;}'` 199 | export MDIR 200 | for j in *.[1-9]; do 201 | c=`echo $j | sed -e 's=\.[1-9]$=.0='` 202 | case $j in 203 | eqn.1) 204 | eqn < $j | nroff -man -h > $MDIR/$c 205 | ;; 206 | *) 207 | nroff -man -h < $j > $MDIR/$c 208 | ;; 209 | esac 210 | done 211 | grep "ln " Makefile | sh -x 212 | done 213 | cd /usr/src 214 | ) 215 | 216 | # Build it all again now that we've done the above dance 217 | make all 218 | make install 219 | # words is installed in the wrong place, so move it 220 | mv $ROOT211/words $ROOT211/usr/games 221 | # Install a few artifacts that aren't done by default 222 | (cd games/battlestar ; make stringfile) 223 | ( # because make install doesn't work, we have to copy from the 224 | # /usr/src/man/Makefile and tewak slightly 225 | cd man; 226 | make scriptinstall 227 | # for file in `find /usr/man -type f -name '*.0' -print`; do \ 228 | # sed -n -f /usr/man/makewhatis.sed $$file; \ 229 | # done | sort -u > whatis.db 230 | # install -o bin -g bin -m 444 whatis.db /usr/man/whatis 231 | install -c -o bin -g bin -m 444 man.template /usr/man/man.template 232 | ) 233 | # Need to rebuild the find database... 234 | /usr/lib/find/updatedb 235 | make clean 236 | 237 | # 238 | # usr/adm needs some blank files created so logging, etc works. 239 | # 240 | cd /usr/adm 241 | rm -f lpd-errs acct shutdownlog usracct savacct daemonlog debuglog 242 | touch lpd-errs acct shutdownlog usracct savacct daemonlog debuglog 243 | 244 | # 245 | # Now build and install the kernel. If all went well, then we're good to go 246 | # here. Set the hostname to the name in the example kernel output from the 247 | # 2.11 setup docs. 248 | # 249 | hostname wlonex.imsd.contel.com 250 | cd /usr/src/sys/GENERIC 251 | make && make install && (cd / ; cp unix genunix; sh -x /GENALLSYS) 252 | 253 | # 254 | # Need to build mdec 255 | # 256 | cd /usr/src/sys/mdec 257 | make clean 258 | make 259 | make install 260 | 261 | # 262 | # Ditto autoconfig... 263 | # 264 | cd /usr/src/sys/autoconfig 265 | (set +e; rm -f ../pdpuba/autoconfig || true) 266 | make clean 267 | make 268 | # (set +e; mv ../pdpuba/autoconfig . || true) 269 | make install 270 | 271 | # 272 | # Ditto boot 273 | # 274 | cd /usr/src/sys/pdpstand 275 | make clean 276 | make 277 | make install 278 | 279 | # 280 | # Hacks for making things bootable 281 | # 282 | # Assume ra device for bootstrap we're ra1 still! 283 | dd if=/mdec/rauboot of=/dev/ra1a count=1 284 | # Try to mount /usr, but it's broken for reasons unknown 285 | # newer 2.11BSD want ra0g, but as released 2.11 wants 286 | # ra0c according to the man page... Need to check the 287 | # actual driver if this doesn't work. 288 | echo /dev/ra0c:/usr:rw:1:2 >> /etc/fstab 289 | 290 | # To boot, though, we have to neuter sendmail 291 | mv /usr/lib/sendmail /usr/lib/sendmail.off 292 | 293 | # And let's just copy the right kernel to unix 294 | cp /raunix /unix 295 | 296 | echo BUILD2 HAS COMPLETED SUCCESSFULLY 297 | -------------------------------------------------------------------------------- /hints/root.cache: -------------------------------------------------------------------------------- 1 | ; @(#)root.cache 5.1 (Berkeley) 06/30/90 2 | 3 | ; Initial cache data for root domain servers. 4 | . IN NS NS.NIC.DDN.MIL. 5 | IN NS A.ISI.EDU. 6 | IN NS AOS.BRL.MIL. 7 | IN NS C.NYSER.NET. 8 | IN NS GUNTER-ADAM.AF.MIL. 9 | IN NS NS.NASA.GOV. 10 | IN NS TERP.UMD.EDU. 11 | 12 | ; Prep the cache (hotwire the addresses). Order does not matter. 13 | NS.NIC.DDN.MIL IN A 192.67.67.53 14 | A.ISI.EDU IN A 26.3.0.103 15 | IN A 128.9.0.107 16 | AOS.BRL.MIL IN A 128.20.1.2 17 | IN A 192.5.25.82 18 | C.NYSER.NET. IN A 192.33.4.12 19 | GUNTER-ADAM.AF.MIL. IN A 26.1.0.13 20 | NS.NASA.GOV. IN A 128.102.16.10 21 | IN A 192.52.195.10 22 | TERP.UMD.EDU. IN A 128.8.10.90 23 | -------------------------------------------------------------------------------- /mk211bsd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | . vars 5 | 6 | # here to the end of pprint stolen from nanobsd. 7 | export PPLEVEL=1 8 | export STARTTIME=`date +%s` 9 | export APOUT_ROOT 10 | # File descriptor 3 is used for logging output 11 | exec 3>&1 12 | # Progress Print 13 | # Print $2 at level $1. 14 | pprint ( ) ( 15 | lvl=$1 16 | shift 17 | if [ "$lvl" -le $PPLEVEL ]; then 18 | runtime=$(( `date +%s` - $STARTTIME )) 19 | printf "%s %.${lvl}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#####" "$*" 1>&3 20 | fi 21 | ) 22 | 23 | extract_dump() { 24 | # Even with this icky code, this is imperfect: symlinks don't work 25 | local r fn inode 26 | 27 | r=$1 28 | $APOUT $TOOLBIN/dumpdir f $r | tail +5 | grep -v '/dev/[a-z]' | fgrep -v .. | \ 29 | ( while read inode fn; do 30 | fn=${fn#/} 31 | case $fn in 32 | */.) 33 | mkdir ${fn%%/.} ;; 34 | *) 35 | echo 1 | $APOUT $TOOLBIN/restor xf $r ${fn} 36 | mv $inode $fn 37 | ;; 38 | esac 39 | done ) 40 | # restor is impefect and leaves divots behind 41 | rm -f rst* 42 | } 43 | 44 | cleanup() { 45 | # Cleanup old stuff -- we recreate it all from extant artifacts with this script 46 | # and some helpers 47 | chmod -R +w $TAPE211 $TOOLS $ROOT211 $TAPE2101 $ROOT2101 48 | rm -rf $TAPE211 $TOOLS $ROOT211 $TAPE2101 $ROOT2101 ${PATCHDIR} 49 | } 50 | 51 | mktools() { 52 | # Create tools areas 53 | mkdir -p $TOOLS $TOOLBIN 54 | 55 | # We need to use the pdp-11 a.out user-mode emulator. Copy it from the 56 | # unix-jun72 effort and build. 57 | ( 58 | rm -rf $APOUT_SRC 59 | mkdir -p $APOUT_SRC 60 | cd $APOUT_SRC 61 | tar -xv -f ${TUHS}/Distributions/Research/Dennis_v1/svntree-20081216.tar.gz \ 62 | --strip-components 3 unix72/tools/apout 63 | # fixes to make it happier with restor 64 | patch -p1 < $TOP/apout.patch 65 | make clean 66 | # gcc fails for me so force clang 67 | make CC=clang apout 68 | ) 69 | 70 | # Need to extract two helper programs. We use the actual 2.11 binaries to 71 | # minimize porting and maximize compatibility. This assumes that we have a 72 | # libarchive based tar. Thankfully, TUHS has an easy to get copy of 73 | # the most use version of these programs. 74 | tar xvf ${UCB}/2.11BSD/root.afio.gz sbin/dumpdir sbin/restor 75 | mv sbin/* $TOOLBIN 76 | rmdir sbin 77 | } 78 | 79 | unpack_211() { 80 | # 81 | # Unpack the pl195 tape. This is a series of files needed to bootstreap 2.11BSD 82 | # The format of a 2.11BSD boot tape is: 83 | # 84 | # File Blocksize Content 85 | # 0 512 mtboot 86 | # 512 mtboot 87 | # 512 boot 88 | # 1 1024 disklabel.bin 89 | # 2 1024 mkfs.bin 90 | # 3 1024 restor.bin 91 | # 4 1024 icheck.bin 92 | # 5 10240 root.dmp / dump, need to use restor to get files 93 | # 6 10240 usr.tar /usr w/o /usr/src or /usr/include 94 | # 7 10240 sys.tar /usr/src/sys /usr/src/include 95 | # 8 10240 src.tar /usr/src/{everything-else} 96 | # 97 | [ -d $TAPE211 ] || ( 98 | mkdir $TAPE211 99 | cd $TAPE211 100 | tar xvf ${UCB}/2.11BSD-pl195.tar 101 | gunzip root.dmp.gz 102 | ) 103 | 104 | # Now 'fake' install the 2.11BSD system into $ROOT211. This does nothing to 105 | # configure the 'image'. The patches touch the entire directory tree, so 106 | # this is the easiest way to cope. But looking at the shell below, it's 107 | # far from the cleanest way to do this... 108 | # Also, have a kludge for running this a bunch where we just restore the 109 | # root from the cached tarball... 110 | if [ -d $ROOT211 ] ; then 111 | if [ -r $ROOT211TAR ]; then 112 | pprint 1 Refreshing 2.11 root from tarball 113 | rm -rf $ROOT211 114 | (cd $TOP ; sudo tar xf $ROOT211TAR) 115 | fi 116 | else 117 | ( 118 | mkdir $ROOT211 119 | cd $ROOT211 120 | # can't use TAPE211 because paths grow too long 121 | extract_dump ../tape-2.11/root.dmp 122 | # symlinks don't work, but they are important for the reverse patching, 123 | # so fix all known ones. Thankfully, all of them extract with a file 124 | # containing a path to the target. There's others in the system, but 125 | # tar gets them right. 126 | for i in vmunix sys etc/termcap etc/crash bin/sort; do 127 | ln -sf $(cat $i) $i 128 | done 129 | mkdir usr 130 | ( 131 | cd usr 132 | tar xvf $TAPE211/usr.tar.gz # restore /usr 133 | mkdir src 134 | cd src 135 | tar xvf $TAPE211/sys.tar.gz # restore /usr/src/sys and /usr/src/include 136 | tar xvf $TAPE211/src.tar.gz # rest of /usr/src 137 | ) 138 | 139 | # Some 'fixes' for things that make this root less pure, but that allow 140 | # for the patch process to work. 141 | 142 | # big hammer, make this relative 143 | ln -sf usr/src/sys sys 144 | # This messes up permissions, but lets more patches succeed. 145 | chmod -R +w $ROOT211 146 | ) 147 | if [ ! -r $ROOT211TAR ]; then 148 | (cd $TOP ; sudo tar xf $ROOT211TAR $ROOT211) 149 | fi 150 | fi 151 | } 152 | 153 | unpack_2101() { 154 | # 155 | # As we reconstruct, we'll need some files from 2.10.1. 156 | # 157 | # Tape 1 158 | # File RecSize #Recs Content 159 | # ---- ------- ----- ------- 160 | # 0 512 41 tapeboot,tapeboot,boot 161 | # 1 1024 28 mkfs 162 | # 2 1024 27 restor 163 | # 3 1024 26 icheck 164 | # 4 10240 451 dump of root fs 165 | # 5 10240 2277 tar of /usr without usr/src 166 | # 6 10240 466 tar of /usr/src/{sys,include} 167 | # Tape 2 168 | # File RecSize #Recs Content 169 | # ---- ------- ----- ------- 170 | # 0 10240 3959 tar of /usr without /usr/src 171 | # The exact tape files are in the two directories 'tape1' and 'tape2' 172 | # respectively. The files have been gzip'd to save space. 173 | # In the directory 'root' is the unpacked version of the system. 174 | # 175 | # Turns out that the source is extracted wrong in the root file, leading to confusion, 176 | # so we'll do the whole thing we do for 2.11 for convenience. 177 | # 178 | ( 179 | mkdir $TAPE2101 180 | cd $TAPE2101 181 | tar xvf ${UCB}/2.10.1bsd.tar 182 | rm -f tape1/file4 183 | gunzip tape1/file4.gz # root.dump file 184 | ) 185 | 186 | # Now 'fake' install the 2.10.1BSD system into $ROOT2101. This does nothing to 187 | # configure the 'image'. The patches touch the entire directory tree, so 188 | # this is the easiest way to cope. But looking at the shell below, it's 189 | # far from the cleanest way to do this... 190 | ( 191 | mkdir $ROOT2101 192 | cd $ROOT2101 193 | extract_dump ../tape-2.10.1/tape1/file4 194 | # symlinks don't work, so fix all known ones. Thankfully, all of them 195 | # extract with a file containing a path to the target. There's others in 196 | # the system, but tar gets them right. 197 | for i in vmunix sys etc/termcap etc/crash bin/sort; do 198 | ln -sf $(cat $i) $i 199 | done 200 | mkdir usr 201 | ( 202 | cd usr 203 | tar xvf $TAPE2101/tape1/file5.gz # restore /usr 204 | mkdir src 205 | cd src 206 | tar xvf $TAPE2101/tape1/file6.gz # restore /usr/src/sys and /usr/src/include 207 | tar xvf $TAPE2101/tape2/file0.gz # rest of /usr/src 208 | ) 209 | ) 210 | } 211 | 212 | # Unpack just enough of V7 to assemble the putative 2.11 assembler since 213 | # newer assemblers barf on assembling it. 214 | unpack_v7() { 215 | pprint 1 "Extracting minimal v7 to boostrap as" 216 | rm -rf $ROOTV7 217 | mkdir $ROOTV7 218 | mkdir $ROOTV7/tmp 219 | cd $ROOTV7 220 | tar xvf $TAPEV7 bin/as bin/ld bin/nm bin/ar lib 221 | } 222 | 223 | extract_patches() { 224 | ( set -x 225 | mkdir $PATCHDIR 226 | cd $PATCHDIR 227 | for i in $(jot 19 1); do 228 | j=$(printf %02d $i) 229 | tar xf $PATCHSRC/${j}0-${j}9.tar.bz2 230 | done 231 | tar xf $PATCHSRC/001-009.tar.bz2 232 | # we're at patch 195, so remove the rest 233 | rm -f 196 197 198 199 234 | # the catchup patch to 80 shows some patches were missing, regen 235 | mkdir -p $TEMPDIR/catch-up 236 | chdir $TEMPDIR/catch-up 237 | tar xvf $PATCHSRC/usr_update.tar.bz2 238 | tar xvf patches.tar.bz2 239 | # mkdir usr 240 | # ( cd usr; tar xvf ../usr.update.tar.Z ) 241 | # 242 | # Recover patch 18a csh size reduction... 243 | # 244 | sed -ne '/\/old\/src\/bin\/csh\/alloc\.c/,/\/old\/src\/bin\/dd\.c/p' < xab > $PATCHDIR/18a 245 | # 246 | # changes to warp 247 | # 248 | sed -ne '/\/old\/src\/games\/warp\/Makefile/,/\/old\/src\/games\/words\/Makefile/p' < xac > $PATCHDIR/42a 249 | # 250 | # Patch 78 had an update to rn, so create it as 78a 251 | # 252 | sed -ne '/\/old\/src\/new\/rn\/addng\.c/,$p' < xas > $PATCHDIR/78a 253 | # 254 | # And now the trickiest one... the tftp changes. These were made a few 255 | # days after patch 1 (May 4, 1991) on May 15th, but do not appear in the 256 | # official patch lists from sms. But they are in the catch up patch in 257 | # several parts. Plus, the catch-up replaces the man pages rather than 258 | # patches them. I've opted, instead, to patch them so I generate 259 | # patches from the extracted files against 2.10.1, but with the 260 | # source moved. 261 | # 262 | sed -ne '/\/old\/src\/etc\/tftpd\/tftpd\.c/,/\/old\/src\/etc\/tunefs\.c/p' < xac > $PATCHDIR/1a 263 | sed -ne '/\/old\/src\/ucb\/tftp\/main\.c/,/\/old\/src\/ucb\/vlp\/vlp\.c/p' < xas >> $PATCHDIR/1a 264 | # 265 | # lib/uucp/USERFILE was changed just after the release to remove 266 | # local hacks 267 | # 268 | sed -ne '/\/old\/lib\/uucp\/USERFILE/,/\/old\/src\/bin\/adb\/opset\.c/p' < xaa > $PATCHDIR/1b 269 | # Small hack to get the 37a.unpatch script to run. 270 | touch $PATCHDIR/37a 271 | # 272 | # There was an update to kern_acct.c to stop writting accounting logs when the 273 | # free space got too low. 274 | # 275 | sed -ne '/\/old\/src\/sys\/h\/acct\.h/,/\/old\/src\//p' < xai > $PATCHDIR/53a 276 | sed -ne '/\/old\/src\/sys\/sys\/kern_acct\.c/,/\/old\/src\//p' < xaq >> $PATCHDIR/53a 277 | ) 278 | } 279 | 280 | # helper routine to recover from 2.10.1BSD 281 | from2.10.1() { 282 | local i 283 | 284 | for i; do 285 | echo "Patch $p | $i | 2.10.1BSD | " >> $RECOVERY_LOG 286 | echo "Patch $p: Recovering $i from 2.10.1BSD" 287 | pprint 1 "Recovering $i from 2.10.1BSD" 288 | cp -p $ROOT2101/$i $ROOT211/$i 289 | chmod +w $ROOT211/$i 290 | done 291 | } 292 | 293 | from4.3() { 294 | local i tb f 295 | 296 | for i; do 297 | cd $TEMP 298 | echo "Patch $p | $i | 4.3BSD | " >> $RECOVERY_LOG 299 | echo "Patch $p: Recovering $i from 4.3BSD" 300 | pprint 1 "Recovering $i from 4.3BSD" 301 | f=${i#/} 302 | case $f in 303 | usr/src/sys/*) 304 | tb=srcsys.tar.gz 305 | f=${f#usr/src/sys/} 306 | mkdir -p usr/src/sys 307 | cd usr/src/sys 308 | ;; 309 | usr/src/*) 310 | tb=src.tar.gz 311 | f=${f#usr/src/} 312 | mkdir -p usr/src 313 | cd usr/src 314 | ;; 315 | *) 316 | die Bad file $i 317 | ;; 318 | esac 319 | tar xvf $UCB/4.3BSD/$tb $f 320 | chmod +w $f 321 | done 322 | cd $TEMP 323 | tar cf - usr/src | (cd $ROOT211 ; tar xvf -) 324 | } 325 | 326 | bail() { 327 | pprint 1 $* 328 | echo $* 329 | exit 1 330 | } 331 | 332 | undo_patch_level() ( 333 | local p patch s 334 | p=$1 335 | patch=$PATCHDIR/$p 336 | 337 | export TEMP=$TEMPDIR/$p 338 | mkdir -p $TEMP 339 | cd $TEMP 340 | case $p in 341 | *.tar) 342 | pprint 1 "patch $p: tarball of patches" 343 | echo "patch $p: tarball of patches" 344 | cd $TEMP 345 | tar xvf $patch 346 | pp=${p%%.tar} 347 | cd $pp 348 | chmod -R +w . 349 | cwd=$(pwd) 350 | if [ -r $HINTSDIR/${pp}.unpatch ] ; then 351 | pprint 1 massaging patches with ${pp}.unpatch 352 | echo massaging patches with ${pp}.unpatch 353 | . $HINTSDIR/${pp}.unpatch 354 | else 355 | pprint 1 nothing 356 | fi 357 | for i in b.*; do 358 | ( cd ${ROOT211} 359 | echo patch -V none -R -p1 ${cwd}/$i 360 | patch -V none -R -p1 < ${cwd}/$i 361 | ) 362 | done 363 | ;; 364 | *) 365 | if ! [ -f $PATCHDIR/$p ] || grep -q '^#! */bin/sh' $PATCHDIR/$p; then 366 | # shar file were always complex, though in a few 367 | # degenerate cases were just extract a patch file 368 | # of varying names and apply it. Other times one 369 | # had to do more. The unshar script is expected 370 | # to undo all that. 371 | s=$HINTSDIR/${p}.unshar 372 | [ -r $s ] || bail $p.unshar not found 373 | pprint 1 "patch $p: undoing shar with $s" 374 | echo "patch $p: undoing shar with $s" 375 | . $s 376 | else 377 | pprint 1 "patch $p: simple patch" 378 | ( 379 | cd $ROOT211 380 | if [ -r $HINTSDIR/${p}.unpatch ] ; then 381 | # Some patches look like pure patches, but 382 | # in reality the instructions had people do 383 | # more than just apply the patch, and the 384 | # unpatch file is supposed to sort it out 385 | # either by patch -R + commands or by just 386 | # doing commands to restore the old state. 387 | pprint 1 undoing patch with ${p}.unpatch 388 | echo undoing patch with ${p}.unpatch 389 | . $HINTSDIR/${p}.unpatch 390 | else 391 | # Some patches aren't relative to the root 392 | # of the tree, so the setup routines allow 393 | # us to cd before apply the patch. Though 394 | # it may make sense to fold this into the 395 | # unpatch mechanism instead. 396 | if [ -r $HINTSDIR/${p}.setup ] ; then 397 | pprint 1 setup to unapply $p with $p.setup 398 | echo setup to unapply $p with $p.setup 399 | . $HINTSDIR/${p}.setup 400 | fi 401 | pprint 1 "Reverse applying $PATCHDIR/$p" 402 | echo "Reverse applying $PATCHDIR/$p" 403 | patch -V none -R -p1 < $PATCHDIR/$p 404 | fi 405 | ) 406 | fi 407 | ;; 408 | esac 409 | ) 410 | 411 | # We have to bootstrap the 2.11 as using v7 assembler on the host. 412 | # apout doesn't support the 2.10.1 as binary, but does the v7 413 | # one. This will get us a binary that uses v7 system calls, which 414 | # sadly is badly broken, even linking the 2.10.1 libc. 415 | bootstrap_as() ( 416 | local v7=$1 syscalls 417 | 418 | pprint 1 "Bootstrapping as" 419 | # bootstrap system calls 420 | cd $ROOT211/usr/src/bin/as 421 | export APOUT_ROOT=$ROOTV7 422 | $APOUT $v7/bin/as - -V as1?.s 423 | mv a.out as1.o 424 | $APOUT $v7/bin/as - -V as2?.s 425 | mv a.out as2.o 426 | # OK, now we need to create a mini libc that has just the 427 | # .o's that we need to make things link. Since this was 428 | # written at a low level, only need to create system calls 429 | # which helps a lot. Use as1.o and as2.o to find out the 430 | # undefined calls. They are all syscalls, and _end which 431 | # the linker creates. 432 | ( 433 | syscalls=$($APOUT $v7/bin/nm as1.o as2.o | grep ' U ' | awk '{print $2;}' | sort -u | grep -v _end | sed -e 's/^_//') 434 | cd $ROOT211/usr/src/lib/libc/pdp/sys 435 | for i in $syscalls sbrk; do 436 | [ -r $i.s ] || continue 437 | export APOUT_ROOT=$ROOT211 # to find right includes 2.11 cpp for long #defines 438 | $APOUT $ROOT211/lib/cpp -E $i.s | sed -e 's;^#;/;' > x.s 439 | export APOUT_ROOT=$ROOTV7 # to find /lib/as2 440 | $APOUT $v7/bin/as -V x.s 441 | mv a.out $i.o 442 | rm -f x.s 443 | done 444 | cat < x.s 445 | / do nothing signal call -- as doesn't need it to work, just resolve for bootstrapping 446 | .globl _signal 447 | _signal: 448 | rts pc 449 | EOF 450 | $APOUT $v7/bin/as -V x.s 451 | mv a.out signal.o 452 | rm -f x.s 453 | rm -f bootstrap.o 454 | # ld doesn't exit cleanly here for some reason 455 | # Both v7 and 2.11 Makefiles for libc ignore the status. 456 | $APOUT $v7/bin/ld -x -r -o bootstrap.o *.o || true 457 | cp bootstrap.o $ROOT211/usr/src/bin/as 458 | # We need to cleanup the .o's that we created. Otherwise builds 459 | # can fail due to permission issues and time issues. 460 | rm *.o 461 | ) 462 | $APOUT $v7/bin/ld -n -s as1.o bootstrap.o -o as 463 | $APOUT $v7/bin/ld -n -s as2.o bootstrap.o -o as2 464 | ) 465 | 466 | # Set the stage 467 | [ -n "$FORCE_CLEAN" ] && cleanup 468 | [ -d $TOOLS ] || mktools 469 | unpack_211 470 | [ -d $ROOT2101 ] || unpack_2101 471 | [ -d $ROOTV7 ] || unpack_v7 472 | [ -z $TEMPDIR ] && die oh no 473 | clean_tree $TEMPDIR 474 | [ -d $PATCHDIR ] || extract_patches 475 | # 476 | # OK. Now we have a good root for both 2.10.1BSD and 2.11pl195BSD with patches 477 | # extracted. We can start to walk them backwards to get back to the 2.11 as 478 | # shipped, or as close as we can come to that in the absence of actual extant 479 | # artifacts. 480 | # 481 | # If these were modern patches, then we'd just do patch -R 195 times. However, 482 | # they aren't. There's a number of files that were lost in this process since 483 | # the instructions have you do things like in patch 180: 484 | # 485 | 486 | # Hack: 487 | # Somewhere along the way, net_csv.s and mch_csv.s became hard-linked together. 488 | # This causes patch 96 to fail, so unhard link them, even though the changes 489 | # appear to be the same to both files in 96. Why are they hard linked? Who knows. 490 | # They were separate files in 2.10.1. 491 | rm $ROOT211/usr/src/sys/pdp/net_csv.s 492 | cp -p $ROOT211/usr/src/sys/pdp/mch_csv.s $ROOT211/usr/src/sys/pdp/net_csv.s 493 | 494 | # There's .o detritits in /usr/src/sys/autoconfig that gets in the way, so 495 | # remove it. Also remove any libraries in the source tree as well as a known 496 | # list of executables. None of these binaries could have been in 2.11BSD as 497 | # released, though, since they all seem to have the newer symbol format with a 498 | # string table (and toyset didn't happen for until patch 151). 499 | find $ROOT211/usr/src -name \*.o -o -name lib\*.a | xargs rm -f 500 | for i in \ 501 | new/jove/doc/cmds.doc new/nmcoll/nmcoll.0 \ 502 | sys/autoconfig/autoconfig sys/pdpstand/boot sys/pdpstand/mkfs \ 503 | sys/pdpstand/restor sys/pdpstand/icheck sys/pdpstand/maketape \ 504 | sys/pdpstand/toyset sys/sys/tags sys/pdp/symbols.sort \ 505 | sys/pdpstand/xp.c.fuji160 sys/conf/NONET \ 506 | games/hack/crypt ucb/w \ 507 | usr.lib/libF77/profiled/Version usr.lib/libF77/mkindx \ 508 | usr.lib/libF77/mkvers usr.lib/libI77/profiled/Version \ 509 | usr.lib/libI77/mkindx usr.lib/libI77/mkvers \ 510 | usr.lib/libI77/Version usr.lib/libU77/profiled/Version \ 511 | usr.lib/libU77/mkindx usr.lib/libU77/mkvers \ 512 | usr.lib/libU77/Version 513 | do 514 | rm $ROOT211/usr/src/$i 515 | done 516 | 517 | # remove some detritis from sms running warp 518 | rm $ROOT211/usr/games/lib/warp/warp.log $ROOT211/usr/games/lib/warp/warp.top 519 | # kill old warp binary, it causes trouble later 520 | rm $ROOT211/usr/games/warp 521 | 522 | # 523 | # Also, the KAZOO config was included through some unknown rev. It's not in 524 | # the 195 patchlevel image we have, but patches 84 and 42 reference it. I 525 | # can find no patch that removes it... 526 | # 527 | # The KAZOO in hints was created by taking GENERIC, applying the diffs from 528 | # 2.10.1 between the two, and then hand-apply the conflicts as they were 529 | # all pretty obvious. I'm not 100% up on things, but we may need to create 530 | # other files to be able to build this. 531 | # 532 | cp $HINTSDIR/KAZOO $ROOT211/usr/src/sys/conf 533 | 534 | patches=$(cd $PATCHDIR; ls | sort -rn) 535 | 536 | [ -z "$STOP_BEFORE_PATCH" ] || die asked to stop 537 | 538 | mkdir -p ${SAVE} 539 | mkdir -p ${LOGS} 540 | rm $RECOVERY_LOG 541 | touch $RECOVERY_LOG 542 | set -e 543 | trap 'die undo patch $p failed; pprint 1 patch $p failed' EXIT 544 | export LOGS TEMP PATCHDIR ROOT211 ROOT2101 APOUT_ROOT HINTSDIR 545 | touch $ROOT211/start-time 546 | # patch 0 is for our fixups 547 | for p in $patches 0; do 548 | undo_patch_level $p 2>&1 > $LOGS/$p.log 549 | done 550 | 551 | # The 2.11 pl 195 as(1) can't assemble the pl0 as(1), but the 2.10.1 can, so 552 | # start there... 553 | trap - EXIT 554 | pprint 1 "Bootstrapping" 555 | bootstrap_as $ROOTV7 556 | # Put the building scripts on the target... 557 | mkdir -p $ROOT211/usr/urbsd 558 | cp $HINTSDIR/build.sh $HINTSDIR/build2.sh $ROOT211/usr/urbsd 559 | pprint 1 "Fixing permissions and prepping tape" 560 | ( 561 | cd $ROOT211 562 | for i in bin etc usr/bin lib; do 563 | chmod +x $i/* 564 | done 565 | # rm libraries that are useless 566 | find lib usr/lib -name \*.a | xargs rm -f 567 | 568 | # push the date of the sources back to something approximately 569 | # correct: use the date of the announcement, which was posted at 570 | # Date: 14 Mar 91 07:31:17 GMT 571 | # So use Z for Zulu aka UTC/GMT. 572 | # Except don't. For all the files newer than the start time, reset them all to 573 | # Jan 15th, the newest date I could find in the 2.11BSDpl195 tree. 574 | # find usr/src -newer start-time | xargs touch -d 1991-01-15T15:00:00Z 575 | 576 | # remove executables in etc, usr/new and usr/local since most of 577 | # them were introduced after initial release. There's a number of 578 | # of them that could be built in the iniitial release, but don't 579 | # install properly... 580 | file etc/* | grep -v chown | grep PDP-11 | awk -F: '{print $1;}' | xargs rm 581 | rm -rf usr/new 582 | mkdir -p usr/new/lib usr/new/man usr/new/man/cat1 583 | rm -rf usr/local # New around patch 80... 584 | # These need to exist for install to work on some targets 585 | mkdir usr/man/man6 usr/man/manl usr/man/catn 586 | 587 | # Remove some binaries that shouldn't be there. tcsh was added later 588 | # and ns* utilities didn't build in pl0 (though maybe I'll need to add 589 | # a hack to get them). lint was broken in the release, and fixed in 590 | # patches starting with patch 14 where the 4.3 lint was ported over. 591 | # strcompact, symcompact and symdump were part of the binary format 592 | # in 159. 593 | # warp.old is due to an old install. 594 | rm -f bin/tcsh usr/bin/ns* usr/lib/nslookup.help usr/bin/lint 595 | rm -f usr/ucb/strcompact usr/ucb/symcompact usr/ucb/symdump 596 | rm -f usr/games/warp.old 597 | 598 | # Sendmail detritis that needs to be removed (alias kept around, 599 | # though it has a too-new date 600 | rm -f usr/lib/sendmail.cf usr/lib/sendmail.sr 601 | 602 | # /usr/msgs/bounds isn't created by default, remove the one we inherited from 603 | # the 2.11 pl 195 tape. 604 | rm usr/msgs/bounds 605 | ) 606 | 607 | # Make the src.tar 608 | ( 609 | cd $ROOT211 610 | sudo tar cf ../src.tar . 611 | ) 612 | # Make the tape to xfer to the 2.11pl195 system 613 | # src.tar -> src.tap is hard coded, alas. 614 | perl 2tape.pl 615 | 616 | # And we're done: fireworks 617 | pprint 1 "Welcome to ur2.11BSD" 618 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | # ur211BSD notes 2 | 3 | Various notes about the current state of things. 4 | 5 | # Latest bad-date info 6 | 7 | Filtered set of files that have bad dates in the final build. 8 | 9 | Size | date | file | notes 10 | -----|------|------|------ 11 | 64184 | Jan 16 1994 | ./usr/games/lib/battle_strings | needs to be installed by hand 12 | 75 | Jan 16 1994 | ./usr/games/words | OK, was in old source, not sure why its date changes 13 | 4 | Feb 16 1994 | ./usr/lib/uucp/SEQF 14 | 76 | Jul 12 1994 | ./usr/lib/uucp/L.sys 15 | 66625 | Jun 12 1994 | ./usr/lib/find/find.codes 16 | 209 | Dec 30 1992 | ./usr/lib/crontab 17 | 622 | Jul 12 1994 | ./usr/lib/aliases 18 | 1241 | Jan 9 1994 | ./usr/man/makewhatis.sed 19 | 873 | Jan 9 1994 | ./usr/man/manroff 20 | 34557 | Jul 17 1994 | ./usr/man/whatis 21 | 109 | Jan 15 1994 | ./usr/man/man.template 22 | 2 | Jul 12 1994 | ./usr/msgs/bounds 23 | 10 | Jul 11 1994 | ./usr/spool/at/lasttimedone 24 | 0 | Dec 28 1991 | ./usr/spool/lpd/errs 25 | 0 | Jul 12 1994 | ./usr/spool/lpd/acct 26 | 4 | Jun 21 1994 | ./usr/spool/lpd/.seq 27 | 25 | Jun 21 1994 | ./usr/spool/lpd/status 28 | 0 | Jul 12 1994 | ./usr/spool/mqueue/syslog 29 | 0 | Jul 12 1994 | ./usr/spool/uucp/LOGFILE 30 | 62 | Apr 28 1991 | ./usr/src/sys/pdpstand/maketape.data 31 | 1516 | Jan 6 1994 | ./usr/src/include/a.out.h 32 | 1389 | Jan 6 1994 | ./usr/src/include/nlist.h 33 | 849 | Apr 26 1993 | ./usr/src/etc/named/master/root.cache 34 | 2962 | Jun 25 1991 | ./usr/src/lib/mip/manifest.h 35 | 1306 | Aug 3 1991 | ./usr/src/lib/mip/ndu.h 36 | 526 | Jul 19 1991 | ./usr/src/lib/mip/onepass.h 37 | 3095 | Jul 30 1991 | ./usr/src/lib/pcc/Makefile.twopass 38 | 733 | Jan 20 1993 | ./usr/src/lib/Makefile 39 | 9826 | Jun 10 1992 | ./usr/src/new/rn/Pnews 40 | 1590 | Jun 10 1992 | ./usr/src/new/rn/config.sh 41 | 2836 | Jun 10 1992 | ./usr/src/new/rn/config.h 42 | 5615 | Jun 10 1992 | ./usr/src/new/rn/Rnmail 43 | 3534 | Jun 10 1992 | ./usr/src/new/rn/newsetup 44 | 1375 | Jun 10 1992 | ./usr/src/new/rn/newsgroups 45 | 1143 | Jun 10 1992 | ./usr/src/new/rn/newsnews 46 | 625 | Jan 22 1993 | ./usr/src/new/crash/Makefile 47 | 13181 | Dec 31 1993 | ./usr/src/usr.lib/sendmail.MX/src/daemon.c 48 | 49 | ## Observations 50 | 51 | So we still have 18 files in /usr/src to contend with. 7 of them are rn files that likely need to be regenerated with an old date from the ur2.11BSD tree. 52 | 53 | maketape.data is super close in time, and likely can be ignored. 54 | 55 | /usr/src/include likely needs to be copied from /usr/include 56 | 57 | 5 files appear releated to pcc. 58 | 59 | master/root.cache is oddly out of place and needs investigating. 60 | 61 | src/lib/Makefile suggests a missing patch of some flavor or just an editor oops. 62 | 63 | src/new/crash/Makefile likewise suggest same 64 | 65 | and the daemon.c one is weird. 66 | 67 | -------------------------------------------------------------------------------- /paper.md: -------------------------------------------------------------------------------- 1 | # 2.11BSD patch level 0 Recovery Project 2 | 3 | According to https://www.krsaborio.net/bsd/research/1991/0314.htm 2.11BSD was 4 | released on March 14, 1991 to celebtrate the 20th anniversary of the PDP-11 5 | computer. It was quickly followed by a series of patches. Sadly, the original 6 | tapes for 2.11BSD have been lost. In the run-up to the 30th anniversary of the 7 | release of 2.11BSD, I wanted to recreate 2.11BSD patch 0, the binary images and 8 | a git repo of all the patches it. 2.11BSD was used as the basis for retrobsd 9 | (https://github.com/RetroBSD/retrobsd) and is currently enjoy a resurgence as 10 | various recreation hardware emulate the PDP-11. The earliest tape is from patch 11 | level 195, and many of these 195 patches destroy information since they were 12 | shell scripts rather than modern patches. The challenge has been to recreate as 13 | much information as possible that's been lost and use that to come up with a 14 | plausable set of original sources, ideally buildable; to recreate the original 15 | tapes, to the degree possible at this late date; and to create a complete github 16 | repo for future generations to study. 17 | 18 | ## The Challenge 19 | 20 | 2.11BSD presents a number of challenges to recover the original system. First, 21 | it was a PDP-11 operating system that only ran on the largest PDP-11 22 | systems. Second, it dates from an era where source code control practices were 23 | less robust than today. Third, a number of patches weren't simply files to feed 24 | to patch(1), but rather were instructions of modifications to transition the 25 | system new new patch levels. Forth, sometimes the instructions omitted key steps 26 | that people were evidentially expected to know what to do, but that require 27 | careful research to reconstruct at this late date. Fifth, kernel configs were 28 | inconsistently patched: sometimes the base files to generate the files need to 29 | build the kernel were pathed, other times the generated files were patched 30 | (someitmes in ways that led to conflicts). Finally, a number of small mistakes 31 | were made when the patches were generated, as evidenced by other patches failing 32 | to apply. All these challenges had to be dealt with in order to arrive at a most 33 | likely 2.11BSD system. 34 | 35 | ### Background on PDP-11 36 | 37 | The PDP-11 was introduced in 1970 38 | (https://history-computer.com/ModernComputer/Electronic/PDP-11.html) and started 39 | out life as a minicomputer. It had no MMU and could address 56kB of memory with 40 | an addition 8k for I/O space for devices. Over the years, it was expanded to 18 41 | and then 22 bits with a MMU and later separte I&D space existed to boost the 42 | largest userland address space to 128kB (64kB of instructions and 64kB of 43 | data). It expanded to have a number of different modes apart from Userland and 44 | Kernel. The disks drives expanded from about 5MB for the RK02 that was common on 45 | earlier drives to 3rd party drives late in its life taht could store several 46 | hundred MB. 47 | 48 | As such, space was always an issue. By the time 2.11BSD was released, it could 49 | only run on the largest of these machines featuring split I&D space as well as 50 | requiring SUPERVISOR mode support. A large number of overlays were required to 51 | squeeze the kernel into the constrained address space available. This meant that 52 | the system could only run on: PDP-11/44/53/70/73/83/84/93/94 with 22 bit 53 | addressing, a megabyte and floating point. 54 | 55 | In 1991 when 2.11BSD was released, it was still encumbered software. Caldera's 56 | freeing of ancient unix was still over a decade away, so the number of origial 57 | tapes made by USENIX was relatively small. An image of the tape was almost 58 | 100MB, which was large for the day, so copies weren't saved. 59 | 60 | Also, many of the PDP-11s runing 2.11BSD were connected to the internet via 61 | USENET and ultra slow connections. This lead to many tricks to keep the patches 62 | small. This means that patches weren't unified diffs for everything like current 63 | systems. For example, patch 160 includes the instructions: 64 | 0) Be in a temp directory ("cd /tmp" or "cd /usr/tmp") 65 | 1) Save the following shar archive to a file (/tmp/160 for example) 66 | 2) Unpack the archive: sh 160 67 | 3) Run the script: ./script 68 | 4) Patch the files: patch -p0 < patchfile 69 | 5) rm 160 script patchfile 70 | which doesn't sound too bad, but script contains 71 | #! /bin/sh 72 | rm -f /usr/src/bin/csh/shortnames.h 73 | rm -f /usr/src/bin/ar.c 74 | rm -f /usr/src/bin/ld.c 75 | rm -f /usr/src/bin/adb/dummy.c /usr/src/bin/adb/mac.h 76 | rm -f /usr/src/bin/adb/machine.h /usr/src/bin/adb/mode.h 77 | rm -rf /usr/src/bin/nm rm /usr/src/bin/ld /usr/src/bin/ar 78 | mkdir /usr/src/bin/nm /usr/src/bin/ld /usr/src/bin/ar 79 | hmod 755 /usr/src/bin/nm /usr/src/bin/ld /usr/src/bin/ar 80 | mv /usr/src/bin/nm.c /usr/src/bin/nm/nm.c 81 | cat > /usr/src/bin/nm/Makefile <<'_MAKEFILE_' 82 | ... 83 | chmod 644 /usr/src/bin/nm/Makefile /usr/src/bin/ld/Makefile 84 | which has a stray 'rm,' but more importantly it removes the old copies of all 85 | these files. In modern patches, the unified diff would just remove all the lines 86 | of the file, giving us a record of the old file. This means we have to get 87 | copies of these files somewhere else. 88 | 89 | ### Source Code Control Practices 90 | 91 | 92 | 93 | ### Upgrade by Script 94 | 95 | ### Missing Instructions 96 | 97 | ### Inconsistently Patched Kernels 98 | 99 | ### Errors in the Patches 100 | -------------------------------------------------------------------------------- /test-p80: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | __p() { 4 | case "$1" in 5 | /*) echo "$TSRC/$1" ;; 6 | *) echo "$1" ;; 7 | esac 8 | } 9 | 10 | missing() { 11 | echo "MISSING: $1" 12 | # exit 13 | } 14 | 15 | cd() { 16 | chdir $(__p $1) 17 | } 18 | 19 | rm() ( 20 | set +f 21 | flags= 22 | if [ "$1" = "-r" ]; then 23 | shift 24 | flags=-r 25 | fi 26 | 27 | for i; do 28 | fn=$(__p $i) 29 | # Expand the globs in the args, we disabled them before starting 30 | for j in $fn; do 31 | if [ -f "$j" ]; then 32 | echo "removing $j" 33 | /bin/rm -f $flags $j 34 | else 35 | missing $j 36 | fi 37 | done 38 | done 39 | ) 40 | 41 | mv() { 42 | src=$(__p $1) 43 | dst=$(__p $2) 44 | if [ -f $src ]; then 45 | echo "Moving $src to $dst" 46 | /bin/mv -f $src $dst 47 | else 48 | missing $src 49 | fi 50 | } 51 | 52 | set -e 53 | # Test to see if p80 / the catch-up kil works. 54 | . vars 55 | export TSRC=${P80TESTDIR}/211bsd 56 | export P80=${P80TESTDIR}/p80 57 | 58 | /bin/rm -rf $P80TESTDIR 59 | mkdir -p $P80TESTDIR 60 | 61 | mkdir -p $TSRC 62 | chdir $TSRC 63 | tar xf $TOP/src.tar 64 | 65 | mkdir -p $P80 66 | chdir $P80 67 | tar xvf $PATCHSRC/usr_update.tar.bz2 68 | tar xvf patches.tar.bz2 69 | 70 | # README says to run root.step1. However, that's bogus for us. It renames a device we don't have. 71 | # it creates a hard link that was in 2.10.1BSD which we have. And it applies patches, but with a 72 | # command that's bogus for us. 73 | # skip root.step1 74 | 75 | # apply the patches for / 76 | chdir $TSRC 77 | patch -t -V none -p1 < $P80/root_patch 78 | 79 | # usr step 1, use the script 80 | # The functions above do some sanity checks before moving 81 | chdir $TSRC 82 | set -f 83 | . $P80/usr.step1 84 | set +f 85 | 86 | # usr step 2, extract 87 | chdir $TSRC/usr 88 | tar xpf $P80/usr.update.tar.Z 89 | 90 | find $TSRC/usr/src -type f | xargs chmod +w 91 | 92 | # user step 3, patch 93 | chdir $TSRC 94 | for i in $P80/xa?; do 95 | echo ------------------- $i ----------------------- 96 | patch -t -V none -p1 < $i 97 | done 98 | -------------------------------------------------------------------------------- /tests.md: -------------------------------------------------------------------------------- 1 | # ur2.11BSD Testing 2 | 3 | This tries to document the tests that I'm using to validate my 4 | reconstruction. There's four major categories of testing. First is backwards 5 | patch consistency. Is the reconstruction consistent with the patches going 6 | backwards? Next is compile consistency: can the resulting system be built and 7 | boot. Next is date consistency. Are the dates that the files wind up with 8 | consistent with a product released in February or March 1991? Finally, there's 9 | forward patch consistency. Can I start at the reconstructed sources and end with 10 | patch 80? Patch 195? Does the catch-up kit work? 11 | 12 | ## Current status 13 | 14 | All of the backward patch inconsistencies have been either corrected or 15 | accounted for (or of little consequence). 16 | 17 | There's one issue with nslookup that needs to be resolve on the build 18 | consistency test. It's unclear if that needs to be resolved in favor of doing it 19 | by hand, or if the binaries were just missing. I suspect this will be resolved 20 | by hand since the binaries are quite popular. 21 | 22 | There's one file that is not date consistent that need looking into. The system 23 | is rebuilt in 1991 to help detect these issues. The current testing methodology 24 | loses the dates from patch files, so we are not yet able to detect missing 25 | patches to files that were patched after pl80 (we can detect it to 80 since the 26 | catch-up kit has a complete set of patches). The dates of files patched aren't 27 | updated by patch, so there's ~1184 files that have dates of 2020... While 28 | important for the recreation, git doesn't retain date metadata, so we'll have to 29 | look at other means. 30 | 31 | There's still a few inconsistencies with patching to pl80 with the catch-up 32 | kit. Those need to be documented. Mostly files that are expected to be present 33 | by the upgrade scripts, but are not. It's unclear if some of the removals were a 34 | just in case thing, or the files really were on the master tape. The bulk of the 35 | remaining ones deal with local machine configuration. No attempt has been made 36 | to walk the patches forward, nor deal with the multitude of added files in patch 37 | 80 that are no-where-else documented. No attempt has been made to go from patch 38 | 80 -> 195, or try to get close to patch 80 one patch at a time. 39 | 40 | It's likely time to create github issues for the first two categories so they 41 | aren't forgotten. The date and catch-up issues need to be burned down a bit more 42 | and documented when the going gets slow there. Much code needs to be written to 43 | do the patch-at-a-time upgrade. 44 | 45 | # Backwards Patch Consistency 46 | 47 | The very first test is 'is the reconstruction consistent with the patches'. This means, does anything in the patches contradict what has been reconstructed. Examples of this are the patches not apply, applying with unexplained fuzz or line number deltas. 48 | 49 | Now that all the patches apply w/o error, I've narrowed the scope of this test. The test is to grep for the words offset or fuzz in the log files: 50 | 51 | % egrep 'Hunk.*offset|fuzz' log/* 52 | log/124.log:Hunk #1 succeeded at 69 with fuzz 1 (offset 2 lines). 53 | log/124.log:Hunk #1 succeeded at 55 (offset 1 line). 54 | log/142.log:Hunk #1 succeeded at 50 with fuzz 2 (offset 8 lines). 55 | log/142.log:Hunk #1 succeeded at 50 with fuzz 2 (offset 8 lines). 56 | log/152.log:Hunk #1 succeeded at 265 (offset 1 line). 57 | log/152.log:Hunk #2 succeeded at 313 (offset 1 line). 58 | log/152.log:Hunk #3 succeeded at 354 (offset 1 line). 59 | log/152.log:Hunk #1 succeeded at 230 (offset 1 line). 60 | log/152.log:Hunk #2 succeeded at 265 (offset 1 line). 61 | log/152.log:Hunk #3 succeeded at 284 (offset 1 line). 62 | log/159.log:Hunk #1 succeeded at 109 with fuzz 2 (offset 27 lines). 63 | log/159.log:Hunk #1 succeeded at 109 with fuzz 2 (offset 27 lines). 64 | log/174.log:Hunk #1 succeeded at 540 (offset 6 lines). 65 | log/174.log:Hunk #2 succeeded at 563 (offset 6 lines). 66 | log/174.log:Hunk #3 succeeded at 579 (offset 6 lines). 67 | log/174.log:Hunk #4 succeeded at 617 with fuzz 1 (offset 6 lines). 68 | log/42.log:Hunk #1 succeeded at 336 (offset -1 lines). 69 | log/42.log:Hunk #1 succeeded at 177 (offset -155 lines). 70 | log/84.log:Hunk #1 succeeded at 325 (offset -1 lines). 71 | log/84.log:Hunk #2 succeeded at 377 (offset -1 lines). 72 | log/84.log:Hunk #1 succeeded at 215 (offset -156 lines). 73 | 74 | This indicates that there's 21 issues that need explaining in some way. Based on 75 | the current text below, they either don't matter for the reconstruction back to 76 | 0 (but may when we forward apply things) or are likely harmless (4 issues that 77 | are very low priority). 78 | 79 | ## What it means 80 | 81 | Fuzz is the number of lines ignored in the patch to apply it for the 82 | non-changing part. This suggests minor changes around the code that's 83 | changing. Each should be investigated. Often, it's white space, but sometimes it 84 | can be more. 85 | 86 | Offset means that it expected the patch to start at line X but instead it started at X+offset. When offset is possitive, it indicates lines added (though offset 1 is quite often a blank line). When negative, it means code was deleted. The larger the number, the more cause for concern. Very large numbers can also just indicate code motion and not any substantial changes. 87 | 88 | Here's an analysis of each of the errors. 89 | 90 | ### 174.log false positive 91 | 92 | The text leading up to this was: 93 | -------------------------- 94 | |*** /usr/src/usr.lib/sendmail.MX/src/daemon.c.old Wed Jan 27 20:26:37 1993 95 | |--- /usr/src/usr.lib/sendmail.MX/src/daemon.c Fri Dec 31 23:06:54 1993 96 | -------------------------- 97 | Patching file usr/src/usr.lib/sendmail.MX/src/daemon.c using Plan A... 98 | Hunk #1 succeeded at 540 (offset 6 lines). 99 | Hunk #2 succeeded at 563 (offset 6 lines). 100 | Hunk #3 succeeded at 579 (offset 6 lines). 101 | Hunk #4 succeeded at 617 with fuzz 1 (offset 6 lines). 102 | Hmm... Ignoring the trailing garbage. 103 | done 104 | 105 | This is the result of creating this patch from the patch to 106 | sendmail/src/daemon.c. It would have been required to build/run sendmail.MX on 107 | 2.11BSD. 108 | 109 | ### 159.log doesn't matter 110 | Patching QT/Makefile 111 | Hmm... Looks like a new-style context diff to me... 112 | The text leading up to this was: 113 | -------------------------- 114 | |*** /usr/src/sys/GENERIC/Makefile.old Sun Jul 4 21:27:00 1993 115 | |--- /usr/src/sys/GENERIC/Makefile Sat Jan 22 16:39:46 1994 116 | -------------------------- 117 | Patching file Makefile using Plan A... 118 | Hunk #1 succeeded at 109 with fuzz 2 (offset 27 lines). 119 | done 120 | Patching SMS/Makefile 121 | Hmm... Looks like a new-style context diff to me... 122 | The text leading up to this was: 123 | -------------------------- 124 | |*** /usr/src/sys/GENERIC/Makefile.old Sun Jul 4 21:27:00 1993 125 | |--- /usr/src/sys/GENERIC/Makefile Sat Jan 22 16:39:46 1994 126 | -------------------------- 127 | Patching file Makefile using Plan A... 128 | Hunk #1 succeeded at 109 with fuzz 2 (offset 27 lines). 129 | done 130 | 131 | Changes to generated Makefile for both the QT and SMS files. QT disappears in the patch 93 or so. We regenerate SMS at patch 93, so these both can be ignored. 132 | 133 | ### 152.log Likely harmless 134 | Hmm... The next patch looks like a new-style context diff to me... 135 | The text leading up to this was: 136 | -------------------------- 137 | |diff -c as.old/as19.s as/as19.s 138 | |*** as.old/as19.s Tue Aug 22 20:14:29 1989 139 | |--- as/as19.s Wed Dec 13 10:23:35 1989 140 | -------------------------- 141 | Patching file as19.s using Plan A... 142 | Hunk #1 succeeded at 265 (offset 1 line). 143 | Hunk #2 succeeded at 313 (offset 1 line). 144 | Hunk #3 succeeded at 354 (offset 1 line). 145 | Hmm... Ignoring the trailing garbage. 146 | done 147 | Hmm... The next patch looks like a new-style context diff to me... 148 | The text leading up to this was: 149 | -------------------------- 150 | |diff -c as.old/as29.s as/as29.s 151 | |*** as.old/as29.s Tue Aug 22 17:12:29 1989 152 | |--- as/as29.s Sun Dec 24 15:06:33 1989 153 | -------------------------- 154 | Patching file as29.s using Plan A... 155 | Hunk #1 succeeded at 230 (offset 1 line). 156 | Hunk #2 succeeded at 265 (offset 1 line). 157 | Hunk #3 succeeded at 284 (offset 1 line). 158 | Hmm... Ignoring the trailing garbage. 159 | 160 | I've looked into this and I think it's a blank line that's causing this at the start of the file, but I need to double check and confirm. The resulting as0.s and as2.s files are no different in later patches. This is likely harmless, but would be good to know why. 161 | 162 | ### 142.log doesn't matter 163 | 164 | Patching QT/Makefile 165 | Hmm... Looks like a new-style context diff to me... 166 | The text leading up to this was: 167 | -------------------------- 168 | |*** /usr/src/sys/GENERIC/Makefile.old Sun Jun 6 21:51:24 1993 169 | |--- /usr/src/sys/GENERIC/Makefile Sun Jun 6 21:48:32 1993 170 | -------------------------- 171 | Patching file Makefile using Plan A... 172 | Hunk #1 succeeded at 50 with fuzz 2 (offset 8 lines). 173 | done 174 | Patching SMS/Makefile 175 | Hmm... Looks like a new-style context diff to me... 176 | The text leading up to this was: 177 | -------------------------- 178 | |*** /usr/src/sys/GENERIC/Makefile.old Sun Jun 6 21:51:24 1993 179 | |--- /usr/src/sys/GENERIC/Makefile Sun Jun 6 21:48:32 1993 180 | -------------------------- 181 | Patching file Makefile using Plan A... 182 | Hunk #1 succeeded at 50 with fuzz 2 (offset 8 lines). 183 | done 184 | 185 | Same files with offsets as for 159.log. Likely doesn't matter for same reasons. Though fuzz and offset is otherwise concerning and may indicate deeper issues that need to be investigated for the trip back through the patches. 186 | 187 | ### 124.log doesn't matter 188 | 189 | The text leading up to this was: 190 | -------------------------- 191 | |*** /usr/src/sys/SMS/Makefile.old Sat Dec 26 22:26:30 1992 192 | |--- /usr/src/sys/SMS/Makefile Fri Mar 12 19:03:53 1993 193 | -------------------------- 194 | Patching file usr/src/sys/SMS/Makefile using Plan A... 195 | Hunk #1 succeeded at 69 with fuzz 1 (offset 2 lines). 196 | Hmm... Ignoring the trailing garbage. 197 | done 198 | Hmm... Looks like a new-style context diff to me... 199 | The text leading up to this was: 200 | -------------------------- 201 | |*** /usr/src/sys/GENERIC/Makefile.old Tue Dec 29 00:44:28 1992 202 | |--- /usr/src/sys/GENERIC/Makefile Fri Mar 12 19:03:39 1993 203 | -------------------------- 204 | Patching file usr/src/sys/GENERIC/Makefile using Plan A... 205 | Hunk #1 succeeded at 55 (offset 1 line). 206 | Hmm... Ignoring the trailing garbage. 207 | done 208 | 209 | The Makefiles (generated files) have become out of sync by one line. There's an additional line inserted in the first 55 lines of the template or similar. Given the amount of hand editing, I'll likely just document this as 'weird' in the end. For both of these, it's not a huge deal: we regenerate them at patch 93. 210 | 211 | ### 84.log likely harmless 212 | 213 | The text leading up to this was: 214 | -------------------------- 215 | |*** /sys/conf/KAZOO.old Sun Dec 22 16:11:27 1991 216 | |--- /sys/conf/KAZOO Thu Nov 19 21:06:53 1992 217 | -------------------------- 218 | Patching file sys/conf/KAZOO using Plan A... 219 | Hunk #1 succeeded at 325 (offset -1 lines). 220 | Hunk #2 succeeded at 377 (offset -1 lines). 221 | Hmm... The next patch looks like a new-style context diff to me... 222 | The text leading up to this was: 223 | The text leading up to this was: 224 | -------------------------- 225 | |*** /sys/conf/VAX.old Sun Dec 22 16:12:46 1991 226 | |--- /sys/conf/VAX Tue Oct 13 20:46:49 1992 227 | -------------------------- 228 | Patching file sys/conf/VAX using Plan A... 229 | No such line 370 in input file, ignoring 230 | Hunk #1 succeeded at 215 (offset -156 lines). 231 | 232 | KAZOO is a best effort reconstruction. This suggests a small error in reconstructing it. Likely harmless, but maybe some attention is needed. 233 | 234 | VAX is a no-effort reconstruction that's known to be badly off. 235 | 236 | ### 42.log likely harmless 237 | -------------------------- 238 | |*** /usr/src/sys/conf/KAZOO.old Wed Dec 19 10:12:43 1990 239 | |--- /usr/src/sys/conf/KAZOO Sun Dec 22 16:11:27 1991 240 | -------------------------- 241 | Patching file usr/src/sys/conf/KAZOO using Plan A... 242 | Hunk #1 succeeded at 336 (offset -1 lines). 243 | -------------------------- 244 | |*** /usr/src/sys/conf/VAX.old Sat Aug 12 21:58:07 1989 245 | |--- /usr/src/sys/conf/VAX Sun Dec 22 16:12:46 1991 246 | -------------------------- 247 | Patching file usr/src/sys/conf/VAX using Plan A... 248 | No such line 331 in input file, ignoring 249 | Hunk #1 succeeded at 177 (offset -155 lines). 250 | 251 | Same as 84.log. 252 | 253 | # Build Tests 254 | 255 | We know that the 2.11BSD happened. If we're trying to reconstruct the sources to it, then they should build. We also know that at the time certain practices were in place. We need to determine if any build breakage was 'worked around' by these practices or if it indicates a problem in my reconstruction. 256 | 257 | I established the following criteria: 258 | 1. Does the breakage stop the build from completing? If so, then it's a bad reconstruction. 259 | 1. Can a clean tree rebuild entirely? 260 | 1. Could a 'dirty' tree cause the build to succeed? That is, if it complains something is missing, then is there a way to recreate the missing thing via make? If so, then one could pluasuably state that it could have gone unnoticed in the release. Rebuilding everything took more than a day, and according to notes in the patches, was undertaken about once a year. 261 | 1. Is the breakage fixed later? Patches 106 to 116 fixed numerous build breakages and irregularities. Generally, I've opted to reconstruct as if those parts had been built by hand (mostly man pages, though I'm not sure what to do about the ns* utilties) 262 | 1. Anything that it doesn't know to make? 263 | 264 | ## Known errors 265 | 266 | ### Don't know how to make clean. Stop. 267 | 268 | There's a number of makefiles that don't know how to make clean. These errors 269 | are all ignored by the build system, so are believed to be expected and 270 | normal. This happens three times. But the root cause is in the 271 | src/usr.lib/sendmail/lib/Makefile, which actually does not know how to make 272 | clean. 273 | 274 | ### rmdir: tmp: no such file or directory Exit 1 (ignored) 275 | rmdir: tmp: No such file or directory 276 | *** Exit 1 (ignored) 277 | 278 | In libc, the Makefiles use a tmp directory to do the build. It's removed, and rm returns an error since the file isn't there. This error is ignored and totally expected. 279 | 280 | ### Exit 1 (ignored) in me 281 | if [ ! -d /usr/lib/me ]; then rm -f /usr/lib/me; mkdir /usr/lib/me; fi 282 | *** Exit 1 (ignored) 283 | 284 | This blows away the installed macro environment styles and recreates them. This error is expected. 285 | 286 | ### Exit 1 (ignored) in f77 287 | 288 | mkstr - f77_strings xx equiv.c 289 | cc -S -w -DTARGET=PDP11 -DFAMILY=DMR -DHERE=PDP11 -DOUTPUT=BINARY -DPOLISH=POSTFIX -DOVERLAID -DC_OVERLAY xxequiv.c 290 | mv xxequiv.s equiv.s 291 | if [ X-i = X-n ]; then ed - equiv.s < :rofix; fi 292 | *** Exit 1 (ignored) 293 | 294 | This is fixing up the error messages when building separate binaries. This error is expected due to the limitations in /bin/sh that's in 2.11BSD as shipped. 295 | 296 | ### Exit 10 (ignored) in jove 297 | 298 | ./setmaps < keymaps.txt > keymaps.c 299 | Warning: cannot find command "select-buffer-1". 300 | Warning: cannot find command "select-buffer-2". 301 | Warning: cannot find command "select-buffer-3". 302 | Warning: cannot find command "select-buffer-4". 303 | Warning: cannot find command "select-buffer-5". 304 | Warning: cannot find command "select-buffer-6". 305 | Warning: cannot find command "select-buffer-7". 306 | Warning: cannot find command "select-buffer-8". 307 | Warning: cannot find command "select-buffer-9". 308 | Warning: cannot find command "select-buffer-10". 309 | *** Exit 10 (ignored) 310 | 311 | Another expected error. 312 | 313 | ### Exit 1 (ignored) in learn 314 | 315 | mkdir /usr/lib/learn /usr/lib/learn/log /usr/lib/learn/bin 316 | mkdir: /usr/lib/learn: File exists 317 | mkdir: /usr/lib/learn/log: File exists 318 | mkdir: /usr/lib/learn/bin: File exists 319 | *** Exit 1 (ignored) 320 | 321 | Learn is trying to make directories that already exist. The lack of -p is what causes this. 322 | 323 | ### Exit 1 (ignored) find 324 | 325 | install -s find /usr/bin/find 326 | mkdir /usr/lib/find 327 | mkdir: /usr/lib/find: File exists 328 | *** Exit 1 (ignored) 329 | 330 | This directory does exist, so this an expected error. 331 | 332 | ### Exit 1 (ignored) rwho 333 | 334 | mkdir /usr/spool/rwho 335 | mkdir: /usr/spool/rwho: File exists 336 | *** Exit 1 (ignored) 337 | 338 | This directory does exist, so this an expected error. 339 | 340 | ### Exit 1 (ignored) ex 341 | mkdir /usr/preserve 342 | mkdir: /usr/preserve: File exists 343 | *** Exit 1 (ignored) 344 | 345 | This directory does exist, so this an expected error. 346 | 347 | ### Exit 1 (ignored) battlestar 348 | install -c battlestar.6 /usr/man/man6/battlestar.6 349 | install: can't find battlestar.6. 350 | *** Exit 1 (ignored) 351 | 352 | This file indeed does not exist here. It's one of the files that patch 106 moves back to live in /usr/src/games/battlestar. So this is expected and also fixed later. 353 | 354 | ### Exit 1 (ignored) phantasia 355 | mkdir /usr/games/lib/phantasia 356 | mkdir: /usr/games/lib/phantasia: File exists 357 | *** Exit 1 (ignored) 358 | 359 | This directory does exist, so this an expected error. 360 | 361 | ### Exit 1 (ignored) warp 362 | mv /usr/games/warp /usr/games/warp.old 363 | mv: /usr/games/warp: Cannot access: No such file or directory 364 | *** Exit 1 (ignored) 365 | 366 | this is expected. We remove warp as part of the build process so we don't wind up with a warp.old dated in 1994 on the image. 367 | 368 | ### Exit 1 (ignored) warp 369 | if test ! -f `./filexp /usr/games/lib/warp/warp.news`; then cp warp.news `./filexp /usr/games/lib/warp`; fi 370 | *** Exit 1 (ignored) 371 | 372 | Also an expected exit value due to limitations in /bin/sh 373 | 374 | ### Exit 1 in nslookup 375 | for i in tools; do (cd $i; make -k clean); done 376 | sh: tools: bad directory 377 | *** Exit 1 378 | 379 | This error is a real error. It's fixed in the 106-116 line of patches. It's 380 | unclear if we should just build/install by hand or not for this one give the 381 | high visibility of the missing pieces. It's highly likely that this was test 382 | built, test installed before a full build, so the binaries were on the 383 | system. This suggests that the build2.sh build orchestration should do that too. 384 | 385 | # Date Test 386 | 387 | To test this, I use the following 388 | # date 9104151234 389 | # ^D to boot to multiuser 390 | login: root 391 | # touch /now 392 | # find / -newer /now -ls | grep -v ' 2020 ' | colrm 1 42 393 | 394 | Most recnetly this generated the following: 395 | | Documented below | Date | File | 396 | |------------------|------|------| 397 | | * | Apr 15 12:35 | /usr/adm/acct | 398 | | * | Mar 10 1993 | /usr/doc/2.10/setup.2.11 | 399 | | * | Jan 15 1993 | /usr/include/OLD | 400 | | * | Feb 16 1994 | /usr/lib/uucp/SEQF | 401 | | o | Jul 12 1994 | /usr/lib/uucp/L.sys | 402 | | o | Dec 30 1992 | /usr/lib/crontab | 403 | | o | Jul 12 1994 | /usr/lib/aliases | 404 | | R | Jul 17 1994 | /usr/man/whatis | 405 | | * | Jan 9 1993 | /usr/preserve | 406 | | | Jul 11 1994 | /usr/spool/at/lasttimedone | 407 | | * | Dec 28 1991 | /usr/spool/lpd/errs | 408 | | * | Jul 12 1994 | /usr/spool/lpd/acct | 409 | | * | Jun 21 1994 | /usr/spool/lpd/.seq | 410 | | * | Jun 21 1994 | /usr/spool/lpd/status | 411 | | * | Jul 12 1994 | /usr/spool/mail | 412 | | | Jul 12 1994 | /usr/spool/mqueue/syslog | 413 | | * | Jul 12 1994 | /usr/spool/rwho | 414 | | * | Apr 8 1994 | /usr/spool/uucp/LCK | 415 | | * | Dec 19 1991 | /usr/spool/uucp/STST | 416 | | * | Apr 3 1994 | /usr/spool/uucp/C. | 417 | | * | Apr 3 1994 | /usr/spool/uucp/D.sms | 418 | | * | Apr 3 1994 | /usr/spool/uucp/D.smsX | 419 | | * | Jul 12 1994 | /usr/spool/uucp/LOGFILE | 420 | | * | Apr 15 12:35 | /usr/spool/lpd.lock | 421 | | | Apr 28 1991 | /usr/src/sys/pdpstand/maketape.data | 422 | | | Apr 26 1993 | /usr/src/etc/named/master/root.cache | 423 | | c | Dec 24 1991 | /usr/src/games/warp/UU/myread | 424 | | c | Dec 24 1991 | /usr/src/games/warp/UU/grimble | 425 | | c | Jun 10 1992 | /usr/src/new/rn/Pnews | 426 | | c | Jun 10 1992 | /usr/src/new/rn/config.sh | 427 | | c | Jun 10 1992 | /usr/src/new/rn/config.h | 428 | | c | Jun 10 1992 | /usr/src/new/rn/Rnmail | 429 | | c | Jun 10 1992 | /usr/src/new/rn/newsetup | 430 | | c | Jun 10 1992 | /usr/src/new/rn/newsgroups | 431 | | c | Jun 10 1992 | /usr/src/new/rn/newsnews | 432 | 433 | There's 42 items in this list. Let's unpack them one at a time. '*' means 434 | there's little to no value in the file because it's part of a running system, or 435 | left over junk. 'c' are genreated config files. 'R' are files that are 436 | regenerated. 'o' can be reconstructed from the old release. 437 | 438 | ## Today's date 439 | 440 | | Date | File | 441 | |------|------| 442 | | Apr 15 12:35 | /usr/adm/acct | 443 | | Apr 15 12:35 | /usr/spool/lpd.lock | 444 | 445 | ## Directories 446 | 447 | These files are directories, so their dates might be messed up: 448 | 449 | | Date | File | 450 | |------|------| 451 | | Mar 10 1993 | /usr/doc/2.10/setup.2.11 | 452 | | Jan 9 1993 | /usr/preserve | 453 | | Jan 15 1993 | /usr/include/OLD | 454 | | Jul 12 1994 | /usr/spool/mail | 455 | | Jul 12 1994 | /usr/spool/rwho | 456 | | Apr 8 1994 | /usr/spool/uucp/LCK | 457 | | Dec 19 1991 | /usr/spool/uucp/STST | 458 | | Apr 3 1994 | /usr/spool/uucp/C. | 459 | | Apr 3 1994 | /usr/spool/uucp/D.sms | 460 | | Apr 3 1994 | /usr/spool/uucp/D.smsX | 461 | 462 | One would think that /usr/include/OLD is something that should be deleted, but 463 | the files are needed for ps. It's unclear why / how that wound up with a future 464 | date, though, since we patch one of the files in it. It's contents are 465 | fine. There's other docs that tell use there's only two files in here for ps. 466 | 467 | The UUCP ones are all empty directories. They likely can just be deleted since 468 | at least the D.sms* ones are local to the master machine that made the 469 | tapes. The others I believe are created as needed, and so there'd be no harm in 470 | deleting them. We could create them as part of the build process. There was some 471 | other directories that were deleted in the catch-up patch, so those will be 472 | recreated when that bug is fixed. Getting this detail right, though, likely has 473 | minimal benefit. 474 | 475 | The rest of these directories can likely just be deleted. At least /var/preserve 476 | and /usr/spool/rwho would get recreated (since there's an ignored error now for 477 | these two in the build). We can likely recreate all of them as part of the build 478 | process and lose no data. They would have been created at the time the tape was 479 | made. We know it was made in Jan-Mar of 1991, btw. There's a odd lack of files 480 | from 1991 on this release that happened in March.... 481 | 482 | ## Other UUCP files 483 | 484 | | Date | File | 485 | |------|------| 486 | | Feb 16 1994 | /usr/lib/uucp/SEQF | 487 | | Jul 12 1994 | /usr/lib/uucp/L.sys | 488 | | Jul 12 1994 | /usr/spool/uucp/LOGFILE | 489 | 490 | These are related to UUCP. LOGFILE and SEQF appear to be uninteresting. L.sys 491 | has some mild historical interest, but it's basically how to log into the remove 492 | systems (and likely should never have been in the distribution). The one from 493 | the 195 tape appears to have a live number and username and password. The old 494 | one likely had similar info, and is lost to time. It's not patched in any patch, 495 | nor in the catchup patches. It's likely best replaced by the one from 2.10.1BSD, 496 | which looks like a suitable dummy file. 497 | 498 | ## Lpd files 499 | 500 | | Date | File | 501 | |------|------| 502 | | Dec 28 1991 | /usr/spool/lpd/errs | 503 | | Jul 12 1994 | /usr/spool/lpd/acct | 504 | | Jun 21 1994 | /usr/spool/lpd/.seq | 505 | | Jun 21 1994 | /usr/spool/lpd/status | 506 | | Apr 15 12:35 | /usr/spool/lpd.lock | 507 | 508 | These files are incidental to lpd running. They are uninteresting other than to have weird dates. 509 | 510 | ## Config files 511 | 512 | | Date | File | 513 | |------|------| 514 | | Jun 10 1992 | /usr/src/new/rn/Pnews | 515 | | Jun 10 1992 | /usr/src/new/rn/config.sh | 516 | | Jun 10 1992 | /usr/src/new/rn/config.h | 517 | | Jun 10 1992 | /usr/src/new/rn/Rnmail | 518 | | Jun 10 1992 | /usr/src/new/rn/newsetup | 519 | | Jun 10 1992 | /usr/src/new/rn/newsgroups | 520 | | Jun 10 1992 | /usr/src/new/rn/newsnews | 521 | | Dec 24 1991 | /usr/src/games/warp/UU/myread | 522 | | Dec 24 1991 | /usr/src/games/warp/UU/grimble | 523 | 524 | These likely need to be regenerated as part of buid2.sh, but the rn Configure 525 | program is difficult to run. warp is easier, but also needs to run. 526 | 527 | ## man whatis database 528 | 529 | | Date | File | 530 | |------|------| 531 | | Jul 17 1994 | /usr/man/whatis | 532 | 533 | This needs to be regenerated. Unfortunately the script that does this in 2.11BSD 534 | pl 0 runs out of memory. We may need to find some way to generate it on the 535 | FreeBSD host. 536 | 537 | ## Changes after 2.10.1 538 | 539 | | Date | File | 540 | |------|------| 541 | | Dec 30 1992 | /usr/lib/crontab | 542 | | Jul 12 1994 | /usr/lib/aliases | 543 | 544 | These files most liklely were unchanged from 2.10.1. Or, if not, that's the most 545 | likely reconstruction in absense of other data. aliases just has one change, and 546 | crontab was reformatted a bit, but is substantially simmilar. 547 | 548 | ## Bottom line... 549 | 550 | Here's the filtered list of what I think might be interesting. 551 | 552 | | Date | File | 553 | |------|------| 554 | | Jul 17 1994 | /usr/man/whatis | 555 | 556 | whatis can't build on pdp-11, so it's stale. For the release reconstruction, I 557 | think we need to find a way to build it. But at least it's well known. 558 | 559 | # Boot test failures 560 | 561 | The tmscpboot stuff is broken. 562 | 563 | The pl80 catchup reconstruction hasn't been tested. 564 | -------------------------------------------------------------------------------- /vars: -------------------------------------------------------------------------------- 1 | # Vars 2 | TOP=$(pwd) 3 | if [ -d $HOME/tuhs ]; then 4 | TUHS=$HOME/tuhs 5 | else 6 | TUHS=$TOP/tuhs 7 | fi 8 | UCB=$TUHS/Distributions/UCB 9 | TOOLS=${TOP}/tools 10 | TOOLBIN=$TOOLS/bin 11 | APOUT_SRC=${TOOLS}/apout 12 | APOUT=${APOUT_SRC}/apout 13 | TAPE211=${TOP}/tape-2.11 14 | ROOT211=${TOP}/root-2.11 15 | TAPE2101=${TOP}/tape-2.10.1 16 | ROOT2101=${TOP}/root-2.10.1 17 | TAPEV7=${TUHS}/Distributions/Research/Henry_Spencer_v7/v7.tar.gz 18 | ROOTV7=${TOP}/root-v7 19 | PATCHSRC=${UCB}/2.11BSD/Patches 20 | PATCHDIR=${TOP}/patches 21 | HINTSDIR=${TOP}/hints 22 | APOUT_ROOT=/ 23 | export TEMPDIR=${TOP}/tmp 24 | LOGS=${TOP}/log 25 | RECOVERY_LOG=${LOGS}/recovery.log 26 | ROOT211TAR=$TOP/root-2.11.tar.xz 27 | export SAVE=${TOP}/saveit 28 | P80TESTDIR=${TOP}/p80-test 29 | GITREPO=${TOP}/git-2.11 30 | 31 | # Common routines 32 | 33 | die() { 34 | echo $* 35 | exit 1 36 | } 37 | 38 | clean_tree() { 39 | chmod -R +w $1 40 | rm -rf $1 41 | } 42 | --------------------------------------------------------------------------------