<div dir="ltr"><div>Hi Richard,<br><br></div>Thank you very much.<br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On 13 March 2015 at 21:35, Richard Purdie <span dir="ltr">&lt;<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Fri, 2015-03-13 at 20:25 +0530, Naresh Bhat wrote:<br>
&gt; Update the grub git recipe with the following actions for native and target<br>
&gt; - Base class extend to native<br>
&gt; - do_configure_prepend<br>
&gt; - do_install_append<br>
&gt; - do_mkimage native<br>
&gt; - do_deploy<br>
&gt;<br>
&gt; Signed-off-by: Naresh Bhat &lt;<a href="mailto:naresh.bhat@linaro.org">naresh.bhat@linaro.org</a>&gt;<br>
&gt; ---<br>
&gt;  meta/recipes-bsp/grub/<a href="http://grub_git.bb" target="_blank">grub_git.bb</a> |   48 +++++++++++++++++++++++++++++++------<br>
&gt;  1 file changed, 41 insertions(+), 7 deletions(-)<br>
<br>
</span>This commit message isn&#39;t up to the job. You listed some things you<br>
changed but didn&#39;t say why these are necessary or how this helps. </blockquote><div><br>My apologies, I will try to update more description. <br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Some<br>
of the changes in here may be better split up a bit too, there seems to<br>
be a lot going on.<br></blockquote><div>I will appreciate if you point me to the changes which needs to be split up.  I will definitely try to split up in my next series.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
&gt; diff --git a/meta/recipes-bsp/grub/<a href="http://grub_git.bb" target="_blank">grub_git.bb</a> b/meta/recipes-bsp/grub/<a href="http://grub_git.bb" target="_blank">grub_git.bb</a><br>
&gt; index 3ab675b..a5ab649 100644<br>
&gt; --- a/meta/recipes-bsp/grub/<a href="http://grub_git.bb" target="_blank">grub_git.bb</a><br>
&gt; +++ b/meta/recipes-bsp/grub/<a href="http://grub_git.bb" target="_blank">grub_git.bb</a><br>
&gt; @@ -8,6 +8,7 @@ DEFAULT_PREFERENCE_arm = &quot;1&quot;<br>
&gt;  PV = &quot;2.00+${SRCPV}&quot;<br>
&gt;  SRCREV = &quot;87de66d9d83446ecddb29cfbdf7369102c8e209e&quot;<br>
&gt;  SRC_URI = &quot;git://<a href="http://git.savannah.gnu.org/grub.git" target="_blank">git.savannah.gnu.org/grub.git</a> \<br>
&gt; +           file://cfg \<br>
&gt;             file://grub-2.00-fpmath-sse-387-fix.patch \<br>
&gt;             file://autogen.sh-exclude-pc.patch \<br>
&gt;             file://grub-2.00-add-oe-kernel.patch \<br>
&gt; @@ -18,7 +19,7 @@ S = &quot;${WORKDIR}/git&quot;<br>
&gt;<br>
&gt;  COMPATIBLE_HOST = &#39;(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)&#39;<br>
&gt;<br>
&gt; -inherit autotools gettext texinfo<br>
&gt; +inherit autotools-brokensep gettext texinfo deploy<br>
<br>
</span>Why do we need brokensep? It appears to work at the moment?<br>
<span class=""><br>
&gt;  PACKAGECONFIG ??= &quot;&quot;<br>
&gt;  PACKAGECONFIG[grub-mount] = &quot;--enable-grub-mount,--disable-grub-mount,fuse&quot;<br>
&gt; @@ -31,24 +32,57 @@ GRUBPLATFORM_arm = &quot;uboot&quot;<br>
&gt;  GRUBPLATFORM_aarch64 = &quot;efi&quot;<br>
&gt;  GRUBPLATFORM ??= &quot;pc&quot;<br>
&gt;<br>
&gt; +CACHED_CONFIGUREVARS += &quot;ac_cv_path_HELP2MAN=&quot;<br>
&gt;  EXTRA_OECONF = &quot;--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix=&quot;&quot; \<br>
&gt;                  --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no&quot;<br>
&gt;<br>
&gt; +export ac_cv_path_HELP2MAN=&quot;&quot;<br>
&gt; +<br>
<br>
</span>You need both an export and a CACHED_CONFIGUREVARS?<br></blockquote><div><br>I am not very sure.  I will check and update. Thanks for pointing.<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
&gt;  do_configure_prepend() {<br>
&gt; -    ( cd ${S}<br>
&gt; -      ${S}/autogen.sh )<br>
&gt; +      ./autogen.sh<br>
&gt; +}<br>
<br>
</span>This is probably why you now need brokensep. Why change the above?<br></blockquote><div>Yes, this is the reason I need brokensep.  The recipe fails to build on our luvOS distribution.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
&gt; +<br>
&gt; +do_install_append_class-native() {<br>
&gt; +        install -m 755 -D grub-mkimage ${D}${bindir}<br>
&gt;  }<br>
&gt;<br>
&gt; -do_install_append () {<br>
&gt; -    install -d ${D}${sysconfdir}/grub.d<br>
&gt; -<br>
&gt; +do_install_append_class-target() {<br>
&gt; +    # Search for the grub.cfg on the local boot media by using the<br>
&gt; +    # built in cfg file provided via this recipe<br>
&gt; +    grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \<br>
&gt; +        -O ${GRUB_TARGET}-${GRUBPLATFORM} -o ./${GRUB_IMAGE} \<br>
&gt; +        boot linux ext2 fat serial part_msdos part_gpt \<br>
&gt; +        normal efi_gop iso9660 search efinet tftp all_video chain \<br>
&gt; +        gfxmenu jpeg gfxterm<br>
&gt; +<br>
&gt; +    install -m 0755 -D ${B}/${GRUB_IMAGE} ${D}${bindir}<br>
&gt; +}<br>
&gt; +<br>
&gt; +GRUB_TARGET_aarch64 = &quot;arm64&quot;<br>
&gt; +GRUB_IMAGE_aarch64 = &quot;grubaa64.efi&quot;<br>
<br>
</span>What about the x86 case?<br></blockquote><div>Right now the recipe builds for PC on x86 architecture. On x86 architecture it is required to update.  <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
&gt; +do_mkimage_class-native() {<br>
&gt; +        :<br>
&gt;  }<br>
&gt;<br>
&gt; +do_deploy() {<br>
&gt; +    install -m 0755 -D ${B}/${GRUB_IMAGE} ${DEPLOYDIR}<br>
&gt; +}<br>
&gt; +<br>
&gt; +do_deploy_class-native() {<br>
&gt; +        :<br>
&gt; +}<br>
&gt; +<br>
&gt; +addtask deploy after do_install before do_build<br>
<br>
</span>Why do we need to start deploying grub?<br></blockquote><div>Probably I need to split up here.  Let me check <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
&gt;  # debugedit chokes on bare metal binaries<br>
&gt;  INHIBIT_PACKAGE_DEBUG_SPLIT = &quot;1&quot;<br>
&gt;<br>
&gt; -RDEPENDS_${PN} = &quot;diffutils freetype&quot;<br>
&gt; +RDEPENDS_${PN}_class-target = &quot;diffutils freetype&quot;<br>
&gt;  FILES_${PN}-dbg += &quot;${libdir}/${BPN}/*/.debug&quot;<br>
&gt;<br>
&gt;  INSANE_SKIP_${PN} = &quot;arch&quot;<br>
&gt;  INSANE_SKIP_${PN}-dbg = &quot;arch&quot;<br>
&gt; +<br>
&gt; +DEPENDS_class-target += &quot;grub-native&quot;<br>
<br>
</span>Why?<br></blockquote><div>My mistake, If I understand properly the native recipe get build in first place.  There is no need to add depends. <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
&gt; +BBCLASSEXTEND = &quot;native&quot;<br>
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</blockquote></div><br></div></div></div></div>