* [PATCH] Refuse to run bitbake on a kernel that is too old.
@ 2014-10-20 18:30 jeffrey.honig
2014-10-20 19:08 ` Burton, Ross
2014-10-21 10:03 ` Enrico Scholz
0 siblings, 2 replies; 5+ messages in thread
From: jeffrey.honig @ 2014-10-20 18:30 UTC (permalink / raw)
To: openembedded-core
From: Jeffrey Honig <jeffrey.honig@windriver.com>
Fixes [YOCTO #6856]
Bitbake.conf now specifies OLDEST_KERNEL to insure that the SDK is not run
on a kernel that is not supported by a component of the SDK (i.e. glibc). If this
is attempted an error will not be generated until deep into the SDK build.
This changes adds a specific test causing a failure whenever bitbake is run.
Signed-off-by: Jeffrey Honig <jeffrey.honig@windriver.com>
---
meta/classes/sanity.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 5be5efb..3725a0b 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -675,6 +675,10 @@ def check_sanity_everybuild(status, d):
if (LooseVersion(bb.__version__) < LooseVersion(minversion)):
status.addresult('Bitbake version %s is required and version %s was found\n' % (minversion, bb.__version__))
+ # Check that our kernel will work for crosssdk
+ if os.uname()[0] == "Linux" and LooseVersion(os.uname()[2]) < LooseVersion(d.getVar('OLDEST_KERNEL')):
+ status.addresult("The system requires a kernel of at least %s to run\n" % d.getVar('OLDEST_KERNEL'))
+
sanity_check_conffiles(status, d)
paths = d.getVar('PATH', True).split(":")
--
2.1.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Refuse to run bitbake on a kernel that is too old.
2014-10-20 18:30 [PATCH] Refuse to run bitbake on a kernel that is too old jeffrey.honig
@ 2014-10-20 19:08 ` Burton, Ross
2014-10-20 23:30 ` Mark Hatle
2014-10-21 10:03 ` Enrico Scholz
1 sibling, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2014-10-20 19:08 UTC (permalink / raw)
To: jeffrey.honig; +Cc: OE-core
On 20 October 2014 19:30, <jeffrey.honig@windriver.com> wrote:
> + # Check that our kernel will work for crosssdk
> + if os.uname()[0] == "Linux" and LooseVersion(os.uname()[2]) < LooseVersion(d.getVar('OLDEST_KERNEL')):
> + status.addresult("The system requires a kernel of at least %s to run\n" % d.getVar('OLDEST_KERNEL'))
> +
The OLDEST_KERNEL documentation says:
Declares the oldest version of the Linux kernel that the
produced binaries must support.
This variable is passed into the build of the Embedded
GNU C Library (<filename>eglibc</filename>).
So surely checking this value at *runtime in bitbake* isn't correct.
Ross
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Refuse to run bitbake on a kernel that is too old.
2014-10-20 19:08 ` Burton, Ross
@ 2014-10-20 23:30 ` Mark Hatle
0 siblings, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2014-10-20 23:30 UTC (permalink / raw)
To: openembedded-core
On 10/21/14, 3:08 AM, Burton, Ross wrote:
> On 20 October 2014 19:30, <jeffrey.honig@windriver.com> wrote:
>> + # Check that our kernel will work for crosssdk
>> + if os.uname()[0] == "Linux" and LooseVersion(os.uname()[2]) < LooseVersion(d.getVar('OLDEST_KERNEL')):
>> + status.addresult("The system requires a kernel of at least %s to run\n" % d.getVar('OLDEST_KERNEL'))
>> +
>
> The OLDEST_KERNEL documentation says:
>
> Declares the oldest version of the Linux kernel that the
> produced binaries must support.
> This variable is passed into the build of the Embedded
> GNU C Library (<filename>eglibc</filename>).
>
> So surely checking this value at *runtime in bitbake* isn't correct.
The generated SDK has the same limitation as the runtime since we moved to
building the SDK for things like the buildtools-tarball.
While it -might- work on older kernels, I think we do need to limit the version
we support to match the SDK and related, otherwise we will have issues. (Do we
also need to add this to the SDK .sh installer script? probably.)
--Mark
> Ross
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Refuse to run bitbake on a kernel that is too old.
2014-10-20 18:30 [PATCH] Refuse to run bitbake on a kernel that is too old jeffrey.honig
2014-10-20 19:08 ` Burton, Ross
@ 2014-10-21 10:03 ` Enrico Scholz
2014-10-22 10:49 ` Mark Hatle
1 sibling, 1 reply; 5+ messages in thread
From: Enrico Scholz @ 2014-10-21 10:03 UTC (permalink / raw)
To: openembedded-core
<jeffrey.honig-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> writes:
> Bitbake.conf now specifies OLDEST_KERNEL to insure that the SDK is
> not run on a kernel that is not supported by a component of the SDK
> (i.e. glibc).
OLDEST_KERNEL is used in glibc recipe only; it would be much better
to build SDK's glibc with an --enable-kernel matching the target
distribution. E.g. by setting a special 'OLDEST_KERNEL_nativesdk'
variable.
> + # Check that our kernel will work for crosssdk
This check should be made overridable for environments which do not
build SDKs.
> + if os.uname()[0] == "Linux" and LooseVersion(os.uname()[2]) < LooseVersion(d.getVar('OLDEST_KERNEL')):
This check does not work when you build e.g. in an LXC container. You
could define something like
| SDK_UNAME ??= "${@' '.join(os.uname())}"
and do the checks on this.
Enrico
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] Refuse to run bitbake on a kernel that is too old.
2014-10-21 10:03 ` Enrico Scholz
@ 2014-10-22 10:49 ` Mark Hatle
0 siblings, 0 replies; 5+ messages in thread
From: Mark Hatle @ 2014-10-22 10:49 UTC (permalink / raw)
To: openembedded-core
On 10/21/14, 6:03 PM, Enrico Scholz wrote:
> <jeffrey.honig-CWA4WttNNZF54TAoqtyWWQ@public.gmane.org> writes:
>
>> Bitbake.conf now specifies OLDEST_KERNEL to insure that the SDK is
>> not run on a kernel that is not supported by a component of the SDK
>> (i.e. glibc).
>
> OLDEST_KERNEL is used in glibc recipe only; it would be much better
> to build SDK's glibc with an --enable-kernel matching the target
> distribution. E.g. by setting a special 'OLDEST_KERNEL_nativesdk'
> variable.
glibc included with master has a minimum kernel version due to various ABIs that
it uses. My understanding is that the OLDEST_KERNEL does indeed match for the
nativesdk.
>> + # Check that our kernel will work for crosssdk
>
> This check should be made overridable for environments which do not
> build SDKs.
Using the buildtools-tarball will result in these issues.. (that is a lot more
common, at least for us due to the wide variety of distributions that don't have
minimum tool versions...)
>> + if os.uname()[0] == "Linux" and LooseVersion(os.uname()[2]) < LooseVersion(d.getVar('OLDEST_KERNEL')):
>
> This check does not work when you build e.g. in an LXC container. You
> could define something like
>
> | SDK_UNAME ??= "${@' '.join(os.uname())}"
>
> and do the checks on this.
>
>
> Enrico
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-22 10:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20 18:30 [PATCH] Refuse to run bitbake on a kernel that is too old jeffrey.honig
2014-10-20 19:08 ` Burton, Ross
2014-10-20 23:30 ` Mark Hatle
2014-10-21 10:03 ` Enrico Scholz
2014-10-22 10:49 ` Mark Hatle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox