> -----Original Message----- > From: Darren Hart [mailto:[email protected]] > Sent: Wednesday, September 04, 2013 9:21 PM > To: Kamble, Nitin A > Cc: Zanussi, Tom; [email protected]; > [email protected]; Wold, Saul > Subject: Re: [PATCH 5/5] mesa: make the recipe MACHINE independent > > On Thu, 2013-09-05 at 03:38 +0000, [email protected] wrote: > > From: Nitin A Kamble <[email protected]> > > > > This avoids rebuilding of the recipe when a different MACHINE is > > selected with the same arch. > > For the occasional idiot such as myself that wants to really understand what > this commit does.... this commit message needs to spell it out a bit more > clearly :-)
This commit removes the change to do_configure, and changes the populate_sysroot instead. It avoids the repeat of compile step for different BSPs with the same arch. I cooked it with slight information from RP. I am wondering whether this is what RP was looking for. Once I get some feedback from RP I will add more to the commit log. Thanks, Nitin > > > > > Fixes bug: > > [YOCTO #5120] > > > > Signed-off-by: Nitin A Kamble <[email protected]> > > --- > > common/recipes-graphics/mesa/mesa_9.1.6.bbappend | 64 > > ++++++++++++++++-------- > > 1 file changed, 44 insertions(+), 20 deletions(-) > > > > diff --git a/common/recipes-graphics/mesa/mesa_9.1.6.bbappend > > b/common/recipes-graphics/mesa/mesa_9.1.6.bbappend > > index b92831d..0fe5534 100644 > > --- a/common/recipes-graphics/mesa/mesa_9.1.6.bbappend > > +++ b/common/recipes-graphics/mesa/mesa_9.1.6.bbappend > > @@ -1,24 +1,48 @@ > > - > > # The emgd binary driver also provides egl, gles1, gles2 library & headers. > > -# To avoid conflict disable egl, gles1, gles2 from meta-dri if the > > BSP image -# is bundling the emgd driver. > > +# To avoid conflict do not populate sysroot with egl, gles1, gles2 > > +files # from mesa-dri if the BSP image is bundling the emgd driver. > > + > > +STAGING_HOLD_DIR="${WORKDIR}/staging_hold" > > > > -python __anonymous () { > > - import re > > - xserver = d.getVar('XSERVER', True) > > - if xserver and 'emgd-driver-bin' in xserver.split(' '): > > - extra_oeconf = d.getVar('EXTRA_OECONF', True).split() > > - take_out = ["--enable-egl", "--enable-gles1", "--enable-gles2"] > > - put_in = ["--disable-egl", "--disable-gles1", "--disable-gles2"] > > - pattern = re.compile("--with-egl-platforms") > > - new_extra_oeconf = [ ] > > - for i in extra_oeconf: > > - if ( i not in take_out ) and ( not pattern.match(i)): > > - new_extra_oeconf.append(i) > > - for i in put_in: > > - new_extra_oeconf.append(i) > > +FILES_SKIP_POPULATE_SYSROOT="${libdir}/libGLESv2.so.2 \ > > + ${libdir}/libEGL.so.1 \ > > + ${libdir}/libGLESv2.so \ > > + ${libdir}/libEGL.so \ > > + ${libdir}/pkgconfig/egl.pc \ > > + ${libdir}/pkgconfig/glesv2.pc \ > > + ${includedir}/KHR/khrplatform.h \ > > + ${includedir}/GLES/glext.h \ > > + ${includedir}/GLES/glplatform.h \ > > + ${includedir}/GLES/gl.h \ > > + ${includedir}/EGL/eglext.h \ > > + ${includedir}/EGL/eglplatform.h \ > > + ${includedir}/EGL/egl.h \ > > + ${includedir}/GLES2/gl2.h \ > > + ${includedir}/GLES2/gl2platform.h \ > > + ${includedir}/GLES2/gl2ext.h \ > > + > > So rather than build it differently, we list the conflicting files and > then.... > (down below) ... > > > " > > > > - d.setVar('EXTRA_OECONF', ' '.join(new_extra_oeconf)) > > - depends = d.getVar('DEPENDS', True) > > - d.setVar('DEPENDS', depends + " emgd-driver-bin") > > +# move away some files before populate_sysroot > > +do_pre_populate_sysroot () { > > + if [[ "${XSERVER}" =~ "emgd-driver-bin" ]]; then > > + mkdir -p ${STAGING_HOLD_DIR} > > + for i in ${FILES_SKIP_POPULATE_SYSROOT} > > + do > > + mkdir -p ${STAGING_HOLD_DIR}/`dirname ${i}` > > + mv ${D}/${i} ${STAGING_HOLD_DIR}/${i} > > + done > > + fi > > Move them out of the <WHAT?> directory prior to calling populate_sysroot > which.... avoids them being put into the sysroot... OK. > > > } > > + > > +# move back the files for do_package > > +do_post_populate_sysroot () { > > + if [[ "${XSERVER}" =~ "emgd-driver-bin" ]]; then > > + for i in ${FILES_SKIP_POPULATE_SYSROOT} > > + do > > + mv ${STAGING_HOLD_DIR}/${i} ${D}/${i} > > + done > > + fi > > +} > > But then we move them back..... why do we move them back? > > Would it not make more sense for these particular files to be packaged in a > different package which the emgd-driver-bin could also provide and be > chosen in lieu of this one? > > The above appears to be a well thought out approach, I'm sure I'm just > missing something, but moving them back afterward strikes me as going > through some awful contortions that may likely come back to bite us later.... > > > + > > +addtask pre_populate_sysroot after do_install before > > +do_populate_sysroot addtask post_populate_sysroot after > > +do_populate_sysroot before do_package > > -- > Darren Hart > Intel Open Source Technology Center > Yocto Project - Linux Kernel > _______________________________________________ meta-intel mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-intel
