Skip to contentSkip to conversation

How to configure for flexible static/dynamic IP operation.

U-Boot-Users Edward Jubenville 3 participants 4 messages May 11, 2007 – May 12, 2007

lore
Share & tools
lore
#0 lore raw

Using u-boot 1.1.4 with Linux kernel 2.4.25.

I'm trying to configure our device for flexibility in choosing static IP or dynamic IP operation, based on which is most appropriate for the network environment of the installation site. I can get both to work fine with u-boot, but I don't know how to pass the information on to the Linux kernel as to which configuration was selected. Presumably, the kernel shouldn't start its DHCP client (dhclient) when static IP operation is selected.

Can someone recommend a strategy for u-boot to communicate the selection to the kernel? Is it done via the kernel command line, or by having the kernel startup peek into u-boot's environment storage?

Thanks in advance,

Ed Jubenville

#1 lore raw
Quoted 7 lines · In message <[email protected]> you wrote:

I'm trying to configure our device for flexibility in choosing static IP or dynamic IP operation, based on which is most appropriate for the network environment of the installation site. I can get both to work fine with u-boot, but I don't know how to pass the information on to the Linux kernel as to which configuration was selected. Presumably, the kernel shouldn't start its DHCP client (dhclient) when static IP operation is selected.

Why should it be important to the Linux kernel how U-Boot got it's IP configuration? You just poss the information with your bootargs, and the kernel uses it, that's all.

Quoted 3 lines

Can someone recommend a strategy for u-boot to communicate the selection to the kernel? Is it done via the kernel command line, or by having the kernel startup peek into u-boot's environment storage?

Is there any chance that you did not even bother to read the manual?

Shame on you!

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,    CEO: 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
I think animal testing is a terrible idea; they get all  nervous  and
give the wrong answers.
#2 lore raw
Quoted 4 lines

Wolfgang wrote:
Why should it be important to the Linux kernel how U-Boot got it's IP configuration? You just poss the information with your bootargs, and the kernel uses it, that's all.

Because if u-boot leases an IP from a DHCP server, isn't it the kernel's responsibility to maintain that lease? Our devices are not usually turned off and on for extremely long periods of time (months). I am assuming the device could be up far longer than the lease time, so doesn't the kernel have the responsibility to renew the lease? At least, that's my understanding of how DHCP works.

Quoted 1 line

Is there any chance that you did not even bother to read the manual?

Nope. No chance. Read it. Didn't find the info. Maybe it's there, but I didn't find it.

Ed Jubenville

#3 lore raw

Dear Ed,

Quoted 11 lines · in message <[email protected]> you wrote:
Quoted 4 lines

Why should it be important to the Linux kernel how U-Boot got it's IP configuration? You just poss the information with your bootargs, and the kernel uses it, that's all.

Because if u-boot leases an IP from a DHCP server, isn't it the kernel's responsibility to maintain that lease? Our devices are not usually turned off and on for extremely long periods of time (months). I am assuming the device could be up far longer than the lease time, so doesn't the kernel have the responsibility to renew the lease? At least, that's my understanding of how DHCP works.

I see. Yes, this is true, if you want to handle this strictly. However, I think that even when you use the Linux kernel's IP auto- configuration feature (CONFIG_IP_PNP_DHCP) the kernel will not renew any leases. At least I am not aware of this.

I may be wrong here, but my understanding is that you have to handle this from user space. So normally you would just pass to Linux the information that you did a DHCP setup in U-Boot (like by adding a string "ip_pnp" to the bootargs settings), which you then can check in user space to set up the necessary stuff to renew the leases.

Quoted 4 lines
Quoted 1 line

Is there any chance that you did not even bother to read the manual?

Nope. No chance. Read it. Didn't find the info. Maybe it's there, but I didn't find it.

You are right. I misunderstood your question at first reading. I did not understand what you were really after.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,    CEO: 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
You young'uns. That was *long* before AltaVista,  DejaNews,  or  even
(gasp) the *Web*! In fact, we typed that thread on steam-powered card
punchers, and shipped it around via Pony Express.
            -- Randal Schwartz in <[email protected]>