]> git.pld-linux.org Git - packages/efi-boot-update.git/blob - kernel.conf
'kernel' and 'kernel-old' modules added
[packages/efi-boot-update.git] / kernel.conf
1 ENABLED=yes
2 LABEL="kernel"
3 BINARY=vmlinuz.efi
4 ARGS="root=/dev/sda2 ro add_efi_memmap"
5
6 ARGS="initrd=@EFI_PLATFORM_PATH@\\initrd $ARGS"
7
8 if is_yes "$ENABLED" ; then
9         _kernel_filetype="$(file -k -L /boot/vmlinuz)"
10
11         if [ "${_kernel_filetype#*PE32 executable}" != "${_kernel_filetype}" ] ; then
12                 # PE32 - 32 bit EFI stub
13                 ARCH=ia32
14                 verbose "Kernel with 32 bit EFI stub found at /boot/vmlinuz"
15         elif [ "${_kernel_filetype#*PE32+ executable}" != "${_kernel_filetype}" ] ; then
16                 # PE32+ - 64 bit EFI stub
17                 ARCH=x64
18                 verbose "Kernel with 64 bit EFI stub found at /boot/vmlinuz"
19         else
20                 msg "/boot/vmlinuz does not contain EFI stub"
21                 ENABLED=no
22         fi
23 fi
24
25 install_files() {
26
27     update_file /boot/initrd initrd
28     update_file /boot/vmlinuz vmlinuz.efi
29 }
30
31 # vi: ft=sh
This page took 0.059441 seconds and 3 git commands to generate.