NetBSD 8 on Alpha ES40 simulator

ES40 is the only open source emulator for the HP (DEC, Compaq) AlphaServer ES40. The current version is capable of running OpenVMS with some limitations. It emulates the Alpha AXP EV68CB processor and other devices.  ES40 emulator development has virtually been halted since 2009. The following will be about the

ES40 Version 0.18+

So sorry kids, no under 18s here

 

The homepage of the ES40 project is still up here http://es40.org/Homepage and it is pretty straight forward to follow their build instructions, which Im gonna cover briefly here  ….

I could not run NetBSD/OpenBSD via Alphavm_free and I have covered it here https://astr0baby.wordpress.com/2017/05/30/alphavm_free-and-bsds/

So only choice now is really hardcore hacking via qemu-system-alpha or the ancient ES40. So will ES40 work with recent NetBSD 8 ? Assuming you have your environment setup for building stuff I will only cover the fundamental dependencies for the ES40 build

  • Poco C++ libraries
  • Libpcap-devel
  • libX11-devel
  • SDL-devel
# apt-get install libpcap-dev build-essential unzip libx11-dev libsdl-dev automake autotools-dev libpoco-dev libxt-dev checkinstall

So lets build this now

# This will pull latest sources and clone it to es40 directory 
cvs -d:pserver:anonymous@es40.cvs.sourceforge.net:/cvsroot/es40 login     (hit enter) 
cvs -z3 -d:pserver:anonymous@es40.cvs.sourceforge.net:/cvsroot/es40 checkout -P es40

$ cd es40 
$ chmod +x configure 
$ chmod +x configure_1.sh
$ chmod +x configure_2.sh
$ cp config/config.guess  .
$ ./configure
This is the debug-options configuration script for the ES40 emulator
If you don't want any debugging options enabled, answer YES to the
following question
Do you want the defaults for all options? (yes, no) [yes]: yes   (we don't want debug now) 
......
$ make 
......
$ cd src 
$ ls -la es40     <-- this will be our main emulator binary) 
-rwxr-xr-x 1 user user 5241664 Oct 11 21:56 es40

Next we prepare the working directory where we will hold the images,ISOs, ROM files as well as the es40 binary. We will need a couple of files so lets describe them and download them

cl67srmrom.exe  is the SRM firmware (also called the SRM console) is the boot firmware written by DEC for systems based on the Alpha AXP microprocessor.   downloadable here https://drop.me/MRq778

netbsd8.iso is our NetBSD Alpha ISO downloadable from here http://ftp.netbsd.org/pub/NetBSD/iso/8.0/NetBSD-8.0-alpha.iso

So we place these 2 files into the working directory where we will hold our simulation

$ mkdir ~/RUN 
$ cd ~/RUN 
$ cp ~/es40/src/es40 . 
$ wget http://ftp.netbsd.org/pub/NetBSD/iso/8.0/NetBSD-8.0-alpha.iso

Download the https://drop.me/MRq778 and place the cl67srmrom.exe here 
So you should have these files present 
$ ls -la 
total 387732
drwxr-xr-x 2 user user      4096 Oct 11 22:20 .
drwxr-xr-x 4 user user      4096 Oct 11 22:10 ..
-rw-r--r-- 1 user user    693248 Oct 11 22:20 cl67srmrom.exe
-rwxr-xr-x 1 user user   5241664 Oct 11 22:10 es40
-rw-r--r-- 1 user user 391090176 Oct 11 22:20 netbsd8.isof

Lest configure the es40 configuration file now (this holds all the needed info for the emulator)  and save this file as /etc/es40.cfg

{
keyboard.use_mapping = false;
keyboard.map = "keys.map";
}

sys0 = tsunami 
{
rom.srm = "cl67srmrom.exe";
rom.decompressed = "decompressed.rom";
rom.flash = "flash.rom";
rom.dpr = "dpr.rom";
memory.bits = 29;

cpu0 = ev68cb { icache = false; speed = 800M; }
pci0.7 = ali{
mouse.enabled = false;
lpt.outfile = "lpt.out";
}

pci0.3 = sym53c810
{ 
disk0.0 = file { 
file = "disk0-es40.img";
read_only = false;
cdrom = false;
autocreate_size = 6000M;
}
disk0.4 = file {
file = "netbsd8.iso";
read_only = true;
cdrom = true;
}
disk0.5 = ramdisk 
{ size = 10M; } 
}

pci0.4 = dec21143 
{ adapter = "tap0" mac = "08-00-2B-E5-40-00"; }

serial0 = serial 
{ port = 21264; }

}

Next we will boot the simulator (we will need root privileges since we touch the tap0 interface)

$ cd ~/RUN 
$ su 
# ./es40

Following should be visible after the disk gets created

Next we telnet to localhost port 21264

$ telnet localhost 21264

After a while (testing memory procedure …) you will get the following SRM prompt

We run the sho dev to list all the devices visible to the Alpha Console and since we are installing we will boot DKA400 (ISO CDROM with NetBSD8)

P00>>> boot DKA400

And the boot process gets stuck on the mcclock() and move no further … so what now ? Well lets first stop the emulator. I could not stop if normally so I have just issues a kill command …

root@panasonic:/home/user# ps -ef | grep es40
root 32409 32366 74 22:29 pts/3 00:05:11 ./es40
root@panasonic:/home/user# kill -9 32409
root@panasonic:/home/user#

Luckily Dimitry Kalinkin modified the above sources so that NetBSD could boot and his fork of ES40 can be downloaded from here  https://github.com/veprbl/es40

So lets build this one and see how it goes

Lets move the old ES40 sources away 
$ mv ~/es40 ~/es40.old 
$ git clone  https://github.com/veprbl/es40
$ cd es40 
$ cp config/config.guess  .
$ ./configure
This is the debug-options configuration script for the ES40 emulator
If you don't want any debugging options enabled, answer YES to the
following question
Do you want the defaults for all options? (yes, no) [yes]: yes
$ make 
...... 
$ 

So once we have the new es40 binary built we copy it over the old one and re-run the emulator

$ cd ~/RUN 
$ cp ~/es40/src/es40 .     <-- the new es40 binary 
$ su 
# ./es40

This time we should be in much better shape (memory checks are gone, and the whole Console startup is much faster … )

And whats important NetBSD 8 installation ISO loads and actually installs – so after we run

P00>>> boot DKA400

Finally NetBSD/alpha 8.0 installer comes up

Installation then is pretty standard and I will not cover this here, however there are a few issues after the installation finishes (full-sets ..do not set network yet in the installer) . We poweroff NetBSD installer and in the SRM console we choose the dka0 disk to boot from

P00>>> set boot_osflags a             (thx herdware) 
P00>>> boot DKA0

Now we will need to wait a while for the initial scripts to finish .. take some time so be patient

<-- cut -->
Loaded entropy from /var/db/entropy-file.
Setting tty flags.
Setting sysctl variables:
ddb.onpanic: 1 -> 0
Starting network.
/etc/rc: WARNING: $hostname not set.
IPv6 mode: host
Configuring network interfaces:.
Adding interface aliases:.
Waiting for DAD to complete for statically configured addresses...
Building databases: dev, services.
Starting syslogd.
Mounting all file systems...
Clearing temporary files.
Updating fontconfig cache:

What I cannot get to run is the networking .. emulated NetBSD can see the network device

# ifconfig -a
tlp0: flags=0x8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
ec_capabilities=1<VLAN_MTU>
ec_enabled=0
address: 08:00:2b:e5:40:00
media: Ethernet autoselect (autoselect)
lo0: flags=0x8048<LOOPBACK,RUNNING,MULTICAST> mtu 33112

But when I bring it up like this

# ifconfig tlp0 10.0.2.222 255.255.255.0 up 
# ifconfig -a
tlp0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ec_capabilities=1<VLAN_MTU>
ec_enabled=0
address: 08:00:2b:e5:40:00
media: Ethernet autoselect (100baseTX)
status: active
inet 10.0.2.222/8 broadcast 10.255.255.255 flags 0x0
inet6 fe80::a00:2bff:fee5:4000%tlp0/64 flags 0x0 scopeid 0x1
lo0: flags=0x8048<LOOPBACK,RUNNING,MULTICAST> mtu 33112

# route add default 10.0.2.2
# route show
Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface

default 10.0.2.2 UG - - - tlp0
10.0.2/24 link#1 U - - - tlp0
10.0.2.222 link#1 UHl - - - lo0

Internet6:
Destination Gateway Flags Refs Use Mtu Interface
fe80::%tlp0/64 link#1 U - - - tlp0
fe80::a00:2bff:fee link#1 UHl - - - lo0
ff01:1::/32 link#1 U - - - tlp0
ff02::%tlp0/32 link#1 U - - - tlp0

I get the following console messages flooding
 
tlp0: filter setup and transmit timeout
tlp0: receive process failed to idle: state RUNNING - WAIT
tlp0: receive process failed to idle: state RUNNING - WAIT
tlp0: filter setup and transmit timeout
tlp0: receive process failed to idle: state RUNNING - WAIT
tlp0: receive process failed to idle: state RUNNING - WAIT
tlp0: filter setup and transmit timeout
tlp0: receive process failed to idle: state RUNNING - WAIT
tlp0: receive process failed to idle: state RUNNING - WAIT

The network does not work with my bridged tap0 device ..

Full dmesg below

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
    2018 The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 8.0 (GENERIC) #0: Tue Jul 17 14:59:51 UTC 2018
        mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/alpha/compile/GENERIC
AlphaServer ES40, 800MHz, s/n 
8192 byte page size, 1 processor.
total memory = 512 MB
(2736 KB reserved for PROM, 509 MB used by NetBSD)
avail memory = 489 MB
timecounter: Timecounters tick every 0.976 msec
Kernelized RAIDframe activated
running cgd selftest aes-xts-256 aes-xts-512 done
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21264C-6
cpu0: Architecture extensions: 0x1305<PAT,MVI,CIX,BWX>
tsc0 at mainbus0: 21272 Core Logic Chipset, Cchip rev 0
tsc0: 8 Dchips, 2 memory buses of 16 bytes
tsc0: arrays present: 512MB, 0MB, 0MB, 0MB, Dchip 0 rev 1
tsp0 at tsc0
pci0 at tsp0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
siop0 at pci0 dev 3 function 0: Symbios Logic 53c810 (fast scsi)
siop0: interrupting at dec 6600 irq 16
scsibus0 at siop0: 8 targets, 8 luns per target
tlp0 at pci0 dev 4 function 0: DECchip 21143 Ethernet, pass 3.0
tlp0: interrupting at dec 6600 irq 20
tlp0: DEC, Ethernet address 08:00:2b:e5:40:00
tlp0: 100baseTX, 10baseT, auto
sio0 at pci0 dev 7 function 0: vendor 10b9 product 1533 (rev. 0xc3)
isa0 at sio0
lpt0 at isa0 port 0x3bc-0x3bf irq 7
com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
com0: console
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0 mux 1
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
attimer0 at isa0 port 0x40-0x43
pcppi0 at isa0 port 0x61
spkr0 at pcppi0: PC Speaker
midi0 at pcppi0: PC speaker
isabeep0 at pcppi0
mcclock0 at isa0 port 0x70-0x71: mc146818 compatible time-of-day clock
attimer0: attached to pcppi0
tsp1 at tsc0
pci1 at tsp1 bus 0
pci1: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
tsciic0 at tsc0
iic0 at tsciic0: I2C bus
timecounter: Timecounter "clockinterrupt" frequency 1024 Hz quality 0
timecounter: Timecounter "PCC" frequency 792674656 Hz quality 1000
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 0 lun 0: <DEC, RZ58     (C) DEC, 2000> disk fixed
sd0: 6000 MB, 15360 cyl, 16 head, 50 sec, 512 bytes/sect x 12288000 sectors
sd0: async, 8-bit transfers
cd0 at scsibus0 target 4 lun 0: <DEC, RRD42   (C) DEC, 4.5d> cdrom removable
cd0: async, 8-bit transfers
sd1 at scsibus0 target 5 lun 0: <DEC, RZ58     (C) DEC, 2000> disk fixed
sd1: 10240 KB, 32 cyl, 16 head, 40 sec, 512 bytes/sect x 20480 sectors
sd1: async, 8-bit transfers
root on sd0a dumps on sd0b
kern.module.path=/stand/alpha/8.0/modules
/dev/sd0a: file system not clean (fs_clean=0x40); please fsck(8)
/dev/sd0a: lost blocks 0 files 0

Video here :

Acknowledgements :

https://raymii.org/s/blog/Installing_the_es40_AlphaServer_emulator_0.18_on_Ubuntu_16.04_and_trying_to_install_openVMS_8.4_on_es40.html

https://github.com/veprbl/es40

http://es40.org/Homepage

 

Advertisement

About astr0baby

Please run Adblock or similar... we have been told to do so since Carl Sagan wrote the Contact .
This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to NetBSD 8 on Alpha ES40 simulator

  1. herdware says:

    “set boot_osflags a” in srm should get it to automatically go multiuser.

  2. Pjotr says:

    There’s a new fork of es40 which runs the Bsds better: https://github.com/lenticularis39/axpbox

    It includes all patches of other forks and more new functionality.

    • astr0baby says:

      Yes, thanks for letting me know. I have checked it out already – it works, but is quite slow currently, however still excellent addition to the other Alpha simulators out there !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.