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:
parent
cde4cef215
commit
57705694e7
@ -42,5 +42,5 @@ save_image /tmp/ramdisk
|
|||||||
# In the past save_image did this for us. If EXIT handler is not
|
# In the past save_image did this for us. If EXIT handler is not
|
||||||
# reset ramdisk image builds fail.
|
# reset ramdisk image builds fail.
|
||||||
trap EXIT
|
trap EXIT
|
||||||
cp /boot/vmlinuz-${KERNEL_VERSION} /tmp/kernel
|
cp /boot/vmlinu[zx]-${KERNEL_VERSION} /tmp/kernel
|
||||||
chmod o+r /tmp/kernel
|
chmod o+r /tmp/kernel
|
||||||
|
@ -159,7 +159,7 @@ function select_boot_kernel_initrd () {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [ -f $TARGET_ROOT/etc/debian_version ]; then
|
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))
|
RAMDISK=$(basename $(ls -1rv $BOOTDIR/initrd*generic 2>/dev/null || ls -1rv $BOOTDIR/initrd* | head -1))
|
||||||
elif [ -f $TARGET_ROOT/etc/SuSE-release ]; then
|
elif [ -f $TARGET_ROOT/etc/SuSE-release ]; then
|
||||||
KERNEL=$(basename $(readlink -e $BOOTDIR/vmlinuz))
|
KERNEL=$(basename $(readlink -e $BOOTDIR/vmlinuz))
|
||||||
|
@ -240,10 +240,10 @@ function populate_udev () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function find_kernel_version () {
|
function find_kernel_version () {
|
||||||
_TMP=$(ls /boot/vmlinuz-* | sort | tail -1)
|
_TMP=$(ls /boot/vmlinu* | sort | tail -1)
|
||||||
if [ "$_TMP" == "" ]; then
|
if [ "$_TMP" == "" ]; then
|
||||||
echo "Unable to find a suitable kernel" >>/dev/stderr
|
echo "Unable to find a suitable kernel" >>/dev/stderr
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo ${_TMP##/boot/vmlinuz-}
|
echo ${_TMP##/boot/vmlinu[zx]-}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user