summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxsmile2021-09-24 12:57:31 +0200
committerxsmile2021-09-24 12:57:31 +0200
commit13f3185f2239d9045a40b4f17e0e8348113d00ba (patch)
treee9032b0d1caefbafe67e59a914fd684179995822
parent59581f174d88cf4181b851e27cb2e0c212b221b5 (diff)
downloadaur-13f3185f2239d9045a40b4f17e0e8348113d00ba.tar.gz
Improve the method to find a kernel image
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD2
-rw-r--r--sedutil-mkimg.sh3
3 files changed, 4 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d042a298e2d..7f05f9ed5f1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = sedutil-ladar
pkgdesc = TCG OPAL 2.00 SED Management Program. ladar's fork, SHA512 variant
pkgver = 1.16.0
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/ladar/sedutil
install = sedutil.install
arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index bf07bb3ea5b..52e224d9784 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=sedutil-ladar
_pkgname=sedutil
pkgver=1.16.0
-pkgrel=3
+pkgrel=4
pkgdesc="TCG OPAL 2.00 SED Management Program. ladar's fork, SHA512 variant"
arch=(x86_64)
url=https://github.com/ladar/sedutil
diff --git a/sedutil-mkimg.sh b/sedutil-mkimg.sh
index bdb7177e0f5..2a750cbd0dc 100644
--- a/sedutil-mkimg.sh
+++ b/sedutil-mkimg.sh
@@ -11,7 +11,7 @@ IMGSIZE=64M
# Partition label
PARTLABEL=SEDUTIL
# Kernel image
-KERNEL=$(find /usr/lib/modules -mindepth 1 -print -quit)/vmlinuz
+KERNEL=$(find /usr/lib/modules -type f -name vmlinuz -print -quit)
# Required packages
DEPENDS=(gptfdisk syslinux)
@@ -49,6 +49,7 @@ package() {
install -D /usr/lib/syslinux/efi64/ldlinux.e64 -t mnt-"${buildtype}"/efi/boot/
install -D /usr/share/sedutil/syslinux-"${buildtype}".cfg mnt-"${buildtype}"/syslinux.cfg
# copy Linux image and initramfs
+ [ -f $KERNEL ] || { echo 'could not find kernel'; cleanup "$buildtype" "$loopdev"; exit 1; }
install -D "$KERNEL" mnt-"${buildtype}"/vmlinuz-linux
install -D initramfs-"${buildtype}".img -t mnt-"${buildtype}"/
[ "$buildtype" = "pba" ] && export SEDUTIL_PBA_IMG=$(realpath "$img")