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
This commit is contained in:
yogananth subramanian 2015-01-22 02:10:39 +05:30
parent cde4cef215
commit 57705694e7
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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))

View File

@ -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]-}
}