--- /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