• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: uboot's DHCP and option 66 (tftp server)  (Read 5301 times)
e-squizo
Newbie
*

Karma: 3
Posts: 22


View Profile
« on: February 10, 2010, 06:04:30 PM »

Does u-boot's DHCP client ask for/honor DHCP option 66?

Typing dhcp at the Marvell> prompt seems to set the following variables:

Code:
gatewayip=10.10.0.254
netmask=255.255.255.0
hostname=hugo
ipaddr=10.10.0.2
serverip=10.10.0.254

I have set up my DHCP server in such a way that it reports the address 10.10.0.1 on option 66, which is the address of the TFTP server, but u-boot's client seems to set serverip to the same address of the DHCP server, which is not really that useful.

Should I configure my DHCP client in a different way? Or is there a way to ask u-boot to query the DHCP server correctly?

Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #1 on: February 10, 2010, 06:42:59 PM »

Does u-boot's DHCP client ask for/honor DHCP option 66?

Typing dhcp at the Marvell> prompt seems to set the following variables:

Code:
gatewayip=10.10.0.254
netmask=255.255.255.0
hostname=hugo
ipaddr=10.10.0.2
serverip=10.10.0.254

I have set up my DHCP server in such a way that it reports the address 10.10.0.1 on option 66, which is the address of the TFTP server, but u-boot's client seems to set serverip to the same address of the DHCP server, which is not really that useful.

Should I configure my DHCP client in a different way? Or is there a way to ask u-boot to query the DHCP server correctly?


U-boot is coded only support primary for bootp, it just modified enough for understand little of DHCP. so no it does not support code 66. I suggest use initrd/initramfs with code 77 (class class) or code 97 (UUID) for better customization.
Logged

Good Luck Smiley

e-squizo
Newbie
*

Karma: 3
Posts: 22


View Profile
« Reply #2 on: February 10, 2010, 07:35:03 PM »

U-boot is coded only support primary for bootp, it just modified enough for understand little of DHCP. so no it does not support code 66. I suggest use initrd/initramfs with code 77 (class class) or code 97 (UUID) for better customization.

Indeed! I set up my DHCP server to provide parameters for BOOTP to fetch the files from the tftp server, and now it works!

Code:
Marvell>> dhcp
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 28
DHCP client bound to address 10.10.0.2
Marvell>> printenv
[...]
bootfile=uImage
gatewayip=10.10.0.254
netmask=255.255.255.0
hostname=hugo
ipaddr=10.10.0.2
serverip=10.10.0.1
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #3 on: February 10, 2010, 08:03:51 PM »

Very good. Now you can use command tftp to load.

shameless self promotion Grin Have look at my u-boot env setup. there some setting for setup boot from tftp.


Good luck Smiley
Logged

Good Luck Smiley

Pages: [1]
Print
Jump to: