From 57705694e707aec035137e60c5669104cd48b8bf Mon Sep 17 00:00:00 2001 From: yogananth subramanian Date: Thu, 22 Jan 2015 02:10:39 +0530 Subject: [PATCH] ramdisk-image-create: add support for vmlinux file ramdisk-image-create assumes the presence of vmlinuz file in OS image. But ubuntu PPC LE images have only vmlinux file. This patch adds support for using vmlinux file. Change-Id: I5dd0b8ceb46b73be57d4c15b39b96f99b524fa3f Closes-Bug: 1413362 --- elements/ramdisk/post-install.d/99-build-ramdisk | 2 +- lib/img-functions | 2 +- lib/ramdisk-functions | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/elements/ramdisk/post-install.d/99-build-ramdisk b/elements/ramdisk/post-install.d/99-build-ramdisk index 6a936ba6..e78bc025 100755 --- a/elements/ramdisk/post-install.d/99-build-ramdisk +++ b/elements/ramdisk/post-install.d/99-build-ramdisk @@ -42,5 +42,5 @@ save_image /tmp/ramdisk # In the past save_image did this for us. If EXIT handler is not # reset ramdisk image builds fail. trap EXIT -cp /boot/vmlinuz-${KERNEL_VERSION} /tmp/kernel +cp /boot/vmlinu[zx]-${KERNEL_VERSION} /tmp/kernel chmod o+r /tmp/kernel diff --git a/lib/img-functions b/lib/img-functions index ff2bb74c..35a820d1 100644 --- a/lib/img-functions +++ b/lib/img-functions @@ -159,7 +159,7 @@ function select_boot_kernel_initrd () { exit 1 fi elif [ -f $TARGET_ROOT/etc/debian_version ]; then - KERNEL=$(basename $(ls -1rv $BOOTDIR/vmlinuz*generic 2>/dev/null || ls -1rv $BOOTDIR/vmlinuz* | head -1)) + KERNEL=$(basename $(ls -1rv $BOOTDIR/vmlinu*generic 2>/dev/null || ls -1rv $BOOTDIR/vmlinu* | head -1)) RAMDISK=$(basename $(ls -1rv $BOOTDIR/initrd*generic 2>/dev/null || ls -1rv $BOOTDIR/initrd* | head -1)) elif [ -f $TARGET_ROOT/etc/SuSE-release ]; then KERNEL=$(basename $(readlink -e $BOOTDIR/vmlinuz)) diff --git a/lib/ramdisk-functions b/lib/ramdisk-functions index 62e27428..e7a30ab9 100644 --- a/lib/ramdisk-functions +++ b/lib/ramdisk-functions @@ -240,10 +240,10 @@ function populate_udev () { } function find_kernel_version () { - _TMP=$(ls /boot/vmlinuz-* | sort | tail -1) + _TMP=$(ls /boot/vmlinu* | sort | tail -1) if [ "$_TMP" == "" ]; then echo "Unable to find a suitable kernel" >>/dev/stderr exit 1 fi - echo ${_TMP##/boot/vmlinuz-} + echo ${_TMP##/boot/vmlinu[zx]-} }