Patchwork [6/6] linux-yocto-tiny: add dependency on xz-native

login
register
mail settings
Submitter Paul Eggleton
Date March 14, 2012, 12:36 a.m.
Message ID <9583d660052617740b61feeb6739263f06e5a64f.1331685330.git.paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/23221/
State Accepted
Commit e1f656492475fb65d1203afe0afeeec7e279a317
Headers show

Comments

Paul Eggleton - March 14, 2012, 12:36 a.m.
The kernel configuration requires lzma to compress the kernel image
(CONFIG_KERNEL_LZMA=y), so add a dependency on xz-native which provides
it.

Fixes [YOCTO #1728].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/recipes-kernel/linux/linux-yocto-tiny_3.0.bb |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
Koen Kooi - March 14, 2012, 8:21 a.m.
Op 14 mrt. 2012, om 01:36 heeft Paul Eggleton het volgende geschreven:

> The kernel configuration requires lzma to compress the kernel image
> (CONFIG_KERNEL_LZMA=y), so add a dependency on xz-native which provides
> it.

Have a look at https://github.com/Angstrom-distribution/meta-ti/commit/b72cb13fcf83b9d342808ea30379bfb6a1321b54 :)

regards,

Koen
Paul Eggleton - March 14, 2012, 8:32 a.m.
On Wednesday 14 March 2012 09:21:06 Koen Kooi wrote:
> Op 14 mrt. 2012, om 01:36 heeft Paul Eggleton het volgende geschreven:
> > The kernel configuration requires lzma to compress the kernel image
> > (CONFIG_KERNEL_LZMA=y), so add a dependency on xz-native which provides
> > it.
> 
> Have a look at
> https://github.com/Angstrom-distribution/meta-ti/commit/b72cb13fcf83b9d3428
> 08ea30379bfb6a1321b54 :)

Right, I thought about that already - but we do not (by default) use defconfigs 
with linux-yocto*, so you'd have to go through all config fragments with this 
check. I figured it probably wasn't worth the effort in this case.

Cheers,
Paul
Bruce Ashfield - March 14, 2012, 12:29 p.m.
On Wed, Mar 14, 2012 at 4:32 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> On Wednesday 14 March 2012 09:21:06 Koen Kooi wrote:
>> Op 14 mrt. 2012, om 01:36 heeft Paul Eggleton het volgende geschreven:
>> > The kernel configuration requires lzma to compress the kernel image
>> > (CONFIG_KERNEL_LZMA=y), so add a dependency on xz-native which provides
>> > it.
>>
>> Have a look at
>> https://github.com/Angstrom-distribution/meta-ti/commit/b72cb13fcf83b9d3428
>> 08ea30379bfb6a1321b54 :)
>
> Right, I thought about that already - but we do not (by default) use defconfigs
> with linux-yocto*, so you'd have to go through all config fragments with this
> check. I figured it probably wasn't worth the effort in this case.

In this case, you wouldn't go through the fragments, you'd just add one that
turns it on when you want it. Don't audit a defconfig, push the few options that
you want onto the build.

Cheers,

Bruce

>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Paul Eggleton - March 14, 2012, 12:39 p.m.
Hi Bruce,

On Wednesday 14 March 2012 08:29:20 Bruce Ashfield wrote:
> In this case, you wouldn't go through the fragments, you'd just add one that
> turns it on when you want it. Don't audit a defconfig, push the few options
> that you want onto the build.

I'm not sure what you mean here, in the context of generically figuring out 
whether lzma is needed...?

Cheers,
Paul
Bruce Ashfield - March 14, 2012, 12:59 p.m.
On Wed, Mar 14, 2012 at 8:39 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> Hi Bruce,
>
> On Wednesday 14 March 2012 08:29:20 Bruce Ashfield wrote:
>> In this case, you wouldn't go through the fragments, you'd just add one that
>> turns it on when you want it. Don't audit a defconfig, push the few options
>> that you want onto the build.
>
> I'm not sure what you mean here, in the context of generically figuring out
> whether lzma is needed...?

Maybe I misread/misunderstood the question at hand then :) Let me just
rephrase it this way, we have the recipe and the control in this case, so
adding the dependency and making sure that the kernel option to use
it via a config fragment is valid .. which is what you did, minus the fragment,
and we don't really need the fragment, since we know it is on.

You could audit the constructed .config as well, since that's the final word
on whether it actually makes it into the kernel build, but also not really
required here.

So consider this random noise, before I drank my coffee this morning :)

Cheers,

Bruce

>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
Paul Eggleton - March 14, 2012, 1:03 p.m.
On Wednesday 14 March 2012 08:59:34 Bruce Ashfield wrote:
> You could audit the constructed .config as well, since that's the final word
> on whether it actually makes it into the kernel build, but also not really
> required here.

This is what I wanted to do, but I'm assuming the config construction happens 
far too late to add the dependency.

Cheers,
Paul
Bruce Ashfield - March 14, 2012, 1:12 p.m.
On Wed, Mar 14, 2012 at 9:03 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> On Wednesday 14 March 2012 08:59:34 Bruce Ashfield wrote:
>> You could audit the constructed .config as well, since that's the final word
>> on whether it actually makes it into the kernel build, but also not really
>> required here.
>
> This is what I wanted to do, but I'm assuming the config construction happens
> far too late to add the dependency.

Hmm. probably, I admit to not looking too deeply while trying to get enough
coffee into my system to properly think :)

Cheers,

Bruce

>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
Darren Hart - March 14, 2012, 2:55 p.m.
On 03/14/2012 06:12 AM, Bruce Ashfield wrote:
> On Wed, Mar 14, 2012 at 9:03 AM, Paul Eggleton
> <paul.eggleton@linux.intel.com> wrote:
>> On Wednesday 14 March 2012 08:59:34 Bruce Ashfield wrote:
>>> You could audit the constructed .config as well, since that's the final word
>>> on whether it actually makes it into the kernel build, but also not really
>>> required here.
>>
>> This is what I wanted to do, but I'm assuming the config construction happens
>> far too late to add the dependency.
> 
> Hmm. probably, I admit to not looking too deeply while trying to get enough
> coffee into my system to properly think :)

Paul is correct here. He would have to wait until kernel_configme
completes before he could be sure that LZMA was needed. Adding to
specific recipes is the best approach in this case.

Patch

diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_3.0.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_3.0.bb
index 5cad513..a3a6167 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_3.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_3.0.bb
@@ -1,6 +1,9 @@ 
 inherit kernel
 require recipes-kernel/linux/linux-yocto.inc
 
+# We need lzma (as CONFIG_KERNEL_LZMA=y)
+DEPENDS += "xz-native"
+
 #KMACHINE = "yocto/standard/tiny/base"
 KMACHINE = "yocto/standard/base"
 KBRANCH = "${KMACHINE}"
@@ -10,7 +13,7 @@  LINUX_VERSION ?= "3.0.23"
 SRCREV_machine ?= "8fd24b3570ab995848e4123ef13bac64e2c924be"
 SRCREV_meta ?= "e559129b4a6f39f68b75141096b2d516cf7a7f35"
 
-PR = "r2"
+PR = "r3"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.0;protocol=git;bareclone=1;branch=${KBRANCH},meta;name=machine,meta \