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
|
|
|
#
|
|
|
|
# Copyright (C) 2014, 2015, 2021 Leah Rowe <info@minifree.org>
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
apt-get -y install packagekit
|
|
|
|
|
2021-11-18 08:13:54 +01:00
|
|
|
# Duplications are intentional. Please do not re-factor.
|
|
|
|
#
|
|
|
|
# This is so that they can moved to separate scripts.
|
|
|
|
#
|
|
|
|
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -y --allow-reinstall install wget
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# For downloading source code
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -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
|
|
|
|
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -y --allow-reinstall install uuid-dev nasm
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# For building source code:
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -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)
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -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
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -y --allow-reinstall install pkg-config
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# for cross-compiling ARM binaries
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -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
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -y --allow-reinstall install gcc-multilib libc6-i386 libc6-dev-i386
|
|
|
|
pkcon -y --allow-reinstall install lib32stdc++6 g++-multilib dh-autoreconf
|
2021-11-18 08:13:54 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Memtest86+ build dependencies
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -y --allow-reinstall install build-essential python2.7 python-is-python3
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# i945-pwm build dependencies
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -y --allow-reinstall install build-essential perl
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# Coreboot build dependencies (also requires build-essential and git)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-08 03:33:56 +01:00
|
|
|
pkcon -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)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -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 libfreetype6-dev
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# BucTS build dependencies (external script)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -y --allow-reinstall install build-essential
|
2021-11-18 08:13:54 +01:00
|
|
|
|
|
|
|
# Flashrom build dependencies (also requires build-essential)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-08 03:33:56 +01:00
|
|
|
pkcon -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.
|
2023-12-08 02:55:25 +01:00
|
|
|
[ "${arch}" -eq 0 ] && pkcon -y --allow-reinstall install lib32z1-dev
|
2023-11-28 18:21:56 +01:00
|
|
|
|
|
|
|
# For running make check
|
|
|
|
# ----------------------
|
2023-12-08 02:55:25 +01:00
|
|
|
pkcon -y --allow-reinstall install shellcheck # lint
|
|
|
|
pkcon -y --allow-reinstall install gawk git grep lzip make sed tar xz-utils # u-boot-libre
|