All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel.bbclass: make dependency on lzop-native conditional
@ 2020-07-07  9:25 T. Ulrich
  2020-07-07 19:47 ` [OE-core] " Andre McCurdy
  0 siblings, 1 reply; 5+ messages in thread
From: T. Ulrich @ 2020-07-07  9:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: Timon Ulrich

From: Timon Ulrich <t.ulrich@anapur.de>

a native lzop is only needed when an lzo compressed initramfs is actually present

Signed-off-by: Timon Ulrich <t.ulrich@anapur.de>
---
 meta/classes/kernel.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index c834aad033..3230c12ccf 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -4,7 +4,8 @@ KERNEL_PACKAGE_NAME ??= "kernel"
 KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
 
 PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
-DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native bison-native"
+DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}"
 DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}"
 PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] kernel.bbclass: make dependency on lzop-native conditional
  2020-07-07  9:25 [PATCH] kernel.bbclass: make dependency on lzop-native conditional T. Ulrich
@ 2020-07-07 19:47 ` Andre McCurdy
  2020-07-07 20:12   ` T. Ulrich
  2020-07-07 21:10   ` Richard Purdie
  0 siblings, 2 replies; 5+ messages in thread
From: Andre McCurdy @ 2020-07-07 19:47 UTC (permalink / raw)
  To: T. Ulrich; +Cc: OE Core mailing list, Timon Ulrich

On Tue, Jul 7, 2020 at 2:25 AM T. Ulrich <timon.ulrich@kabelmail.de> wrote:
>
> From: Timon Ulrich <t.ulrich@anapur.de>
>
> a native lzop is only needed when an lzo compressed initramfs is actually present

Is the logic actually that native lzop is only needed if an lzo
compressed initramfs is present AND and a plain .cpio or .cpio.gz is
NOT present?

> Signed-off-by: Timon Ulrich <t.ulrich@anapur.de>
> ---
>  meta/classes/kernel.bbclass | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index c834aad033..3230c12ccf 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -4,7 +4,8 @@ KERNEL_PACKAGE_NAME ??= "kernel"
>  KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
>
>  PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
> -DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
> +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native bison-native"
> +DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}"
>  DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}"
>  PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
>
> --
> 2.17.1
>
>
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] kernel.bbclass: make dependency on lzop-native conditional
  2020-07-07 19:47 ` [OE-core] " Andre McCurdy
@ 2020-07-07 20:12   ` T. Ulrich
  2020-07-07 21:10   ` Richard Purdie
  1 sibling, 0 replies; 5+ messages in thread
From: T. Ulrich @ 2020-07-07 20:12 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: OE Core mailing list, Timon Ulrich

> Is the logic actually that native lzop is only needed if an lzo
> compressed initramfs is present AND and a plain .cpio or .cpio.gz is
> NOT present?
Yes, that is the case. If a plain cpio is present then there's no
need to uncompress, hence there's no need for lzop-native.

IMO this patch still improves the behavior:
before lzop-native would be built regardless,
now it gets if it _might_ be necessary.

Am 07.07.2020 um 21:47 schrieb Andre McCurdy:
> On Tue, Jul 7, 2020 at 2:25 AM T. Ulrich <timon.ulrich@kabelmail.de> wrote:
>> From: Timon Ulrich <t.ulrich@anapur.de>
>>
>> a native lzop is only needed when an lzo compressed initramfs is actually present
> Is the logic actually that native lzop is only needed if an lzo
> compressed initramfs is present AND and a plain .cpio or .cpio.gz is
> NOT present?
>
>> Signed-off-by: Timon Ulrich <t.ulrich@anapur.de>
>> ---
>>   meta/classes/kernel.bbclass | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
>> index c834aad033..3230c12ccf 100644
>> --- a/meta/classes/kernel.bbclass
>> +++ b/meta/classes/kernel.bbclass
>> @@ -4,7 +4,8 @@ KERNEL_PACKAGE_NAME ??= "kernel"
>>   KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
>>
>>   PROVIDES += "${@ "virtual/kernel" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else "" }"
>> -DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native lzop-native bison-native"
>> +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native bc-native bison-native"
>> +DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lzo", "lzop-native", "", d)}"
>>   DEPENDS += "${@bb.utils.contains("INITRAMFS_FSTYPES", "cpio.lz4", "lz4-native", "", d)}"
>>   PACKAGE_WRITE_DEPS += "depmodwrapper-cross"
>>
>> --
>> 2.17.1
>>
>>
>> 
> .




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] kernel.bbclass: make dependency on lzop-native conditional
  2020-07-07 19:47 ` [OE-core] " Andre McCurdy
  2020-07-07 20:12   ` T. Ulrich
@ 2020-07-07 21:10   ` Richard Purdie
  2020-07-07 21:57     ` Andre McCurdy
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2020-07-07 21:10 UTC (permalink / raw)
  To: Andre McCurdy, T. Ulrich; +Cc: OE Core mailing list, Timon Ulrich

On Tue, 2020-07-07 at 12:47 -0700, Andre McCurdy wrote:
> On Tue, Jul 7, 2020 at 2:25 AM T. Ulrich <timon.ulrich@kabelmail.de>
> wrote:
> > From: Timon Ulrich <t.ulrich@anapur.de>
> > 
> > a native lzop is only needed when an lzo compressed initramfs is
> > actually present
> 
> Is the logic actually that native lzop is only needed if an lzo
> compressed initramfs is present AND and a plain .cpio or .cpio.gz is
> NOT present?

This patch improves things but as you point out there appears to be
further room for improvement. Not sure how much more ugly implementing
that logic would be and whether its worth it...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH] kernel.bbclass: make dependency on lzop-native conditional
  2020-07-07 21:10   ` Richard Purdie
@ 2020-07-07 21:57     ` Andre McCurdy
  0 siblings, 0 replies; 5+ messages in thread
From: Andre McCurdy @ 2020-07-07 21:57 UTC (permalink / raw)
  To: Richard Purdie; +Cc: T. Ulrich, OE Core mailing list, Timon Ulrich

On Tue, Jul 7, 2020 at 2:10 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Tue, 2020-07-07 at 12:47 -0700, Andre McCurdy wrote:
> > On Tue, Jul 7, 2020 at 2:25 AM T. Ulrich <timon.ulrich@kabelmail.de>
> > wrote:
> > > From: Timon Ulrich <t.ulrich@anapur.de>
> > >
> > > a native lzop is only needed when an lzo compressed initramfs is
> > > actually present
> >
> > Is the logic actually that native lzop is only needed if an lzo
> > compressed initramfs is present AND and a plain .cpio or .cpio.gz is
> > NOT present?
>
> This patch improves things but as you point out there appears to be
> further room for improvement. Not sure how much more ugly implementing
> that logic would be and whether its worth it...

Then we should at least add a comment explaining the real dependency,
even if coding it is too ugly.

Alternatively we could simplify the code significantly and remove all
the -native dependencies by just stating that if you want to bundle an
initramfs then you need to include "cpio" or "cpio.gz" in
INITRAMFS_FSTYPES...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-07 21:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07  9:25 [PATCH] kernel.bbclass: make dependency on lzop-native conditional T. Ulrich
2020-07-07 19:47 ` [OE-core] " Andre McCurdy
2020-07-07 20:12   ` T. Ulrich
2020-07-07 21:10   ` Richard Purdie
2020-07-07 21:57     ` Andre McCurdy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.