u-boot: Add mkenvimage tool
PATCH 1/1 u-boot: Add mkenvimage tool
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, here [2] for Altera's SoCFPGA and I may guess there're others so instead of adding another one for ARC why don't we package it for each and everyone.
[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
[2] https://github.com/kraj/meta-altera/blob/master/recipes-bsp/u-boot/u-boot-mkenvimage_v2016.11.bb
--- .../u-boot/u-boot-mkenvimage_2018.07.bb | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 meta/recipes-bsp/u-boot/u-boot-mkenvimage_2018.07.bb
meta/recipes-bsp/u-boot/u-boot-mkenvimage_2018.07.bb new file +27 -0
@@ -0,0 +1,27 @@ +require u-boot-common_${PV}.inc + +SUMMARY = "U-Boot bootloader environment image creation tool" +DEPENDS += "openssl" + +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' +EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' + +do_compile () { + oe_runmake sandbox_defconfig + + # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and + # generating it requires bin2header tool, which for target build + # is built with target tools and thus cannot be executed on host. + sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config + + oe_runmake cross_tools NO_SDL=1 +} + +do_install () { + install -d ${D}${bindir} + install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage + ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage +} + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.16.2
PATCH 1/1 u-boot: Add mkenvimage tool
Quoted 11 lines · Alexey Brodkin
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, here [2] for Altera's SoCFPGA and I may guess there're others so instead of adding another one for ARC why don't we package it for each and everyone.
[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
[2] https://github.com/kraj/meta-altera/blob/master/recipes-bsp/u-boot/u-boot-mkenvimage_v2016.11.bb
If this is applicable/works for all u-boot based machines then I think it makes sense to have it on OE-core.
Quoted 48 lines
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>Cc Alexander Kanavin <alexander.kanavin at linux.intel.com>Cc Richard Purdie <richard.purdie at linuxfoundation.org>Cc Otavio Salvador <otavio at ossystems.com.br>Cc Ross Burton <ross.burton at intel.com>Cc Marek Vasut <marex at denx.de>--- .../u-boot/u-boot-mkenvimage_2018.07.bb | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 meta/recipes-bsp/u-boot/u-boot-mkenvimage_2018.07.bbmeta/recipes-bsp/u-boot/u-boot-mkenvimage_2018.07.bb new file +27
-1@@ -0,0 +1,27 @@ +require u-boot-common_${PV}.inc + +SUMMARY = "U-Boot bootloader environment image creation tool" +DEPENDS += "openssl" + +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' +EXTRA_OEMAKE_class-nativesdk = 'CROSS_COMPILE="${HOST_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" STRIP=true V=1' + +do_compile () { + oe_runmake sandbox_defconfig + + # Disable CONFIG_CMD_LICENSE, license.h is not used by tools and + # generating it requires bin2header tool, which for target build + # is built with target tools and thus cannot be executed on host. + sed -i "s/CONFIG_CMD_LICENSE=.*/# CONFIG_CMD_LICENSE is not set/" .config + + oe_runmake cross_tools NO_SDL=1 +} + +do_install () { + install -d ${D}${bindir} + install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage + ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimage +} + +BBCLASSEXTEND = "native nativesdk" --2.16.2
PATCH 1/1 u-boot: Add mkenvimage tool
Quoted 11 lines · Khem Raj
Quoted 9 lines · Alexey Brodkin
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, here [2] for Altera's SoCFPGA and I may guess there're others so instead of adding another one for ARC why don't we package it for each and everyone.
Quoted 5 lines
Quoted 2 lines
[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
[2] https://github.com/kraj/meta-altera/blob/master/recipes-bsp/u-boot/u-boot-mkenvimage_v2016.11.bbIf this is applicable/works for all u-boot based machines then I think it makes sense to have it on OE-core.
It is.
Quoted 6 lines
Quoted 6 lines
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>Cc Alexander Kanavin <alexander.kanavin at linux.intel.com>Cc Richard Purdie <richard.purdie at linuxfoundation.org>Cc Otavio Salvador <otavio at ossystems.com.br>Cc Ross Burton <ross.burton at intel.com>Cc Marek Vasut <marex at denx.de>
That said, could the recipe for mkimage and mkenvimage be somehow deduplicated ? There seems to be a lot of common stuff.
Quoted 2 lines
Quoted 2 lines
--- .../u-boot/u-boot-mkenvimage_2018.07.bb | 27 ++++++++++++++++++++++
btw why was U-Boot not updated using AUH to 2018.09/2018.11 ?
Signature · 2 lines
Best regards, Marek Vasut
PATCH 1/1 u-boot: Add mkenvimage tool
Hi Marek,
Quoted 28 lines · Marek Vasut
Quoted 10 lines · Khem Raj
Quoted 8 lines · Alexey Brodkin
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, here [2] for Altera's SoCFPGA and I may guess there're others so instead of adding another one for ARC why don't we package it for each and everyone.
Quoted 7 lines
Quoted 4 lines
[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=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=cK5urAA7P2ER1AvKZdD3CEL5r23DwdtJ4Iohy_QCUSQ&s=VyVOHq5I3FsOXvOf7SQgVlwtTfKX0bN5ZmPPehjD-zw&e=
[2]
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kraj_meta-2Daltera_blob_master_recipes-2Dbsp_u-2Dboot_u-2Dboot-2Dmkenvimage-5Fv2016.11.bb&d=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=cK5urAA7P2ER1AvKZdD3CEL5r23DwdtJ4Iohy_QCUSQ&s=TDPtpmofctGuP4dejRGli0SBUReQQPoiFQsWPHs4vV8&e=If this is applicable/works for all u-boot based machines then I think it makes sense to have it on OE-core.
It is.
Quoted 6 lines
Quoted 6 lines
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>Cc Alexander Kanavin <alexander.kanavin at linux.intel.com>Cc Richard Purdie <richard.purdie at linuxfoundation.org>Cc Otavio Salvador <otavio at ossystems.com.br>Cc Ross Burton <ross.burton at intel.com>Cc Marek Vasut <marex at denx.de>
Quoted 4 lines
Reviewed-by Marek Vasut <marex at denx.de>That said, could the recipe for mkimage and mkenvimage be somehow deduplicated ? There seems to be a lot of common stuff.
I'd say why don't we just have one recipe for all U-Boot tools instead of adding tools one-by-one?
-Alexey
PATCH 1/1 u-boot: Add mkenvimage tool
Quoted 31 lines · Alexey Brodkin
Hi Marek,
Quoted 28 lines · Marek Vasut
Quoted 10 lines · Khem Raj
Quoted 8 lines · Alexey Brodkin
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, here [2] for Altera's SoCFPGA and I may guess there're others so instead of adding another one for ARC why don't we package it for each and everyone.
Quoted 7 lines
Quoted 4 lines
[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=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=cK5urAA7P2ER1AvKZdD3CEL5r23DwdtJ4Iohy_QCUSQ&s=VyVOHq5I3FsOXvOf7SQgVlwtTfKX0bN5ZmPPehjD-zw&e=
[2]
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kraj_meta-2Daltera_blob_master_recipes-2Dbsp_u-2Dboot_u-2Dboot-2Dmkenvimage-5Fv2016.11.bb&d=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=cK5urAA7P2ER1AvKZdD3CEL5r23DwdtJ4Iohy_QCUSQ&s=TDPtpmofctGuP4dejRGli0SBUReQQPoiFQsWPHs4vV8&e=If this is applicable/works for all u-boot based machines then I think it makes sense to have it on OE-core.
It is.
Quoted 6 lines
Quoted 6 lines
Signed-off-by Alexey Brodkin <[email protected]>Cc Alexander Kanavin <[email protected]>Cc Richard Purdie <[email protected]>Cc Otavio Salvador <[email protected]>Cc Ross Burton <[email protected]>Cc Marek Vasut <[email protected]>
Quoted 7 lines
Quoted 4 lines
Reviewed-by Marek Vasut <[email protected]>That said, could the recipe for mkimage and mkenvimage be somehow deduplicated ? There seems to be a lot of common stuff.
I'd say why don't we just have one recipe for all U-Boot tools instead of adding tools one-by-one?
Or add:
install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage
ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimageto existing u-boot-mkimage recipe, that's what I'm doing in u-boot-mkimage bbappend.
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
PATCH 1/1 u-boot: Add mkenvimage tool
Hi Martin,
Quoted 2 lines · Martin Jansa
Quoted 1 line · Alexey Brodkin
Hi Marek,
[snip]
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Reviewed-by Marek Vasut <marex at denx.de>That said, could the recipe for mkimage and mkenvimage be somehow deduplicated ? There seems to be a lot of common stuff.
I'd say why don't we just have one recipe for all U-Boot tools instead of adding tools one-by-one?
Quoted 6 lines
Or add:
install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimageto existing u-boot-mkimage recipe, that's what I'm doing in u-boot-mkimage bbappend.
Sure and indeed that was my initial intention but then I noticed there're separate recipes for mkimage and fw-utils and decided to act similarly.
If OE people is fine with addition of another (pretty similar ideologically) utility in u-boot-mkimage_xx.bb then I'm happy to implement it that way.
-Alexey
Hi,
yes fw-utils is similar, but has different dependencies and builds slightly differently.
mkenvimage on the other hand is already built by current u-boot-mkimage recipe, just not installed by default (adding separate recipe would build it twice).
Quoted 33 lines · Alexey Brodkin
Hi Martin,
Quoted 2 lines · Martin Jansa
Quoted 1 line · Alexey Brodkin
Hi Marek,
[snip]
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
Reviewed-by Marek Vasut <[email protected]>That said, could the recipe for mkimage and mkenvimage be somehow deduplicated ? There seems to be a lot of common stuff.
I'd say why don't we just have one recipe for all U-Boot tools instead of adding tools one-by-one?
Quoted 6 lines
Or add:
install -m 0755 tools/mkenvimage ${D}${bindir}/uboot-mkenvimage ln -sf uboot-mkenvimage ${D}${bindir}/mkenvimageto existing u-boot-mkimage recipe, that's what I'm doing in u-boot-mkimage bbappend.
Sure and indeed that was my initial intention but then I noticed there're separate recipes for mkimage and fw-utils and decided to act similarly.
If OE people is fine with addition of another (pretty similar ideologically)
utility in u-boot-mkimage_xx.bb then I'm happy to implement it that way.-Alexey
PATCH 1/1 u-boot: Add mkenvimage tool
Quoted 1 line · Martin Jansa
yes fw-utils is similar, but has different dependencies and builds slightly differently.
fw-utils use the machine setup to find the default environment to use, so it is indeed machine specific.
Signature · 3 lines
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
PATCH 1/1 u-boot: Add mkenvimage tool
In reply to Khem RajHi Khem,
Quoted 10 lines · Khem Raj
Quoted 8 lines · Alexey Brodkin
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, here [2] for Altera's SoCFPGA and I may guess there're others so instead of adding another one for ARC why don't we package it for each and everyone.
Quoted 7 lines
Quoted 4 lines
[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=U0I6P-1P3vft6mR4soZ9Y6ptJqYWloOoS0ogvO2Rzv4&s=WEknmJT4TnByCWMMzh4D-2sDrYv5_kx2V1Qk8SYtJY8&e=
[2]
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kraj_meta-2Daltera_blob_master_recipes-2Dbsp_u-2Dboot_u-2Dboot-2Dmkenvimage-5Fv2016.11.bb&d=DwIBaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=U0I6P-1P3vft6mR4soZ9Y6ptJqYWloOoS0ogvO2Rzv4&s=OiXy88hL3o5z9JN0O88EUo3ttvvgFQnC2LnDc_xhGyY&e=If this is applicable/works for all u-boot based machines then I think it makes sense to have it on OE-core.
Well "mkenvimage" is one of standard U-Boot tools so it has nothing specific for any architecture or board whatsoever.
It is not used that often as "mkimage" probably because people mostly depends on default U-Boot env settings which are compiled-in U-Boot binary with help of CONFIG_EXTRA_ENV_SETTINGS="..." but IMHO it is rather useful as we may prepare fine-tuned environment setups for a particular use-case from pure text-based input.
-Alexey
PATCH 1/1 u-boot: Add mkenvimage tool
Quoted 21 lines · Alexey Brodkin
Hi Khem,
Quoted 10 lines · Khem Raj
Quoted 8 lines · Alexey Brodkin
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, here [2] for Altera's SoCFPGA and I may guess there're others so instead of adding another one for ARC why don't we package it for each and everyone.
Quoted 7 lines
Quoted 4 lines
[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=U0I6P-1P3vft6mR4soZ9Y6ptJqYWloOoS0ogvO2Rzv4&s=WEknmJT4TnByCWMMzh4D-2sDrYv5_kx2V1Qk8SYtJY8&e=
[2]
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_kraj_meta-2Daltera_blob_master_recipes-2Dbsp_u-2Dboot_u-2Dboot-2Dmkenvimage-5Fv2016.11.bb&d=DwIBaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=U0I6P-1P3vft6mR4soZ9Y6ptJqYWloOoS0ogvO2Rzv4&s=OiXy88hL3o5z9JN0O88EUo3ttvvgFQnC2LnDc_xhGyY&e=If this is applicable/works for all u-boot based machines then I think it makes sense to have it on OE-core.
Quoted 8 lines
Well "mkenvimage" is one of standard U-Boot tools so it has nothing specific for any architecture or board whatsoever.
It is not used that often as "mkimage" probably because people mostly depends on default U-Boot env settings which are compiled-in U-Boot binary with help of
CONFIG_EXTRA_ENV_SETTINGS="..." but IMHO it is rather useful as we may prepare fine-tuned environment setups for a particular use-case from pure text-based input.
It is useful, but I think it is better to include it into current recipe (as Martin suggest) instead of adding a new one.
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================