PiDP-8/I Software

Build Setup
Log In

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

  1. Updates the operating system apt database
  2. Updates the operating system
  3. Checks for the installation of all of the dependencies and installs them if they are not already installed
  4. Creates the necessary directories
  5. Clones the repository
  6. Gets the trunk branch
  7. Configures the build
  8. Performs a complete build
  9. Performs the install

Notes

How to use it.

  1. Open a new file using the editor of your choice on your Raspberry Pi
  2. Paste the block of text below into the file.
  3. Save file and exit
  4. Make the file executable (chmod +777 <filename>)
  5. 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}