image.bbclass: Make the kernel depmod dependent on the presence of a kernel - some images eg an initramfs don't have this

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5473 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2008-10-09 19:08:11 +00:00
parent 1ef8ccb0f6
commit fc467314f8
1 changed files with 5 additions and 3 deletions

View File

@ -118,10 +118,12 @@ fakeroot do_rootfs () {
# This part is done by kernel-module-* postinstall scripts but if image do
# not contains modules at all there are few moments in boot sequence with
# "unable to open modules.dep" message.
KERNEL_VERSION=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion`
if [ -e ${STAGING_KERNEL_DIR}/kernel-abiversion ]; then
KERNEL_VERSION=`cat ${STAGING_KERNEL_DIR}/kernel-abiversion`
mkdir -p ${IMAGE_ROOTFS}/lib/modules/$KERNEL_VERSION
${TARGET_SYS}-depmod-2.6 -a -b ${IMAGE_ROOTFS} -F ${STAGING_KERNEL_DIR}/System.map-$KERNEL_VERSION $KERNEL_VERSION
mkdir -p ${IMAGE_ROOTFS}/lib/modules/$KERNEL_VERSION
${TARGET_SYS}-depmod-2.6 -a -b ${IMAGE_ROOTFS} -F ${STAGING_KERNEL_DIR}/System.map-$KERNEL_VERSION $KERNEL_VERSION
fi
${IMAGE_POSTPROCESS_COMMAND}