From f11799385e56272647dc8aa02951e7563c3de555 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Sat, 23 Nov 2024 20:04:39 -0800 Subject: [PATCH] Add support for debian 12 to install script --- bin/wally-distro-check.sh | 11 +++++++++++ bin/wally-package-install.sh | 7 +++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bin/wally-distro-check.sh b/bin/wally-distro-check.sh index 8f4af6958..bd4de121b 100755 --- a/bin/wally-distro-check.sh +++ b/bin/wally-distro-check.sh @@ -84,6 +84,17 @@ elif [[ "$ID" == ubuntu || "$ID_LIKE" == *ubuntu* ]]; then printf "${FAIL_COLOR}%s\n${ENDC}" "The Wally install script has only been tested with Ubuntu versions 20.04 LTS, 22.04 LTS, and 24.04 LTS. You have version $VERSION." exit 1 fi +elif [[ "$ID" == debian || "$ID_LIKE" == *debian* ]]; then + export FAMILY=debian + if [ "$ID" != debian ]; then + printf "${WARNING_COLOR}%s\n${ENDC}" "For Debian family distros, the Wally install script has only been tested on standard Debian (and Ubuntu). Your distro " \ + "is $PRETTY_NAME. The regular Debian install will be attempted, but there may be issues." + fi + export DEBIAN_VERSION="$VERSION_ID" + if (( DEBIAN_VERSION < 12 )); then + printf "${FAIL_COLOR}%s\n${ENDC}" "The Wally install script has only been tested with Debian version 12. You have version $VERSION." + exit 1 + fi else printf "${FAIL_COLOR}%s%s%s\n${ENDC}" "The Wally install script is currently only compatible with Ubuntu and Red Hat family " \ "(RHEL, Rocky Linux, or AlmaLinux) distros. Your detected distro is $PRETTY_NAME. You may try manually running the " \ diff --git a/bin/wally-package-install.sh b/bin/wally-package-install.sh index 1fc003189..aadfed2b0 100755 --- a/bin/wally-package-install.sh +++ b/bin/wally-package-install.sh @@ -61,7 +61,7 @@ if [ "$FAMILY" == rhel ]; then fi # A newer version of gcc is required for qemu OTHER_PACKAGES=(gcc-toolset-13) -elif [ "$FAMILY" == ubuntu ]; then +elif [[ "$FAMILY" == ubuntu || "$FAMILY" == debian ]]; then if (( UBUNTU_VERSION >= 24 )); then PYTHON_VERSION=python3.12 VERILATOR_PACKAGES+=(mold) # Not availale in Ubuntu 20.04, nice for Verilator @@ -71,11 +71,14 @@ elif [ "$FAMILY" == ubuntu ]; then elif (( UBUNTU_VERSION >= 20 )); then PYTHON_VERSION=python3.9 OTHER_PACKAGES+=(gcc-10 g++-10 cpp-10) # Newer version of gcc needed for Verilator + elif (( DEBIAN_VERSION >= 12 )); then + PYTHON_VERSION=python3.11 + VERILATOR_PACKAGES+=(mold) # Not availale in Ubuntu 20.04, nice for Verilator fi PACKAGE_MANAGER="DEBIAN_FRONTEND=noninteractive apt-get" UPDATE_COMMAND="sudo $PACKAGE_MANAGER update -y && sudo $PACKAGE_MANAGER upgrade -y --with-new-pkgs" GENERAL_PACKAGES+=(rsync git make cmake "$PYTHON_VERSION" python3-pip "$PYTHON_VERSION"-venv curl wget tar pkg-config dialog mutt ssmtp) - GNU_PACKAGES+=(autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat1-dev ninja-build libglib2.0-dev libslirp-dev) + GNU_PACKAGES+=(autoconf automake autotools-dev libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat1-dev ninja-build libglib2.0-dev libslirp-dev) QEMU_PACKAGES+=(libfdt-dev libpixman-1-dev) SPIKE_PACKAGES+=(device-tree-compiler libboost-regex-dev libboost-system-dev) VERILATOR_PACKAGES+=(help2man perl g++ clang ccache libunwind-dev libgoogle-perftools-dev numactl perl-doc libfl2 libfl-dev zlib1g)