]> git.pld-linux.org Git - packages/efi-boot-update.git/blobdiff - kernel-old.conf
'kernel' and 'kernel-old' modules added
[packages/efi-boot-update.git] / kernel-old.conf
diff --git a/kernel-old.conf b/kernel-old.conf
new file mode 100644 (file)
index 0000000..8fb8dfc
--- /dev/null
@@ -0,0 +1,35 @@
+ENABLED=yes
+LABEL="old kernel"
+BINARY=vmlinuz_old.efi
+ARGS="root=/dev/sda2 ro add_efi_memmap"
+
+ARGS="initrd=@EFI_PLATFORM_PATH@\\initrd_old $ARGS"
+
+if is_yes "$ENABLED" ; then
+       if [ -e /boot/vmlinuz.old ] ; then
+               _kernel_filetype="$(file -k -L /boot/vmlinuz.old)"
+       else
+               _kernel_filetype="$(file -k -L /boot/vmlinuz)"
+       fi
+
+       if [ "${_kernel_filetype#*PE32 executable}" != "${_kernel_filetype}" ] ; then
+               # PE32 - 32 bit EFI stub
+               ARCH=ia32
+               verbose "Kernel with 32 bit EFI stub found at /boot/vmlinuz.old"
+       elif [ "${_kernel_filetype#*PE32+ executable}" != "${_kernel_filetype}" ] ; then
+               # PE32+ - 64 bit EFI stub
+               ARCH=x64
+               verbose "Kernel with 64 bit EFI stub found at /boot/vmlinuz.old"
+       else
+               msg "/boot/vmlinuz.old does not contain EFI stub"
+               ENABLED=no
+       fi
+fi
+
+install_files() {
+
+    update_file --missingok /boot/initrd.old initrd_old
+    update_file --missingok /boot/vmlinuz.old vmlinuz_old.efi
+}
+
+# vi: ft=sh
This page took 0.108372 seconds and 4 git commands to generate.