resources: dependencies: unify PureOS and Trisquel.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
parent
b51622e98a
commit
2005599b1f
19
Makefile.am
19
Makefile.am
|
@ -23,8 +23,8 @@
|
|||
SHELL := bash
|
||||
|
||||
.PHONY: all check download modules ich9m-descriptors payloads roms release \
|
||||
clean crossgcc-clean install-dependencies-ubuntu \
|
||||
install-dependencies-pureos-10 install-dependencies-arch \
|
||||
clean crossgcc-clean \
|
||||
install-dependencies-pureos-trisquel install-dependencies-arch \
|
||||
install-dependencies-void
|
||||
|
||||
LOG = make-$(shell date '+%s').log
|
||||
|
@ -82,14 +82,9 @@ crossgcc-clean:
|
|||
distclean:
|
||||
./build distclean all
|
||||
|
||||
install-dependencies-ubuntu:
|
||||
install-dependencies-pureos-trisquel:
|
||||
echo 'Makefile: running $@ target' >> $(LOG)
|
||||
set -o pipefail ; ./build dependencies trisquel | tee -a $(LOG)
|
||||
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
|
||||
|
||||
install-dependencies-pureos-10:
|
||||
echo 'Makefile: running $@ target' >> $(LOG)
|
||||
set -o pipefail ; ./build dependencies pureos-10 | tee -a $(LOG)
|
||||
set -o pipefail ; ./build dependencies pureos-trisquel | tee -a $(LOG)
|
||||
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
|
||||
|
||||
install-dependencies-arch:
|
||||
|
@ -114,10 +109,8 @@ include resources/packages/i945-thinkpads-install-utilities/Makefile.am
|
|||
|
||||
help:
|
||||
@printf "Available commands:\n"
|
||||
@printf "\tsudo make install-dependencies-ubuntu # %s\n" \
|
||||
"Install required dependencies on Ubuntu."
|
||||
@printf "\tsudo make install-dependencies-pureos-10 # %s\n" \
|
||||
"Install required dependencies on PureOS 10 (byzantium)."
|
||||
@printf "\t# Install required dependencies on PureOS 10 (byzantium).\n"
|
||||
@printf "\tsudo make install-dependencies-pureos-trisquel\n\n" \
|
||||
@printf "\tmake release # %s\n" \
|
||||
"Build a GNU Boot release."
|
||||
@printf "\tmake clean # %s\n" \
|
||||
|
|
|
@ -1,131 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# trisquel-10 script: installs build dependencies for Ubuntu 20.04
|
||||
#
|
||||
# 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>
|
||||
#
|
||||
# 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
|
||||
|
||||
to_install=""
|
||||
install_packages()
|
||||
{
|
||||
for package in $@ ; do
|
||||
if dpkg -l "${package}" | grep "^ii" 2>&1>/dev/null ; then
|
||||
continue
|
||||
else
|
||||
to_install="${to_install} ${package}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
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.
|
||||
#
|
||||
|
||||
install_packages wget
|
||||
|
||||
# For downloading source code
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages git
|
||||
|
||||
# For Tianocore and iPXE
|
||||
# TODO: check whether this is the full list
|
||||
|
||||
install_packages uuid-dev nasm
|
||||
|
||||
# For building source code:
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages build-essential
|
||||
|
||||
# for running the crostool script (to get mrc.bin file for t440p)
|
||||
install_packages sharutils curl parted e2fsprogs unzip
|
||||
|
||||
# to use the right software versions and links for compiling
|
||||
install_packages pkg-config
|
||||
|
||||
# for cross-compiling ARM binaries
|
||||
install_packages gcc-arm-linux-gnueabi
|
||||
|
||||
[ "$(uname -i)" = x86_64 ] || [ "$(uname -m)" = x86_64 ]
|
||||
arch=${?}
|
||||
|
||||
# For cross-compiling i686 target on x86_64 host.
|
||||
if [ "${arch}" -eq 0 ]; then
|
||||
install_packages gcc-multilib libc6-i386 libc6-dev-i386
|
||||
install_packages lib32stdc++6 g++-multilib dh-autoreconf
|
||||
fi
|
||||
|
||||
# Memtest86+ build dependencies
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages build-essential python2.7 python-is-python3
|
||||
|
||||
# i945-pwm build dependencies
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages build-essential perl
|
||||
|
||||
# Coreboot build dependencies (also requires build-essential and git)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages libncurses5-dev doxygen acpica-tools gdb flex bison build-essential git libssl-dev gnat
|
||||
|
||||
# GRUB build dependencies (also requires build-essential, bison and flex)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages 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
|
||||
|
||||
# BucTS build dependencies (external script)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages build-essential
|
||||
|
||||
# Flashrom build dependencies (also requires build-essential)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages libpci-dev pciutils zlib1g-dev libftdi-dev build-essential libusb-1.0-0-dev libusb-1.0-0
|
||||
|
||||
# For cross-compiling i686 target on x86_64 host.
|
||||
[ "${arch}" -eq 0 ] && install_packages lib32z1-dev
|
||||
|
||||
# For running make check
|
||||
# ----------------------
|
||||
install_packages shellcheck # lint
|
||||
install_packages gawk git grep lzip make sed tar xz-utils # u-boot-libre
|
||||
|
||||
# For building the website tarball
|
||||
install_packages \
|
||||
graphviz \
|
||||
pandoc
|
||||
|
||||
if [ -n "${to_install}" ] ; then
|
||||
apt install -y ${to_install}
|
||||
fi
|
|
@ -1,14 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# trisquel script: installs build dependencies for Trisquel 9 and 10.
|
||||
# trisquel script: installs build dependencies for PureOS 10, Trisquel 9 and Trisquel 10.
|
||||
#
|
||||
# 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>
|
||||
|
||||
#
|
||||
# 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
|
||||
|
@ -108,7 +108,7 @@ if ! grep -q 'VERSION_CODENAME="nabia"' /etc/os-release ; then
|
|||
install_packages fonts-unifont
|
||||
fi
|
||||
|
||||
install_packages 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 unifont
|
||||
install_packages 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 libtool-bin libfreetype6-dev unifont
|
||||
|
||||
# BucTS build dependencies (external script)
|
||||
# ------------------------------------------------------------
|
||||
|
@ -118,7 +118,7 @@ install_packages build-essential
|
|||
# Flashrom build dependencies (also requires build-essential)
|
||||
# ------------------------------------------------------------
|
||||
|
||||
install_packages libpci-dev pciutils zlib1g-dev libftdi-dev build-essential libusb-1.0-0-dev libusb-dev
|
||||
install_packages libpci-dev pciutils zlib1g-dev libftdi-dev build-essential libusb-1.0-0 libusb-1.0-0-dev libusb-dev
|
||||
|
||||
# For cross-compiling i686 target on x86_64 host.
|
||||
[ "${arch}" -eq 0 ] && install_packages lib32z1-dev
|
|
@ -50,21 +50,21 @@ fi
|
|||
# as for instance Trisquel 10 has ID_LIKE=debian and not
|
||||
# ID_LIKE=ubuntu.
|
||||
if is_base_distro "trisquel" ; then
|
||||
"$(dirname $0)"/../../dependencies/trisquel $@
|
||||
"$(dirname $0)"/../../dependencies/pureos-trisquel $@
|
||||
exit $?
|
||||
elif is_base_distro "pureos" ; then # PureOS doesn't have ID_LIKE
|
||||
"$(dirname $0)"/../../dependencies/pureos-10 $@
|
||||
"$(dirname $0)"/../../dependencies/pureos-trisquel $@
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if is_base_distro "arch" ; then
|
||||
"$(dirname $0)"/../../dependencies/arch $@
|
||||
elif is_base_distro "debian" ; then
|
||||
"$(dirname $0)"/../../dependencies/pureos-10 $@
|
||||
"$(dirname $0)"/../../dependencies/pureos-trisquel $@
|
||||
elif is_base_distro "fedora" ; then
|
||||
"$(dirname $0)"/../../dependencies/fedora35 $@
|
||||
elif is_base_distro "ubuntu" ; then
|
||||
"$(dirname $0)"/../../dependencies/trisquel $@
|
||||
"$(dirname $0)"/../../dependencies/pureos-trisquel $@
|
||||
elif is_base_distro "void" ; then
|
||||
"$(dirname $0)"/../../dependencies/void $@
|
||||
fi
|
||||
|
|
|
@ -158,17 +158,11 @@ to build an image for a specific computer).
|
|||
To build GNU Boot you must first ensure that all build dependencies
|
||||
are installed.
|
||||
|
||||
If you are running Trisquel 10 (nabia) you can run the following
|
||||
command as it takes care of installing all the required dependencies
|
||||
for you:
|
||||
|
||||
sudo make install-dependencies-ubuntu
|
||||
|
||||
If instead you use PureOS 10 (byzantium) you can use the following
|
||||
command instead:
|
||||
|
||||
sudo make install-dependencies-pureos-10
|
||||
If you are running PureOS 10 (byzantium), Trisquel 10 (nabia) or
|
||||
Trisquel 11 (aramo), you can run the following command as it takes
|
||||
care of installing all the required dependencies for you:
|
||||
|
||||
sudo make install-dependencies-pureos-trisquel
|
||||
|
||||
You can then build everything with this command:
|
||||
|
||||
|
@ -232,13 +226,10 @@ First, install build dependencies
|
|||
---------------------------------
|
||||
|
||||
GNU Boot includes a script that automatically installs dependencies in
|
||||
Trisquel 10 (nabia):
|
||||
various distributions. It has mainly been tested on PureOS 10
|
||||
(byzantium), Trisquel 10 (nabia) and Trisquel 11 (aramo):
|
||||
|
||||
sudo ./build dependencies trisquel
|
||||
|
||||
and for PureOS 10 (byzantium):
|
||||
|
||||
sudo ./build dependencies pureos-10
|
||||
sudo ./build install dependencies
|
||||
|
||||
The build script automatically runs all necessary commands; for example
|
||||
`./build payload grub` will automatically run `./build module grub` if the
|
||||
|
|
|
@ -131,7 +131,7 @@ So far the copyright headers were verified on the following files:
|
|||
aca12bde3f7af5b17969d57f7da1a8d700e0a36f ("website: serve.sh: update
|
||||
copyright headers.")
|
||||
|
||||
* resources/dependencies/trisquel (details in the commit
|
||||
* resources/dependencies/pureos-trisquel (details in the commit
|
||||
805127f0301294e41a4409a2c9a7d121214a594e ("dependencies: Trisquel
|
||||
10: Add copyright header.")).
|
||||
|
||||
|
|
|
@ -242,13 +242,13 @@ script is also applicable to newer ubuntu versions
|
|||
./build module flashrom
|
||||
|
||||
If the script complains about missing dependencies, just modify the
|
||||
resources/dependencies/trisquel script and remove those dependencies.
|
||||
resources/dependencies/pureos-trisquel script and remove those dependencies.
|
||||
The script is written for Ubuntu 20.04, but it should work fine in other
|
||||
GNU/Linux distributions that use the `apt-get` package manager.
|
||||
|
||||
A `flashrom/` directory will be present, with a `flashrom` executable inside
|
||||
of it. If you got an error about missing package when running the dependencies
|
||||
command above, tweak `resources/dependencies/trisquel`. That
|
||||
command above, tweak `resources/dependencies/pureos-trisquel`. That
|
||||
script downloads and installs build dependencies in apt-get and it is intended
|
||||
for use on x86-64 systems running Ubuntu 20.04, but it should work in Raspbian
|
||||
on the Raspberry Pi.
|
||||
|
|
Loading…
Reference in New Issue