]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
Core Update 172: Ship u-boot and regenerate all initrds
authorPeter Müller <peter.mueller@ipfire.org>
Mon, 21 Nov 2022 11:11:45 +0000 (11:11 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Mon, 21 Nov 2022 11:11:45 +0000 (11:11 +0000)
The latter is also needed to apply new CPU microcodes on x86_64.

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

diff --git a/config/rootfiles/core/172/filelists/aarch64/u-boot b/config/rootfiles/core/172/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
diff --git a/config/rootfiles/core/172/filelists/armv6l/u-boot b/config/rootfiles/core/172/filelists/armv6l/u-boot
new file mode 120000 (symlink)
index 0000000..e88d95f
--- /dev/null
@@ -0,0 +1 @@
+../../../../common/armv6l/u-boot
\ No newline at end of file
index ea29bbf0eb256f24c645e9024a474e91955590fe..cc31851abc696cac4f4a7e23be1d289396e5f249 100644 (file)
@@ -38,6 +38,13 @@ done
 /etc/rc.d/init.d/sshd stop
 /etc/rc.d/init.d/unbound stop
 
+KVER="xxxKVERxxx"
+
+# Backup uEnv.txt if exist
+if [ -e /boot/uEnv.txt ]; then
+    cp -vf /boot/uEnv.txt /boot/uEnv.txt.org
+fi
+
 # Remove files
 rm -rvf \
        /etc/strongswan.d/scepclient.conf \
@@ -154,6 +161,24 @@ if grep -q "ENABLED=on" /var/ipfire/vpn/settings; then
        /etc/init.d/ipsec start
 fi
 
+# Regenerate all initrds
+dracut --regenerate-all --force
+case "$(uname -m)" in
+       armv*)
+               mkimage -A arm -T ramdisk -C lzma -d /boot/initramfs-${KVER}-ipfire.img /boot/uInit-${KVER}-ipfire
+               rm /boot/initramfs-${KVER}-ipfire.img
+               ;;
+       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