diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-29 14:35:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-29 15:36:52 +0000 |
commit | 3f15d8a807edb02825e32c4d8c924b4465ca5098 (patch) | |
tree | 15091a4b06f91f76a73f266ee4248124c20973ed /meta/classes/kernel.bbclass | |
parent | 36bd248463291919f2a2fa343db88c99953c18c6 (diff) | |
download | poky-3f15d8a807edb02825e32c4d8c924b4465ca5098.tar.gz |
kernel: Fix depmod for multilib
Using populate_sysroot for this data was a nice idea but flawed as it
doesn't work in multilib builds. Instead we can use PKGDATA_DIR since
this is consistent over multilib builds. It also turns out to be
slightly neater code too. Hopefully this resolves the problem once and
for all.
(From OE-Core rev: 6cccae3ca54c1177a1d91d23c3e151d74e735ee9)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r-- | meta/classes/kernel.bbclass | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 29498b4faf..125ed88406 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -231,16 +231,20 @@ kernel_do_install() { | |||
231 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} | 231 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} |
232 | install -d ${D}${sysconfdir}/modules-load.d | 232 | install -d ${D}${sysconfdir}/modules-load.d |
233 | install -d ${D}${sysconfdir}/modprobe.d | 233 | install -d ${D}${sysconfdir}/modprobe.d |
234 | |||
235 | # Stash data for depmod | ||
236 | install -d ${D}${datadir}/kernel-depmod/ | ||
237 | echo "${KERNEL_VERSION}" > ${D}${datadir}/kernel-depmod/kernel-abiversion | ||
238 | cp System.map ${D}${datadir}/kernel-depmod/System.map-${KERNEL_VERSION} | ||
239 | } | 234 | } |
240 | do_install[prefuncs] += "package_get_auto_pr" | 235 | do_install[prefuncs] += "package_get_auto_pr" |
241 | 236 | ||
242 | addtask shared_workdir after do_compile before do_install | 237 | addtask shared_workdir after do_compile before do_install |
243 | 238 | ||
239 | emit_depmod_pkgdata() { | ||
240 | # Stash data for depmod | ||
241 | install -d ${PKGDESTWORK}/kernel-depmod/ | ||
242 | echo "${KERNEL_VERSION}" > ${PKGDESTWORK}/kernel-depmod/kernel-abiversion | ||
243 | cp System.map ${PKGDESTWORK}/kernel-depmod/System.map-${KERNEL_VERSION} | ||
244 | } | ||
245 | |||
246 | PACKAGEFUNCS += "emit_depmod_pkgdata" | ||
247 | |||
244 | do_shared_workdir () { | 248 | do_shared_workdir () { |
245 | cd ${B} | 249 | cd ${B} |
246 | 250 | ||
@@ -285,21 +289,13 @@ do_shared_workdir () { | |||
285 | fi | 289 | fi |
286 | } | 290 | } |
287 | 291 | ||
288 | # Only stage the files we need for depmod, not the modules/firmware | 292 | # We don't need to stage anything, not the modules/firmware since those would clash with linux-firmware |
289 | sysroot_stage_all () { | 293 | sysroot_stage_all () { |
290 | sysroot_stage_dir ${D}${datadir}/kernel-depmod ${SYSROOT_DESTDIR}${datadir}/kernel-depmod | 294 | : |
291 | } | 295 | } |
292 | 296 | ||
293 | KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig" | 297 | KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig" |
294 | 298 | ||
295 | PACKAGE_PREPROCESS_FUNCS += "kernel_package_preprocess" | ||
296 | |||
297 | kernel_package_preprocess () { | ||
298 | rm -rf ${PKGD}${datadir}/kernel-depmod | ||
299 | rmdir ${PKGD}${datadir} | ||
300 | rmdir ${PKGD}${exec_prefix} | ||
301 | } | ||
302 | |||
303 | kernel_do_configure() { | 299 | kernel_do_configure() { |
304 | # fixes extra + in /lib/modules/2.6.37+ | 300 | # fixes extra + in /lib/modules/2.6.37+ |
305 | # $ scripts/setlocalversion . => + | 301 | # $ scripts/setlocalversion . => + |