All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] Can DHCP be used for TFTP booting?
@ 2008-01-15 22:17 hce
  2008-01-15 22:30 ` Ben Warren
  2008-01-15 22:45 ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: hce @ 2008-01-15 22:17 UTC (permalink / raw)
  To: u-boot

Hi,

I am currently using a fixed tftp server and client IP address for
booting from tftp, it works fine. I am wondering if the DHCP can be
used or not for tftp booting, either for both TFTP server and client
IP address or just for client IP address? If so, could you please give
an example of how to config DHCP parameters in CONFIG_BOOTARGS and
CONFIG_BOOTCOMMAND?

Thank you.

Jim

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

* [U-Boot-Users] Can DHCP be used for TFTP booting?
  2008-01-15 22:17 [U-Boot-Users] Can DHCP be used for TFTP booting? hce
@ 2008-01-15 22:30 ` Ben Warren
  2008-01-16  4:12   ` hce
  2008-01-15 22:45 ` Wolfgang Denk
  1 sibling, 1 reply; 6+ messages in thread
From: Ben Warren @ 2008-01-15 22:30 UTC (permalink / raw)
  To: u-boot

hce wrote:
> Hi,
>
> I am currently using a fixed tftp server and client IP address for
> booting from tftp, it works fine. I am wondering if the DHCP can be
> used or not for tftp booting, either for both TFTP server and client
> IP address or just for client IP address? If so, could you please give
> an example of how to config DHCP parameters in CONFIG_BOOTARGS and
> CONFIG_BOOTCOMMAND?
>   
DHCP can be used for obtaining an IP address and also booting. My advice 
is to play with it yourself. Make sure you include CONFIG_CMD_DHCP, and 
then try "help dhcp". Sorry for the lack of hand holding, but it's the 
best way for you to learn. If you're really stuck, ask again.

regards,
Ben

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

* [U-Boot-Users] Can DHCP be used for TFTP booting?
  2008-01-15 22:17 [U-Boot-Users] Can DHCP be used for TFTP booting? hce
  2008-01-15 22:30 ` Ben Warren
@ 2008-01-15 22:45 ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2008-01-15 22:45 UTC (permalink / raw)
  To: u-boot

In message <95455e980801151417v6ee20603uc740c8536c3aee5e@mail.gmail.com> you wrote:
> 
> I am currently using a fixed tftp server and client IP address for
> booting from tftp, it works fine. I am wondering if the DHCP can be
> used or not for tftp booting, either for both TFTP server and client
> IP address or just for client IP address? If so, could you please give
> an example of how to config DHCP parameters in CONFIG_BOOTARGS and
> CONFIG_BOOTCOMMAND?

yes, it can be used. Just run the "dhcpboot" command (or short
"dhcp"), and follow the description in The Fine Manual how to pass
command line information to the Linux kernel.

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 use of anthropomorphic terminology when  dealing  with  computing
systems is a symptom of professional immaturity.   -- Edsger Dijkstra

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

* [U-Boot-Users] Can DHCP be used for TFTP booting?
  2008-01-15 22:30 ` Ben Warren
@ 2008-01-16  4:12   ` hce
  2008-01-16  4:39     ` Ben Warren
  0 siblings, 1 reply; 6+ messages in thread
From: hce @ 2008-01-16  4:12 UTC (permalink / raw)
  To: u-boot

On Jan 16, 2008 9:30 AM, Ben Warren <biggerbadderben@gmail.com> wrote:
>
> hce wrote:
> > Hi,
> >
> > I am currently using a fixed tftp server and client IP address for
> > booting from tftp, it works fine. I am wondering if the DHCP can be
> > used or not for tftp booting, either for both TFTP server and client
> > IP address or just for client IP address? If so, could you please give
> > an example of how to config DHCP parameters in CONFIG_BOOTARGS and
> > CONFIG_BOOTCOMMAND?
> >
> DHCP can be used for obtaining an IP address and also booting. My advice
> is to play with it yourself. Make sure you include CONFIG_CMD_DHCP, and
> then try "help dhcp". Sorry for the lack of hand holding, but it's the
> best way for you to learn. If you're really stuck, ask again.

I've tried to run "help dhcp", it printed out "dhcp". Nothing else I
could see. I've searched Internet to try to find a format of
CONFIG_CMD_DHCP. Yes, I am very much stuck at the moment. Could you
please point me a reference manual for DHCP boot set up as well
relavent to following issues?

What I can think of there may be two issues need to be clarified:

(1) How to set following parameters:

#define CONFIG_BOOTARGS "..... ip=dhcp?? ..."
#define CONFIG_BOOTCOMMAND "setenv ipaddr dhcp ???..."
#define CONFIG_CMD_DHCP "dhcp ???"

(2) How to set DHCP for /tftpboot in /etc/exports?

All above set up are specific IP addresses currently (CONFIG_CMD_DHCP
is not set yet), I have no idea how the specific IP addresses can be
replaced by DHCP?

BTW, I am running uboot on ARM 9 processor, booting from flash.

Thank you.

Kind Regards,

Jim
> regards,
> Ben
>

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

* [U-Boot-Users] Can DHCP be used for TFTP booting?
  2008-01-16  4:12   ` hce
@ 2008-01-16  4:39     ` Ben Warren
  2008-01-16  8:33       ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Warren @ 2008-01-16  4:39 UTC (permalink / raw)
  To: u-boot

hce wrote:
> On Jan 16, 2008 9:30 AM, Ben Warren <biggerbadderben@gmail.com> wrote:
>   
>> hce wrote:
>>     
>>> Hi,
>>>
>>> I am currently using a fixed tftp server and client IP address for
>>> booting from tftp, it works fine. I am wondering if the DHCP can be
>>> used or not for tftp booting, either for both TFTP server and client
>>> IP address or just for client IP address? If so, could you please give
>>> an example of how to config DHCP parameters in CONFIG_BOOTARGS and
>>> CONFIG_BOOTCOMMAND?
>>>
>>>       
>> DHCP can be used for obtaining an IP address and also booting. My advice
>> is to play with it yourself. Make sure you include CONFIG_CMD_DHCP, and
>> then try "help dhcp". Sorry for the lack of hand holding, but it's the
>> best way for you to learn. If you're really stuck, ask again.
>>     
>
> I've tried to run "help dhcp", it printed out "dhcp". Nothing else I
> could see. I've searched Internet to try to find a format of
> CONFIG_CMD_DHCP. Yes, I am very much stuck at the moment. Could you
> please point me a reference manual for DHCP boot set up as well
> relavent to following issues?
>
> What I can think of there may be two issues need to be clarified:
>
> (1) How to set following parameters:
>
> #define CONFIG_BOOTARGS "..... ip=dhcp?? ..."
>   
This #define fills in the 'bootargs' environment variable if it is not 
set.  Read the following file found in Linux kernel source: 
Documentation/nfsroot.txt.  I think "ip=dhcp" is right, but don't quote 
me on that...  You can change the value of 'bootargs' at runtime using 
'setenv' and save using 'save'.
> #define CONFIG_BOOTCOMMAND "setenv ipaddr dhcp ???..."
>   
This #define fills in the 'bootcmd' environment variable if it is not 
set.  This is what is run when the countdown timer runs out.  You can of 
course change this using 'setenv' and save it using 'save'
> #define CONFIG_CMD_DHCP "dhcp ???"
>   
This is just a flag telling U-boot to include the 'dhcp' command.  The 
value is immaterial.
> (2) How to set DHCP for /tftpboot in /etc/exports?
>
>   
Huh?  That's not how you configure a TFTP server, only NFS exports.
> All above set up are specific IP addresses currently (CONFIG_CMD_DHCP
> is not set yet), I have no idea how the specific IP addresses can be
> replaced by DHCP?
>
>   
Please have a look in the U-boot source file net/bootp.c.  It may give 
you some insight into which environment variables are used and how.
> BTW, I am running uboot on ARM 9 processor, booting from flash.
>
> Thank you.
>
> Kind Regards,
>
> Jim
>   
>> regards,
>> Ben
>>
>>     

Hope this helps a little bit.

regards,
Ben

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

* [U-Boot-Users] Can DHCP be used for TFTP booting?
  2008-01-16  4:39     ` Ben Warren
@ 2008-01-16  8:33       ` Wolfgang Denk
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2008-01-16  8:33 UTC (permalink / raw)
  To: u-boot

In message <478D8A86.70509@gmail.com> you wrote:
>
> This #define fills in the 'bootargs' environment variable if it is not 
> set.  Read the following file found in Linux kernel source: 
> Documentation/nfsroot.txt.  I think "ip=dhcp" is right, but don't quote 

No, it makes no sense to use that with U-Boot. When you use the  dhcp
command  in  U-Boot to determine the IP configuration and to download
the kernel image, then it makes litte sense to repeat the (slow) DHCP
procedure  in  LInux.  Normally  you  just  pass  the  already  known
paramters  to  the  Linux kernel, as described in the Manual, section
7.3. Boot Arguments Unleashed, see
http://www.denx.de/wiki/view/DULG/LinuxBootArgs

> Please have a look in the U-boot source file net/bootp.c.  It may give 
> you some insight into which environment variables are used and how.

And, of course, reading the Fine Manual will definitely answer some of
these questions.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Buy land. They've stopped making it."                   - Mark Twain

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

end of thread, other threads:[~2008-01-16  8:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-15 22:17 [U-Boot-Users] Can DHCP be used for TFTP booting? hce
2008-01-15 22:30 ` Ben Warren
2008-01-16  4:12   ` hce
2008-01-16  4:39     ` Ben Warren
2008-01-16  8:33       ` Wolfgang Denk
2008-01-15 22:45 ` 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.