* [PATCH] kernel: set COMPATIBLE_HOST to *-linux
@ 2020-12-11 16:09 Ross Burton
2020-12-11 16:53 ` [OE-core] " Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Ross Burton @ 2020-12-11 16:09 UTC (permalink / raw)
To: openembedded-core
The target system triple contains whether the target is Linux or not,
so use it to avoid situations where you can attempt to build a kernel
for systems which don't support Linux.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/classes/kernel.bbclass | 2 ++
meta/recipes-kernel/linux/linux-dummy.bb | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 1a444efabf..2f1006ddf0 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,5 +1,7 @@
inherit linux-kernel-base kernel-module-split
+COMPATIBLE_HOST = ".*-linux"
+
KERNEL_PACKAGE_NAME ??= "kernel"
KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
index 649fc04dd1..95dc85ff2f 100644
--- a/meta/recipes-kernel/linux/linux-dummy.bb
+++ b/meta/recipes-kernel/linux/linux-dummy.bb
@@ -26,7 +26,7 @@ DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package"
INHIBIT_DEFAULT_DEPS = "1"
-#COMPATIBLE_MACHINE = "your_machine"
+COMPATIBLE_HOST = ".*-linux"
PR = "r1"
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] kernel: set COMPATIBLE_HOST to *-linux
2020-12-11 16:09 [PATCH] kernel: set COMPATIBLE_HOST to *-linux Ross Burton
@ 2020-12-11 16:53 ` Khem Raj
2020-12-13 22:20 ` Ross Burton
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2020-12-11 16:53 UTC (permalink / raw)
To: openembedded-core
On 12/11/20 8:09 AM, Ross Burton wrote:
> The target system triple contains whether the target is Linux or not,
> so use it to avoid situations where you can attempt to build a kernel
> for systems which don't support Linux.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> meta/classes/kernel.bbclass | 2 ++
> meta/recipes-kernel/linux/linux-dummy.bb | 2 +-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 1a444efabf..2f1006ddf0 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -1,5 +1,7 @@
> inherit linux-kernel-base kernel-module-split
>
> +COMPATIBLE_HOST = ".*-linux"
does this cover linux-gnueabi and such tuples too ?
> +
> KERNEL_PACKAGE_NAME ??= "kernel"
> KERNEL_DEPLOYSUBDIR ??= "${@ "" if (d.getVar("KERNEL_PACKAGE_NAME") == "kernel") else d.getVar("KERNEL_PACKAGE_NAME") }"
>
> diff --git a/meta/recipes-kernel/linux/linux-dummy.bb b/meta/recipes-kernel/linux/linux-dummy.bb
> index 649fc04dd1..95dc85ff2f 100644
> --- a/meta/recipes-kernel/linux/linux-dummy.bb
> +++ b/meta/recipes-kernel/linux/linux-dummy.bb
> @@ -26,7 +26,7 @@ DESCRIPTION_kernel-vmlinux = "Kernel vmlinux meta package"
>
> INHIBIT_DEFAULT_DEPS = "1"
>
> -#COMPATIBLE_MACHINE = "your_machine"
> +COMPATIBLE_HOST = ".*-linux"
>
> PR = "r1"
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] kernel: set COMPATIBLE_HOST to *-linux
2020-12-11 16:53 ` [OE-core] " Khem Raj
@ 2020-12-13 22:20 ` Ross Burton
2020-12-13 23:09 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Ross Burton @ 2020-12-13 22:20 UTC (permalink / raw)
To: Khem Raj; +Cc: OE-core
On Fri, 11 Dec 2020 at 16:53, Khem Raj <raj.khem@gmail.com> wrote:
> > +COMPATIBLE_HOST = ".*-linux"
>
> does this cover linux-gnueabi and such tuples too ?
Maybe? Depends on the matching in anchored. If it does by accident
then explicitly matching would be better. What machine has a triple
like that for testing?
Ross
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] kernel: set COMPATIBLE_HOST to *-linux
2020-12-13 22:20 ` Ross Burton
@ 2020-12-13 23:09 ` Richard Purdie
2020-12-16 10:39 ` Ross Burton
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2020-12-13 23:09 UTC (permalink / raw)
To: Ross Burton, Khem Raj; +Cc: OE-core
On Sun, 2020-12-13 at 22:20 +0000, Ross Burton wrote:
> On Fri, 11 Dec 2020 at 16:53, Khem Raj <raj.khem@gmail.com> wrote:
>
> > > +COMPATIBLE_HOST = ".*-linux"
> >
> > does this cover linux-gnueabi and such tuples too ?
>
> Maybe? Depends on the matching in anchored. If it does by accident
> then explicitly matching would be better. What machine has a triple
> like that for testing?
Most arm machines I think? :)
It is unanchored, something which I have to wonder about. I also don't
like the overhead adding COMPATIBLE_* adds but I guess we just have to
live with that :(.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] kernel: set COMPATIBLE_HOST to *-linux
2020-12-13 23:09 ` Richard Purdie
@ 2020-12-16 10:39 ` Ross Burton
0 siblings, 0 replies; 5+ messages in thread
From: Ross Burton @ 2020-12-16 10:39 UTC (permalink / raw)
To: Richard Purdie; +Cc: Khem Raj, OE-core
On Sun, 13 Dec 2020 at 23:09, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> > Maybe? Depends on the matching in anchored. If it does by accident
> > then explicitly matching would be better. What machine has a triple
> > like that for testing?
>
> Most arm machines I think? :)
Only old ones, which are dead to me. ;)
> It is unanchored, something which I have to wonder about. I also don't
> like the overhead adding COMPATIBLE_* adds but I guess we just have to
> live with that :(.
So prior art in meta:
meta/recipes-core/systemd/systemd-boot_246.6.bb:COMPATIBLE_HOST =
"(x86_64.*|i.86.*)-linux"
meta/recipes-devtools/dmidecode/dmidecode_3.3.bb:COMPATIBLE_HOST =
"(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
meta/recipes-devtools/gcc/gcc-sanitizers.inc:COMPATIBLE_HOST =
'(x86_64|i.86|powerpc|sparc|s390|arm|aarch64).*-linux'
meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb:COMPATIBLE_HOST =
'(x86_64|i.86).*-(linux|freebsd.*)'
meta/recipes-devtools/valgrind/valgrind_3.16.1.bb:COMPATIBLE_HOST =
'(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
35 users in total and none are anchored, they all implicitly let the
expression match -linux-gnueabi.
Ross
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-16 10:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-11 16:09 [PATCH] kernel: set COMPATIBLE_HOST to *-linux Ross Burton
2020-12-11 16:53 ` [OE-core] " Khem Raj
2020-12-13 22:20 ` Ross Burton
2020-12-13 23:09 ` Richard Purdie
2020-12-16 10:39 ` Ross Burton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox