[OE-core] [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config

Tom Rini trini at konsulko.com
Wed Jun 21 12:03:17 UTC 2017


On Tue, Jun 20, 2017 at 07:55:44PM -0400, Denys Dmytriyenko wrote:
> On Tue, Jun 20, 2017 at 07:15:12PM -0300, Otavio Salvador wrote:
> > If a fw_env.config file is found in workdir, this is preferred over
> > the U-Boot example.
> > 
> > Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
> > ---
> > 
> >  meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.05.bb | 9 ++++++++-
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.05.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.05.bb
> > index c2e8f0fb84..0682f9274b 100644
> > --- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.05.bb
> > +++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2017.05.bb
> > @@ -19,7 +19,14 @@ do_install () {
> >  	install -d ${D}${sysconfdir}
> >  	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
> >  	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
> > -	install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
> > +
> > +	# If a specific file is added in a .bbappend, this is used instead
> > +	# of the generic one
> > +	if [ -e ${WORKDIR}/fw_env.config ]; then
> > +		install -m 0644 ${WORKDIR}/fw_env.config ${D}${sysconfdir}/fw_env.config
> 
> I don't get it - if it's expected that a .bbappend will be adding a more 
> specific version of fw_env.config, why that .bbappend can't simply install 
> it with do_install_append()?

Well, this is a lot more user friendly, and it's quite likely that if a
platform intends to ship u-boot-fw-utils they intend to provide a
functional one as well.  It would be a best-practices to provide one
that works for a machine.conf that supports U-Boot, even (and has env
stored somewhere, I mean it even supports env as a file).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170621/cc0e4128/attachment-0002.sig>


More information about the Openembedded-core mailing list