The complete guide to running your PiDP-11 on 64 bit Raspberry Pi OS

3,596 views
Skip to first unread message

John Anderson

unread,
Mar 31, 2023, 11:15:04 PM3/31/23
to [PiDP-11]
I finally broke down and got the pidp-11 to run on the latest 64 bit version of the raspberry pi OS.

It was more involved than you’d think so I thought I’d write down the steps for everyone who whats to give it a try.

So why make the change? These days most computing platforms are 64 bit. 32 bit versions are becoming obsolete. So going forward the sweet spot of compatibility will soon be 64 bit. 64 bit OS are also more efficient and can access more than 4 Gb of memory. Raspberry 3 and 4 pi hardware supports 64 bit OSes.

The other recent change is to get rid of the default “pi” user, which is a security risk. It also often makes sense to setup login using ssh keys instead of passwords, which is both more secure and less hassle since you don’t need to remember passwords.

So while I’m at it I’ll show you how to do all those things, and a couple more, as well.

The instructions are long and I hope there aren’t too many typos!

Start by downloading the latest Raspberry Pi Imager from:


I’m on a mac so I downloaded the macOS version, but I suspect the others work the same way.

Pop your SD card into the computer with the Raspberry Pi Imager and run the Imager.

Click “CHOOSE OS" to choose "Raspberry Pi OS (other)" -> "Raspberry Pi OS (64-bit)". Raspberry Pi OS Lite (64-bit) would probably also work, but I’m going to use VNC to remotely login to use the desktop that isn’t in the Lite version.

Click “CHOOSE STORAGE” to choose your SD card. Mine says “Generic MassStorageClass Media - 128.2 GB”

Click on the gear icon in the panel to bring up a bunch of options:

For me it says “Would you like to pre-fill the wifi password from the system keychain?” Choose yes. This will setup your Raspberry Pi to use wifi to get to the internet, which is handy. Alternatively you could setup wired ethernet or manually setup the SSID and password in the Advance options panel that comes up.

Check "Set hostname". I chose "pidp-11”.

Check "Enable SSH". You can either use password or Allow public-key authentication only. I chose public-key authentication because it’s more secure. It’s also more complicated and convenient. If you want to learn how to do it google "set up public key ssh.” In my case it automatically populates the field for authorized_keys from my mac’s .ssh file.

Check "Set username and password". Choose a name other than “pi", the old default user. Fill out a password. If you allow public-key authentication I’ll show you how to disable password login later if you want increased security.

Check "Configure wireless LAN”. It was already pre-fill the SSID and wifi password from the system keychain, but if not you could fill it out here. Set wireless LAN country if it’s not “GB”

Click Set locale settings, which defaulted to the locale of my mac.

Under Persistent settings I chose “Eject media when finished” and “Enable telemetry.” Enable telemetry sends some anonymized information back to the Raspberry PI orgainzation.

Press “Save”

Press “WRITE”

It should write the SSD with the OS, which takes a minute or two.

Put the SSD into the raspberry PI of the PiDP-ll and plug in the power. Wait a minute or two for it to boot.

Go figure out the IP address of your Raspberry PI on your local network. You can usually do this by looking at the IP addresses listed in your Router/Modem.

I set up my router to use a fixed IP address for the Raspberry PI using its MAC address to reserve the IP address. I then added 2 lines to my etc/hosts file with a symbolic name to my Raspberry Pi’s IP addresses. One for the fixed ethernet address and one for the wifi ethernet address:

192.168.1.30 PIDP-11
192.168.1.31 PIDP-11W

That way I can just open a shell and type:

$ ssh user@pidp-11w

instead of

$ ssh user@192.168.1.31

Where “user” is the user name I specified in the settings above to remotely login over wifi. It should ask you to save a fingerprint or complain if you have previously setup this Raspberry PI with ssh. In that case you need to remove the old key from your known_hosts file.

If you setup public-key authentication you’ll be logged in otherwise you’ll need to type the password.

Once logged in via ssh let’s update the Raspberry Pi:

$ sudo apt update
$ sudo apt upgrade
$ sudo reboot

It can be tedious doing the rest of the steps in a shell via ssh. It’s more convenient to use the desktop via VNC. Near the end of this description I have instructions on setting that up. Now might be a good time to do that otherwise continue with the shell:

Remotely login again:

$ ssh user@pidp-11w

Let’s go setup the pidp-11 software by first downloading everything:

$ sudo mkdir /opt/pidp11
$ cd /opt/pidp11

then unpack pidp11.tar.gz

$ sudo gzip -d pidp11.tar.gz
$ sudo tar -xvf pidp11.tar

and the systems:

$ sudo gzip -d systems.tar.gz
$ sudo tar -xvf systems.tar

At this point we’ll need to change some things to recompile for 64 bits. First we’ll need to edit the install file located at /opt/pidp11/install/install.sh. Replace all the occurrences of "/home/pi" with “home/user” where user is your username.

then run the install file:

$ sudo /opt/pidp11/install/install.sh

This will install a bunch of packages and install the old 32 bit version of the pidp-11 software, which will have to be replaced with the 64 bit version that we’ll eventually build.

Make sure the gcc compiler is installed (I’m not sure if both these are required):

$ sudo apt install gcc-aarch64-linux-gnu
$ sudo apt install build-essential

You’ll need a new 64 bit version of libpcap.a located in /opt/pidp11/src/02.3_simh/4.x+realcons/rpi-build. Copy the new one over:

$ cd /opt/pidp11/src/02.3_simh/4.x+realcons/rpi-build/
$ mv libpcap.a libpcap.a-32bit
$ sudo cp /usr/lib/aarch64-linux-gnu/libpcap.a /opt/pidp11/src/02.3_simh/4.x+realcons/rpi-build

Let’s remove the 32 bit client before building the 64 bit one since make clean doesn’t work:

$ sudo rm /opt/pidp11/src/02.3_simh/4.x+realcons/bin-rpi/pdp11_realcons

The first problem we’ll have to fix is that “find_dev" is defined in the new libpcap.a and in the pidp-11 source code. So we’ll replace all the occurrences of “find_dev” with something else, e.g. “find_device". 19 occurrences these files:

12 in /opt/pidp11/src/02.3_simh/4.x+realcons/src/scp.c
1 in /opt/pidp11/src/02.3_simh/4.x+realcons/src/scp.h
1 in /opt/pidp11/src/02.3_simh/4.x+realcons/src/sim_tmxr.c
1 in /opt/pidp11/src/02.3_simh/4.x+realcons/src/PDP11/pdp11_dl.c
1 in /opt/pidp11/src/02.3_simh/4.x+realcons/src/PDP11/pdp11_td.c
3 in /opt/pidp11/src/02.3_simh/4.x+realcons/src/PDP11/pdp11_io_lib.c

Let’s fix another bug in PDP11/pdp11_cpu.c so we don’t get multiple definitions of realcons_event_cpu_reset due to an implicit definition:

in /opt/pidp11/src/02.3_simh/4.x+realcons/src/PDP11/pdp11_cpu.c replace:

console_controller_event_func_t realcons_event_cpu_reset;

with

extern console_controller_event_func_t realcons_event_cpu_reset;

Next we need to add a linker flag for -ldbus-1 to /opt/pidp11/src/02.3_simh/4.x+realcons/src/quickmake:

LDFLAGS = -lrt -lm  -lpthread -ldl -lreadline -ldbus-1

Now we can build the 64 bit version:

$ cd /opt/pidp11/src
$ sudo ./makeclient.sh

If it works it should say something like:

.//../bin-rpi/pdp11_realcons: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=ae02bf98f52a059dd4e47bb0239322a0c5cf6877, for GNU/Linux 3.7.0, not stripped

That’s the 64 bit executable without symbols stripped.

Now let’s build the server. First let’s fix the makefile so it uses the 64 bit compiler:

in /opt/pidp11/src/11_pidp_server/pidp11/makefile change:

CC=arm-linux-gnueabihf-gcc -std=c99 -U__STRICT_ANSI__ $(CC_DBG_FLAGS) $(OS_CCDEFS) -I.
to
CC=gcc -std=c99 -U__STRICT_ANSI__ $(CC_DBG_FLAGS) $(OS_CCDEFS) -I.

Then build the server:

$ cd /opt/pidp11/src
$ sudo ./makeserver.sh

It should say something like:

bin-rpi/pidp1170_blinkenlightd: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=c82d2743c7450584114f47bc3cb9fafc0e45d176, for GNU/Linux 3.7.0, with debug_info, not stripped

Server compiled OK!

Now let’s delete the old version of scansw and compile a new one:

$ cd /opt/pidp11/src/11_pidp_server/scanswitch
$ rm scansw
$ make

Time to reinstall our new 64 bit versions:

$ sudo /opt/pidp11/install/install.sh
$ sudo reboot

At this point you should see the lights on the Raspberry Pi. If you login remotely via ssh you should see:

PDP-11 simulator V4.0-0 Current  REALCONS build Mar 31 2023
Starting PDP-11/70 (4mB memory) ...
Searching realcons controller "11/70" ...
Connecting to host localhost ...
Loading core memory ...

There are a few remaining tasks you might consider doing:

I use VNC to remotely log into the headless Raspberry PI to use the desktop, either on the local network or remotely. To do that you need to enable VNC with raspi-config and set the screen resolution. I chose the biggest resolution, but your screen might be smaller. In a shell on the Raspberry Pi type:

$ sudo raspi-config

It displays a bunch of options. You want to enable VNC and increase the screen resolution:

2 Display Options -> D5 VNC Resolution -> 1920X1080
3 Interface Options -> I3 VNC Enable
choose reboot

I’ve been using the free "VNC Viewer" on Mac to connect to the Raspberry Pi’s VNC server. There are other VNC viewers for other platforms.

If you use public-key authentication to login it’s more secure to remove password login for ssh. To do that edit /etc/ssh/sshd_config as root and change:

#PasswordAuthentication yes

to

PasswordAuthentication no

RemoteIT is a  very useful tool for accessing your Raspberry Pi remotely via ssh or VNC. It’s more secure and easier to use than setting up port forwarding on your router. It works by installing a service on the Raspberry Pi that connects to a remote server that you can use to access your Raspberry Pi no matter where you are. It’s free and easy to setup. Check it out at:


Finally I find it useful to install unattended-upgrades which automatically keeps my Raspberry Pi up to date with the latest important updates. Check it out here:


That's it. Enjoy your PiDP-11!
Message has been deleted
Message has been deleted

Robert Byer

unread,
Sep 9, 2023, 3:31:12 PM9/9/23
to [PiDP-11]
I followed these directions to the letter and have issues.

When all is said and done, the PiDP-11 console is only showing three LEDs lit (the KERNEL, CONS PHY and DATA PATHS) and nothing else.  The LEDs move around for each of the rotary knobs and it appears the switches are working as I can set them to boot an image and it boots.

But that's it, no other LED's (address, data, parity etc.) LEDs are working.

Johnny Billquist

unread,
Sep 9, 2023, 3:32:46 PM9/9/23
to pid...@googlegroups.com
Do they light up if you pull on the light test switch?

Johnny
> Click “CHOOSE STORAGE” to choose your SD card. Minesays “Generic
> MassStorageClass Media - 128.2 GB”
>
> Click on the gear icon in the panel to bring up a bunch of options:
>
> For me it says “Would you like to pre-fill the wifi password from
> the system keychain?” Choose yes. This will setup your Raspberry Pi
> to use wifi to get to the internet, which is handy. Alternatively
> you could setup wired ethernet or manually setup the SSID and
> password in the Advance options panel that comes up.
>
> Check "Set hostname". I chose "pidp-11”.
>
> Check "Enable SSH". You can either use password or Allow public-key
> authentication only. I chose public-key authentication because it’s
> more secure. It’s also more complicated and convenient. If you want
> to learn how to do it google "set up public key ssh.” In mycase it
> $ssh us...@192.168.1.31
>
> Where “user” is the user name I specified in the settings above to
> remotely login over wifi. It should ask you to save a fingerprint or
> complain if you have previously setup this Raspberry PI with ssh. In
> that case you need to remove the old key from your known_hosts file.
>
> If you setup public-key authentication you’ll be logged in otherwise
> you’ll need to type the password.
>
> Once logged in via ssh let’s update the Raspberry Pi:
>
> $ sudo apt update
> $ sudo apt upgrade
> $ sudo reboot
>
> It can be tedious doing the rest of the steps in a shell via ssh.
> It’s more convenient to use the desktop via VNC. Near the end of
> this description I have instructions on setting that up. Now might
> be a good time to do that otherwise continue with the shell:
>
> Remotely login again:
>
> $ssh user@pidp-11w
>
> Let’s go setup the pidp-11 software by first downloading everything:
>
> $ sudo mkdir /opt/pidp11
> $ cd /opt/pidp11
> $ sudo wget http://pidp.net/pidp11/pidp11.tar.gz
> <http://pidp.net/pidp11/pidp11.tar.gz>
> $ sudo wget http://pidp.net/pidp11/systems.tar.gz
> <http://pidp.net/pidp11/systems.tar.gz>
> $ sudo wget http://pidp.net/pidp11/PiDP-11_Manual.odt
> <http://pidp.net/pidp11/PiDP-11_Manual.odt>
>
> then unpack pidp11.tar.gz
>
> $ sudo gzip -d pidp11.tar.gz
> $ sudo tar -xvf pidp11.tar
>
> and the systems:
>
> $ sudo gzip -d systems.tar.gz
> $ sudo tar -xvf systems.tar
>
> At this point we’ll need to change some things to recompilefor 64
> bits. First we’ll need to edit the install file located at
> /opt/pidp11/install/install.sh. Replace all the occurrences of
> "/home/pi" with “home/user” where user is your username.
>
> then run the install file:
>
> $ sudo /opt/pidp11/install/install.sh
>
> This will install a bunch of packages and install the old 32 bit
> version of the pidp-11 software, which will have to be replaced with
> the 64 bit version that we’ll eventually build.
>
> Make sure the gcc compiler is installed (I’m not sure if both these
> are required):
>
> $ sudo apt install gcc-aarch64-linux-gnu
> $sudo apt install build-essential
> https://www.remote.it <https://www.remote.it>
>
> Finally I find it useful to install unattended-upgrades which
> automatically keeps my Raspberry Pi up to date with the latest
> important updates. Check it out here:
>
> https://www.seancarney.ca/2021/02/06/secure-your-raspberry-pi-by-enabling-automatic-software-updates/ <https://www.seancarney.ca/2021/02/06/secure-your-raspberry-pi-by-enabling-automatic-software-updates/>
>
> That's it. Enjoy your PiDP-11!
>
> --
> You received this message because you are subscribed to the Google
> Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pidp-11+u...@googlegroups.com
> <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pidp-11/b6ca487e-a27d-41e2-939c-f51b2a81dac9n%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/b6ca487e-a27d-41e2-939c-f51b2a81dac9n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: b...@softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol

John Kline

unread,
Sep 9, 2023, 3:50:42 PM9/9/23
to Johnny Billquist, pid...@googlegroups.com
FWIW, I followed the instructions to the letter and I’m up and running on 64-bits.

> On Sep 9, 2023, at 12:32 PM, Johnny Billquist <b...@softjar.se> wrote:
>
> Do they light up if you pull on the light test switch?
> To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/5fa3e7c6-26c3-7777-c59e-1492dc544ad0%40softjar.se.

Robert Byer

unread,
Sep 9, 2023, 6:17:08 PM9/9/23
to Johnny Billquist, pid...@googlegroups.com
Yes, all LED's light when the test switch is depressed.  I had been running for years off the stock 32-bit software without issue.

To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/5fa3e7c6-26c3-7777-c59e-1492dc544ad0%40softjar.se.

John Anderson

unread,
Sep 9, 2023, 7:18:33 PM9/9/23
to Robert Byer, [PiDP-11]
Very strange failure. My lights work fine. Did you save a transcript of your build that you could email to me?

John

-- 
You received this message because you are subscribed to a topic in the Google Groups "[PiDP-11]" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pidp-11/zPiWQ3NUFig/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/b6ca487e-a27d-41e2-939c-f51b2a81dac9n%40googlegroups.com.

Robert Byer

unread,
Sep 9, 2023, 7:28:13 PM9/9/23
to John Anderson, [PiDP-11]
Ok, I must be in "idiot" mode today.

It's working perfectly.  I had the keyswitch hooked up and the key had fallen out and I didn't notice it was keyed off.  Put the key in, gave a twist and it came to life.

Thanks for the excellent instructions, everything worked like it should except me.

John Anderson

unread,
Sep 10, 2023, 1:36:32 AM9/10/23
to Robert Byer, [PiDP-11]
Glad to hear you got it to work!

John

Robert Byer

unread,
Sep 10, 2023, 12:32:48 PM9/10/23
to [PiDP-11]
My last question, has anyone compiled the newest version of SIMH on 64-bit Raspberry Pi OS for use with PiDP-11?
(and if yes, has anyone outlined the steps)

Clem Cole

unread,
Sep 10, 2023, 1:56:51 PM9/10/23
to Robert Byer, [PiDP-11]
OpenSIMH will (and does run) on the Pi [well, at least as of the beginning of August was the last time I tried it -- the OpenSIMH folks, such as myself, often test it there] However -- the integration of Oscar's changes for the front-panel are incomplete.  It's on my ToDo list but low.   If you want to take a shot at it, email me offline in the next few days, and I'll point you to where to look.

I will give you an overview of the core issue.  Oscar's changes are very PI specific, and for whatever reason (interesting politics in Linux land), the RPI library for twiddling I/O ports does not use the official Linux interface [as I have expressed to people on the affected mailing list that own the issue -- it reminds me of the old DEC VMS FTN vs. the F77 standard that original UNIX implementations followed - i.e. it strikes me that the different ARM Debian flavors should accept the RPI differences -- just like in UNIX land[1] realizes that VMS FTN was similar too but not the same as the 'official' F77 -- but DEC had the code base and if you were a vendor like Masscomp or Apollo and eventually Sun, if wanted to sell into that market, you needed a compiler that also could accept and compile VMS FTN[2] as the input language) 

Anyway, official Linux (Debian et al.) uses an I/O library that did not exist when the Blinkenlights folks did the original work on which Oscar's code is based.  So the Raspberry Pi OS interface to the different I/O ports is private to each RPI platform (Oscar has a lot of code to test for which one and does different things each time a new RPI comes out) as it uses specific calls for the support chips that each flavor of the RPI has been implemented -- rewriting Oscar's code to use the official library is a much larger project [which I have started but am not finished].   

If we get Oscar's code to use the official Linux interface, then it will run on more than just the RPI (I'm testing on a Libre Computer's LePotato and a BananaPI as well as an RPi2, RPi3, and RPi4).

FWIW: This note is not "official" policy (although I am on the OpenSIMH SG) my guess is that until the surgery to SIMH is less platform-specific as it currently will need to be, it would be unwise to try to put it in the mainline. BTW: The counterargument is that the primary Linux platform for SIMH has been the RPI via Oscar's work, so taking it as is makes some sense - but it means ifdef's and more target-specific code, which is not desirable -- since SIMH is not just for UNIX flavored targets [for instance, it still compiles and runs on VMS last I knew].



Clem

1]  Remember Stu Feldman was at BTL he was chair of the F77 committee during those times. But the f77 compiler in V7 and the like as pretty primitive to what DEC was supplying.
2] In fact, most of the DEC changes made it into F95 but that was years later. 

You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/ec837485-8c15-4d6a-9822-81e0c22a122dn%40googlegroups.com.

Charles Ess

unread,
Oct 13, 2023, 1:25:45 AM10/13/23
to [PiDP-11]
First of all, thanks a million for these terrifically clear and detailed instructions! Everything worked more or less perfectly - with one exception caused by a mistake I made as a relative newcomer. John kindly helped me with figuring out what went wrong: other newer folk may benefit from the details as well.
Briefly: I over-read the instruction "we’ll replace all the occurrences of “find_dev” with something else, e.g. “find_device"." That is, in addition to the several instances of "find_dev" (and nothing else following) that need changing - some of these files also include "find_dev_from_unit".  These should NOT be changed to, e.g., "find_device_from_unit". 
I did so in a first go with a kind of brute force global find and replace: the result of the makefile process was, um, interesting, but catastrophic.
Once John pointed out this as the possible problem, I then corrected the instances of "find_device_from_unit" back to "find_dev_from_unit". The makefile process then worked exactly as it should have, including the final message as quoted by John indicating a successful build.
Hope this may be helpful for those of us who need all the help we can get. Again, many thanks to John for the instructions and his quick help in fixing my error.
Good luck and enjoy!
- c.



Peter Hicks (Poggs)

unread,
Nov 15, 2023, 1:31:31 PM11/15/23
to [PiDP-11]
All,

In case it's of use and less fiddly, I've created a diff at https://gist.github.com/poggs/64d5c3f7d097f14334a16c7b2708ef69 which will implement these code patches.

Feedback appreciated!


Peter

Anton Lavrentiev

unread,
Nov 15, 2023, 11:23:56 PM11/15/23
to Peter Hicks (Poggs), [PiDP-11]
I wonder how did it work for the 32 bit version without the need to rename?

At any rate, if there is a known conflict with the pcap library,
wouldn't it be better to fix that at the simh level as well? I still
see the find_dev() calls in the current codebase.
Maybe (open-)simh should be alerted of this issue so that the code
there is adjusted, too, going forward?
Just a thought, though.
>> $ ssh us...@192.168.1.31
> --
> You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/f629a133-ce55-4fd6-bded-d7ddc8fc5be4n%40googlegroups.com.

isy...@gmail.com

unread,
Nov 20, 2023, 1:23:23 PM11/20/23
to [PiDP-11]
Dear All,

 As there has been a bit of discussion on this point, I have put together a full build for a Pi4 running Bookworm 64bit.
There are a lot of changes:
1. Getting going: Turn off wayland and use x11 in raspi-config. I have tried the wayland drivers with SDL2 and the benefit is marginal. And, you can still use VNC.
2. All of the patches to allow for find_dev to find_device etc have been included.
3. Sun in their infinite wisdom have changed RPC. Install libtirpc-dev.
4. As above, I have changed the pcap bit to use libpcap ... install libpcap-dev.
5. The display system has changed a lot as SDL2 has been updated. The displays are now frame locked to the gpu which considerably reduces flicker.
     Having done this, the text displays via RT11 are now too stable(!!!!) and look like a normal green screen monitor .... not how I remember it on my long gone system.
6. I have included 64bit binaries as well in the source directories. These are for Bookworm 64 as above. For any other distro, rebuild with makeclient.sh and makeserver.sh.
7. The pidp11.sh script which ends up as /opt/pidp11/bin/pidp11.sh has been changed slightly to sort out the annoying XDG_RUNTIME_DIR problem. (Personally, I use this after boot rather than autostart via init.d).
8. I have included an updated RT11 system in systems/rt11-vt. This may be added to your existing systems/selection to allow for selection via the SWR and address push switch.
    if you really want to hammer the vector to bitmap conversion scheme, run radar.bas via gbasic which are on the RT11 volume.
9. As usual, Lunar Lander is available either via the 'lunar' script in rt11-vt or, you can run rtlem from the RT11 volume. (NB this halts on a keypress ... just type boot rl0 to start again).
10. The VT11 screen can now be used for text input which would be from the keyboard attached to your PiDP11.
11. Theoretically, the system is ready for use as a terminal to ITS running on the brand new PiDP10. Personally, I would use a GT40 for this and this app has been tested as a graphic slave.

Hope it is of interest, Ian Schofield

oscarv

unread,
Nov 20, 2023, 3:55:01 PM11/20/23
to [PiDP-11]
Ian,

Thank you! I had the noble plan to hold off with an update until I got my Pi 5. Alas: after waiting for a couple of weeks, now it disappeared in the postal system apparently.
But I'm aware the whole package would benefit from the various updates. New 211BSD and RSX-11M+ disk images should be added as well. 

Kind regards,

Oscar.

isy...@gmail.com

unread,
Nov 21, 2023, 5:40:14 AM11/21/23
to [PiDP-11]
Dear Oscar,

 Many thanks for your note. I sort of did have the Pi5 in mind but I seem to have missed the boat for an order. I suspect (hope) this build will be OK.
Given that it has an updated GPU,  the wayland option is worth another look.  Will have to wait and see.
I agree that some new OS images would be a good idea. I am sure that some offers will arise in relation to this point.
Hope the PiDP10 production is going well.

BW, Ian.

isy...@gmail.com

unread,
Nov 21, 2023, 5:24:28 PM11/21/23
to [PiDP-11]
Dear All,

 On second thoughts, who needs a GT40 :) See photo and instructions in ITS.zip (https://drive.google.com/file/d/1Y5HIleVgYgc9lpz3SfsQmI0_rWH-VW6Z/view?usp=drive_link).
 Look at the photo first and if you know what is going on it may take you hours rather than days to get there !!!!!
 I strongly suggest you go to  Lars Brinkhoff's site  PDP-10 (github.com) to learn all about this complex system.

Good luck, Ian.

ni...@kurand.net

unread,
Nov 26, 2023, 12:12:12 PM11/26/23
to [PiDP-11]
I tried to follow these instructions with a Lite Bookworm 64-bit fresh installation (using the Raspberry Pi Image on MacOS). I completed all of the required src and makefile changes etc. Unfortunately, pdp11_realcon failed to build because Bookworm doesn't appear to have /user/include/rpc/rpc.h that is required by many files with lots of errors like these:

In file included from .//../../../07.0_blinkenlight_api/blinkenlight_api_client.h:36,
                 from .//REALCONS/realcons.h:36,
                 from PDP11/pdp11_cpu.c:232:
.//../../../07.0_blinkenlight_api//rpcgen_linux/rpc_blinkenlight_api.h:9:10: fatal error: rpc/rpc.h: No such file or directory
    9 | #include <rpc/rpc.h>
      |          ^~~~~~~~~~~
compilation terminated.
In file included from .//../../../07.0_blinkenlight_api/blinkenlight_api_client.h:36,
                 from .//REALCONS/realcons.h:36,
                 from PDP11/pdp11_cpumod.c:49:
.//../../../07.0_blinkenlight_api//rpcgen_linux/rpc_blinkenlight_api.h:9:10: fatal error: rpc/rpc.h: No such file or directory
    9 | #include <rpc/rpc.h>
      |          ^~~~~~~~~~~
compilation terminated.


It seems that in the Bookworm release, the original RPC support has been unbundled from glibc and been replaced with the optional tirpc library that is mostly compatible with the original. This means that there are now a few additional steps needed to build the 64 bit version of the software:

First, the package libtirpc-dev needs to be installed:

$ sudo apt install libtirpc-dev

Second, when preparing to make the client, an additional load option is required along with an additional compiler option to tell the compiler where to get tirpc headers. When editing quickmake.sh, ensure that the -ltirpc option is included for the loader:

LDFLAGS = -lrt -lm  -lpthread -ldl -lreadline -ldbus-1 -ltirpc

and make sure that -I /usr/include/tirpc is included for the compiler:

CC = gcc -std=c99 -U__STRICT_ANSI__  $(CC_DEFS) $(OS_CCDEFS) -I $(SRC) -I /usr/include/tirpc  $(CC_DBG_FLAGS) -UUSE_REALCONS

Third, when preparing to make the server, similar changes are required while editing the makefile. Ensure that the -ltirpc option is included for the loader:

LDFLAGS = -pthread -ltirpc

and make sure that -I /usr/include/tirpc is included for the compiler:

CC=gcc -std=c99 -U__STRICT_ANSI__ $(CC_DBG_FLAGS) $(OS_CCDEFS) -I. -I /usr/include/tirpc

Similar changes will be needed if you build (or hack) the BlinkenBone panel test program 07.2_blinkenlight_test.

isy...@gmail.com

unread,
Nov 26, 2023, 1:52:59 PM11/26/23
to [PiDP-11]
Thanks. Which PiDP11 source repo did you use? The copy on google drive as above has all of your suggested mods in already.... Anyway, your are spot on with the required changes!

Regards, Ian.

kurand

unread,
Nov 26, 2023, 5:20:19 PM11/26/23
to [PiDP-11]

Just followed the original instructions so got source from http://pidp.net/pidp11/pidp11.tar.gz

isy...@gmail.com

unread,
Nov 27, 2023, 6:18:54 AM11/27/23
to [PiDP-11]
That is fine. However, as SDL2 has changed a bit, you may find that Lunar Lander doesn't work anymore.
 This is fixed as well in the repo link above.

isy...@gmail.com

unread,
Nov 28, 2023, 5:32:47 PM11/28/23
to [PiDP-11]
Following some most welcome assistance from Charles Ess a number of issues have been resolved:
1. All of the scripts now have exec(anyone) privilege. Specifically, install.sh,  rc.pidp11 and pdp.sh.
2. Scansw was not in the build structure. This has been added to makeserver.sh.
3. A VT11 terminal version of RT11 has been added to the systems directory with a start code of 5 from idled. (NB only start this after the window manager has appeared).
NB After unpacking in /opt, rename to pidp11 after saving your current build. Repo renamed to prevent inadvertent overwrite.
Repo does not contain any binaries. So, an install/build on a 32 bit system should be OK as well.
This looks fairly stable but complaints welcome!
For a reminder: (With apologies to the expert crowd!) (This should have been in Readme.md!)
<...
Unpack the repo in /opt. (as sudo)
sudo mv Pi-2023-64 pidp11
sudo /opt/pidp11/src/makeclient.sh
sudo /opt/pidp11/src/makeserver.sh
sudo /opt/pidp11/install/install.sh
Set the switchregister to 0.
sudo reboot
idled should start.
ssh to your Pi. and the terminal should open with messages from idled and the lights should be twinkling!
Set the switchregister as required.
Press the address switch and off you go.
NB If you run /home/pi/pdp.sh from another terminal, it will grab the console screen. 
NB2 If you happen to drop out of simh with '^e' and 'bye' you can (partially) start again with:
/etc/init.d/pidp11 start
/etc/init.d/pidp11 status
(look for the PID ....  <PID>.pidp11)
screen -r <PID>
...>

Regards, Ian.

Charles Ess

unread,
Nov 29, 2023, 12:14:31 PM11/29/23
to [PiDP-11]
Many thanks indeed to Ian for his yeoman's work in making this build that much easier - and to John in the first place, for making this install possible: and to both for kindly helping me out with various snags I encountered along the way as very much _not_ an expert in these terrains.
As he explains, Ian has continued to make very helpful fixes and improvements - again, many thanks. But I found in following through with this latest repo (I needed to get the Scansw included, and this seemed the easiest way to go) that there are still a few niggles. I hope the following will  save at least us non-experts some time and possible puzzlement.
Perhaps most importantly: in his original instructions, John points out the need to "edit the install file located at /opt/pidp11/install/install.sh. Replace all the occurrences of "/home/pi" with "home/user" where user is your username." I count 9 such occurrences, FWIW. (And: for those unfamiliar with / intimidated with a terminal text editor such as nano, these changes can be made by just opening the file as found in a file window - right-click on the file and then select "text editor" [i.e., not Geany or the other options] which makes finding and changing the occurrences light work.
Note that this needs to be done _after_ renaming the newly unpacked repo ("sudo mv Pi-2023-64 pidp11") and _before_ moving on to the makeclient and makeserver builds.
I was likely just missing a keystroke - a period before the first forward slash? - but I found that "sudo /opt/pidp11/src/makeclient.sh" didn't work. I followed John's instructions instead, cd'ing into /opt/pidp11/src and then issuing "sudo ./makeclient.sh" and then "sudo ../makeserver.sh". 
Just FYI: both of the first two scripts stop after outputting a lot of text with something like "-litrpc -ldbus -l" and then stop. Be patient - after some silent running, the process completes and you'll see the very satisfying messages John includes in his instructions, ending with " ... debug_info, not stripped."
Running "sudo ./install.sh" (while inside /opt/pidp11/install) also coughed a couple of times. The first was with an error message about failing to make the symbolic link /etc/inid.d/pipd11 - file already exists.  This is because the file was there from a previous install - and is easily fixed, or simply avoided in the first place, by removing or renaming that file and then running the install.sh script.
It will also tell you at the very end that ".profile already exists." But I found that going ahead and rebooting and following out the rest of Ian's directions gave me the blinkenlights as expected as well as performing perfectly well as he further describes. 
I hope some of this might be useful - again, many thanks to both John and Ian for making all of this go so well.
- c.

kurand

unread,
Nov 30, 2023, 11:25:13 AM11/30/23
to [PiDP-11]
Ian, 

So, I switched over to using your source with the SDL2 updates etc. Notice that scanws was still 32 bit (copied last week sometime), so rebuilt it and also merged in my blinkenlight_test sources. Everything compiles and seems to run ok except...

My pidp11 hardware (Rpi4B) runs with nothing plugged into either hdmi port. This appears to cause a problem with SDL2 which just seems to cause the pidp11 sim to exit whenever a VT11 display is required (booting either RT11 system). Any ideas on how to solve this issue? I have tried adding hdmi_force_hotplug=1 into /boot/config.txt, but this doesn't seem to help any.

*** booting rt11 ***
*** Start client/server ***
*** RPi 4 detected

PDP-11 simulator V4.0-0 Current  REALCONS build Nov 19 2023
Disabling XQ

Searching realcons controller "11/70" ...
Connecting to host localhost ...
Could not create SDL window: No available displays
                                                  pi@zaphod:~ $

isy...@gmail.com

unread,
Nov 30, 2023, 3:26:11 PM11/30/23
to [PiDP-11]
(Duplicate)
Hi Nick,

 Yes, this is a (new) problem with SDL2.
1. Are you still using wayland. If so, switch to X11 in raspi-config.
2. Are you using VNC and can you see a desktop on your PC?
3. Alter config.txt to this: (Sorry for the text here, Google groups delete attached files these days!!!!)(NB This config is specific for a Pi4 with a 64bit OS).

---->

# For more options and information see
http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Additional overlays and parameters are documented
# /boot/firmware/overlays/README

# Automatically load overlays for detected cameras
#camera_auto_detect=1

#Display Settings
framebuffer_width=1920
framebuffer_height=1080
hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=82

# Automatically load overlays for detected DSI displays
#display_auto_detect=1

# Automatically load initramfs files, if found
auto_initramfs=1
# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]
display_lcd_rotate=2

<-----

4. Add this line to /opt/pidp11/bin/pidp11.sh
export SDL_VIDEO_X11_XRANDR=0
just after export DISPLAY
5. I suggest sudo halt and power off then on again as reboot in this circumstance does not work. And, set SR=0
6. Once you have the idled light pattern, VNC to the PiDP11 and you should get a 1920x1080 display.
7. Open a terminal and type ./pdp.sh. You should see the idled options list.
8. Set SR=5 and press the address switch. The VT11 window will open and you can type into it if you wish. Or, type GT OFF and use the terminal.

Sorry for the long winded reply. I do not think that running the display system over wifi or whatever is a good idea as the performance is compromised.
Nonetheless, it is adequate.

Do let me know if this works, regards, Ian.

kurand

unread,
Dec 1, 2023, 10:13:59 AM12/1/23
to [PiDP-11]
That works, thanks

Rene Richarz

unread,
Feb 23, 2024, 10:28:37 AMFeb 23
to [PiDP-11]
I followed your recipe up to the point when make client should be executed.

But I'm getting errors that the compiler cannot find <rpc/rpc.h> when I'm running ./makeclient.sh on the 64-bit RPi 5. I have no experience whatsoever with rpc. Is this a specific issue of the Raspberry Pi 5 or what am I doing wrong?

$ ssh user@192.168.1.31

Where “user” is the user name I specified in the settings above to remotely login over wifi. It should ask you to save a fingerprint or complain if you have previously setup this Raspberry PI with ssh. In that case you need to remove the old key from your known_hosts file.

If you setup public-key authentication you’ll be logged in otherwise you’ll need to type the password.

Once logged in via ssh let’s update the Raspberry Pi:

$ sudo apt update
$ sudo apt upgrade
$ sudo reboot

It can be tedious doing the rest of the steps in a shell via ssh. It’s more convenient to use the desktop via VNC. Near the end of this description I have instructions on setting that up. Now might be a good time to do that otherwise continue with the shell:

Remotely login again:

$ ssh user@pidp-11w

Let’s go setup the pidp-11 software by first downloading everything:

$ sudo mkdir /opt/pidp11
$ cd /opt/pidp11

then unpack pidp11.tar.gz

$ sudo gzip -d pidp11.tar.gz
$ sudo tar -xvf pidp11.tar

and the systems:

$ sudo gzip -d systems.tar.gz
$ sudo tar -xvf systems.tar

At this point we’ll need to change some things to recompile for 64 bits. First we’ll need to edit the install file located at /opt/pidp11/install/install.sh. Replace all the occurrences of "/home/pi" with “home/user” where user is your username.
LDFLAGS = -lrt -lm  -lpthread -ldl -lreadline -ldbus-1

Now we can build the 64 bit version:

$ cd /opt/pidp11/src
$ sudo ./makeclient.sh

If it works it should say something like:

.//../bin-rpi/pdp11_realcons: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=ae02bf98f52a059dd4e47bb0239322a0c5cf6877, for GNU/Linux 3.7.0, not stripped

That’s the 64 bit executable without symbols stripped.

Now let’s build the server. First let’s fix the makefile so it uses the 64 bit compiler:

in /opt/pidp11/src/11_pidp_server/pidp11/makefile change:

CC=arm-linux-gnueabihf-gcc -std=c99 -U__STRICT_ANSI__ $(CC_DBG_FLAGS) $(OS_CCDEFS) -I.
to
CC=gcc -std=c99 -U__STRICT_ANSI__ $(CC_DBG_FLAGS) $(OS_CCDEFS) -I.

Then build the server:

$ cd /opt/pidp11/src
$ sudo ./makeserver.sh

It should say something like:

bin-rpi/pidp1170_blinkenlightd: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=c82d2743c7450584114f47bc3cb9fafc0e45d176, for GNU/Linux 3.7.0, with debug_info, not stripped

Server compiled OK!

Now let’s delete the old version of scansw and compile a new one:

$ cd /opt/pidp11/src/11_pidp_server/scanswitch
$ rm scansw
$ make

Time to reinstall our new 64 bit versions:

$ sudo /opt/pidp11/install/install.sh
$ sudo reboot

At this point you should see the lights on the Raspberry Pi. If you login remotely via ssh you should see:

PDP-11 simulator V4.0-0 Current  REALCONS build Mar 31 2023
Starting PDP-11/70 (4mB memory) ...
Searching realcons controller "11/70" ...
Connecting to host localhost ...
Loading core memory ...

There are a few remaining tasks you might consider doing:

John Anderson

unread,
Feb 23, 2024, 10:48:52 AMFeb 23
to Rene Richarz, [PiDP-11]
On my raspberry pi 4 I have rpc.h in /usr/include/rpc

It’s also there on a stock raspberry pi 4 without any of the pidp-11 software. 

Do you have it on your raspberry pi?


--
You received this message because you are subscribed to a topic in the Google Groups "[PiDP-11]" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pidp-11/zPiWQ3NUFig/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/4ae35724-2f63-4c3a-80bf-2cce0a9bcb6dn%40googlegroups.com.

Rene Richarz

unread,
Feb 23, 2024, 10:55:01 AMFeb 23
to John Anderson, [PiDP-11]
Thanks for the quick answer. No, it’s not there. Instead of rpc.h there is netdb.h in /usr/include/rpc

Clem Cole

unread,
Feb 23, 2024, 10:57:16 AMFeb 23
to Rene Richarz, [PiDP-11]
Hmm sounds like something is not installed, or maybe not linked properly.
It might be helpful to have the unix locate(1) command installed and enabled, which if I recall raspbian does not do automatically:
$ sudo apt install locate

Now run locate on rpc.h with: $ locate rpc.h
On my Pi it returns:

$ locate rpc.h
/usr/include/linux/rxrpc.h
/usr/include/misc/fastrpc.h
/usr/include/rpc/rpc.h
/usr/include/tirpc/rpc/rpc.h
/usr/share/doc/fp-docs/3.2.0/fclres/machotypes/tmachosubmachinetypepowerpc.html



Which eventually points to: apt install libntirpc-dev

And then forcing the links with:
sudo ln -s /usr/include/ntirpc/rpc/rpc.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/misc/abstract_atomic.h /usr/include/misc/
sudo ln -s /usr/include/ntirpc/netconfig.h /usr/include/misc/
sudo ln -s /usr/include/ntirpc/misc/stdio.h /usr/include/misc
sudo ln -s /usr/include/ntirpc/intrinsic.h /usr/include
sudo ln -s /usr/include/ntirpc/rpc/tirpc_compat.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/auth.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/rpc_err.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/clnt_stat.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/auth_stat.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/clnt.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/misc/rbtree.h /usr/include/misc
sudo ln -s /usr/include/ntirpc/misc/opr.h /usr/include/misc
sudo ln -s /usr/include/ntirpc/misc/wait_queue.h /usr/include/misc
sudo ln -s /usr/include/ntirpc/misc/queue.h /usr/include/misc
sudo ln -s /usr/include/ntirpc/reentrant.h /usr/include
sudo ln -s /usr/include/ntirpc/rpc/svc.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/rpc_msg.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/work_pool.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/pool_queue.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/misc/portable.h /usr/include/misc
sudo ln -s /usr/include/ntirpc/misc/timespec.h /usr/include/misc
sudo ln -s /usr/include/ntirpc/misc/os_epoll.h /usr/include/misc
sudo ln -s /usr/include/ntirpc/rpc/auth_unix.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/rpcb_clnt.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/rpcb_prot.h /usr/include/rpc
sudo ln -s /usr/include/ntirpc/rpc/rpcent.h /usr/include/rpc


That said, I'm a little reluctant to do that, as I've always seen the core rpc package installed in raspian previous so I think something else is going on.
Start with the locate(1) command and see what locate rpc finds.  Something seems a little wonky in your install to be honest.

--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.

Rene Richarz

unread,
Feb 23, 2024, 11:01:44 AMFeb 23
to Clem Cole, [PiDP-11]
Locate rcp.h returns nothing on an almost fresh Raspberry Pi 5 image (without pidp11).

Mike Katz

unread,
Feb 23, 2024, 11:12:24 AMFeb 23
to Clem Cole, Rene Richarz, [PiDP-11]
Remember to do a sudo updatedb before running the locate command.

This is the output of the locate rpc.h command run on an 8GB Raspberry PI 5 running 64bit

raspberry-pi:~ $ locate rpc.h
/usr/include/linux/rxrpc.h
/usr/include/misc/fastrpc.h
/usr/include/tirpc/rpc/rpc.h
/usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/net/af_rxrpc.h
/usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/trace/events/rxrpc.h
/usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/trace/events/sunrpc.h
/usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/uapi/linux/rxrpc.h
/usr/src/linux-headers-6.1.0-rpi7-common-rpi/include/uapi/misc/fastrpc.h
/usr/src/linux-headers-6.1.0-rpi8-common-rpi/include/net/af_rxrpc.h
/usr/src/linux-headers-6.1.0-rpi8-common-rpi/include/trace/events/rxrpc.h
/usr/src/linux-headers-6.1.0-rpi8-common-rpi/include/trace/events/sunrpc.h
/usr/src/linux-headers-6.1.0-rpi8-common-rpi/include/uapi/linux/rxrpc.h
/usr/src/linux-headers-6.1.0-rpi8-common-rpi/include/uapi/misc/fastrpc.h
raspberry-pi:~ $ uname -a
Linux raspberry-pi 6.1.0-rpi8-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux

Mike Katz

unread,
Feb 23, 2024, 11:13:10 AMFeb 23
to Rene Richarz, Clem Cole, [PiDP-11]
Did you do an updatedb after installing locate.  If not the locate command database is empty and will not find anything.
--
You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com.

Rene Richarz

unread,
Feb 23, 2024, 11:18:42 AMFeb 23
to Mike Katz, Clem Cole, [PiDP-11]
Thanks. It’s in tirpc. Should I just add -ltirpc in LDFLAGS and -I/usr/include/tirpc in CFLAGS?
-

isy...@gmail.com

unread,
Feb 23, 2024, 11:24:08 AMFeb 23
to [PiDP-11]
Dear All,

 Please see my note in this thread. the rpc libraries have change in more recent distros such as Bookworm. The package is libtirpc-dev.
 This requires some edits of the include paths to point to /usr/include/tirpc.
 These are fixed in the google drive link distro.
 Also, please note that the gpio system has been switched to use libgpiod. Package libgpiod-dev.
Hope this helps.
 NB This build is for a PI5 only! If you are still using a PI4 and a new distro. Change the refs from gpiochip4 to gpiochip0 in:
/opt/pidp11/src/11_pidp_server/scanswitch/scansw.c and /opt/pidp11/src/11_pidp_server/pidp11/gpio.c

Regards, Ian.

Steven A. Falco

unread,
Feb 23, 2024, 12:55:39 PMFeb 23
to pid...@googlegroups.com
Here are my notes for the changes I had to make for the rpc.h stuff on a Pi 4 running bookworm. It has been working great. I didn't bother with the gpio changes because the Pi 4 doesn't really need them (although they are much cleaner than the old approach).

In quickmake, we need to include tirpc in two places:

REALCONS_OPT=-DUSE_REALCONS \
-DBLINKENLIGHT_CLIENT \
-I$(SRC)/REALCONS \
-I$(BLINKENLIGHT_COMMON_DIR) \
-I$(BLINKENLIGHT_API_DIR)/rpcgen_linux \
-I$(BLINKENLIGHT_API_DIR) \
-I/usr/include/tirpc

LDFLAGS = -lrt -lm -lpthread -ldl -lreadline -ldbus-1 -ltirpc

Similarly, in 11_pidp_server/pidp11/makefile we need:

CC=gcc -std=c99 -U__STRICT_ANSI__ $(CC_DBG_FLAGS) $(OS_CCDEFS) -I. -I/usr/include/tirpc

LDFLAGS += -lrt -ltirpc

Steve
> --
> You received this message because you are subscribed to the Google Groups "[PiDP-11]" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pidp-11+u...@googlegroups.com <mailto:pidp-11+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/fdf9933f-7394-4687-8deb-2b2dc6d9feb0n%40googlegroups.com <https://groups.google.com/d/msgid/pidp-11/fdf9933f-7394-4687-8deb-2b2dc6d9feb0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Ian Schofield

unread,
Feb 23, 2024, 1:08:25 PMFeb 23
to Steven A. Falco, pid...@googlegroups.com
Hi Rene,

 You need to run makeclient.sh in the /opt/pidp11/src directory as you have for makeserver.sh.
 This will create the simh runtime /opt/pidp11/src/02.3_simh/4.x+realcons/bin-rpi/pdp11_realcons
 There should be a link to this file in /opt/pidp11/bin/client11
 If not, run /opt/pidp11/install/install.sh again to create this link.
 Then check it is OK with /opt/pidp11/bin/pidp11.sh

Regards, Ian.



You received this message because you are subscribed to a topic in the Google Groups "[PiDP-11]" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pidp-11/zPiWQ3NUFig/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pidp-11+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pidp-11/9e2cc7ba-ae4b-4d93-9dc4-bc58bc582384%40gmail.com.

Rene Richarz

unread,
Feb 23, 2024, 1:55:08 PMFeb 23
to [PiDP-11]
Hi everybody

With all your help it FINALLY WORKS. Everybody has contributed an important detail.

Thanks again

Rene

Curtis Dean Smith (史國興)

unread,
Feb 23, 2024, 11:57:05 PMFeb 23
to [PiDP-11]
Thank you!

Rene Richarz

unread,
Feb 24, 2024, 3:21:10 AMFeb 24
to [PiDP-11]
scansw does not always work
*******************************

Unfortunately there is still a problem with my setup on the RPi5. One cannot select a system using the switches. Instead it always boots to idled. One can still use the upper rotary switch to reboot the RPi5 or to restart SimH.

I traced this problem down to scansw returning 0, if the PiDP-11 software is already running. It returns the proper switch setting if the PiDP-11 software is not running. It also returns the proper value if used within SimH.

This had to be expect, because libgpio does not allow two programs to access the same gpio line at the same time.

I can still access the spare pin gpio 17 while SimH is running. This is of course because scansw does not access gpio 17.

One can still do the following to start for example 2.11BSD
cd /opt/pidp11/bin
sudo ./pidp11.sh 102

Any idea how to solve this?

It's a bit of a problem for me, because I want to start idled or 2.11BSD based on the switch settings.

Rene Richarz

unread,
Feb 24, 2024, 6:38:27 AMFeb 24
to [PiDP-11]
I fixed the system selection problem. Actually the systems with boot selection switches set to 0-7 worked properly. While scansw cannot be used while the PiDP-11 software is running, it works in the PiDP-11 software.

The problem was that the new scansw returned the switch settings in decimal, but the PiDP-11 software expected it in octal. Fix therefore the following in scansw.c:
line 73 change %ld to %lo and make scansw again. 
With this fix all systems boot up properly with the selection switches.

isy...@gmail.com

unread,
Feb 24, 2024, 10:43:53 AMFeb 24
to [PiDP-11]
Hi all,

 Ooops! I hadn't seen this problem. Glad it is fixed.

Regards, Ian.

Reply all
Reply to author
Forward
0 new messages