Source1: update.conf
Source2: grub.conf
Source3: grub-installed.conf
+Source4: kernel.conf
+Source5: kernel-old.conf
Source10: README
Source11: TODO
URL: http://www.pld-linux.org/
install %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8/%{name}.8
install %{SOURCE1} $RPM_BUILD_ROOT/etc/efi-boot
install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT/etc/efi-boot/update.d
+install %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT/etc/efi-boot/update.d
%clean
rm -rf $RPM_BUILD_ROOT
%dir /etc/efi-boot/update.d
%config(noreplace) %verify(not md5 mtime size) /etc/efi-boot/update.d/grub.conf
%config(noreplace) %verify(not md5 mtime size) /etc/efi-boot/update.d/grub-installed.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/efi-boot/update.d/kernel.conf
+%config(noreplace) %verify(not md5 mtime size) /etc/efi-boot/update.d/kernel-old.conf
%dir /lib/efi
%dir /lib/efi/ia32
%dir /lib/efi/x64
--- /dev/null
+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
--- /dev/null
+ENABLED=yes
+LABEL="kernel"
+BINARY=vmlinuz.efi
+ARGS="root=/dev/sda2 ro add_efi_memmap"
+
+ARGS="initrd=@EFI_PLATFORM_PATH@\\initrd $ARGS"
+
+if is_yes "$ENABLED" ; then
+ _kernel_filetype="$(file -k -L /boot/vmlinuz)"
+
+ 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"
+ 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"
+ else
+ msg "/boot/vmlinuz does not contain EFI stub"
+ ENABLED=no
+ fi
+fi
+
+install_files() {
+
+ update_file /boot/initrd initrd
+ update_file /boot/vmlinuz vmlinuz.efi
+}
+
+# vi: ft=sh