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