* [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config @ 2017-06-20 22:15 Otavio Salvador 2017-06-20 23:55 ` Denys Dmytriyenko 0 siblings, 1 reply; 8+ messages in thread From: Otavio Salvador @ 2017-06-20 22:15 UTC (permalink / raw) To: OpenEmbedded Core Mailing List Cc: marex, trini, Otavio Salvador, brad.mouring If a fw_env.config file is found in workdir, this is preferred over the U-Boot example. Signed-off-by: Otavio Salvador <otavio@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 + else + install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config.example + fi } do_install_class-cross () { -- 2.13.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config 2017-06-20 22:15 [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config Otavio Salvador @ 2017-06-20 23:55 ` Denys Dmytriyenko 2017-06-21 12:03 ` Tom Rini 2017-06-21 15:25 ` Marek Vasut 0 siblings, 2 replies; 8+ messages in thread From: Denys Dmytriyenko @ 2017-06-20 23:55 UTC (permalink / raw) To: Otavio Salvador Cc: marex, trini, brad.mouring, OpenEmbedded Core Mailing List 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@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()? > + else > + install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config.example > + fi > } > > do_install_class-cross () { > -- > 2.13.1 > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config 2017-06-20 23:55 ` Denys Dmytriyenko @ 2017-06-21 12:03 ` Tom Rini 2017-06-21 15:50 ` Denys Dmytriyenko 2017-06-21 15:25 ` Marek Vasut 1 sibling, 1 reply; 8+ messages in thread From: Tom Rini @ 2017-06-21 12:03 UTC (permalink / raw) To: Denys Dmytriyenko Cc: marex, brad.mouring, Otavio Salvador, OpenEmbedded Core Mailing List [-- Attachment #1: Type: text/plain, Size: 1838 bytes --] 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@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 [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config 2017-06-21 12:03 ` Tom Rini @ 2017-06-21 15:50 ` Denys Dmytriyenko 2017-06-21 16:52 ` Tom Rini 0 siblings, 1 reply; 8+ messages in thread From: Denys Dmytriyenko @ 2017-06-21 15:50 UTC (permalink / raw) To: Tom Rini Cc: marex, brad.mouring, Otavio Salvador, OpenEmbedded Core Mailing List On Wed, Jun 21, 2017 at 08:03:17AM -0400, Tom Rini wrote: > 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@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). Why don't we go all the way there? If we say machine.conf is meant to define a machine-specific env config, let's do it generically. What I'm arguing against here is some partial solution - modifying the global recipe in oe-core, but still require .bbappend to provide a file. It's should either be "do everything in .bbappend, like we all do now" or "do everything in main oe-core recipe and let machine.conf define it". -- Denys ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config 2017-06-21 15:50 ` Denys Dmytriyenko @ 2017-06-21 16:52 ` Tom Rini 2017-06-21 18:01 ` Otavio Salvador 0 siblings, 1 reply; 8+ messages in thread From: Tom Rini @ 2017-06-21 16:52 UTC (permalink / raw) To: Denys Dmytriyenko Cc: marex, brad.mouring, Otavio Salvador, OpenEmbedded Core Mailing List [-- Attachment #1: Type: text/plain, Size: 2676 bytes --] On Wed, Jun 21, 2017 at 11:50:23AM -0400, Denys Dmytriyenko wrote: > On Wed, Jun 21, 2017 at 08:03:17AM -0400, Tom Rini wrote: > > 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@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). > > Why don't we go all the way there? If we say machine.conf is meant to define a > machine-specific env config, let's do it generically. > > What I'm arguing against here is some partial solution - modifying the global > recipe in oe-core, but still require .bbappend to provide a file. It's should > either be "do everything in .bbappend, like we all do now" or "do everything > in main oe-core recipe and let machine.conf define it". OK, we should do it globally with a ??= of the in-tree example only? Or just let u-boot-fw-utils fail to build? -- Tom [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config 2017-06-21 16:52 ` Tom Rini @ 2017-06-21 18:01 ` Otavio Salvador 2017-06-21 18:17 ` Tom Rini 0 siblings, 1 reply; 8+ messages in thread From: Otavio Salvador @ 2017-06-21 18:01 UTC (permalink / raw) To: Tom Rini Cc: Marek Vasut, OpenEmbedded Core Mailing List, Otavio Salvador, Brad Mouring On Wed, Jun 21, 2017 at 1:52 PM, Tom Rini <trini@konsulko.com> wrote: > On Wed, Jun 21, 2017 at 11:50:23AM -0400, Denys Dmytriyenko wrote: >> What I'm arguing against here is some partial solution - modifying the global >> recipe in oe-core, but still require .bbappend to provide a file. It's should >> either be "do everything in .bbappend, like we all do now" or "do everything >> in main oe-core recipe and let machine.conf define it". > > OK, we should do it globally with a ??= of the in-tree example only? Or > just let u-boot-fw-utils fail to build? Maybe the best is to allow for boards to have its fw_env.config inside U-Boot so people can provide a 'good' base for users. Doing so, we can teach the recipe to install it? -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config 2017-06-21 18:01 ` Otavio Salvador @ 2017-06-21 18:17 ` Tom Rini 0 siblings, 0 replies; 8+ messages in thread From: Tom Rini @ 2017-06-21 18:17 UTC (permalink / raw) To: Otavio Salvador Cc: Marek Vasut, OpenEmbedded Core Mailing List, Otavio Salvador, Brad Mouring [-- Attachment #1: Type: text/plain, Size: 1228 bytes --] On Wed, Jun 21, 2017 at 03:01:36PM -0300, Otavio Salvador wrote: > On Wed, Jun 21, 2017 at 1:52 PM, Tom Rini <trini@konsulko.com> wrote: > > On Wed, Jun 21, 2017 at 11:50:23AM -0400, Denys Dmytriyenko wrote: > >> What I'm arguing against here is some partial solution - modifying the global > >> recipe in oe-core, but still require .bbappend to provide a file. It's should > >> either be "do everything in .bbappend, like we all do now" or "do everything > >> in main oe-core recipe and let machine.conf define it". > > > > OK, we should do it globally with a ??= of the in-tree example only? Or > > just let u-boot-fw-utils fail to build? > > Maybe the best is to allow for boards to have its fw_env.config inside > U-Boot so people can provide a 'good' base for users. Doing so, we can > teach the recipe to install it? No, I don't like that. One could generate probably-correct config for NAND/NOR. But UBI and FAT (and EXT4) start to become a per-distro thing. This is even somewhat true of MMC where it's more likely that you'll know what maps out to /dev/mmcblk0 vs /dev/mmcblk1, and upstream U-Boot won't know what kernel people are going to boot and then have give a device name. -- Tom [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config 2017-06-20 23:55 ` Denys Dmytriyenko 2017-06-21 12:03 ` Tom Rini @ 2017-06-21 15:25 ` Marek Vasut 1 sibling, 0 replies; 8+ messages in thread From: Marek Vasut @ 2017-06-21 15:25 UTC (permalink / raw) To: Denys Dmytriyenko, Otavio Salvador Cc: trini, brad.mouring, OpenEmbedded Core Mailing List On 06/21/2017 01:55 AM, 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@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()? +1 , I dont get it either. Just use do_install_append and be done with it. -- Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-06-21 18:16 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-06-20 22:15 [PATCH] u-boot-fw-utils: Allow replacement of fw_env.config Otavio Salvador 2017-06-20 23:55 ` Denys Dmytriyenko 2017-06-21 12:03 ` Tom Rini 2017-06-21 15:50 ` Denys Dmytriyenko 2017-06-21 16:52 ` Tom Rini 2017-06-21 18:01 ` Otavio Salvador 2017-06-21 18:17 ` Tom Rini 2017-06-21 15:25 ` Marek Vasut
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.