diff options
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r-- | meta/classes/kernel.bbclass | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 78c8c7cf00..a60de8cc9e 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass | |||
@@ -230,28 +230,33 @@ kernel_do_install() { | |||
230 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} | 230 | [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION} |
231 | install -d ${D}${sysconfdir}/modules-load.d | 231 | install -d ${D}${sysconfdir}/modules-load.d |
232 | install -d ${D}${sysconfdir}/modprobe.d | 232 | install -d ${D}${sysconfdir}/modprobe.d |
233 | } | ||
234 | do_install[prefuncs] += "package_get_auto_pr" | ||
233 | 235 | ||
234 | # | 236 | addtask shared_workdir after do_compile before do_install |
235 | # Support for external module building - create a minimal copy of the | 237 | |
236 | # kernel source tree. | 238 | do_shared_workdir () { |
237 | # | 239 | cd ${B} |
238 | kerneldir=${D}${KERNEL_SRC_PATH} | 240 | |
241 | kerneldir=${STAGING_KERNEL_BUILDDIR} | ||
239 | install -d $kerneldir | 242 | install -d $kerneldir |
240 | mkdir -p ${D}/lib/modules/${KERNEL_VERSION} | ||
241 | ln -sf ${KERNEL_SRC_PATH} "${D}/lib/modules/${KERNEL_VERSION}/build" | ||
242 | 243 | ||
243 | # | 244 | # |
244 | # Store the kernel version in sysroots for module-base.bbclass | 245 | # Store the kernel version in sysroots for module-base.bbclass |
245 | # | 246 | # |
246 | 247 | ||
247 | echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion | 248 | echo "${KERNEL_VERSION}" > $kerneldir/kernel-abiversion |
248 | 249 | ||
249 | # Copy files required for module builds | 250 | # Copy files required for module builds |
250 | cp System.map $kerneldir/System.map-${KERNEL_VERSION} | 251 | cp System.map $kerneldir/System.map-${KERNEL_VERSION} |
251 | cp Module.symvers $kerneldir/ | 252 | cp Module.symvers $kerneldir/ |
252 | cp .config $kerneldir/ | 253 | cp .config $kerneldir/ |
253 | mkdir -p $kerneldir/include/config | 254 | mkdir -p $kerneldir/include/config |
254 | cp include/config/kernel.release $kerneldir/include/config/kernel.release | 255 | cp include/config/kernel.release $kerneldir/include/config/kernel.release |
256 | |||
257 | # We can also copy over all the generated files and avoid special cases | ||
258 | # like version.h, but we've opted to keep this small until file creep starts | ||
259 | # to happen | ||
255 | if [ -e include/linux/version.h ]; then | 260 | if [ -e include/linux/version.h ]; then |
256 | mkdir -p $kerneldir/include/linux | 261 | mkdir -p $kerneldir/include/linux |
257 | cp include/linux/version.h $kerneldir/include/linux/version.h | 262 | cp include/linux/version.h $kerneldir/include/linux/version.h |
@@ -273,10 +278,11 @@ kernel_do_install() { | |||
273 | cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/ | 278 | cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/ |
274 | fi | 279 | fi |
275 | } | 280 | } |
276 | do_install[prefuncs] += "package_get_auto_pr" | ||
277 | 281 | ||
278 | python sysroot_stage_all () { | 282 | # We have an empty sysroot_stage_all to keep the default routine from |
279 | oe.path.copyhardlinktree(d.expand("${D}${KERNEL_SRC_PATH}"), d.expand("${SYSROOT_DESTDIR}${KERNEL_SRC_PATH}")) | 283 | # package.bbclass from expanding the kernel source into the sysroot and |
284 | # colliding with linux-firmware files | ||
285 | sysroot_stage_all () { | ||
280 | } | 286 | } |
281 | 287 | ||
282 | KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig" | 288 | KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig" |
@@ -467,7 +473,7 @@ kernel_do_deploy() { | |||
467 | do_deploy[dirs] = "${DEPLOYDIR} ${B}" | 473 | do_deploy[dirs] = "${DEPLOYDIR} ${B}" |
468 | do_deploy[prefuncs] += "package_get_auto_pr" | 474 | do_deploy[prefuncs] += "package_get_auto_pr" |
469 | 475 | ||
470 | addtask deploy before do_build after do_install | 476 | addtask deploy after do_populate_sysroot |
471 | 477 | ||
472 | EXPORT_FUNCTIONS do_deploy | 478 | EXPORT_FUNCTIONS do_deploy |
473 | 479 | ||