summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel.bbclass')
-rw-r--r--meta/classes/kernel.bbclass30
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}
234do_install[prefuncs] += "package_get_auto_pr"
233 235
234 # 236addtask 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. 238do_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}
276do_install[prefuncs] += "package_get_auto_pr"
277 281
278python 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
285sysroot_stage_all () {
280} 286}
281 287
282KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} oldnoconfig || yes '' | oe_runmake -C ${S} O=${B} oldconfig" 288KERNEL_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() {
467do_deploy[dirs] = "${DEPLOYDIR} ${B}" 473do_deploy[dirs] = "${DEPLOYDIR} ${B}"
468do_deploy[prefuncs] += "package_get_auto_pr" 474do_deploy[prefuncs] += "package_get_auto_pr"
469 475
470addtask deploy before do_build after do_install 476addtask deploy after do_populate_sysroot
471 477
472EXPORT_FUNCTIONS do_deploy 478EXPORT_FUNCTIONS do_deploy
473 479