Build Setup
Here is a simple script that can be used on a new or existing install on your Raspberry Pi SD card or SSD.
It enables you to bootstrap a stock Raspberry Pi installation into a fully built and configured PiDP-8/i system.
You visit this wiki page on the PiDP-8/i development web site and copy the below script to your Pi system. When you run it you get all the prerequisites installed, the software source fetched, configured, built and installed.
Action of the script
- Updates the operating system apt database
- Updates the operating system
- Checks for the installation of all of the dependencies and installs them if they are not already installed
- Creates the necessary directories
- Clones the repository
- Gets the trunk branch
- Configures the build
- Performs a complete build
- Performs the install
Notes
This script creates a log file with the date and time of install as part of the file name. If you encounter any difficulties running this script, please include this log file along with a description of the issue to this mail list or post a comment/bug report.
This script and the PiDP-8/I software have been tested on Raspberry Pi Operating Systems Bookworm and Trixie (both 32 bit and 64 bit).
All models of the Raspberry Pi platforms with a 40 pin I/O header are supported.
How to use it.
- Open a new file using the editor of your choice on your Raspberry Pi
- Paste the block of text below into the file.
- Save file and exit
- Make the file executable (chmod +777 <filename>)
- Execute the file (./<filename>)
#!/bin/bash
#
# Update the apt database
#
echo -e "\r\nUpdating apt database\r\n"
sudo apt update
#
# Update the operating system
#
echo -e "\r\nUpdating the operating system\r\n"
sudo apt upgrade -y
sudo apt full-upgrade -y
#
# Install fossil if necessary
#
echo -e "\r\nVerifying fossil installation\r\n"
if ! dpkg-query -W fossil &>/dev/null ; then
echo -e "\r\nInstalling fossil\r\n"
sudo apt install fossil -y
fi
#
# Install build-essential if necessary
#
echo -e "\r\nVerifying build-essential installation\r\n"
if ! dpkg-query -W build-essential &>/dev/null ; then
echo -e "\r\nInstalling build-essential\r\n"
sudo apt install build-essential -y
fi
#
# Install libraspberrypi-dev if necessary
#
echo -e "\r\nVerifying libraspberrypi-dev installation\r\n"
if ! dpkg-query -W libraspberrypi-dev &>/dev/null ; then
echo -e "\r\nInstalling libraspberrypi-dev\r\n"
sudo apt install libraspberrypi-dev -y
fi
#
# Install libncurses-dev if necessary
#
echo -e "\r\nVerifying libncurses-dev installation\r\n"
if ! dpkg-query -W libncurses-dev &>/dev/null ; then
echo -e "\r\nInstalling libncurses-dev\r\n"
sudo apt install libncurses-dev -y
fi
#
# Install perl if necessary
#
echo -e "\r\nVerifying perl installation\r\n"
if ! dpkg-query -W perl &>/dev/null ; then
echo -e "\r\nInstalling perl\r\n"
sudo apt install perl -y
fi
#
# Install python3-pexpect if necessary
#
echo -e "\r\nVerifying python3-pexpect installation\r\n"
if ! dpkg-query -W python3-pexpect &>/dev/null ; then
echo -e "\r\nInstalling python3-pexpect\r\n"
sudo apt install python3-pexpect -y
fi
#
# Install python3-yaml if necessary
#
echo -e "\r\nVerifying python3-yaml installation\r\n"
if ! dpkg-query -W python3-yaml &>/dev/null ; then
echo -e "\r\nInstalling python3-yaml\r\n"
sudo apt install python3-yaml -y
fi
#
# Install time if necessary
#
echo -e "\r\nVerifying time installation\r\n"
if ! dpkg-query -W time &>/dev/null ; then
echo -e "\r\nInstalling time\r\n"
sudo apt install time -y
fi
#
# Install expect if necessary
#
echo -e "\r\nVerifying expect installation\r\n"
if ! dpkg-query -W expect &>/dev/null ; then
echo -e "\r\nInstalling expect\r\n"
sudo apt install expect -y
fi
#
# Make sure that the date and time are correct. Change the timezone for your local timezone
#
sudo timedatectl set-timezone America/Central
sudo timedatectl set-ntp on
#
# Setup the log file
#
now=`date +"%Y%m%d%H%M"`
Logfile=$PWD'/PIDP8I_SetupLog_'${now}
echo -e "\r\nLogfile: "$Logfile"\r\n"
cat /sys/firmware/devicetree/base/model | tee ${Logfile}
cat /proc/cpuinfo | tee -a ${Logfile}
#
# Check out trunk and the cycle-realistic branch
#
echo -e "\r\nMaking Directories\r\n" | tee -a ${Logfile}
mkdir -p ~/museum ~/src/pidp8i/trunk ~/src/pidp8i/pi5 ~/src/pidp8i/pi5-ils2 ~/src/pidp8i/pi5-ils2-cyclerealistic
#
# Cloning fossil repository
#
echo -e "\r\nCloning repository\r\n" | tee -a ${Logfile}
(/usr/bin/time fossil clone https://tangentsoft.com/pidp8i ~/museum/pidp8i.fossil) 2>&1 | tee -a ${Logfile}
#
# Get trunk
#
cd ~/src/pidp8i/trunk
echo -e "\r\nGetting trunk\r\n" | tee -a ${Logfile}
(/usr/bin/time fossil open ~/museum/pidp8i.fossil) 2>&1 | tee -a ${Logfile}
echo -e "\r\nConfiguring trunk for build\r\n" | tee -a ${Logfile}
(/usr/bin/time ./configure --prefix=$PWD/pidp8i) 2>&1 | tee -a ${Logfile}
echo -e "\r\nMaking tools\r\n" | tee -a ${Logfile}
(/usr/bin/time tools/mmake) 2>&1 | tee -a ${Logfile}
echo -e "\r\nMaking install\r\n" | tee -a ${Logfile}
(/usr/bin/time sudo make install) 2>&1 | tee -a ${Logfile}