diff options
author | Richard Purdie <richard@openedhand.com> | 2006-05-30 20:08:51 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-05-30 20:08:51 +0000 |
commit | bdd7bdd5417e47931632148ff6103f9cf378aaea (patch) | |
tree | ccacf3b26f9b4ddaa8326dacb8432ce6b7fa7397 /openembedded | |
parent | deba905a8052511b88be064324145553cf583f9f (diff) | |
download | poky-bdd7bdd5417e47931632148ff6103f9cf378aaea.tar.gz |
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.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@456 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded')
-rw-r--r-- | openembedded/classes/kernel.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/openembedded/classes/kernel.bbclass b/openembedded/classes/kernel.bbclass index ab8c03014f..ad51c4e035 100644 --- a/openembedded/classes/kernel.bbclass +++ b/openembedded/classes/kernel.bbclass | |||
@@ -192,6 +192,17 @@ PKG_kernel-image = "kernel-image-${KERNEL_VERSION}" | |||
192 | ALLOW_EMPTY_kernel = "1" | 192 | ALLOW_EMPTY_kernel = "1" |
193 | ALLOW_EMPTY_kernel-image = "1" | 193 | ALLOW_EMPTY_kernel-image = "1" |
194 | 194 | ||
195 | pkg_postinst_kernel-image () { | ||
196 | if [ ! -e "$D/lib/modules/${KERNEL_RELEASE}" ]; then | ||
197 | mkdir -p $D/lib/modules/${KERNEL_RELEASE} | ||
198 | fi | ||
199 | if [ -n "$D" ]; then | ||
200 | ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION} | ||
201 | else | ||
202 | depmod -A | ||
203 | fi | ||
204 | } | ||
205 | |||
195 | pkg_postinst_modules () { | 206 | pkg_postinst_modules () { |
196 | if [ -n "$D" ]; then | 207 | if [ -n "$D" ]; then |
197 | ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION} | 208 | ${HOST_PREFIX}depmod-${KERNEL_MAJOR_VERSION} -A -b $D -F ${STAGING_KERNEL_DIR}/System.map-${KERNEL_RELEASE} ${KERNEL_VERSION} |