* [U-Boot] fw_setenv writes to bootdelay but not ethaddr
@ 2012-04-05 20:32 Bishop, Mark
2012-04-05 21:29 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Bishop, Mark @ 2012-04-05 20:32 UTC (permalink / raw)
To: u-boot
root:/> fw_setenv bootdelay 3
MTD_open
MTD_ioctl
MTD_ioctl
MTD_read
MTD_close
MTD_open
MTD_ioctl
MTD_ioctl
MTD_ioctl
nand_erase_nand: start = 0x000000060000, len = 131072
MTD_write
MTD_ioctl
MTD_close
nand_sync: called
root:/>
root:/> fw_setenv ethaddr X1:X2:X3:X4:X5:X6
MTD_open
MTD_ioctl
MTD_ioctl
MTD_read
MTD_close
Can't overwrite "ethaddr"
root:/>
Where Xn is a valid MAC address.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] fw_setenv writes to bootdelay but not ethaddr
2012-04-05 20:32 [U-Boot] fw_setenv writes to bootdelay but not ethaddr Bishop, Mark
@ 2012-04-05 21:29 ` Mike Frysinger
[not found] ` <5D308BD40154E4439D82454FE483A5020661A0F1@EVS4.nam.ci.root>
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2012-04-05 21:29 UTC (permalink / raw)
To: u-boot
On Thursday 05 April 2012 16:32:11 Bishop, Mark wrote:
> root:/> fw_setenv ethaddr X1:X2:X3:X4:X5:X6
> Can't overwrite "ethaddr"
looks correct to me. you probably didn't set CONFIG_ENV_OVERWRITE.
-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/20120405/884e31ed/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] fw_setenv writes to bootdelay but not ethaddr
[not found] ` <5D308BD40154E4439D82454FE483A5020661A0F1@EVS4.nam.ci.root>
@ 2012-04-08 21:31 ` Mike Frysinger
[not found] ` <5D308BD40154E4439D82454FE483A5020661A0FA@EVS4.nam.ci.root>
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2012-04-08 21:31 UTC (permalink / raw)
To: u-boot
On Sunday 08 April 2012 17:15:26 Bishop, Mark wrote:
> From: Mike Frysinger [mailto:vapier at gentoo.org]
> > On Thursday 05 April 2012 16:32:11 Bishop, Mark wrote:
> > > root:/> fw_setenv ethaddr X1:X2:X3:X4:X5:X6
> > > Can't overwrite "ethaddr"
> >
> > looks correct to me. you probably didn't set CONFIG_ENV_OVERWRITE.
>
> I wish it was so:
> #define CONFIG_ENV_OVERWRITE 1
> is present in my board file.
>
> I've checked to make sure that it is the correct header file. I've also
> checked to make sure that CONFIG_OVERWRITE_ETHADDR_ONCE is not set.
>
> I'm using the slightly outdated uclinux uboot from their head repo and I am
> checking the patches applied to the uboot head if any were to fix
> something like this.
sorry, should have been a little clearer. the tools installed by uclinux-dist
do not have a config, so it uses the default one. the CONFIG_xxx settings in
your u-boot don't get used. fw_printenv has to be built with those config
settings.
-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/20120408/a1f2017f/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] fw_setenv writes to bootdelay but not ethaddr
[not found] ` <5D308BD40154E4439D82454FE483A5020661A0FA@EVS4.nam.ci.root>
@ 2012-04-10 4:39 ` Mike Frysinger
0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2012-04-10 4:39 UTC (permalink / raw)
To: u-boot
On Sunday 08 April 2012 18:16:51 Bishop, Mark wrote:
> > -----Original Message-----
> > From: Mike Frysinger [mailto:vapier at gentoo.org]
> > Sent: Sunday, April 08, 2012 5:32 PM
> > To: Bishop, Mark
> > Cc: u-boot at lists.denx.de
> > Subject: Re: [U-Boot] fw_setenv writes to bootdelay but not ethaddr
> >
> > On Sunday 08 April 2012 17:15:26 Bishop, Mark wrote:
> > > From: Mike Frysinger [mailto:vapier at gentoo.org]
> > >
> > > > On Thursday 05 April 2012 16:32:11 Bishop, Mark wrote:
> > > > > root:/> fw_setenv ethaddr X1:X2:X3:X4:X5:X6 Can't overwrite
> > > > > "ethaddr"
> > > >
> > > > looks correct to me. you probably didn't set CONFIG_ENV_OVERWRITE.
> > >
> > > I wish it was so:
> > > #define CONFIG_ENV_OVERWRITE 1
> > > is present in my board file.
> > >
> > > I've checked to make sure that it is the correct header file. I've
> > > also checked to make sure that CONFIG_OVERWRITE_ETHADDR_ONCE is not
> >
> > set.
> >
> > > I'm using the slightly outdated uclinux uboot from their head repo
> >
> > and
> >
> > > I am checking the patches applied to the uboot head if any were to
> >
> > fix
> >
> > > something like this.
> >
> > sorry, should have been a little clearer. the tools installed by
> > uclinux-dist do not have a config, so it uses the default one. the
> > CONFIG_xxx settings in your u-boot don't get used. fw_printenv has to
> > be built with those config settings.
> > -mike
>
> The entire conditional in fw_env_write() is wacked out.
>
> If the value is already set, then it never sets it again.
>
> .....
> if ((oldval = envmatch (name, env)) != NULL)
> break;
> }
>
> /*
> * Delete any existing definition
> */
> if (oldval) {
> /*
> * Ethernet Address and serial# can be set only once
> */
> if ((strcmp (name, "ethaddr") == 0) ||
> (strcmp (name, "serial#") == 0)) {
> fprintf (stderr, "Can't overwrite \"%s\"\n", name);
> errno = EROFS;
> return -1;
> .........
>
> I would have expected it to use a #ifdef CONFIG_OVERWRITE_ETHADDR_ONCE, but
> this is only supposed to be an example.
maybe the code base you're using is old. when i look at u-boot mainline, i
see that being protected by "#ifndef CONFIG_ENV_OVERWRITE".
> I am just going to remove the guard and move on.
should be fine as well
-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/20120410/61a3cbbd/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-10 4:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 20:32 [U-Boot] fw_setenv writes to bootdelay but not ethaddr Bishop, Mark
2012-04-05 21:29 ` Mike Frysinger
[not found] ` <5D308BD40154E4439D82454FE483A5020661A0F1@EVS4.nam.ci.root>
2012-04-08 21:31 ` Mike Frysinger
[not found] ` <5D308BD40154E4439D82454FE483A5020661A0FA@EVS4.nam.ci.root>
2012-04-10 4:39 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox