the kernel-release is not "necessary"
This commit is contained in:
parent
84b2470459
commit
9b2a3788ab
17
post.sh
17
post.sh
@ -2,29 +2,18 @@
|
|||||||
|
|
||||||
set -xeuf -o pipefail
|
set -xeuf -o pipefail
|
||||||
|
|
||||||
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/initramfs.img" ]; then
|
||||||
echo "ERROR: No /boot/.uname found to extract 'uname -r' from."
|
echo "Initramfs not found."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "/boot/initramfs-${UNAME_R}.img" ]; then
|
|
||||||
echo "Initramfs not found... regenerating."
|
|
||||||
/sbin/installkernel "${UNAME_R}" "/boot/.vmlinuz-${UNAME_R}-rpm" "/boot/.System.map-${UNAME_R}-rpm"
|
|
||||||
mv "/boot/vmlinuz-${UNAME_R}.old" "/boot/vmlinuz-${UNAME_R}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "rootdev=${BOOT_PART}" >> "/boot/efi/uEnv.txt"
|
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.img /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