remove "/boot" from the symlink by pushd-ing into /boot
This commit is contained in:
parent
2741e6c60a
commit
dbf0df24e8
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Name: opi5-efi
|
Name: opi5-efi
|
||||||
Version: 0.0.4
|
Version: 0.0.4
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
Summary: Necessary files for booting from vendor U-Boot on Orange Pi 5
|
Summary: Necessary files for booting from vendor U-Boot on Orange Pi 5
|
||||||
License: GPL
|
License: GPL
|
||||||
Provides: %{name}-%{version}
|
Provides: %{name}-%{version}
|
||||||
|
11
post.sh
11
post.sh
@ -5,8 +5,8 @@ set -xeuf -o pipefail
|
|||||||
UNAME_R="$(</boot/.uname)"
|
UNAME_R="$(</boot/.uname)"
|
||||||
BOOT_PART="$(grep '/ ' /etc/fstab | awk '{print $1}')"
|
BOOT_PART="$(grep '/ ' /etc/fstab | awk '{print $1}')"
|
||||||
|
|
||||||
cp /opt/opi5-efi/boot.cmd "/boot/efi/boot.cmd"
|
cp /opt/opi5-efi/boot.cmd boot/efi/boot.cmd
|
||||||
cp /opt/opi5-efi/uEnv.txt "/boot/efi/uEnv.txt"
|
cp /opt/opi5-efi/uEnv.txt boot/efi/uEnv.txt
|
||||||
|
|
||||||
if [ ! -f /boot/.uname ]; then
|
if [ ! -f /boot/.uname ]; then
|
||||||
echo "ERROR: No /boot/.uname found to extract 'uname -r' from."
|
echo "ERROR: No /boot/.uname found to extract 'uname -r' from."
|
||||||
@ -23,5 +23,8 @@ echo "rootdev=${BOOT_PART}" >> "/boot/efi/uEnv.txt"
|
|||||||
sed -i "s/setenvrootdev/setenv rootdev \"${BOOT_PART}\"/" "/boot/efi/boot.cmd"
|
sed -i "s/setenvrootdev/setenv rootdev \"${BOOT_PART}\"/" "/boot/efi/boot.cmd"
|
||||||
|
|
||||||
mkimage -A arm -T ramdisk -C none -n uInitrd -d "/boot/initramfs-${UNAME_R}.img" "/boot/uInitrd-${UNAME_R}"
|
mkimage -A arm -T ramdisk -C none -n uInitrd -d "/boot/initramfs-${UNAME_R}.img" "/boot/uInitrd-${UNAME_R}"
|
||||||
ln -s "/boot/uInitrd-${UNAME_R}" "/boot/uInitrd"
|
mkimage -C none -A arm -T script -d /boot/efi/boot.cmd /boot/efi/boot.scr
|
||||||
mkimage -C none -A arm -T script -d "/boot/efi/boot.cmd" "/boot/efi/boot.scr"
|
|
||||||
|
pushd /boot
|
||||||
|
ln -s "uInitrd-${UNAME_R}" uInitrd
|
||||||
|
popd
|
||||||
|
Loading…
Reference in New Issue
Block a user