2021-06-03 13:47:08 +02:00
|
|
|
#!/usr/bin/env bash
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# ubuntu2004 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>
|
2021-05-18 14:56:12 +02: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
|
2021-11-18 08:13:54 +01:00
|
|
|
# the Free Software Foundation, version 3 of the License.
|
2021-05-18 14:56:12 +02:00
|
|
|
#
|
|
|
|
# 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-tools
|
|
|
|
|
2021-05-18 14:56:12 +02:00
|
|
|
# Duplications are intentional. Please do not re-factor.
|
|
|
|
#
|
|
|
|
# This is so that they can moved to separate scripts.
|
|
|
|
#
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install wget
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# For downloading source code
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install git
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# For Tianocore and iPXE
|
|
|
|
# TODO: check whether this is the full list
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install uuid-dev nasm
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# For building source code:
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install build-essential
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# for running the crostool script (to get mrc.bin file for t440p)
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install sharutils curl parted e2fsprogs unzip
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# to use the right software versions and links for compiling
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install pkg-config
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# for cross-compiling ARM binaries
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install gcc-arm-linux-gnueabi
|
2021-05-18 14:56:12 +02: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-01 18:06:18 +01:00
|
|
|
pkcon -y install gcc-multilib libc6-i386 libc6-dev-i386
|
|
|
|
pkcon -y install lib32stdc++6 g++-multilib dh-autoreconf
|
2021-05-18 14:56:12 +02:00
|
|
|
# recommended, but not sure what for:
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install lib32tinfo-dev
|
2021-05-18 14:56:12 +02:00
|
|
|
fi
|
|
|
|
|
2021-11-01 03:51:10 +01:00
|
|
|
# Memtest86+ build dependencies
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install build-essential python2.7
|
2021-11-01 03:51:10 +01:00
|
|
|
|
2021-05-18 14:56:12 +02:00
|
|
|
# i945-pwm build dependencies
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install build-essential perl
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# Coreboot build dependencies (also requires build-essential and git)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install libncurses5-dev doxygen iasl gdb flex bison build-essential git libssl-dev gnat
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# For cross-compiling i686 target on x86_64 host.
|
2023-12-01 18:06:18 +01:00
|
|
|
[ "${arch}" -eq 0 ] && pkcon -y install lib32ncurses5-dev
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# GRUB build dependencies (also requires build-essential, bison and flex)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install ttf-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-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# BucTS build dependencies (external script)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install build-essential
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# Flashrom build dependencies (also requires build-essential)
|
|
|
|
# ------------------------------------------------------------
|
|
|
|
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install libpci-dev pciutils zlib1g-dev libftdi-dev build-essential libusb-1.0-0-dev libusb-1.0 libusb-1.0-0-dev libusb-dev
|
2021-05-18 14:56:12 +02:00
|
|
|
|
|
|
|
# For cross-compiling i686 target on x86_64 host.
|
2023-12-01 18:06:18 +01:00
|
|
|
[ "${arch}" -eq 0 ] && pkcon -y install lib32z1-dev
|
2023-11-28 18:21:56 +01:00
|
|
|
|
|
|
|
# For running make check
|
|
|
|
# ----------------------
|
2023-12-01 18:06:18 +01:00
|
|
|
pkcon -y install shellcheck # lint
|
|
|
|
pkcon -y install gawk git grep lzip make sed tar xz-utils # u-boot-libre
|