diff options
-rw-r--r-- | pcr/libreboot-utils/PKGBUILD | 53 |
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 } |