2021-11-18 08:13:54 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2023-12-09 02:07:14 +01:00
|
|
|
# trisquel-10 script: installs build dependencies for Ubuntu 20.04
|
2021-11-18 08:13:54 +01:00
|
|
|
#
|
2024-11-29 20:14:16 +01:00
|
|
|
# Copyright (C) 2014-2016, 2020-2021 Leah Rowe <info@minifree.org>
|
|
|
|
# Copyright (C) 2016, Klemens Nanni <contact@autoboot.org>
|
|
|
|
# Copyright (C) 2020, Wei Mingzhi <whistler_wmz@users.sf.net>
|
|
|
|
# Copyright (C) 2021, madbehaviorus <mad.behaviorus@mailbox.org>
|
|
|
|
# Copyright (C) 2021, Ron Nazarov <noisytoot@disroot.org>
|
|
|
|
# Copyright (C) 2023, Adrien Bourmault <neox@gnu.org>
|
|
|
|
# Copyright (C) 2023-2024 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
2021-11-18 08:13:54 +01:00
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, version 3 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
|
|
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
|
|
|
set -u -e
|
|
|
|
|
|
|
|
if [ $EUID -ne 0 ]; then
|
|
|
|
printf "This script must be run as root\n"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Duplications are intentional. Please do not re-factor.
|
|
|
|
#
|
|
|
|
# This is so that they can moved to separate scripts.
|
|
|
|
#
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install wget
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# For downloading source code
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install git
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# For Tianocore and iPXE
|
|
|
|
# TODO: check whether this is the full list
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install uuid-dev nasm
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# For building source code:
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install build-essential
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# for running the crostool script (to get mrc.bin file for t440p)
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install sharutils curl parted e2fsprogs unzip
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# to use the right software versions and links for compiling
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install pkg-config
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# for cross-compiling ARM binaries
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install gcc-arm-linux-gnueabi
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ]
|
|
|
|
arch=${?}
|
|
|
|
|
|
|
|
# For cross-compiling i686 target on x86_64 host.
|
|
|
|
if [ "${arch}" -eq 0 ]; then
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install gcc-multilib libc6-i386 libc6-dev-i386
|
|
|
|
apt install -y --allow-reinstall install lib32stdc++6 g++-multilib dh-autoreconf
|
2021-11-18 08:13:54 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Memtest86+ build dependencies
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install build-essential python2.7 python-is-python3
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# i945-pwm build dependencies
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install build-essential perl
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# Coreboot build dependencies (also requires build-essential and git)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install libncurses5-dev doxygen acpica-tools gdb flex bison build-essential git libssl-dev gnat
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# GRUB build dependencies (also requires build-essential, bison and flex)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install fonts-unifont libopts25 libselinux1-dev autogen m4 autoconf help2man libopts25-dev libfont-freetype-perl automake autotools-dev build-essential bison flex libfuse-dev liblzma-dev gawk libdevmapper-dev libtool-bin libfreetype6-dev
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# BucTS build dependencies (external script)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install build-essential
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# Flashrom build dependencies (also requires build-essential)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install libpci-dev pciutils zlib1g-dev libftdi-dev build-essential libusb-1.0-0-dev libusb-1.0-0
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# For cross-compiling i686 target on x86_64 host.
|
2024-11-22 23:14:34 +01:00
|
|
|
[ "${arch}" -eq 0 ] && apt install -y --allow-reinstall install lib32z1-dev
|
2023-11-28 18:21:56 +01:00
|
|
|
|
|
|
|
# For running make check
|
|
|
|
# ----------------------
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install shellcheck # lint
|
|
|
|
apt install -y --allow-reinstall install gawk git grep lzip make sed tar xz-utils # u-boot-libre
|
2023-12-07 13:58:57 +01:00
|
|
|
|
|
|
|
# For building the website tarball
|
2024-11-22 23:14:34 +01:00
|
|
|
apt install -y --allow-reinstall install \
|
2024-11-22 15:01:30 +01:00
|
|
|
graphviz \
|
|
|
|
pandoc
|