place opi5-efi files in /boot/efi

This commit is contained in:
Pratham Patel 2023-10-05 05:33:37 +05:30
parent e8c02730a6
commit 96db78824f
No known key found for this signature in database

View file

@ -23,8 +23,8 @@ echo "Nothing to prepare"
echo "Nothing to build"
%install
cp ${SOURCE0} $RPM_BUILD_ROOT/boot/boot.cmd-%{full_ver}
cp ${SOURCE1} $RPM_BUILD_ROOT/boot/uEnv.txt-%{full_ver}
cp ${SOURCE0} $RPM_BUILD_ROOT/boot/efi/boot.cmd-%{full_ver}
cp ${SOURCE1} $RPM_BUILD_ROOT/boot/efi/uEnv.txt-%{full_ver}
%clean
rm -rf $RPM_BUILD_ROOT
@ -35,11 +35,11 @@ if [ -f /boot/.uname ]; then
UNAME_R=$(</boot/.uname)
BOOT_PART=$(grep '/ ' /etc/fstab | awk '{print $1}')
echo "${BOOT_PART}" >> /boot/uEnv.txt-%{full_ver}
sed -i "s/setenvrootdev/setenv rootdev \"${BOOT_PART}\"/" /boot/boot.cmd-%{full_ver}
sed -i "s/setenvunamer/setenv unamer \"${UNAME_R}\"/" /boot/boot.cmd-%{full_ver}
echo "${BOOT_PART}" >> /boot/efi/uEnv.txt-%{full_ver}
sed -i "s/setenvrootdev/setenv rootdev \"${BOOT_PART}\"/" /boot/efi/boot.cmd-%{full_ver}
sed -i "s/setenvunamer/setenv unamer \"${UNAME_R}\"/" /boot/efi/boot.cmd-%{full_ver}
else
echo "ERROR: No /boot/.uname found to extract 'uname -r' from."
fi
mkimage -C none -A arm -T script -d /boot/boot.cmd-%{full_ver} /boot/boot.scr-%{full_ver}
cp /boot/boot.scr-%{full_ver} /boot/boot.scr
mkimage -C none -A arm -T script -d /boot/efi/boot.cmd-%{full_ver} /boot/efi/boot.scr-%{full_ver}
cp /boot/boot.scr-%{full_ver} /boot/efi/boot.scr