u-boot-fw-utils: install config file
PATCH 1/1 u-boot-fw-utils: install config file
From: "Maxin B. John" <[email protected]>
The on-target fw_printenv and fw_setenv needs configuration file (fw_env.config) to be present in the target.
--- meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb +2 -0
@@ -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}"
Signature · 1 line
1.7.10.4
Quoted 15 lines · Maxin B. John
From: "Maxin B. John" <[email protected]>
The on-target
fw_printenvandfw_setenvneeds configuration file (fw_env.config) to be present in the target.Signed-off-by Maxin B. John <[email protected]>--- meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb | 2 ++ 1 file changed, 2 insertions(+)meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb +0
-0
meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb do_compile () { · line 35
Quoted 10 lines
meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb +2
-0@@ -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.
Signature · 1 line
Tom
Hi Tom,
Quoted 3 lines · Tom Rini
Quoted 2 lines · Maxin B. John
From: "Maxin B. John" <[email protected]>
<snip>
Quoted 8 lines
Quoted 4 lines
+ 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 ?
Quoted 2 lines
Signature · 1 line
Tom
Best Regards,
Maxin
Quoted 26 lines · Maxin B. John
Hi Tom,
Quoted 3 lines · Tom Rini
Quoted 2 lines · Maxin B. John
From: "Maxin B. John" <[email protected]>
<snip>
Quoted 8 lines
Quoted 4 lines
+ 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_printenvwill fail with this warning:#fw_printenv
Cannot parse config file: No such file or directoryIMHO, those who want to use a "real" config file, should use a proper ".bbappend" eg:
do_install_append(){
Quoted 8 lines
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.
Signature · 1 line
Tom