Message ID | 20181119100443.2882-1-abrodkin@synopsys.com |
---|---|
State | New |
Headers | show |
Series | [v3] u-boot: Add mkenvimage tool | expand |
On 11/19/2018 11:04 AM, Alexey Brodkin wrote: > This utility is used for creation of images containing > usable in run-time U-Boot environment. > > As of today this utility is added per-board like here [1] > for Intel Edison board. > > [1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-bsp/u-boot/u-boot-tools_2014.04.bb > > Given there're quite some U-Boot tools that we may want to add later > this recipe name switch from "u-boot-mkimage" to generic "u-boot-tools" > still for compatibility we provide "u-boot-mkimage" with help > of PROVIDES as well as proposed "u-boot-mkenvimage". > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > Cc: Richard Purdie <richard.purdie@linuxfoundation.org> > Cc: Otavio Salvador <otavio@ossystems.com.br> > Cc: Martin Jansa <martin.jansa@gmail.com> > Cc: Ross Burton <ross.burton@intel.com> > Cc: Marek Vasut <marex@denx.de> Do we want to generate one package per tool or not ? > --- > > Changes v2 -> v3: > * Recipe renamed to "u-boot-tools" to better match its contents > (especially in the future as we add more tools there) > * Existing "u-boot-mkimage" and newly introduced "u-boot-mkenvimage" > made avaialble via PROVIDES > > Changes v1 -> v2: > * Got rid of a separate recipe and instead added mkenvimage > to u-boot mkimage recipy > > .../{u-boot-mkimage_2018.07.bb => u-boot-tools_2018.07.bb} | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > rename meta/recipes-bsp/u-boot/{u-boot-mkimage_2018.07.bb => u-boot-tools_2018.07.bb} (83%) > > diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2018.07.bb > similarity index 83% > rename from meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb > rename to meta/recipes-bsp/u-boot/u-boot-tools_2018.07.bb > index 08bff1d161..140afa8dfe 100644 > --- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb > +++ b/meta/recipes-bsp/u-boot/u-boot-tools_2018.07.bb > @@ -1,7 +1,8 @@ > require u-boot-common_${PV}.inc > > -SUMMARY = "U-Boot bootloader image creation tool" > +SUMMARY = "U-Boot bootloader tools" > DEPENDS += "openssl" > +PROVIDES = "u-boot-mkimage u-boot-mkenvimage" > > EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' > EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' > @@ -20,8 +21,14 @@ do_compile () { > > do_install () { > install -d ${D}${bindir} > + > + # mkimage > install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage > ln -sf uboot-mkimage ${D}${bindir}/mkimage > + > + # mkenvimage > + install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage > + ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage > } > > RDEPENDS_${PN} += "dtc" >
On Mon, Nov 19, 2018 at 01:51:41PM +0100, Marek Vasut wrote: > On 11/19/2018 11:04 AM, Alexey Brodkin wrote: > > This utility is used for creation of images containing > > usable in run-time U-Boot environment. > > > > As of today this utility is added per-board like here [1] > > for Intel Edison board. > > > > [1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-bsp/u-boot/u-boot-tools_2014.04.bb > > > > Given there're quite some U-Boot tools that we may want to add later > > this recipe name switch from "u-boot-mkimage" to generic "u-boot-tools" > > still for compatibility we provide "u-boot-mkimage" with help > > of PROVIDES as well as proposed "u-boot-mkenvimage". > > > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > > Cc: Richard Purdie <richard.purdie@linuxfoundation.org> > > Cc: Otavio Salvador <otavio@ossystems.com.br> > > Cc: Martin Jansa <martin.jansa@gmail.com> > > Cc: Ross Burton <ross.burton@intel.com> > > Cc: Marek Vasut <marex@denx.de> > > Do we want to generate one package per tool or not ? I think so, yes. Not all places will want all tools.
On Mon, Nov 19, 2018 at 5:08 PM Tom Rini <trini@konsulko.com> wrote: > > On Mon, Nov 19, 2018 at 01:51:41PM +0100, Marek Vasut wrote: > > On 11/19/2018 11:04 AM, Alexey Brodkin wrote: > > > This utility is used for creation of images containing > > > usable in run-time U-Boot environment. > > > > > > As of today this utility is added per-board like here [1] > > > for Intel Edison board. > > > > > > [1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-bsp/u-boot/u-boot-tools_2014.04.bb > > > > > > Given there're quite some U-Boot tools that we may want to add later > > > this recipe name switch from "u-boot-mkimage" to generic "u-boot-tools" > > > still for compatibility we provide "u-boot-mkimage" with help > > > of PROVIDES as well as proposed "u-boot-mkenvimage". > > > > > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > > > Cc: Richard Purdie <richard.purdie@linuxfoundation.org> > > > Cc: Otavio Salvador <otavio@ossystems.com.br> > > > Cc: Martin Jansa <martin.jansa@gmail.com> > > > Cc: Ross Burton <ross.burton@intel.com> > > > Cc: Marek Vasut <marex@denx.de> > > > > Do we want to generate one package per tool or not ? > > I think so, yes. Not all places will want all tools. And a bonus to add a u-boot-tools-meta which rdepends on all. You can copy code to do that from gstreamer-plugins packages.
Hi Otavio, Tom, all, On Mon, 2018-11-19 at 17:22 -0200, Otavio Salvador wrote: > On Mon, Nov 19, 2018 at 5:08 PM Tom Rini <trini@konsulko.com> wrote: > > On Mon, Nov 19, 2018 at 01:51:41PM +0100, Marek Vasut wrote: > > > On 11/19/2018 11:04 AM, Alexey Brodkin wrote: > > > > This utility is used for creation of images containing > > > > usable in run-time U-Boot environment. > > > > > > > > As of today this utility is added per-board like here [1] > > > > for Intel Edison board. > > > > > > > > [1] > > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__git.yoctoproject.org_cgit_cgit.cgi_meta-2Dintel-2Dedison_tree_meta-2Dintel-2Dedison-2Dbsp_recipes-2Dbsp_u-2Dboot_u-2Dboot-2Dtools-5F2014.04.bb&d=DwIBaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=sQnruA_KoGH_aC_YyN_lCddYmWBmcOpMVXzZtSwSbWo&s=pXmv0aNPFSCoj8CwGvwcZj-4bN_Sdjob3YwHYTzxDlw&e= > > > > > > > > Given there're quite some U-Boot tools that we may want to add later > > > > this recipe name switch from "u-boot-mkimage" to generic "u-boot-tools" > > > > still for compatibility we provide "u-boot-mkimage" with help > > > > of PROVIDES as well as proposed "u-boot-mkenvimage". > > > > > > > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > > > > Cc: Richard Purdie <richard.purdie@linuxfoundation.org> > > > > Cc: Otavio Salvador <otavio@ossystems.com.br> > > > > Cc: Martin Jansa <martin.jansa@gmail.com> > > > > Cc: Ross Burton <ross.burton@intel.com> > > > > Cc: Marek Vasut <marex@denx.de> > > > > > > Do we want to generate one package per tool or not ? > > > > I think so, yes. Not all places will want all tools. > > And a bonus to add a u-boot-tools-meta which rdepends on all. You can > copy code to do that from gstreamer-plugins packages. That's how we start from simple enhancement one-liner and end-up with rework of a different scale :) I'm still ramping-up with OE but hopefully will be able to implement proposed tool-per-package feature sometime soon. -Alexey
> -----Original Message----- > From: openembedded-core-bounces@lists.openembedded.org <openembedded- > core-bounces@lists.openembedded.org> On Behalf Of Otavio Salvador > Sent: den 19 november 2018 20:22 > To: Tom Rini <trini@konsulko.com> > Cc: Marek Vasut <marex@denx.de>; linux-snps-arc@lists.infradead.org; > Alexey Brodkin <alexey.brodkin@synopsys.com>; Otavio Salvador > <otavio@ossystems.com.br>; Patches and discussions about the oe-core > layer <openembedded-core@lists.openembedded.org> > Subject: Re: [OE-core] [PATCH v3] u-boot: Add mkenvimage tool > > On Mon, Nov 19, 2018 at 5:08 PM Tom Rini <trini@konsulko.com> wrote: > > > > On Mon, Nov 19, 2018 at 01:51:41PM +0100, Marek Vasut wrote: > > > On 11/19/2018 11:04 AM, Alexey Brodkin wrote: > > > > This utility is used for creation of images containing > > > > usable in run-time U-Boot environment. > > > > > > > > As of today this utility is added per-board like here [1] > > > > for Intel Edison board. > > > > > > > > [1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel- > edison/tree/meta-intel-edison-bsp/recipes-bsp/u-boot/u-boot- > tools_2014.04.bb > > > > > > > > Given there're quite some U-Boot tools that we may want to add > later > > > > this recipe name switch from "u-boot-mkimage" to generic "u-boot- > tools" > > > > still for compatibility we provide "u-boot-mkimage" with help > > > > of PROVIDES as well as proposed "u-boot-mkenvimage". > > > > > > > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > > > > Cc: Richard Purdie <richard.purdie@linuxfoundation.org> > > > > Cc: Otavio Salvador <otavio@ossystems.com.br> > > > > Cc: Martin Jansa <martin.jansa@gmail.com> > > > > Cc: Ross Burton <ross.burton@intel.com> > > > > Cc: Marek Vasut <marex@denx.de> > > > > > > Do we want to generate one package per tool or not ? > > > > I think so, yes. Not all places will want all tools. > > And a bonus to add a u-boot-tools-meta which rdepends on all. You can > copy code to do that from gstreamer-plugins packages. Actually, why mess with an unnecessary meta package. Just use the empty ${PN} package for that. That works for the GStreamer packages as well these days (since commit 8e1009a3), even though they do it by depending on the meta packages for backwards compatibility. //Peter > -- > Otavio Salvador O.S. Systems > http://www.ossystems.com.br http://code.ossystems.com.br > Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750
On Tue, 20 Nov 2018 at 14:29, Peter Kjellerstedt <peter.kjellerstedt@axis.com> wrote: > Actually, why mess with an unnecessary meta package. Just use the > empty ${PN} package for that. That works for the GStreamer packages > as well these days (since commit 8e1009a3), even though they do it > by depending on the meta packages for backwards compatibility. Yes, please. Having a u-boot-tools-meta will mean we're constantly explaining why installing u-boot-tools either doesn't install anything, or produces an error. Ross
(hit sent too early) Of course how big are these tools, and is it really useful splitting them up? If we're talking a 10k binary, is putting them in separate packages worth the complication? Ross
On Tue, Nov 20, 2018 at 1:40 PM Burton, Ross <ross.burton@intel.com> wrote: > > (hit sent too early) > > Of course how big are these tools, and is it really useful splitting > them up? If we're talking a 10k binary, is putting them in separate > packages worth the complication? I think it makes sense to split; we are building an embedded system build system and granular installation is a must have. Using PN to install all tools is a win win combination.
Hi Otavio, > -----Original Message----- > From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br] > Sent: Tuesday, November 20, 2018 6:49 PM > To: Burton, Ross <ross.burton@intel.com> > Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Marek Vasut <marex@denx.de>; Tom Rini <trini@konsulko.com>; Otavio > Salvador <otavio@ossystems.com.br>; Alexey Brodkin <alexey.brodkin@synopsys.com>; Patches and discussions about the oe-core > layer <openembedded-core@lists.openembedded.org>; linux-snps-arc@lists.infradead.org > Subject: Re: [OE-core] [PATCH v3] u-boot: Add mkenvimage tool > > On Tue, Nov 20, 2018 at 1:40 PM Burton, Ross <ross.burton@intel.com> wrote: > > > > (hit sent too early) > > > > Of course how big are these tools, and is it really useful splitting > > them up? If we're talking a 10k binary, is putting them in separate > > packages worth the complication? > > I think it makes sense to split; we are building an embedded system > build system and granular installation is a must have. Using PN to > install all tools is a win win combination. Please note we're discussing _host_ tools here! So do we really care if there's one more utility installed on development host? And if someone installs those U-Boot host utilities on the target then most probably this target is not super embedded any longer. -Alexey
On Tue, Nov 20, 2018 at 01:48:40PM -0200, Otavio Salvador wrote: > On Tue, Nov 20, 2018 at 1:40 PM Burton, Ross <ross.burton@intel.com> wrote: > > > > (hit sent too early) > > > > Of course how big are these tools, and is it really useful splitting > > them up? If we're talking a 10k binary, is putting them in separate > > packages worth the complication? > > I think it makes sense to split; we are building an embedded system > build system and granular installation is a must have. Using PN to > install all tools is a win win combination. Agreed. The common use cases won't need all of the possible tools so lets not grow sizes we don't need to grow.
On 11/20/2018 04:52 PM, Alexey Brodkin wrote: > Hi Otavio, > >> -----Original Message----- >> From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br] >> Sent: Tuesday, November 20, 2018 6:49 PM >> To: Burton, Ross <ross.burton@intel.com> >> Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Marek Vasut <marex@denx.de>; Tom Rini <trini@konsulko.com>; Otavio >> Salvador <otavio@ossystems.com.br>; Alexey Brodkin <alexey.brodkin@synopsys.com>; Patches and discussions about the oe-core >> layer <openembedded-core@lists.openembedded.org>; linux-snps-arc@lists.infradead.org >> Subject: Re: [OE-core] [PATCH v3] u-boot: Add mkenvimage tool >> >> On Tue, Nov 20, 2018 at 1:40 PM Burton, Ross <ross.burton@intel.com> wrote: >>> >>> (hit sent too early) >>> >>> Of course how big are these tools, and is it really useful splitting >>> them up? If we're talking a 10k binary, is putting them in separate >>> packages worth the complication? >> >> I think it makes sense to split; we are building an embedded system >> build system and granular installation is a must have. Using PN to >> install all tools is a win win combination. > > Please note we're discussing _host_ tools here! > So do we really care if there's one more utility installed on development host? > > And if someone installs those U-Boot host utilities on the target then most probably > this target is not super embedded any longer. You can use mkenvimage on target, I had to do that a few times.
On Tue, Nov 20, 2018 at 1:52 PM Alexey Brodkin <alexey.brodkin@synopsys.com> wrote: > > -----Original Message----- > > From: Otavio Salvador [mailto:otavio.salvador@ossystems.com.br] > > Sent: Tuesday, November 20, 2018 6:49 PM > > To: Burton, Ross <ross.burton@intel.com> > > Cc: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; Marek Vasut <marex@denx.de>; Tom Rini <trini@konsulko.com>; Otavio > > Salvador <otavio@ossystems.com.br>; Alexey Brodkin <alexey.brodkin@synopsys.com>; Patches and discussions about the oe-core > > layer <openembedded-core@lists.openembedded.org>; linux-snps-arc@lists.infradead.org > > Subject: Re: [OE-core] [PATCH v3] u-boot: Add mkenvimage tool > > > > On Tue, Nov 20, 2018 at 1:40 PM Burton, Ross <ross.burton@intel.com> wrote: > > > > > > (hit sent too early) > > > > > > Of course how big are these tools, and is it really useful splitting > > > them up? If we're talking a 10k binary, is putting them in separate > > > packages worth the complication? > > > > I think it makes sense to split; we are building an embedded system > > build system and granular installation is a must have. Using PN to > > install all tools is a win win combination. > > Please note we're discussing _host_ tools here! > So do we really care if there's one more utility installed on development host? > > And if someone installs those U-Boot host utilities on the target then most probably > this target is not super embedded any longer. The tools are commonly used on host but this is not a limitation and there are use cases where we may want to include it on target. Also, it can be installed on SDK (nativesdk packages) and being able to install what will be used is a must for me. I am not concerned about the space used by it but for the choice of me pick the right pieces I need, and not putting it all together.
On Mon, 2018-11-19 at 13:04 +0300, Alexey Brodkin wrote: > This utility is used for creation of images containing > usable in run-time U-Boot environment. > > As of today this utility is added per-board like here [1] > for Intel Edison board. > > [1] > http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-bsp/u-boot/u-boot-tools_2014.04.bb > > Given there're quite some U-Boot tools that we may want to add later > this recipe name switch from "u-boot-mkimage" to generic "u-boot- > tools" > still for compatibility we provide "u-boot-mkimage" with help > of PROVIDES as well as proposed "u-boot-mkenvimage". > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > Cc: Richard Purdie <richard.purdie@linuxfoundation.org> > Cc: Otavio Salvador <otavio@ossystems.com.br> > Cc: Martin Jansa <martin.jansa@gmail.com> > Cc: Ross Burton <ross.burton@intel.com> > Cc: Marek Vasut <marex@denx.de> > --- I know others are talking about splitting the packaging and I'm ok with deferring that to a separate patch. This patch did break the build in oe-selftest as you renamed a recipe and didn't update conf/distro/include/maintainers.inc. Could you send a new version with that tweak please? (grep https://autobuilder.yoctoproject.org/typhoon/#/builders/28/builds/242/steps/7/logs/step2d for the recipe name to see the test that failed) Cheers, Richard
diff --git a/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2018.07.bb similarity index 83% rename from meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb rename to meta/recipes-bsp/u-boot/u-boot-tools_2018.07.bb index 08bff1d161..140afa8dfe 100644 --- a/meta/recipes-bsp/u-boot/u-boot-mkimage_2018.07.bb +++ b/meta/recipes-bsp/u-boot/u-boot-tools_2018.07.bb @@ -1,7 +1,8 @@ require u-boot-common_${PV}.inc -SUMMARY = "U-Boot bootloader image creation tool" +SUMMARY = "U-Boot bootloader tools" DEPENDS += "openssl" +PROVIDES = "u-boot-mkimage u-boot-mkenvimage" EXTRA_OEMAKE_class-target = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' EXTRA_OEMAKE_class-native = 'CC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' @@ -20,8 +21,14 @@ do_compile () { do_install () { install -d ${D}${bindir} + + # mkimage install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage ln -sf uboot-mkimage ${D}${bindir}/mkimage + + # mkenvimage + install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage + ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage } RDEPENDS_${PN} += "dtc"
This utility is used for creation of images containing usable in run-time U-Boot environment. As of today this utility is added per-board like here [1] for Intel Edison board. [1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel-edison/tree/meta-intel-edison-bsp/recipes-bsp/u-boot/u-boot-tools_2014.04.bb Given there're quite some U-Boot tools that we may want to add later this recipe name switch from "u-boot-mkimage" to generic "u-boot-tools" still for compatibility we provide "u-boot-mkimage" with help of PROVIDES as well as proposed "u-boot-mkenvimage". Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Richard Purdie <richard.purdie@linuxfoundation.org> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Martin Jansa <martin.jansa@gmail.com> Cc: Ross Burton <ross.burton@intel.com> Cc: Marek Vasut <marex@denx.de> --- Changes v2 -> v3: * Recipe renamed to "u-boot-tools" to better match its contents (especially in the future as we add more tools there) * Existing "u-boot-mkimage" and newly introduced "u-boot-mkenvimage" made avaialble via PROVIDES Changes v1 -> v2: * Got rid of a separate recipe and instead added mkenvimage to u-boot mkimage recipy .../{u-boot-mkimage_2018.07.bb => u-boot-tools_2018.07.bb} | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) rename meta/recipes-bsp/u-boot/{u-boot-mkimage_2018.07.bb => u-boot-tools_2018.07.bb} (83%)