Last active
February 6, 2021 02:45
-
-
Save paulwratt/98de1ce795b5b355c300e73bdb13af37 to your computer and use it in GitHub Desktop.
ARM non-Ubuntu PPA use of Vincents 'cross-mint' m68k Atari ST GCC 4.6.4 toolchain (no build)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# install Vincint Riviera Ubuntu PPA repo v1.0.0-20200506 | |
# then install all ARM packages in right order (APT/DPKG) | |
# https://gist.github.com/paulwratt/98de1ce795b5b355c300e73bdb13af37 | |
# | |
# this script is based on the original source build script: | |
# https://gist.github.com/paulwratt/b401937124906803628cb3a34d3d36f1 | |
# | |
# you can download the latest versions from command line using this: | |
# https://gist.github.com/paulwratt/c8199d1e2162a82d475d7777a67d6f13 | |
# | |
PPA_URL0="http://ppa.launchpad.net/vriviere/arm/ubuntu" | |
PPA_URL1="http://ppa.launchpad.net/vriviere/ppa/ubuntu" | |
PPA_ARCH="$1" | |
PPA_DISTRO="$2" | |
PPA1_DISTRO="$2" | |
show_eg(){ | |
echo " ./cross-mint-ppa-arm.sh --apt-only eoan (Buster)" | |
echo " ./cross-mint-ppa-arm.sh --apt-only xenial (Stretch)" | |
echo " ./cross-mint-ppa-arm.sh focal (aarch64 Focal)" | |
echo " ./cross-mint-ppa-arm.sh xenial (armhf Stretch)" | |
echo " ./cross-mint-ppa-arm.sh eoan (armhf Buster)" | |
} | |
show_help(){ | |
echo "install Vincent's 'cross-mint' for ARM from his Ubuntu PPA" | |
echo " includes multi-lib libraries for 68000, mc5475, 68020-060" | |
echo "" | |
echo "usage: ./cross-mint-ppa-build.sh [--info] | [--apt-only] [release]" | |
echo "" | |
echo "[release] = * Ubuntu distro name" | |
echo " Ubuntu Debian" | |
echo " 20.10 groovy bullseye/ sid *" | |
echo " 20.04 focal bullseye/ sid - 11" | |
echo " 19.10 eoan buster / sid - 10 *" | |
echo " 19.04 disco buster / sid *" | |
echo " 18.10 cosmic buster / sid" | |
echo " 18.04 bionic buster / sid *" | |
echo " 17.10 artful stretch / sid - 9" | |
echo " 17.04 zesty stretch / sid" | |
echo " 16.10 yakkety stretch / sid" | |
echo " 16.04 xenial stretch / sid *" | |
echo " 15.10 wily jessie / sid - 8" | |
echo " 15.04 vivid jessie / sid" | |
echo " 14.10 utopic jessie / sid" | |
echo " 14.04 trusty jessie / sid *" | |
echo " 13.10 saucy wheezy / sid - 7" | |
echo " 13.04 raring wheezy / sid" | |
echo " 12.10 quantal wheezy / sid" | |
echo " 12.04 precise wheezy / sid" | |
echo " 11.10 oneiric wheezy / sid" | |
echo " 11.04 natty squeeze / sid - 6" | |
echo " 10.10 maverick squeeze / sid" | |
echo " 10.04 lucid squeeze / sid" | |
echo " * Ubuntu distro name in PPA repo" | |
echo "" | |
echo "Note: the Repo architecture is selected automatically" | |
echo " Repo Endian RPi" | |
echo " (no) - 32 bit big endian - armv6" | |
echo " armhf - 32 bit little endian - armv7" | |
echo " arm64 - 64 bit little endian - aarch64" | |
echo "" | |
echo "--apt-only [release] install keyring and '.list' files" | |
echo " into '/etc/apt'" | |
echo "--info display info required to do it by hand" | |
echo " resulting packages will install to '/usr/m68k-atari-mint'" | |
echo "" | |
echo "examples:" | |
show_eg | |
} | |
show_info(){ | |
echo "install Vincent's 'cross-mint' for ARM from his Ubuntu PPA" | |
echo " includes multi-lib libraries for 68000, mc5475, 68020-060" | |
echo "" | |
echo "this script was tested on Raspbian 10 Buster on 4Gb RPi 4," | |
echo "Raspbian 9 Stretch RPi 3B+ and BeePi 1.0 (Stretch) on RPi 2B+." | |
echo "" | |
echo "on PC Raspbian you only need to write the PPA repo url and" | |
echo "install the keyring for it (use option '--apt-only'). It is" | |
echo "is already an i386 distribution, so the PPA binary packages" | |
echo "will work without building from source. The same should be" | |
echo "true for any Debian based i386 or x64 (amd64) distribution." | |
echo "" | |
echo "the original source build script is available here:" | |
echo " https://gist.github.com/paulwratt/b401937124906803628cb3a34d3d36f1" | |
echo "" | |
echo "the PPA source entries for Buster are:" | |
echo " deb http://ppa.launchpad.net/vriviere/arm/ubuntu eoan main" | |
echo " deb-src http://ppa.launchpad.net/vriviere/arm/ubuntu eoan main" | |
echo " deb http://ppa.launchpad.net/vriviere/ppa/ubuntu eoan main" | |
echo " deb-src http://ppa.launchpad.net/vriviere/ppa/ubuntu eoan main" | |
echo "" | |
echo "the PPA key added to trusted sources with:" | |
echo " sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4AAD3A5DB5690522" | |
echo "" | |
echo "This script stores them in:" | |
echo " /etc/apt/sources.list.d/vincent-arm-cross.list" | |
echo " /etc/apt/trusted.gpg.d/vincent-arm-cross.gpg" | |
echo " /etc/apt/sources.list.d/vincent-m68k-cross.list" | |
echo " /etc/apt/trusted.gpg.d/vincent-m68k-cross.gpg" | |
echo " this script does not build any packages from source, see:" | |
echo " cross-mint-ppa-build.sh" | |
echo "" | |
echo "On the above PPA urls, add the packages name (April 2020):" | |
echo " /pool/main/[1st letter]/[package name]/" | |
echo " (meta package) (other libraries)" | |
echo " cross-mint-essential cflib-m68k-atari-mint" | |
echo " binutils-m68k-atari-mint gemma-m68k-atari-mint" | |
echo " mintbin-m68k-atari-mint ldg-m68k-atari-mint" | |
echo " gcc-m68k-atari-mint ncurses-m68k-atari-mint" | |
echo " mintlib-m68k-atari-mint openssl-m68k-atari-mint" | |
echo " pml-m68k-atari-mint sdl-m68k-atari-mint" | |
echo " gemlib-m68k-atari-mint zlib-m68k-atari-mint" | |
echo " " | |
echo "eg. in a web browser:" | |
echo "http://ppa.launchpad.net/vriviere/arm/ubuntu/pool/main/g/gcc-m68k-atari-mint/" | |
echo "http://ppa.launchpad.net/vriviere/ppa/ubuntu/pool/main/g/gemlib-m68k-atari-mint/" | |
echo "" | |
echo "use the [release] table to work out which version to download," | |
echo "there is also the '*.tar.gz' source packages as well." | |
echo "" | |
echo "many thanks to Vincent Riviere for the years of work required" | |
echo "to maintain these packages. I have previously build from source" | |
echo "on Raspbian 7 Wheezy using his '*-cygwin-howto.txt's as a base:" | |
echo " http://vincent.riviere.free.fr/soft/m68k-atari-mint/" | |
echo "" | |
} | |
show_m68k(){ | |
dpkg -l | grep m68k-atari-mint | |
} | |
if [ "$1" = "" -o "$1" = "--help" ]; then | |
show_help | |
exit | |
fi | |
if [ "$1" = "info" -o "$1" = "--info" ]; then | |
show_info | |
exit | |
fi | |
HAS_VAL="no" | |
if [ "$PPA_ARCH" = "apt-only" -o "$PPA_ARCH" = "--apt-only" ]; then | |
HAS_VAL="yes" | |
fi | |
if [ "$HAS_VAL" = "no" ]; then | |
PPA_DISTRO=$PPA_ARCH | |
PPA1_DISTRO=$PPA_ARCH | |
PPA_ARCH="" | |
fi | |
HAS_VAL="no" | |
for i in "groovy" "focal" "eoan" "disco" "bionic" "xenial" "trusty"; do | |
if [ "$i" = "$PPA_DISTRO" ]; then | |
HAS_VAL="yes" | |
break | |
fi | |
done | |
#hack | |
if [ "$PPA_DISTRO" = "eoan" -o "$PPA_DISTRO" = "disco" ]; then | |
$PPA1_DISTRO="bionic" | |
fi | |
#hack | |
if [ "$PPA_DISTRO" = "trusty" ]; then | |
$PPA1_DISTRO="xenial" | |
fi | |
#hack | |
if [ "$PPA_DISTRO" = "groovy" ]; then | |
$PPA_DISTRO="focal" | |
fi | |
if [ "$HAS_VAL" = "no" ]; then | |
echo "Error: wrong Ubuntu distro name, choose:" | |
echo " eoan focal disco bionic xenial" | |
exit | |
fi | |
if [ "$(which dirmngr)" = "" ]; then | |
echo "apt-get: adding 'dirmngr', please wait" | |
sudo apt-get --quiet install dirmngr | |
fi | |
sudo rm -f /etc/apt/sources.list.d/vincent-arm-cross.list | |
sudo rm -f /etc/apt/trusted.gpg.d/vincent-arm-cross.gpg | |
sudo rm -f /etc/apt/sources.list.d/vincent-m68k-cross.list | |
sudo rm -f /etc/apt/trusted.gpg.d/vincent-m68k-cross.gpg | |
sudo touch /etc/apt/sources.list.d/vincent-arm-cross.list | |
sudo echo "# Vincents cross-mint Ubuntu ARM PPA" | sudo tee -a /etc/apt/sources.list.d/vincent-arm-cross.list > /dev/null | |
sudo echo "deb $PPA_URL0 $PPA_DISTRO main" | sudo tee -a /etc/apt/sources.list.d/vincent-arm-cross.list > /dev/null | |
sudo echo "deb-src $PPA_URL0 $PPA_DISTRO main" | sudo tee -a /etc/apt/sources.list.d/vincent-arm-cross.list > /dev/null | |
echo "cross-mint PPA: source written to file:" | |
echo " /etc/apt/sources.list.d/vincent-arm-cross.list" | |
sudo touch /etc/apt/sources.list.d/vincent-m68k-cross.list | |
sudo echo "# Vincents cross-mint Ubuntu PPA" | sudo tee -a /etc/apt/sources.list.d/vincent-m68k-cross.list > /dev/null | |
sudo echo "deb $PPA_URL1 $PPA1_DISTRO main" | sudo tee -a /etc/apt/sources.list.d/vincent-m68k-cross.list > /dev/null | |
sudo echo "deb-src $PPA_URL1 $PPA1_DISTRO main" | sudo tee -a /etc/apt/sources.list.d/vincent-m68k-cross.list > /dev/null | |
echo "cross-mint PPA: source written to file:" | |
echo " /etc/apt/sources.list.d/vincent-m68k-cross.list" | |
sudo touch /etc/apt/trusted.gpg.d/vincent-arm-cross.gpg | |
sudo apt-key --keyring /etc/apt/trusted.gpg.d/vincent-arm-cross.gpg adv --keyserver keyserver.ubuntu.com --recv-keys 4AAD3A5DB5690522 | |
sudo touch /etc/apt/trusted.gpg.d/vincent-m68k-cross.gpg | |
sudo apt-key --keyring /etc/apt/trusted.gpg.d/vincent-m68k-cross.gpg adv --keyserver keyserver.ubuntu.com --recv-keys 4AAD3A5DB5690522 | |
echo "cross-mint PPA: keys added to trusted sources:" | |
echo " /etc/apt/trusted.gpg.d/vincent-arm-cross.gpg" | |
echo " /etc/apt/trusted.gpg.d/vincent-m68k-cross.gpg" | |
echo "cross-mint PPA: updating package list, please wait" | |
sudo apt-get --quiet update | |
echo "cross-mint PPA: package list updated" | |
if [ "$PPA_ARCH" = "apt-only" -o "$PPA_ARCH" = "--apt-only" ]; then | |
echo "You can now install 'cross-mint':" | |
echo " sudo apt-get install cross-mint-essential" | |
echo "Then you can now install 'cross-mint' libraries:" | |
echo " sudo apt-get install *-m68k-atari-mint" | |
echo "You can now build from source:" | |
echo " apt source -t $PPA_DISTRO --build binutils-m68k-atari-mint" | |
exit | |
fi | |
#sudo apt-get install texinfo wget build-essential fakeroot devscripts gawk gperf libmpfr-dev sharutils dejagnu autogen chrpath quilt libmpc-dev | |
#if [ ! -d /usr/share/doc/devscripts/examples -o ! -f /usr/bin/wget ]; then | |
# echo "Error: failed to install build packages:" | |
# echo " wget build-essential fakeroot devscripts" | |
# exit | |
#fi | |
sudo apt-get install cross-mint-essential | |
sudo apt-get install *-m68k-atari-mint | |
show_m68k | |
echo "all packages were install from the PPA's" | |
exit | |
# this script is based on the original source build script: | |
# https://gist.github.com/paulwratt/b401937124906803628cb3a34d3d36f1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment