This commit is contained in:
Pratham Patel 2023-10-07 22:17:49 +05:30
parent 09affb66e2
commit 578d1ee73c
No known key found for this signature in database
2 changed files with 2 additions and 13 deletions

View File

@ -5,7 +5,7 @@
Name: opi5-efi
Version: 0.0.2
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Necessary files for booting from vendor U-Boot on Orange Pi 5
License: GPL
Provides: %{name}-%{version}

13
post.sh
View File

@ -6,16 +6,6 @@ UNAME_R="$(</boot/.uname)"
BOOT_PART="$(grep '/ ' /etc/fstab | awk '{print $1}')"
replacewithfullver
if [ -x /sbin/installkernel -a -r "/boot/vmlinuz-${UNAME_R}" -a -r "/boot/System.map-${UNAME_R}" ]; then
cp "/boot/vmlinuz-${UNAME_R}" "/boot/.vmlinuz-${UNAME_R}-rpm"
cp "/boot/System.map-${UNAME_R}" "/boot/.System.map-${UNAME_R}-rpm"
rm -f "/boot/vmlinuz-${UNAME_R}" "/boot/System.map-${UNAME_R}"
/sbin/installkernel "${UNAME_R}" "/boot/.vmlinuz-${UNAME_R}-rpm" "/boot/.System.map-${UNAME_R}-rpm"
rm -f "/boot/.vmlinuz-${UNAME_R}-rpm" "/boot/.System.map-${UNAME_R}-rpm"
fi
ln "/boot/.uname-${UNAME_R}" /boot/.uname
cp /opt/opi5-efi/boot.cmd "/boot/efi/boot.cmd-${FULL_VER}"
cp /opt/opi5-efi/uEnv.txt "/boot/efi/uEnv.txt-${FULL_VER}"
@ -25,8 +15,7 @@ if [ ! -f /boot/.uname ]; then
fi
if [ ! -f "/boot/initramfs-${UNAME_R}" ]; then
echo "ERROR: No initramfs found."
exit 1
/sbin/installkernel "${UNAME_R}" "/boot/.vmlinuz-${UNAME_R}-rpm" "/boot/.System.map-${UNAME_R}-rpm"
fi
echo "rootdev=${BOOT_PART}" >> "/boot/efi/uEnv.txt-${FULL_VER}"