]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Core Update 172: Ship u-boot and regenerate all initrds
authorPeter Müller <peter.mueller@ipfire.org>
Wed, 22 Nov 2023 21:50:15 +0000 (21:50 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Wed, 22 Nov 2023 21:50:15 +0000 (21:50 +0000)
This ensures the newly compiled mkimage is executed on the system.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
config/rootfiles/core/182/filelists/aarch64/u-boot [new symlink]
config/rootfiles/core/182/update.sh

diff --git a/config/rootfiles/core/182/filelists/aarch64/u-boot b/config/rootfiles/core/182/filelists/aarch64/u-boot
new file mode 120000 (symlink)
index 0000000..2a16bdb
--- /dev/null
@@ -0,0 +1 @@
+../../../../common/aarch64/u-boot
\ No newline at end of file
index b03183e9cba2a2f0feace2940375795ff11d171b..db70446c352f0c09aa1be6f0903f85c249218d9c 100644 (file)
@@ -37,6 +37,13 @@ done
 /etc/rc.d/init.d/unbound stop
 /etc/rc.d/init.d/sshd stop
 
+KVER="xxxKVERxxx"
+
+# Backup uEnv.txt if exist
+if [ -e /boot/uEnv.txt ]; then
+    cp -vf /boot/uEnv.txt /boot/uEnv.txt.org
+fi
+
 # Extract files
 extract_files
 
@@ -83,6 +90,21 @@ if grep -q "ENABLED=on" /var/ipfire/vpn/settings; then
        /etc/rc.d/init.d/ipsec start
 fi
 
+# Rebuild initial ramdisks
+dracut --regenerate-all --force
+KVER="xxxKVERxxx"
+case "$(uname -m)" in
+       aarch64)
+               mkimage -A arm64 -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfire.img /boot/uInit-${KVER}-ipfire
+               # dont remove initramfs because grub need this to boot.
+               ;;
+esac
+
+# Call user update script (needed for some ARM boards)
+if [ -e /boot/pakfire-kernel-update ]; then
+    /boot/pakfire-kernel-update ${KVER}
+fi
+
 # This update needs a reboot...
 touch /var/run/need_reboot