kernel.bbclass: Allow modules.tar.gz generation to be inhibited

Submitted by Phil Blundell on Sept. 23, 2012, 9:45 p.m.

Details

Message ID 1348436710.4444.247.camel@x121e.pbcl.net
State New
Headers show

Commit Message

Phil Blundell Sept. 23, 2012, 9:45 p.m.
The modules.tar.gz archive is sometimes of no value and it can take
a noticeable time to build if many modules were enabled in the kernel
configuration.  The extraneous file also contributes to deploy/ clutter
and is a waste of disk space.

Allow it to be suppressed by setting KERNEL_DEPLOY_MODULE_TARBALL=0.

Signed-off-by: Phil Blundell <pb@pbcl.net>
---
 meta/classes/kernel.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index fdef1be..2896d28 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -520,9 +520,11 @@  do_uboot_mkimage() {
 
 addtask uboot_mkimage before do_install after do_compile
 
+KERNEL_DEPLOY_MODULE_TARBALL ?= "1"
+
 kernel_do_deploy() {
 	install -m 0644 ${KERNEL_OUTPUT} ${DEPLOYDIR}/${KERNEL_IMAGE_BASE_NAME}.bin
-	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
+	if [ ${KERNEL_DEPLOY_MODULE_TARBALL} = "1" ] && (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
 		tar -cvzf ${DEPLOYDIR}/modules-${KERNEL_VERSION}-${PR}-${MACHINE}.tgz -C ${D} lib
 	fi
 

Comments

Paul Eggleton Sept. 23, 2012, 10:20 p.m.
On Sunday 23 September 2012 22:45:10 Phil Blundell wrote:
> The modules.tar.gz archive is sometimes of no value and it can take
> a noticeable time to build if many modules were enabled in the kernel
> configuration.  The extraneous file also contributes to deploy/ clutter
> and is a waste of disk space.
> 
> Allow it to be suppressed by setting KERNEL_DEPLOY_MODULE_TARBALL=0.

I'm wondering, does anyone still find this file useful?

Cheers,
Paul
Philip Balister Sept. 23, 2012, 11:22 p.m.
On 09/23/2012 06:20 PM, Paul Eggleton wrote:
> On Sunday 23 September 2012 22:45:10 Phil Blundell wrote:
>> The modules.tar.gz archive is sometimes of no value and it can take
>> a noticeable time to build if many modules were enabled in the kernel
>> configuration.  The extraneous file also contributes to deploy/ clutter
>> and is a waste of disk space.
>>
>> Allow it to be suppressed by setting KERNEL_DEPLOY_MODULE_TARBALL=0.
>
> I'm wondering, does anyone still find this file useful?

I've used it to put modules in rootfs when there is a new kernel version 
and I do not have easy access to packages feeds. This speeds testing.

Philip
Ross Burton Sept. 24, 2012, 8:36 a.m.
On 24 September 2012 00:22, Philip Balister <philip@balister.org> wrote:
>>> Allow it to be suppressed by setting KERNEL_DEPLOY_MODULE_TARBALL=0.
>>
>> I'm wondering, does anyone still find this file useful?
>
> I've used it to put modules in rootfs when there is a new kernel version and
> I do not have easy access to packages feeds. This speeds testing.

Sounds like a less than common use-case.  How about setting it to 0 by default?

Ross
Richard Purdie Sept. 24, 2012, 9:56 a.m.
On Mon, 2012-09-24 at 09:36 +0100, Burton, Ross wrote:
> On 24 September 2012 00:22, Philip Balister <philip@balister.org> wrote:
> >>> Allow it to be suppressed by setting KERNEL_DEPLOY_MODULE_TARBALL=0.
> >>
> >> I'm wondering, does anyone still find this file useful?
> >
> > I've used it to put modules in rootfs when there is a new kernel version and
> > I do not have easy access to packages feeds. This speeds testing.
> 
> Sounds like a less than common use-case.  How about setting it to 0 by default?

I know I used to use this file a lot when working on Zaurus kernels.
These days I don't get to play with hardware as much as I'd like so I've
not used it in a while.

It is extremely useful when you need it. I've always argued there are
much more problematic time sinks in the build than this tarball
creation...

Cheers,

Richard
Philip Balister Sept. 24, 2012, 12:05 p.m.
On 09/24/2012 04:36 AM, Burton, Ross wrote:
> On 24 September 2012 00:22, Philip Balister <philip@balister.org> wrote:
>>>> Allow it to be suppressed by setting KERNEL_DEPLOY_MODULE_TARBALL=0.
>>>
>>> I'm wondering, does anyone still find this file useful?
>>
>> I've used it to put modules in rootfs when there is a new kernel version and
>> I do not have easy access to packages feeds. This speeds testing.
>
> Sounds like a less than common use-case.  How about setting it to 0 by default?

Fine with me.Expect me to be annoying on irc when I forget how to turn 
it back on :)

Philip