<div dir="ltr"><br><div class="gmail_extra">On Wed, Mar 20, 2013 at 4:30 PM, Bruce Ashfield <span dir="ltr">&lt;<a href="mailto:bruce.ashfield@gmail.com" target="_blank">bruce.ashfield@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Mar 20, 2013 at 10:55 AM, Anders Roxell &lt;<a href="mailto:anders.roxell@gmail.com">anders.roxell@gmail.com</a>&gt; wrote:<br>

&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Wed, Mar 20, 2013 at 2:42 PM, Bruce Ashfield &lt;<a href="mailto:bruce.ashfield@gmail.com">bruce.ashfield@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Wed, Mar 20, 2013 at 9:22 AM,  &lt;<a href="mailto:anders.roxell@gmail.com">anders.roxell@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; From: Anders Roxell &lt;<a href="mailto:anders.roxell@enea.com">anders.roxell@enea.com</a>&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; In mainline kernel 3.7-rc1 (hash:abbf1590de22a6d22)<br>
&gt;&gt; &gt; The path include/linux/version.h was updated to<br>
&gt;&gt; &gt; include/generated/uapi/linux/version.h<br>
&gt;&gt;<br>
&gt;&gt; It&#39;s true that uapi now holds the generated version.h, but what build<br>
&gt;&gt; error were you seeing without this change in place ?<br>
&gt;<br>
&gt;<br>
&gt; We were trying to build linx<br>
&gt; (<a href="http://linx.sourceforge.net/linxdoc/doc/index.html" target="_blank">http://linx.sourceforge.net/linxdoc/doc/index.html</a>)<br>
&gt; Please let me know if it is better to rewrite linx or include this patch?<br>
<br>
</div>My concern is that as a list of alternatives builds up over time, that don&#39;t<br>
necessarily use the same format of the linux version, you&#39;ll end up with<br>
applications that are making the wrong decisions if a fallback is used. Having<br>
a clear public / exported file, and throwing errors if it doesn&#39;t exist would<br>
ensure consistent behaviour (granted annoying if you get the error when you<br>
think you shouldn&#39;t).<br>
<br>
If you look at the code in get_kernelversion() it shouldn&#39;t even work if<br>
version.h is used versus utsrelease.h.  I&#39;d be inclined to suggest the<br>
removal of the existing version.h fallback, versus adding another.<br>
<br>
You might not even need to modify the application code to fix this. What<br>
are the dependencies of your recipe that would allow for utsrelease.h<br>
to not be generated when the build calls get_kernelversion ?<br>
<br></blockquote><div style><br></div><div style>Sorry for the late response!</div><div style>I agree with you that its better to use utsrelease.h rather than depending on version.h.</div><div style><br></div><div style>
We have added a patch for the linx source to solve this.</div><div style><br></div><div style>Thank you very much for the help and support!</div><div style><br></div><div style>With kind regards,</div><div style>Anders</div>
<div style> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers,<br>
<br>
Bruce<br>
<div class="HOEnZb"><div class="h5"><br>
&gt;<br>
&gt; Regards,<br>
&gt; Anders<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; utsrelease.h is<br>
&gt;&gt; still created where it has been for some time, and should be what is<br>
&gt;&gt; typically used for any version checks.<br>
&gt;&gt;<br>
&gt;&gt; Cheers,<br>
&gt;&gt;<br>
&gt;&gt; Bruce<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Signed-off-by: Anders Roxell &lt;<a href="mailto:anders.roxell@enea.com">anders.roxell@enea.com</a>&gt;<br>
&gt;&gt; &gt; ---<br>
&gt;&gt; &gt;  meta/classes/linux-kernel-base.bbclass |    3 +++<br>
&gt;&gt; &gt;  1 files changed, 3 insertions(+), 0 deletions(-)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; diff --git a/meta/classes/linux-kernel-base.bbclass<br>
&gt;&gt; &gt; b/meta/classes/linux-kernel-base.bbclass<br>
&gt;&gt; &gt; index 4f2b0a4..b7d0ffa 100644<br>
&gt;&gt; &gt; --- a/meta/classes/linux-kernel-base.bbclass<br>
&gt;&gt; &gt; +++ b/meta/classes/linux-kernel-base.bbclass<br>
&gt;&gt; &gt; @@ -8,6 +8,9 @@ def get_kernelversion(p):<br>
&gt;&gt; &gt;          fn = p + &#39;/include/generated/utsrelease.h&#39;<br>
&gt;&gt; &gt;      if not os.path.isfile(fn):<br>
&gt;&gt; &gt;          fn = p + &#39;/include/linux/version.h&#39;<br>
&gt;&gt; &gt; +    if not os.path.isfile(fn):<br>
&gt;&gt; &gt; +        # after 3.7-rc1<br>
&gt;&gt; &gt; +        fn = p + &#39;/include/generated/uapi/linux/version.h&#39;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;      import re<br>
&gt;&gt; &gt;      try:<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; 1.7.5.4<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Openembedded-core mailing list<br>
&gt;&gt; &gt; <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
&gt;&gt; &gt; <a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core" target="_blank">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; &quot;Thou shalt not follow the NULL pointer, for chaos and madness await<br>
&gt;&gt; thee at its end&quot;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
&quot;Thou shalt not follow the NULL pointer, for chaos and madness await<br>
thee at its end&quot;<br>
</div></div></blockquote></div><br></div></div>