* [U-Boot] auto-update and DHCP
@ 2010-02-05 19:16 Beaman, Thomas
2010-02-05 20:47 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Beaman, Thomas @ 2010-02-05 19:16 UTC (permalink / raw)
To: u-boot
Hi,
I would like to use the auto-update feature that is enabled with
CONFIG_UPDATE_TFTP, which requires that the env variable serverip be set
for the tftp access. Our system uses DHCP to get the serverip env
variable, but this happens after the auto-update attempt has run. I have
not been able to find any documentation on using CONFIG_UPDATE_TFTP with
DHCP, any ideas on how to setup this configuration.
Thanks,
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] auto-update and DHCP
2010-02-05 19:16 [U-Boot] auto-update and DHCP Beaman, Thomas
@ 2010-02-05 20:47 ` Wolfgang Denk
2010-02-05 21:11 ` Beaman, Thomas
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-02-05 20:47 UTC (permalink / raw)
To: u-boot
Dear Tom,
In message <561E05732443A84A9BB3A75519C098F60B5A9D22@USA0300MS03.na.xerox.net> you wrote:
>
> I would like to use the auto-update feature that is enabled with
> CONFIG_UPDATE_TFTP, which requires that the env variable serverip be set
> for the tftp access. Our system uses DHCP to get the serverip env
> variable, but this happens after the auto-update attempt has run. I have
> not been able to find any documentation on using CONFIG_UPDATE_TFTP with
> DHCP, any ideas on how to setup this configuration.
I guess this will not work with the code as is. But you can try to
apply this patch, and then run the "dhcp" command from your "preboot"
settings:
diff --git a/common/main.c b/common/main.c
index 10d8904..c860b0b 100644
--- a/common/main.c
+++ b/common/main.c
@@ -305,10 +305,6 @@ void main_loop (void)
trab_vfd (bmp);
#endif /* CONFIG_VFD && VFD_TEST_LOGO */
-#if defined(CONFIG_UPDATE_TFTP)
- update_tftp ();
-#endif /* CONFIG_UPDATE_TFTP */
-
#ifdef CONFIG_BOOTCOUNT_LIMIT
bootcount = bootcount_load();
bootcount++;
@@ -369,6 +365,10 @@ void main_loop (void)
}
#endif /* CONFIG_PREBOOT */
+#if defined(CONFIG_UPDATE_TFTP)
+ update_tftp ();
+#endif /* CONFIG_UPDATE_TFTP */
+
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
s = getenv ("bootdelay");
bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY;
Note this is completely untested.
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
Anyone who knows history, particularly the history of Europe, will, I
think, recognize that the domination of education or of government by
any one particular religious faith is never a happy arrangement for
the people. - Eleanor Roosevelt
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] auto-update and DHCP
2010-02-05 20:47 ` Wolfgang Denk
@ 2010-02-05 21:11 ` Beaman, Thomas
2010-03-11 23:01 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Beaman, Thomas @ 2010-02-05 21:11 UTC (permalink / raw)
To: u-boot
Wolfgang,
This patch and running dhcp from preboot does work as expected. Is this
a change that should be put back?
Another question on this topic, what is the general strategy on
auto-updates. If I leave the .itb file on the tftpserver an update will
occur on every reboot. Is there a way to check any version info from the
.itb or uboot file to know if I am already at the uboot version in the
.itb file and then not attempt the flash update?
Regards,
Tom
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Friday, February 05, 2010 3:48 PM
To: Beaman, Thomas
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] auto-update and DHCP
Dear Tom,
In message
<561E05732443A84A9BB3A75519C098F60B5A9D22@USA0300MS03.na.xerox.net> you
wrote:
>
> I would like to use the auto-update feature that is enabled with
> CONFIG_UPDATE_TFTP, which requires that the env variable serverip be
> set for the tftp access. Our system uses DHCP to get the serverip env
> variable, but this happens after the auto-update attempt has run. I
> have not been able to find any documentation on using
> CONFIG_UPDATE_TFTP with DHCP, any ideas on how to setup this
configuration.
I guess this will not work with the code as is. But you can try to apply
this patch, and then run the "dhcp" command from your "preboot"
settings:
diff --git a/common/main.c b/common/main.c index 10d8904..c860b0b 100644
--- a/common/main.c
+++ b/common/main.c
@@ -305,10 +305,6 @@ void main_loop (void)
trab_vfd (bmp);
#endif /* CONFIG_VFD && VFD_TEST_LOGO */
-#if defined(CONFIG_UPDATE_TFTP)
- update_tftp ();
-#endif /* CONFIG_UPDATE_TFTP */
-
#ifdef CONFIG_BOOTCOUNT_LIMIT
bootcount = bootcount_load();
bootcount++;
@@ -369,6 +365,10 @@ void main_loop (void)
}
#endif /* CONFIG_PREBOOT */
+#if defined(CONFIG_UPDATE_TFTP)
+ update_tftp ();
+#endif /* CONFIG_UPDATE_TFTP */
+
#if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
s = getenv ("bootdelay");
bootdelay = s ? (int)simple_strtol(s, NULL, 10) :
CONFIG_BOOTDELAY;
Note this is completely untested.
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
Anyone who knows history, particularly the history of Europe, will, I
think, recognize that the domination of education or of government by
any one particular religious faith is never a happy arrangement for
the people. - Eleanor Roosevelt
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] auto-update and DHCP
2010-02-05 21:11 ` Beaman, Thomas
@ 2010-03-11 23:01 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2010-03-11 23:01 UTC (permalink / raw)
To: u-boot
Dear "Beaman, Thomas",
In message <561E05732443A84A9BB3A75519C098F60B5A9D24@USA0300MS03.na.xerox.net> you wrote:
>
> This patch and running dhcp from preboot does work as expected. Is this
> a change that should be put back?
Done.
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
"It may be that our role on this planet is not to worship God but to
create him." - Arthur C. Clarke
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-11 23:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-05 19:16 [U-Boot] auto-update and DHCP Beaman, Thomas
2010-02-05 20:47 ` Wolfgang Denk
2010-02-05 21:11 ` Beaman, Thomas
2010-03-11 23:01 ` Wolfgang Denk
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.