<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"><<a href="mailto:richard.purdie@linuxfoundation.org" target="_blank">richard.purdie@linuxfoundation.org</a>></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>
> Update the grub git recipe with the following actions for native and target<br>
> - Base class extend to native<br>
> - do_configure_prepend<br>
> - do_install_append<br>
> - do_mkimage native<br>
> - do_deploy<br>
><br>
> Signed-off-by: Naresh Bhat <<a href="mailto:naresh.bhat@linaro.org">naresh.bhat@linaro.org</a>><br>
> ---<br>
> meta/recipes-bsp/grub/<a href="http://grub_git.bb" target="_blank">grub_git.bb</a> | 48 +++++++++++++++++++++++++++++++------<br>
> 1 file changed, 41 insertions(+), 7 deletions(-)<br>
<br>
</span>This commit message isn't up to the job. You listed some things you<br>
changed but didn'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>
> 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>
> index 3ab675b..a5ab649 100644<br>
> --- a/meta/recipes-bsp/grub/<a href="http://grub_git.bb" target="_blank">grub_git.bb</a><br>
> +++ b/meta/recipes-bsp/grub/<a href="http://grub_git.bb" target="_blank">grub_git.bb</a><br>
> @@ -8,6 +8,7 @@ DEFAULT_PREFERENCE_arm = "1"<br>
> PV = "2.00+${SRCPV}"<br>
> SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e"<br>
> SRC_URI = "git://<a href="http://git.savannah.gnu.org/grub.git" target="_blank">git.savannah.gnu.org/grub.git</a> \<br>
> + file://cfg \<br>
> file://grub-2.00-fpmath-sse-387-fix.patch \<br>
> file://autogen.sh-exclude-pc.patch \<br>
> file://grub-2.00-add-oe-kernel.patch \<br>
> @@ -18,7 +19,7 @@ S = "${WORKDIR}/git"<br>
><br>
> COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'<br>
><br>
> -inherit autotools gettext texinfo<br>
> +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>
> PACKAGECONFIG ??= ""<br>
> PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"<br>
> @@ -31,24 +32,57 @@ GRUBPLATFORM_arm = "uboot"<br>
> GRUBPLATFORM_aarch64 = "efi"<br>
> GRUBPLATFORM ??= "pc"<br>
><br>
> +CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="<br>
> EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \<br>
> --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"<br>
><br>
> +export ac_cv_path_HELP2MAN=""<br>
> +<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>
> do_configure_prepend() {<br>
> - ( cd ${S}<br>
> - ${S}/autogen.sh )<br>
> + ./autogen.sh<br>
> +}<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>
> +<br>
> +do_install_append_class-native() {<br>
> + install -m 755 -D grub-mkimage ${D}${bindir}<br>
> }<br>
><br>
> -do_install_append () {<br>
> - install -d ${D}${sysconfdir}/grub.d<br>
> -<br>
> +do_install_append_class-target() {<br>
> + # Search for the grub.cfg on the local boot media by using the<br>
> + # built in cfg file provided via this recipe<br>
> + grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \<br>
> + -O ${GRUB_TARGET}-${GRUBPLATFORM} -o ./${GRUB_IMAGE} \<br>
> + boot linux ext2 fat serial part_msdos part_gpt \<br>
> + normal efi_gop iso9660 search efinet tftp all_video chain \<br>
> + gfxmenu jpeg gfxterm<br>
> +<br>
> + install -m 0755 -D ${B}/${GRUB_IMAGE} ${D}${bindir}<br>
> +}<br>
> +<br>
> +GRUB_TARGET_aarch64 = "arm64"<br>
> +GRUB_IMAGE_aarch64 = "grubaa64.efi"<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>
> +do_mkimage_class-native() {<br>
> + :<br>
> }<br>
><br>
> +do_deploy() {<br>
> + install -m 0755 -D ${B}/${GRUB_IMAGE} ${DEPLOYDIR}<br>
> +}<br>
> +<br>
> +do_deploy_class-native() {<br>
> + :<br>
> +}<br>
> +<br>
> +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>
> # debugedit chokes on bare metal binaries<br>
> INHIBIT_PACKAGE_DEBUG_SPLIT = "1"<br>
><br>
> -RDEPENDS_${PN} = "diffutils freetype"<br>
> +RDEPENDS_${PN}_class-target = "diffutils freetype"<br>
> FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"<br>
><br>
> INSANE_SKIP_${PN} = "arch"<br>
> INSANE_SKIP_${PN}-dbg = "arch"<br>
> +<br>
> +DEPENDS_class-target += "grub-native"<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>
> +BBCLASSEXTEND = "native"<br>
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</blockquote></div><br></div></div></div></div>