* [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default
@ 2011-12-22 18:59 Grant Erickson
2012-01-05 15:59 ` Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: Grant Erickson @ 2011-12-22 18:59 UTC (permalink / raw)
To: u-boot
This patch allows the U-Boot user space companion utility, fw_setenv,
to overwrite the 'ethaddr' key/value pair if the current value is set
to a per-board-configured default.
This change allows 'fw_setenv' to match the behavior of 'setenv' /
'env set' on the U-Boot command line.
Signed-off-by: Grant Erickson <marathon96@gmail.com>
---
tools/env/fw_env.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 996682e..2185be9 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -45,6 +45,8 @@
#include "fw_env.h"
+#include <config.h>
+
#define WHITESPACE(c) ((c == '\t') || (c == ' '))
#define min(x, y) ({ \
@@ -390,15 +392,23 @@ int fw_env_write(char *name, char *value)
* Delete any existing definition
*/
if (oldval) {
+#ifndef CONFIG_ENV_OVERWRITE
+
/*
* Ethernet Address and serial# can be set only once
*/
- if ((strcmp (name, "ethaddr") == 0) ||
- (strcmp (name, "serial#") == 0)) {
+ if (
+ (strcmp(name, "serial#") == 0) ||
+ ((strcmp(name, "ethaddr") == 0)
+#if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
+ && (strcmp(oldval, MK_STR(CONFIG_ETHADDR)) != 0)
+#endif /* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */
+ ) ) {
fprintf (stderr, "Can't overwrite \"%s\"\n", name);
errno = EROFS;
return -1;
}
+#endif /* CONFIG_ENV_OVERWRITE */
if (*++nxt == '\0') {
*env = '\0';
--
1.7.7.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default
2011-12-22 18:59 [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default Grant Erickson
@ 2012-01-05 15:59 ` Wolfgang Denk
2012-01-23 12:23 ` Andreas Bießmann
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2012-01-05 15:59 UTC (permalink / raw)
To: u-boot
Dear Grant Erickson,
In message <1324580395-27004-1-git-send-email-marathon96@gmail.com> you wrote:
> This patch allows the U-Boot user space companion utility, fw_setenv,
> to overwrite the 'ethaddr' key/value pair if the current value is set
> to a per-board-configured default.
>
> This change allows 'fw_setenv' to match the behavior of 'setenv' /
> 'env set' on the U-Boot command line.
>
> Signed-off-by: Grant Erickson <marathon96@gmail.com>
> ---
> tools/env/fw_env.c | 14 ++++++++++++--
> 1 files changed, 12 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The Buddha, the Godhead, resides quite as comfortably in the circuits
of a digital computer or the gears of a cycle transmission as he does
at the top of a mountain or in the petals of a flower.
- R. Pirsig, "Zen and the Art of Motorcycle Maintenance"
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default
2012-01-05 15:59 ` Wolfgang Denk
@ 2012-01-23 12:23 ` Andreas Bießmann
2012-01-23 13:30 ` [U-Boot] Toradex Colibri, PXA-270 (ARM) Daniel Mack
2012-01-23 20:40 ` [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default Mike Frysinger
0 siblings, 2 replies; 6+ messages in thread
From: Andreas Bießmann @ 2012-01-23 12:23 UTC (permalink / raw)
To: u-boot
Dear Wolfgang,
On 05.01.2012 16:59, Wolfgang Denk wrote:
> Dear Grant Erickson,
>
> In message <1324580395-27004-1-git-send-email-marathon96@gmail.com> you wrote:
>> This patch allows the U-Boot user space companion utility, fw_setenv,
>> to overwrite the 'ethaddr' key/value pair if the current value is set
>> to a per-board-configured default.
>>
>> This change allows 'fw_setenv' to match the behavior of 'setenv' /
>> 'env set' on the U-Boot command line.
>>
>> Signed-off-by: Grant Erickson <marathon96@gmail.com>
>> ---
>> tools/env/fw_env.c | 14 ++++++++++++--
>> 1 files changed, 12 insertions(+), 2 deletions(-)
>
> Applied, thanks.
This patch breaks building 'env' without board configuration.
This is bad cause our automatic build environment build this tool for
different boards. Specific configuration is done via /etc/fw_env.config.
Can't we use some build-time configuration like
http://patchwork.ozlabs.org/patch/120372/ ?
best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Toradex Colibri, PXA-270 (ARM)
2012-01-23 12:23 ` Andreas Bießmann
@ 2012-01-23 13:30 ` Daniel Mack
2012-01-23 14:28 ` Wolfgang Denk
2012-01-23 20:40 ` [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default Mike Frysinger
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Mack @ 2012-01-23 13:30 UTC (permalink / raw)
To: u-boot
Hello,
i recently stumbled upon a compile-error which appears after trying to
compile via
/./MAKEALL --arch arm --cpu pxa --vendor toradex/
, it appears U-Boot uses software-FP whereas the native XScale-libs use
hardware-FP, see for yourself please :
/[dmack at Blizzard ~/workspace/u-boot]$ ./MAKEALL --arch arm --cpu pxa --vendor toradex/
/Configuring for colibri_pxa270 board.../
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_udivsi3.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_udivsi3.oS)/
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_divsi3.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_divsi3.oS)/
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_umodsi3.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_umodsi3.oS)/
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_modsi3.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_modsi3.oS)/
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_dvmd_lnx.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_dvmd_lnx.oS)/
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_lshrdi3.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_lshrdi3.oS)/
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_ashldi3.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_ashldi3.oS)/
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_udivdi3.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_udivdi3.oS)/
/arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_clz.oS) uses hardware FP, whereas u-boot uses software FP/
/arm-linux-ld: failed to merge target specific data of file /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_clz.oS)/
/make: *** [u-boot] Fehler 1/
/size: './u-boot': No such file/
/--------------------- SUMMARY ----------------------------/
/Boards compiled: 1/
/Boards with warnings or errors: 1 ( colibri_pxa270 )/
/----------------------------------------------------------/
Is there a solution for this, am i missing something?
Best regards,
Daniel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Toradex Colibri, PXA-270 (ARM)
2012-01-23 13:30 ` [U-Boot] Toradex Colibri, PXA-270 (ARM) Daniel Mack
@ 2012-01-23 14:28 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2012-01-23 14:28 UTC (permalink / raw)
To: u-boot
Dear Daniel Mack,
In message <4F1D60E8.4030609@lertes.de> you wrote:
>
> i recently stumbled upon a compile-error which appears after trying to
> compile via
>
> /./MAKEALL --arch arm --cpu pxa --vendor toradex/
>
> , it appears U-Boot uses software-FP whereas the native XScale-libs use
> hardware-FP, see for yourself please :
This is a tool chain problem. You should get one that supports
soft-FP, especially on processors that don;t have a FPU in the first
place.
> /arm-linux-ld: ERROR: /usr/lib/gcc/arm-xscale-linux-gnu/3.4.6/libgcc.a(_udivsi3.oS) uses hardware FP, whereas u-boot uses software FP/
GCC 3.4 has always been (in)famous for causing issues, especially on
ARM. And it is so old that you can consider it unsupported.
> Is there a solution for this, am i missing something?
I guess you did not bother to check the mailing list archives? You
should.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Often it is fatal to live too long. - Racine
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default
2012-01-23 12:23 ` Andreas Bießmann
2012-01-23 13:30 ` [U-Boot] Toradex Colibri, PXA-270 (ARM) Daniel Mack
@ 2012-01-23 20:40 ` Mike Frysinger
1 sibling, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2012-01-23 20:40 UTC (permalink / raw)
To: u-boot
On Monday 23 January 2012 07:23:09 Andreas Bie?mann wrote:
> On 05.01.2012 16:59, Wolfgang Denk wrote:
> > Grant Erickson wrote:
> >> This patch allows the U-Boot user space companion utility, fw_setenv,
> >> to overwrite the 'ethaddr' key/value pair if the current value is set
> >> to a per-board-configured default.
> >>
> >> This change allows 'fw_setenv' to match the behavior of 'setenv' /
> >> 'env set' on the U-Boot command line.
> >>
> >> Signed-off-by: Grant Erickson <marathon96@gmail.com>
> >> ---
> >>
> >> tools/env/fw_env.c | 14 ++++++++++++--
> >> 1 files changed, 12 insertions(+), 2 deletions(-)
> >
> > Applied, thanks.
>
> This patch breaks building 'env' without board configuration.
> This is bad cause our automatic build environment build this tool for
> different boards. Specific configuration is done via /etc/fw_env.config.
> Can't we use some build-time configuration like
> http://patchwork.ozlabs.org/patch/120372/ ?
update your patch to take the new code into account. you're going to have to
rebase anyways to get it merged.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120123/58dedffa/attachment.pgp>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-23 20:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22 18:59 [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default Grant Erickson
2012-01-05 15:59 ` Wolfgang Denk
2012-01-23 12:23 ` Andreas Bießmann
2012-01-23 13:30 ` [U-Boot] Toradex Colibri, PXA-270 (ARM) Daniel Mack
2012-01-23 14:28 ` Wolfgang Denk
2012-01-23 20:40 ` [U-Boot] [PATCH] tools/env: allow overwrite of ethaddr on default Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox