diff options
author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-08-18 22:50:44 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-19 16:35:22 +0100 |
commit | 9af0f1a46bbb6ad9ee8b35957251f4aa826b023f (patch) | |
tree | c90fd86b7128672ebc58966bf867af3bef3d00d8 /meta/recipes-core | |
parent | 47a73c522817ba352ac4ddae660be8dc47486460 (diff) | |
download | poky-9af0f1a46bbb6ad9ee8b35957251f4aa826b023f.tar.gz |
kernel-devsrc: restructure for out of tree (and on target) module builds
The existing kernel-devsrc package starts with a full copy of the kernel
source and then starts to strip out elements that are not required.
This results in extra time (I/O) and extra space being taken up in the
final package. The main purpose of the kernel-devsrc package has been to
build modules against the running kernel, not to include a full copy of
the source code for re-building the kernel. The end result was a
600M kernel-devsrc package.
This restructuring of the package uses an approach similar to other
distros, where the kernel-devsrc package is for building against the
running kernel and uses a curated set of copied infrastructure, versus
a mass copy of the entire kernel.
The differences in this approach versus other is largely due to the
architecture support and the split build/source directory of the
kernel.
The result is a kernel-devsrc package of about 10M, which is capable
of running "make scripts" and compiling kernel modules against the
running kernel.
Along with the changes to the copying of the infrascture, we also
have the following changes:
- a better/more explicit listing of dependencies for on-target
builds of "make scripts" or "make modules_prepare"
- The kernel source is installed into /lib/modules/<version>/build
and a symlink created from /usr/src/kernel to the new location.
This aligns with the standard location for module support
code
- There is also a symlink from /lib/modules/<version>/source -> build
to reserve a spot for a new package that is simply the kernel
source. That package is not part of this update.
(From OE-Core rev: 007ef1f468110b2698a27ea9a6d43fed5a0a9fc2)
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/images/build-appliance-image_15.0.0.bb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-core/images/build-appliance-image_15.0.0.bb b/meta/recipes-core/images/build-appliance-image_15.0.0.bb index db2f58dfb9..7b210f0969 100644 --- a/meta/recipes-core/images/build-appliance-image_15.0.0.bb +++ b/meta/recipes-core/images/build-appliance-image_15.0.0.bb | |||
@@ -59,8 +59,10 @@ fakeroot do_populate_poky_src () { | |||
59 | cp ${WORKDIR}/README_VirtualBox_Toaster.txt ${IMAGE_ROOTFS}/home/builder/ | 59 | cp ${WORKDIR}/README_VirtualBox_Toaster.txt ${IMAGE_ROOTFS}/home/builder/ |
60 | 60 | ||
61 | # Create a symlink, needed for out-of-tree kernel modules build | 61 | # Create a symlink, needed for out-of-tree kernel modules build |
62 | rm -f ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build | 62 | if [ ! -e ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build ]; then |
63 | lnr ${IMAGE_ROOTFS}${KERNEL_SRC_PATH} ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build | 63 | rm -f ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build |
64 | lnr ${IMAGE_ROOTFS}${KERNEL_SRC_PATH} ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build | ||
65 | fi | ||
64 | 66 | ||
65 | echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf | 67 | echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf |
66 | echo "export LC_ALL=en_US.utf8" >> ${IMAGE_ROOTFS}/home/builder/.bashrc | 68 | echo "export LC_ALL=en_US.utf8" >> ${IMAGE_ROOTFS}/home/builder/.bashrc |