<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 1, 2016 at 5:45 AM, Martin Jansa <span dir="ltr"><<a href="mailto:martin.jansa@gmail.com" target="_blank">martin.jansa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">On Mon, Feb 01, 2016 at 11:24:03AM +0200, Alexandru But wrote:<br>
> On Fri, Jan 29, 2016 at 07:01:57PM +0100, Martin Jansa wrote:<br>
> > On Tue, Jan 19, 2016 at 12:45:18PM +0200, Alexandru But wrote:<br>
> > > Patch based on commit a3606c0:<br>
> > > Sometimes the compiler doesn't like { 0,} as an initializer<br>
> ><br>
> > Probably not caused by this change, but efivar now fails to build in<br>
> > world build for qemuarm:<br>
> ><br>
> > | linux.c: In function 'eb_nvme_ns_id':<br>
> > | linux.c:48:27: error: 'NVME_IOCTL_ID' undeclared (first use in this function)<br>
> > | uint64_t ret = ioctl(fd, NVME_IOCTL_ID, NULL);<br>
> > | ^<br>
> > | linux.c:48:27: note: each undeclared identifier is reported only once for each function it appears in<br>
> > | make[1]: *** [linux.o] Error 1<br>
> > | make[1]: Leaving directory `/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/efivar/0.21-r0/git/src'<br>
> > | make: *** [src] Error 2<br>
> > | ERROR: oe_runmake failed<br>
> > | ERROR: Function failed: do_compile (log file is located at /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/efivar/0.21-r0/temp/log.do_compile.8376)<br>
> > NOTE: recipe efivar-0.21-r0: task do_compile: Failed<br>
> > ERROR: Task 5672 (/home/jenkins/oe/world/shr-core/meta-openembedded/meta-oe/recipes-extended/efivar/<a href="http://efivar_0.21.bb" rel="noreferrer" target="_blank">efivar_0.21.bb</a>, do_compile) failed with exit code '1'<br>
> ><br>
><br>
> Yes, I saw the error, and indeed is not related to this change. The problem is<br>
> that NVMe uapi header was renamed from nvme.h to nvme_ioctl.h. Here is the<br>
> change:<br>
> <a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9d99a8dda154f38307d43d9c9aa504bd3703d596" rel="noreferrer" target="_blank">https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=9d99a8dda154f38307d43d9c9aa504bd3703d596</a><br>
><br>
> The Kconfig update unfortunately hasn't been change in the same time. It was<br>
> commited to the kernel only recently and will most likely be present in 4.5.<br>
> <a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a9cf8284b45110a4d98aea180a89c857e53bf850" rel="noreferrer" target="_blank">https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a9cf8284b45110a4d98aea180a89c857e53bf850</a><br>
><br>
> In the standard/base repository that yocto uses, only the first of the above<br>
> changes have been pulled. The old header has a new name, so the desired macro<br>
> is no longer there. The problem could be solved from the utility point of view<br>
> with a patch that gentoo tree already has:<br>
> <a href="https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-libs/efivar/files/0.21-nvme_ioctl.h.patch" rel="noreferrer" target="_blank">https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-libs/efivar/files/0.21-nvme_ioctl.h.patch</a><br>
><br>
> The problem is that even with this change the new header will not be found since<br>
> the second change is not yet in the yocto repo. I cherry-picked and created all<br>
> the changes above, but efivar still does not find the new header.<br>
> Problem is that the headers from sysroot are built by linux-libc-headers and<br>
> this recipe uses the static 4.4 linux release archive from <a href="http://kernel.org" rel="noreferrer" target="_blank">kernel.org</a>. If all<br>
> the above are pulled in and linux-libc-headers are using sources with both<br>
> changes, than efivar build will pass.<br>
><br>
> From my point of view the possible solutions for this problem are:<br>
> - Push the efivar patch and blacklist the recipe until linux-libc-headers points<br>
> to 4.5<br>
> - Revert the rename change in the yocto kernel repo and apply the efivar patch<br>
> after 4.5 token<br>
> - Apply the efivar patch, and a patch for linux-libc-headers<br>
> - Escalate the problem to the kernel comunity to backport the Kconfig change to<br>
> 4.4<br>
><br>
> I am not sure which is the right approach since they all have downsides.<br>
<br>
Thanks for detailed analysis, I don't use efivar or linux-yocto, so I<br>
was reporting the issue only because I wasn't able to even build-test<br>
your change in jenkins.<br>
<br>
Adding oe-core and Bruce, because the issue is in<br>
linux-yocto/linux-libc-headers maintained there.<br>
<br></blockquote><div><br></div><div>Thanks Martin and Alexandru,</div><div><br></div><div><font color="#555555"><span style="font-size:12.8px;white-space:nowrap">Alexandru: since we'd like to fix this everywhere, and not just someone building,</span></font></div><div><font color="#555555"><span style="font-size:12.8px;white-space:nowrap">against linux-yocto .. and I'd rather not wait until the 4.5 kernel is released (so</span></font></div><div><font color="#555555"><span style="font-size:12.8px;white-space:nowrap">I can bump the libc-headers).</span></font></div><div><font color="#555555"><span style="font-size:12.8px;white-space:nowrap"><br></span></font></div><div><font color="#555555"><span style="font-size:12.8px;white-space:nowrap">I'd suggest that we patch linux-libc-headers to </span></font><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)">have the proper definitions, can</span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)">you prepare a patch, since you are currently building efivar and can quickly confim</span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)">a fix ?</span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)">We can also nominate the Kconfig change to be backported to 4.4, but we can</span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)">get things working in the mean time.</span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)">Cheers,</span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)"><br></span></div><div><span style="font-size:12.8px;white-space:nowrap;color:rgb(85,85,85)">Bruce</span></div><div><br></div><div><font color="#555555"><span style="font-size:12.8px;white-space:nowrap"><br></span></font></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Regards,<br>
<br>
> > > Signed-off-by: Alexandru But <<a href="mailto:alexandru.but@ni.com" target="_blank">alexandru.but@ni.com</a>><br>
> > > ---<br>
> > > ...he-compiler-doesn-t-like-0-as-an-initiali.patch | 42 ++++++++++++++++++++++<br>
> > > meta-oe/recipes-extended/efivar/<a href="http://efivar_0.21.bb" rel="noreferrer" target="_blank">efivar_0.21.bb</a> | 3 +-<br>
> > > 2 files changed, 44 insertions(+), 1 deletion(-)<br>
> > > create mode 100644 meta-oe/recipes-extended/efivar/efivar/0001-Sometimes-the-compiler-doesn-t-like-0-as-an-initiali.patch<br>
> > ><br>
> > > diff --git a/meta-oe/recipes-extended/efivar/efivar/0001-Sometimes-the-compiler-doesn-t-like-0-as-an-initiali.patch b/meta-oe/recipes-extended/efivar/efivar/0001-Sometimes-the-compiler-doesn-t-like-0-as-an-initiali.patch<br>
> > > new file mode 100644<br>
> > > index 0000000..68cabd6<br>
> > > --- /dev/null<br>
> > > +++ b/meta-oe/recipes-extended/efivar/efivar/0001-Sometimes-the-compiler-doesn-t-like-0-as-an-initiali.patch<br>
> > > @@ -0,0 +1,42 @@<br>
> > > +From a3606c02fd271d32e364fcc540e34ba1899309f6 Mon Sep 17 00:00:00 2001<br>
> > > +From: Peter Jones <<a href="mailto:pjones@redhat.com" target="_blank">pjones@redhat.com</a>><br>
> > > +Date: Tue, 14 Jul 2015 09:33:54 -0400<br>
> > > +Subject: [PATCH] Sometimes the compiler doesn't like { 0, } as an<br>
> > > + initializer...<br>
> > > +<br>
> > > +Because it really wants to be { {0, },} or something, and sometimes the<br>
> > > +compiler, knowing full well what we're trying to do, likes to complain<br>
> > > +about the rigor applied to our technique in doing it.<br>
> > > +<br>
> > > +memset() the struct ifreq to 0 instead so I don't need to figure out its<br>
> > > +internal structure just to zero it out.<br>
> > > +<br>
> > > +Resolves #28<br>
> > > +<br>
> > > +Signed-off-by: Peter Jones <<a href="mailto:pjones@redhat.com" target="_blank">pjones@redhat.com</a>><br>
> > > +---<br>
> > > + src/linux.c | 3 ++-<br>
> > > + 1 file changed, 2 insertions(+), 1 deletion(-)<br>
> > > +<br>
> > > +diff --git a/src/linux.c b/src/linux.c<br>
> > > +index 57f71f3..817b8e6 100644<br>
> > > +--- a/src/linux.c<br>
> > > ++++ b/src/linux.c<br>
> > > +@@ -847,12 +847,13 @@ ssize_t<br>
> > > + __attribute__((__visibility__ ("hidden")))<br>
> > > + make_mac_path(uint8_t *buf, ssize_t size, const char * const ifname)<br>
> > > + {<br>
> > > +- struct ifreq ifr = { 0, };<br>
> > > ++ struct ifreq ifr;<br>
> > > + struct ethtool_drvinfo drvinfo = { 0, };<br>
> > > + int fd, rc;<br>
> > > + ssize_t ret = -1, sz, off=0;<br>
> > > + char busname[PATH_MAX+1] = "";<br>
> > > +<br>
> > > ++ memset(&ifr, 0, sizeof (ifr));<br>
> > > + strncpy(ifr.ifr_name, ifname, IF_NAMESIZE);<br>
> > > + drvinfo.cmd = ETHTOOL_GDRVINFO;<br>
> > > + ifr.ifr_data = (caddr_t)&drvinfo;<br>
> > > +--<br>
> > > +2.6.1<br>
> > > +<br>
> > > diff --git a/meta-oe/recipes-extended/efivar/<a href="http://efivar_0.21.bb" rel="noreferrer" target="_blank">efivar_0.21.bb</a> b/meta-oe/recipes-extended/efivar/<a href="http://efivar_0.21.bb" rel="noreferrer" target="_blank">efivar_0.21.bb</a><br>
> > > index b5ef90a..1684a10 100644<br>
> > > --- a/meta-oe/recipes-extended/efivar/<a href="http://efivar_0.21.bb" rel="noreferrer" target="_blank">efivar_0.21.bb</a><br>
> > > +++ b/meta-oe/recipes-extended/efivar/<a href="http://efivar_0.21.bb" rel="noreferrer" target="_blank">efivar_0.21.bb</a><br>
> > > @@ -8,7 +8,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"<br>
> > > DEPENDS_class-target = "popt efivar-native"<br>
> > ><br>
> > > SRCREV = "aab6c2a64d90b6e5a63661fb5bd6be8d878b0784"<br>
> > > -SRC_URI = "git://<a href="http://github.com/rhinstaller/efivar.git" rel="noreferrer" target="_blank">github.com/rhinstaller/efivar.git</a>"<br>
> > > +SRC_URI = "git://<a href="http://github.com/rhinstaller/efivar.git" rel="noreferrer" target="_blank">github.com/rhinstaller/efivar.git</a> \<br>
> > > + file://0001-Sometimes-the-compiler-doesn-t-like-0-as-an-initiali.patch"<br>
> > > SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch"<br>
> > > SRC_URI_append_class-native = " file://efivar-drop-options-not-supported-by-lower-version-gcc.patch"<br>
> > ><br>
> > > --<br>
> > > 2.6.1<br>
> > ><br>
> > > --<br>
> > > _______________________________________________<br>
> > > Openembedded-devel mailing list<br>
> > > <a href="mailto:Openembedded-devel@lists.openembedded.org" target="_blank">Openembedded-devel@lists.openembedded.org</a><br>
> > > <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-devel" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-devel</a><br>
> ><br>
> > --<br>
> > Martin 'JaMa' Jansa jabber: <a href="mailto:Martin.Jansa@gmail.com" target="_blank">Martin.Jansa@gmail.com</a><br>
><br>
><br>
><br>
> > --<br>
> > _______________________________________________<br>
> > Openembedded-devel mailing list<br>
> > <a href="mailto:Openembedded-devel@lists.openembedded.org" target="_blank">Openembedded-devel@lists.openembedded.org</a><br>
> > <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-devel" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-devel</a><br>
<span><font color="#888888">><br>
> --<br>
> _______________________________________________<br>
> Openembedded-devel mailing list<br>
> <a href="mailto:Openembedded-devel@lists.openembedded.org" target="_blank">Openembedded-devel@lists.openembedded.org</a><br>
> <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-devel" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-devel</a><br>
<br>
--<br>
Martin 'JaMa' Jansa jabber: <a href="mailto:Martin.Jansa@gmail.com" target="_blank">Martin.Jansa@gmail.com</a><br>
</font></span><br>--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"</div>
</div></div>