summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-05-06 23:19:58 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-05-06 23:56:45 +0200
commit98b60a86eb642db7beed4b4451235c5c62335c42 (patch)
tree5da585f248dde467326f9daa68d1de5f60e6c423
parent6d71b84ccc515104a83bc97882a528c7142cf7b6 (diff)
downloadabslibre-98b60a86eb642db7beed4b4451235c5c62335c42.tar.gz
abslibre-98b60a86eb642db7beed4b4451235c5c62335c42.tar.bz2
abslibre-98b60a86eb642db7beed4b4451235c5c62335c42.zip
pcr: libreboot-utils: armv7h: skip remaining tools requiring port mapped I/O
The warning about bucts was removed as in fact most of these tools are probably dangerous in one way or another if used improperly. Flashrom which is packaged in most GNU/Linux distributions is also very dangerous if used improperly, though it comes with warnings and safe defaults. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--pcr/libreboot-utils/PKGBUILD53
1 files changed, 31 insertions, 22 deletions
diff --git a/pcr/libreboot-utils/PKGBUILD b/pcr/libreboot-utils/PKGBUILD
index a4e529756..ca816f7b4 100644
--- a/pcr/libreboot-utils/PKGBUILD
+++ b/pcr/libreboot-utils/PKGBUILD
@@ -4,7 +4,7 @@
# Maintainers: Parabola hackers <dev@lists.parabola.nu>
pkgname=libreboot-utils
-pkgrel=4
+pkgrel=5
_upstream_ver=20211122
pkgver=4.15.libreboot${_upstream_ver}
pkgdesc="Misc. Coreboot/Libreboot utils (bucts, cbfstool, ECtool, nvramtool, superiotool)"
@@ -54,29 +54,27 @@ build() {
# Get to the directory.
cd "$srcdir/libreboot-${_upstream_ver}_src/coreboot/default/util/"
- # Bucts uses port-mapped I/O which doesn't exist on armv7h, so
- # it fails to compile when including sys/io.h. And it's only
- # useful for x86 computers anyway as it's supposed to run on
- # computers with an I945 chipset.
- #
- # Note that it could also be dangerous to use for people that
- # are not installing Libreboot or that don't know what they
- # are doing. In case it happens, removing the CMOS battery and
- # all other power sources should reset the BUC.TS register to
- # its default value and enable the computer to boot again.
+ # These tools uses port-mapped I/O which doesn't exist on armv7h,
+ # so they fails to compile when including sys/io.h. They also need
+ # port-mapped I/O to work so it's pointless to try to build them
+ # on armv7h.
if [ "${CARCH}" = "i686" -o "${CARCH}" = "x86_64" ] ; then
# Build bucts.
make -C bucts
+
+ # Build ECtool.
+ make -C ectool
+
+ # Build superiotool.
+ make -C superiotool
fi
# Build cbfstool.
make -C cbfstool WERROR=''
- # Build ECtool.
- make -C ectool
+
# Build nvramtool.
make -C nvramtool
- # Build superiotool.
- make -C superiotool
+
}
package() {
@@ -85,17 +83,28 @@ package() {
# Set directories up.
install -d "${pkgdir}"/usr/bin "${pkgdir}"/usr/share/man/man8
- # Install bucts.
- install -Dm755 bucts/bucts "${pkgdir}"/usr/bin/bucts
+
+ # These tools uses port-mapped I/O which doesn't exist on armv7h,
+ # so they fails to compile when including sys/io.h. So we also need
+ # to skip their installation.
+ if [ "${CARCH}" = "i686" -o "${CARCH}" = "x86_64" ] ; then
+ # Install bucts.
+ install -Dm755 bucts/bucts "${pkgdir}"/usr/bin/bucts
+
+ # Install ECtool.
+ install -Dm755 ectool/ectool "${pkgdir}"/usr/bin/ectool
+
+ # Install superiotool.
+ install -Dm755 superiotool/superiotool \
+ "${pkgdir}"/usr/bin/superiotool
+ install -m644 superiotool/superiotool.8 \
+ "${pkgdir}"/usr/share/man/man8
+ fi
+
# Install cbfstool.
install -Dm755 cbfstool/cbfstool "${pkgdir}"/usr/bin/cbfstool
- # Install ECtool.
- install -Dm755 ectool/ectool "${pkgdir}"/usr/bin/ectool
# Install nvramtool.
install -Dm755 nvramtool/nvramtool "${pkgdir}"/usr/bin/nvramtool
install -m644 nvramtool/cli/nvramtool.8 "${pkgdir}"/usr/share/man/man8
- # Install superiotool.
- install -Dm755 superiotool/superiotool "${pkgdir}"/usr/bin/superiotool
- install -m644 superiotool/superiotool.8 "${pkgdir}"/usr/share/man/man8
}