From f8315e145d997512ba5a8f594ecf7c7b9e053a3b Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Wed, 18 Apr 2012 23:25:21 +0200 Subject: [PATCH] * util/grub.d/10_linux.in: Fix detection of genkernel initramfs. --- ChangeLog | 4 ++++ util/grub.d/10_linux.in | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e14b639c..84ad00af1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-04-18 Mike Gilbert + + * util/grub.d/10_linux.in: Fix detection of genkernel initramfs. + 2012-04-18 Bean * grub-core/disk/ata.c (grub_ata_strncpy): Put terminating zero at right diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 8c75fab29..14402e86c 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -150,7 +150,8 @@ EOF EOF } -case x`uname -m` in +machine=`uname -m` +case "x$machine" in xi?86 | xx86_64) list=`for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi @@ -161,6 +162,14 @@ case x`uname -m` in done` ;; esac +case "$machine" in + i?86) GENKERNEL_ARCH="x86" ;; + mips|mips64) GENKERNEL_ARCH="mips" ;; + mipsel|mips64el) GENKERNEL_ARCH="mipsel" ;; + arm*) GENKERNEL_ARCH="arm" ;; + *) GENKERNEL_ARCH="$machine" ;; +esac + prepare_boot_cache= prepare_root_cache= boot_device_id= @@ -187,7 +196,9 @@ while [ "x$list" != "x" ] ; do "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ "initrd-${alt_version}" "initramfs-${alt_version}.img" \ "initramfs-genkernel-${version}" \ - "initramfs-genkernel-${alt_version}"; do + "initramfs-genkernel-${alt_version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${alt_version}"; do if test -e "${dirname}/${i}" ; then initrd="$i" break