Introduction
Performed by Tom London and John F. Reiser,[2] porting Unix was made possible due to work done between the Sixth and Seventh Editions of the operating system to decouple it from its "native" PDP-11 environment. The 32V team first ported the C compiler (Johnson's pcc), adapting an assembler and loader written for the Interdata 8/32 version of Unix to the VAX. They then ported the April 15, 1978 version of Unix, finding in the process that "[t]he (Bourne) shell [...] required by far the largest conversion effort of any supposedly portable program, for the simple reason that it is not portable."[3]
UNIX/32V was released without virtual memory paging, retaining only the swapping architecture of Seventh Edition. A virtual memory system was added at Berkeley by Bill Joy and Özalp Babaoğlu in order to support Franz Lisp; this was released to other Unix licensees as the Third Berkeley Software Distribution (3BSD) in 1979. Thanks to the popularity of the two systems' successors, 4BSD and UNIX System V, UNIX/32V is an antecedent of nearly all modern Unix systems.
Host
- Vendor: Generic
- CPU: 1 x Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz 3.79 GHz
- RAM: 128GB
- OS: Windows 10 64-bits
Guest
- DEC VAX-11/780
Virtualization
- SimH 4.1 (from GitHub)
Pending
- Additional disks
References
Steps
- Install cygwin
- install bzip2 (or 7z) and tar
- Install simh 4.1 from here. This is another fork project from the original emulator.
$ mkdir -p /cygdrive/m/Emulators/SimH/mirror/ $ cd /cygdrive/m/Emulators/SimH/mirror/
- If this is the first time, make a local copy of the simulator
$ git clone https://github.com/open-simh/simh.git simh-4.1 Cloning into 'simh-4.1'... remote: Enumerating objects: 35175, done. remote: Counting objects: 100% (104/104), done. remote: Compressing objects: 100% (66/66), done. remote: Total 35175 (delta 46), reused 86 (delta 38), pack-reused 35071 Receiving objects: 100% (35175/35175), 78.76 MiB | 21.77 MiB/s, done. Resolving deltas: 100% (27237/27237), done. Updating files: 100% (1580/1580), done.
- Otherwise, update your local copy
$ ( cd simh-4.1 && git fetch --all -v ) POST git-upload-pack (155 bytes) From https://github.com/open-simh/simh = [up to date] master -> origin/master = [up to date] Alpha-CPU -> origin/Alpha-CPU = [up to date] AsyncTmxr -> origin/AsyncTmxr = [up to date] AutoConfigure -> origin/AutoConfigure = [up to date] Bryan-HP-Current -> origin/Bryan-HP-Current = [up to date] BufferedConsole -> origin/BufferedConsole = [up to date] ControlFlow -> origin/ControlFlow = [up to date] Extra-VAXen -> origin/Extra-VAXen = [up to date] FastAsynchIO -> origin/FastAsynchIO = [up to date] HP2100Extensions -> origin/HP2100Extensions = [up to date] KDP -> origin/KDP = [up to date] SerialMux -> origin/SerialMux = [up to date] Supnik-Current -> origin/Supnik-Current = [up to date] VAX-11-BootBlock-Fixup -> origin/VAX-11-BootBlock-Fixup = [up to date] simtools -> origin/simtools = [up to date] v3.9-0-rc1 -> origin/v3.9-0-rc1 = [up to date] vms-pcap -> origin/vms-pcap
- Create the simulator machines
$ ( cd simh-4.1 && make vax780 && ./BIN/vax780 ) lib paths are: /usr/lib ../windows-build/winpcap/WpdPack/Lib /lib/ /usr/lib/ include paths are: /usr/lib/gcc/x86_64-pc-cygwin/11/include /usr/include /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/../include/w32api ../windows-build/winpcap/WpdPack/Include using libm: /usr/lib/libm.a using librt: /usr/lib/librt.a using libpthread: /usr/lib/libpthread.a /usr/include/pthread.h using semaphore: /usr/include/semaphore.h using libdl: /usr/lib/libdl.a /usr/include/dlfcn.h using libedit: /usr/include/editline/readline.h using mman: /usr/include/sys/mman.h *** Warning *** *** Warning *** vax780 Simulator is being built WITHOUT *** Warning *** libpcap networking support *** Warning *** *** Warning *** To build simulator(s) with libpcap networking support you *** Warning *** should read 0readme_ethernet.txt and follow the instructions *** Warning *** regarding the needed libpcap development components for your *** Warning *** cygwin platform *** Warning *** *** Warning *** *** Warning *** vax780 Simulator is being built WITHOUT LAN networking support *** Warning *** *** Warning *** To build simulator(s) with networking support you should read *** Warning *** 0readme_ethernet.txt and follow the instructions regarding the *** Warning *** needed libpcap components for your cygwin platform *** Warning *** *** *** vax780 Simulator being built with: *** - compiler optimizations and no debugging support. GCC Version: 11.3.0. *** - WITHOUT Local LAN networking support. *** - Local LAN packet transports: NAT(SLiRP) *** - Per simulator tests will be run. *** *** git commit id is 4e159a04ed6291509b685dc06f620389b3373cce. *** git commit time is 2023-01-04T13:22:12-0700. *** gcc -std=gnu99 -U__STRICT_ANSI__ -O2 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -DSIM_GIT_COMMIT_ID=4e159a04ed6291509b685dc06f620389b3373cce -DSIM_GIT_COMMIT_TIME=2023-01-04T13:22:12-0700 -DSIM_COMPILER="GCC Version: 11.3.0" -DSIM_BUILD_TOOL=simh-makefile -I . -Werror -D_GNU_SOURCE -DUSE_READER_THREAD -DSIM_ASYNCH_IO -DHAVE_SEMAPHORE -DHAVE_SYS_IOCTL -DSIM_HAVE_DLOPEN=a -DHAVE_EDITLINE -DHAVE_UTIME -DHAVE_GLOB -DHAVE_SHM_OPEN ./VAX/vax_cpu.c ./VAX/vax_cpu1.c ./VAX/vax_fpa.c ./VAX/vax_cis.c ./VAX/vax_octa.c ./VAX/vax_cmode.c ./VAX/vax_mmu.c ./VAX/vax_sys.c ./VAX/vax_syscm.c ./VAX/vax780_stddev.c ./VAX/vax780_sbi.c ./VAX/vax780_mem.c ./VAX/vax780_uba.c ./VAX/vax7x0_mba.c ./VAX/vax780_fload.c ./VAX/vax780_syslist.c ./PDP11/pdp11_rl.c ./PDP11/pdp11_rq.c ./PDP11/pdp11_ts.c ./PDP11/pdp11_dz.c ./PDP11/pdp11_lp.c ./PDP11/pdp11_tq.c ./PDP11/pdp11_xu.c ./PDP11/pdp11_ry.c ./PDP11/pdp11_cr.c ./PDP11/pdp11_rp.c ./PDP11/pdp11_tu.c ./PDP11/pdp11_hk.c ./PDP11/pdp11_vh.c ./PDP11/pdp11_dmc.c ./PDP11/pdp11_dup.c ./PDP11/pdp11_td.c ./PDP11/pdp11_tc.c ./PDP11/pdp11_rk.c ./PDP11/pdp11_io_lib.c ./PDP11/pdp11_ch.c ./scp.c ./sim_console.c ./sim_fio.c ./sim_timer.c ./sim_sock.c ./sim_tmxr.c ./sim_ether.c ./sim_tape.c ./sim_disk.c ./sim_serial.c ./sim_video.c ./sim_imd.c ./sim_card.c -DVM_VAX -DVAX_780 -DUSE_INT64 -DUSE_ADDR64 -I ./VAX -I ./PDP11 -Islirp -Islirp_glue -Islirp_glue/qemu -DHAVE_SLIRP_NETWORK -DUSE_SIMH_SLIRP_DEBUG slirp/*.c slirp_glue/*.c -DUSE_NETWORK -o BIN/vax780 -lm -lrt -lpthread -ldl -ledit BIN/vax780 RegisterSanityCheck /cygdrive/m/Emulators/SimH/mirror/simh-4.1/VAX/tests/vax-diag_test.ini </dev/null Running internal register sanity checks on VAX 11/780 simulator. *** Good Registers in VAX 11/780 simulator. VAX 11/780 simulator Open SIMH V4.1-0 Current git commit id: 4e159a04 Running Hardware Core Test (EVKAA) *** PASSED - VAX 11/780 Hardware Core Instruction test EVKAA Starting VAX Diagnostic Supervisor Missing Regular Expression support - skipping EVKAB test VAX 11/780 simulator Open SIMH V4.1-0 Current git commit id: 4e159a04 sim> exit Goodbye
- Prepare data directory
$ mkdir -p /cygdrive/m/Emulators/SimH/guests/vax-11-780_unix-32v $ cd /cygdrive/m/Emulators/SimH/guests/vax-11-780_unix-32v
- The simulator program is available in the BIN directory from the compiled git repository. To make life easier, the best is to create a link to the program. I can create a link into /usr/bin or into the guest directory. I will go with the later.
$ ln -s ../../mirror/simh-4.1/BIN/vax780.exe vax780-4.1.exe $ ls -laF vax780-4.1.exe lrwxrwxrwx 1 afberendsen None 36 Feb 19 15:26 vax780-4.1.exe -> ../../mirror/simh-4.1/BIN/vax780.exe*
- Unpack the UNIX/32V tape file
$ 7z.exe x 32v.tap.bz2 7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21 Scanning the drive for archives: 1 file, 4025935 bytes (3932 KiB) Extracting archive: 32v.tap.bz2 -- Path = 32v.tap.bz2 Type = bzip2 Everything is Ok Size: 17368040 Compressed: 4025935 $ chmod a-wx 32v.tap
- Prepare disk to receive the UNIX/32V
- Create tboot.ini file to allow the initial disk set-up and code transfer from the tape.
set rq disable set lpt disable set rl disable set hk disable set rq disable set rqb disable set rqc disable set rqd disable set ry disable set ts disable set tq disable set dz lines=8 set rp0 rp06 attach rp0 rp06.disk set tu0 te16 attach tu0 32v.tap D 50000 20009FDE D 50004 D0512001 D 50008 3204A101 D 5000C C113C08F D 50010 A1D40424 D 50014 008FD00C D 50018 C1800000 D 5001C 8F320800 D 50020 10A1FE00 D 50024 00C139D0 D 50028 04c1d004 D 5002C 07e15004 D 50030 0000f750 go 50000 go 0
- Start-up the simulator with the initial environment. On the past, when creating the initial disk (rp06.disk), the simulator used to ask for a confirmation to re-write the last track.
$ ./vax780-4.1.exe tboot.ini VAX 11/780 simulator Open SIMH V4.1-0 Current git commit id: 4e159a04 /cygdrive/m/Emulators/SimH/guests/vax-11-780_unix-32v/tboot.ini-14> at rp0 rp06.disk %SIM-INFO: RP0: Creating new file: rp06.disk /cygdrive/m/Emulators/SimH/guests/vax-11-780_unix-32v/tboot.ini-16> at tu0 32v.tap %SIM-INFO: TU0: unit is read only %SIM-INFO: TU0: Tape Image '32v.tap' scanned as SIMH format HALT instruction, PC: 00050033 (HALT)
- We are going to run the tdcopy program. This program copies in the miniroot image onto the hard disk. Once the program is loaded simply answer in the following manner to select the tape drive connected on MBA1, unit 0 to the disk on MBA0 unit 0. Naturally the file number #1 (not 0) because we don't write out the tape boot blocks.
HALT instruction, PC: 00050033 (HALT) =tdcopy tdcopy : TM03 tape-to-disk copy tape MBA # : 1 tape unit # : 0 tape file offset : 1 tape block offset : 0 disk MBA # : 0 disk unit : 0 disk block offset : 0 no. of input blocks : 480 10240 = tape block size normal termination 480 input blocks read 9600 output blocks written =
- Stop the simulator. At the UNIX/32V prompt, press CTRL-E. This will bring the simulator interface. At the simulator, simple issue the quit command.
= CTRL+E Simulation stopped, PC: 00050180 (BBC #7,R0,5017D) sim> q Goodbye
- Transfer UNIX/32V to the disk. This is funny. Is not an install. You will copy a functional version of UNIX/2V from the tape (which can be potently used to boot the system), into the disk.
- Create a new ini file. This time is the Disk Boot ini file: dboot.ini
set tto 7b set rq dis set lpt dis set rl dis set hk dis set rq dis set rqb dis set rqc dis set rqd dis set ry dis set ts dis set tq dis set dz 7b set dz lines=16 att dz -m 2311 set rp0 rp06 at rp0 rp06.disk set tu0 te16 at tu0 32v.tape D 30000 00009FDE D 30004 D0512001 D 30008 D004A101 D 3000C 0400C113 D 30010 10008F32 D 30014 D40424C1 D 30018 8FD00CA1 D 3001C 80000000 D 30020 320800C1 D 30024 A1FE008F D 30028 28C1D410 D 3002C 14C1D404 D 30030 C139D004 D 30034 c1d00400 D 30038 e1500404 D 3003C 00f75007 go 30000 go 2
- Load the simulator for UNIX/32V
$ ./vax780-4.1.exe dboot.ini VAX 11/780 simulator Open SIMH V4.1-0 Current git commit id: 4e159a04 /cygdrive/m/Emulators/SimH/guests/vax-11-780_unix-32v/dboot.ini-15> att dz -m 2311 %SIM-INFO: Listening on port 2311 Modem control activated /cygdrive/m/Emulators/SimH/guests/vax-11-780_unix-32v/dboot.ini-19> at tu0 32v.tap %SIM-INFO: TU0: unit is read only %SIM-INFO: TU0: Tape Image '32v.tap' scanned as SIMH format HALT instruction, PC: 00030040 (HALT) file :
- Now we are at the bootloader, and we must tell it what file to boot. Not surprisingly the UNIX kernel is called, unix. So simply type in unix, and hit enter.
file : unix RESTRICTED RIGHTS USE, DUPLICATION OR DISCLOSURE IS SUBJECT TO RESTRICTION STATED IN YOUR CONTRACT WITH WESTERN ELECTRIC COMPANY INC. real mem = 8323072 Warning: more page-frames than allocated in bit map Only 2048 of 16256 used. (Increase PHYSPAGES) avail mem = 939008 #
- Ok, now we are booted up into single user mode! Now we need to format the /usr partition and restore some files. The mkfs command is run as follows:
# /etc/mkfs /dev/rp0h 322278 isize = 65496 m/n = 3 500 #
- There is no 'mt' command in UNIX/32V, so you have to 'cheat' to advance the tape. We need to advance it to the 3rd file by simply reading the tape and discarding the output to /dev/null
# cp /dev/rmt4 /dev/null # cp /dev/rmt4 /dev/null
- With the OS installed, there is no shutdown command, in the old says we ran sync a few times and pulled the plug....
# sync ; sync ; sync ; sync # CTRL+E Simulation stopped, PC: 80000798 (BLBC 8000B6FC,80000798) sim> q Goodbye
- From here it's simple to get going. Boot up with the dboot.ini, and simply hit CTRL+D at the # prompt, and away you go. There is no root password.
$ ./vax780-4.1.exe dboot.ini VAX 11/780 simulator Open SIMH V4.1-0 Current git commit id: 4e159a04 /cygdrive/m/Emulators/SimH/guests/vax-11-780_unix-32v/dboot.ini-15> att dz -m 2311 %SIM-INFO: Listening on port 2311 Modem control activated /cygdrive/m/Emulators/SimH/guests/vax-11-780_unix-32v/dboot.ini-19> at tu0 32v.tap %SIM-INFO: TU0: unit is read only %SIM-INFO: TU0: Tape Image '32v.tap' scanned as SIMH format HALT instruction, PC: 00030040 (HALT) file : unix RESTRICTED RIGHTS USE, DUPLICATION OR DISCLOSURE IS SUBJECT TO RESTRICTION STATED IN YOUR CONTRACT WITH WESTERN ELECTRIC COMPANY INC. real mem = 8323072 Warning: more page-frames than allocated in bit map Only 2048 of 16256 used. (Increase PHYSPAGES) avail mem = 939008 # CTRL+Dentering rc clearing mtab clearing /tmp mounting /usr on rp0h starting update starting cron leaving rc login: root # ls bin dev etc fboot lib mnt sys tmp unix usr # sync;sync;sync;sync # CTRL+E Simulation stopped, PC: 80000798 (BLBC 8000B6FC,80000798) sim> q Goodbye
First look
Comments
Post a Comment