summaryrefslogtreecommitdiff
path: root/classes/kernel.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2006-05-30 22:56:58 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-05-30 22:56:58 +0000
commita578015e0055199c526ba641dd7035949df78820 (patch)
treef87648a56f1cc29efcff741079998cafe8d8e7e8 /classes/kernel.bbclass
parent4ec55c36751931e262662d5b418b7d5bc9fe21a8 (diff)
kernel.bbclass: Add a postinstall for kernel-image to make sure the corrrect /lib/modules directory exists and to run depmod. This removes modprobe errors when no kernel modules are installed.
Diffstat (limited to 'classes/kernel.bbclass')
-rw-r--r--classes/kernel.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index ab8c03014f..ad51c4e035 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -192,6 +192,17 @@ PKG_kernel-image = "kernel-image-${KERNEL_VERSION}"
ALLOW_EMPTY_kernel = "1"
ALLOW_EMPTY_kernel-image = "1"
+pkg_postinst_kernel-image () {
+if [ ! -e "$D/lib/modules/${KERNEL_RELEASE}" ]; then
+ mkdir -p $D/lib/modules/${KERNEL_RELEASE}
+fi
+if [ -n "$D" ]; then
+ ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION}
+else
+ depmod -A
+fi
+}
+
pkg_postinst_modules () {
if [ -n "$D" ]; then
${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION}