Bug 13361

Summary: Building Out-of-Tree Modules on the BBB Target using optional YOCTO package kernel-headers
Product: [Yocto Project Subprojects] Kernel Reporter: Zoran Stojsavljevic <zoran.stojsavljevic>
Component: kernel-configurationAssignee: Bruce Ashfield <bruce.ashfield>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Undecided CC: yp.kernel.watcher, yp.watcher, zoran.stojsavljevic
Version: 2.8   
Target Milestone: 2.8   
Hardware: BeagleBone   
OS: arm   
URL: https://github.com/ZoranStojsavljevic/bbb-yocto/tree/master/Issues
Whiteboard:
OS type for building Yocto: --- Type of Regression: New (Never tested)
Verified: Documentation change: Yes (doc changes required)

Description Zoran Stojsavljevic 2019-05-26 03:41:37 UTC
The problem summation:

---------- Forwarded message ---------
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, May 24, 2019 at 3:00 AM
Subject: Re: [yocto] Building Out-of-Tree Modules on the BBB Target
To: Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com>, Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Yocto Project <yocto@yoctoproject.org>

I think this is a fair suggestion. Having prebuilt kernel available that contains the configuration and header files used in the build is all that is required for external modules to build in addition to toolchain, so maybe its worth a try to create such a package and then have kernel-source separated out which can be installed on top if one needs.
_______

The rationale to add kernel-headers package is the image footprint. Still, as empirically measured by me, kernel-headers package will add ~ 7x to 9x reduction in size to image comparing to kernel-devsrc package. Having BBB's DDR2 of size 512MB, and initramfs for testing purposes, in speaks for itself.

Me (Zoran) opened this one just to track progress of this work by Bruce Ashfield.

Thank you,
Zoran Stojsavljevic
Comment 1 Zoran Stojsavljevic 2019-05-27 13:59:09 UTC
Forgot to propose a name. I propose a name for the new package to be: kernel-devhdrs , which is in-line with name: kernel-devsrc .

Thank you,
Zoran
Comment 2 Bruce Ashfield 2019-05-27 18:29:08 UTC
There's no massive size reduction to be had in a different package aside from the existing kernel-devsrc. It currently measures in around 100M.

Just a copy of all .h files in the kernel tree, is over 200M. If you prune out drivers, and some other non-essential headers, you can get down to about !00M again, but that is not something you can build against. You need the same elements that are already in kernel-devsrc.

The details of the work is in: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13360

If you are seeing different measurements for source/header sizes, please do add the details in the bug so we can sort out the different interpretations before I sent things to the list.
Comment 3 Zoran Stojsavljevic 2019-05-28 04:15:27 UTC
https://bugzilla.yoctoproject.org/show_bug.cgi?id=13360#c3

Zoran
Comment 4 Zoran Stojsavljevic 2019-05-28 16:40:22 UTC
Closing 13361 since it is duplicate of https://bugzilla.yoctoproject.org/show_bug.cgi?id=13360

Zoran

*** This bug has been marked as a duplicate of bug 13360 ***