Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] u-boot-fw-utils: install config file
@ 2014-06-25  9:13 Maxin B. John
  2014-06-26 12:27 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Maxin B. John @ 2014-06-25  9:13 UTC (permalink / raw)
  To: openembedded-core; +Cc: Maxin B. John

From: "Maxin B. John" <maxin.john@enea.com>

The on-target fw_printenv and fw_setenv needs configuration file
(fw_env.config) to be present in the target.

Signed-off-by: Maxin B. John <maxin.john@enea.com>
---
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
index 14b0976..89fed8b 100644
--- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
@@ -26,8 +26,10 @@ do_compile () {
 
 do_install () {
   install -d ${D}${base_sbindir}
+  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
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] u-boot-fw-utils: install config file
  2014-06-25  9:13 [PATCH] u-boot-fw-utils: install config file Maxin B. John
@ 2014-06-26 12:27 ` Tom Rini
  2014-06-26 13:34   ` Maxin B. John
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2014-06-26 12:27 UTC (permalink / raw)
  To: Maxin B. John; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]

On Wed, Jun 25, 2014 at 11:13:59AM +0200, Maxin B. John wrote:
> From: "Maxin B. John" <maxin.john@enea.com>
> 
> The on-target fw_printenv and fw_setenv needs configuration file
> (fw_env.config) to be present in the target.
> 
> Signed-off-by: Maxin B. John <maxin.john@enea.com>
> ---
>  meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
> index 14b0976..89fed8b 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
> +++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb
> @@ -26,8 +26,10 @@ do_compile () {
>  
>  do_install () {
>    install -d ${D}${base_sbindir}
> +  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
>  }
>  
>  PACKAGE_ARCH = "${MACHINE_ARCH}"

We should really provide some way for the BSP to provide a functional
fw_env.config file as the one in the sources is mainly an example and
unlikely to work on most systems.

-- 
Tom

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 853 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] u-boot-fw-utils: install config file
  2014-06-26 12:27 ` Tom Rini
@ 2014-06-26 13:34   ` Maxin B. John
  2014-06-26 13:47     ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Maxin B. John @ 2014-06-26 13:34 UTC (permalink / raw)
  To: Tom Rini; +Cc: openembedded-core

Hi Tom,

On Thu, Jun 26, 2014 at 08:27:00AM -0400, Tom Rini wrote:
> On Wed, Jun 25, 2014 at 11:13:59AM +0200, Maxin B. John wrote:
> > From: "Maxin B. John" <maxin.john@enea.com>
> > 
<snip>
> > +  install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
> >  }
> >  
> >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> 
> We should really provide some way for the BSP to provide a functional
> fw_env.config file as the one in the sources is mainly an example and
> unlikely to work on most systems.
I do agree that it is just an example file. However, without the configuration 
file, fw_printenv will fail with this warning:

#fw_printenv 
Cannot parse config file: No such file or directory

IMHO, those who want to use a "real" config file, should use a proper ".bbappend"
eg:

do_install_append() {

case "${MACHINE}" in "mymachine" )
        echo ' myargs '> ${D}${sysconfdir}/fw_env.config;;
*);;

esac
}

Is this an acceptable way or should we modify it ?
> -- 
> Tom

Best Regards,
Maxin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] u-boot-fw-utils: install config file
  2014-06-26 13:34   ` Maxin B. John
@ 2014-06-26 13:47     ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-06-26 13:47 UTC (permalink / raw)
  To: Maxin B. John; +Cc: openembedded-core

On Thu, Jun 26, 2014 at 03:34:07PM +0200, Maxin B. John wrote:
> Hi Tom,
> 
> On Thu, Jun 26, 2014 at 08:27:00AM -0400, Tom Rini wrote:
> > On Wed, Jun 25, 2014 at 11:13:59AM +0200, Maxin B. John wrote:
> > > From: "Maxin B. John" <maxin.john@enea.com>
> > > 
> <snip>
> > > +  install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
> > >  }
> > >  
> > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > 
> > We should really provide some way for the BSP to provide a functional
> > fw_env.config file as the one in the sources is mainly an example and
> > unlikely to work on most systems.
> I do agree that it is just an example file. However, without the configuration 
> file, fw_printenv will fail with this warning:
> 
> #fw_printenv 
> Cannot parse config file: No such file or directory
> 
> IMHO, those who want to use a "real" config file, should use a proper ".bbappend"
> eg:
> 
> do_install_append() {
> 
> case "${MACHINE}" in "mymachine" )
>         echo ' myargs '> ${D}${sysconfdir}/fw_env.config;;
> *);;
> 
> esac
> }
> 
> Is this an acceptable way or should we modify it ?

Ah, OK, cobwebs dusted off.  The u-boot recipe currently provides
fw_env.config correct for the board in question, so long as it's
provided.

-- 
Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-26 13:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-25  9:13 [PATCH] u-boot-fw-utils: install config file Maxin B. John
2014-06-26 12:27 ` Tom Rini
2014-06-26 13:34   ` Maxin B. John
2014-06-26 13:47     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox