]> git.pld-linux.org Git - packages/efi-boot-update.git/blobdiff - kernel.conf
'kernel' and 'kernel-old' modules added
[packages/efi-boot-update.git] / kernel.conf
diff --git a/kernel.conf b/kernel.conf
new file mode 100644 (file)
index 0000000..3d60407
--- /dev/null
@@ -0,0 +1,31 @@
+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
This page took 0.057433 seconds and 4 git commands to generate.