← Back to team overview

linaro-pkg team mailing list archive

[Bug 927781] Re: PXELINUX implementation doesn't respect dhcp ConfigFile or PathPrefix values

 

While I agree this would be a useful feature, I don't believe it's
required to achieve what you want to achieve.  U-Boot's pxe already
supports a way to point different client classes at different  areas of
the tftp server.

U-boot doesn't need to download 'pxelinux.0' from the tftp server like
normal PXE implementations do, but it still respects the bootfile option
in dhcp responses. When you run 'dhcp' in U-boot it will attempt to
download whatever was supplied as the bootfile in the dhcp response, and
will set the 'bootfile' env variable accordingly.

Following the same convention as pxelinux, U-Boot's 'pxe get' will look
for config/image files at paths relative to the directory the 'bootfile'
location was given as.

So, given this dhcp config, highbank clients will be pointed at
/arm/highbank, and x86 PXE clients will be pointed at /x86/

class "pxe" {
    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
}

class "uboot-highbank" {
    match if substring (option vendor-class-identifier, 0, 21) = "U-boot.armv7.highbank";
}

subnet 192.168.100.0 netmask 255.255.255.0 {
        server-name "192.168.100.1";
        option tftp-server-name "192.168.100.1";
        option subnet-mask 255.255.255.0;
        option broadcast-address 192.168.100.255;
        option domain-name-servers 8.8.4.4;
        option routers 192.168.100.254;


        pool {
                range 192.168.100.100 192.168.100.149;
                allow members of "uboot-highbank";
                filename "/arm/highbank/empty";
        }

        pool {
                range 192.168.100.150 192.168.100.199;
                allow members of "pxe";
                filename "/x86/pxelinux.0";
        }
}

The 'empty' file can be empty; as long as it exists, U-Boot will be
happy with the tftp request.

Here's some example output from highbank doing PXE:
Highbank #dhcp
BOOTP broadcast 1
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 28
DHCP client bound to address 192.168.100.100
Using xgmac0 device
TFTP from server 192.168.100.1; our IP address is 192.168.100.100
Filename '/arm/highbank/empty'.
Load address: 0x700000
Loading: #
done
Highbank #pxe get
missing environment variable: pxeuuid
Retrieving file: /arm/highbank/pxelinux.cfg/01-52-54-00-12-34-56
Using xgmac0 device
TFTP from server 192.168.100.1; our IP address is 192.168.100.100
Filename '/arm/highbank/pxelinux.cfg/01-52-54-00-12-34-56'.
Load address: 0x700000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
Retrieving file: /arm/highbank/pxelinux.cfg/C0A86464

-- 
You received this bug notification because you are a member of Linaro
Maintainers, which is the registrant for Linaro U-Boot.
https://bugs.launchpad.net/bugs/927781

Title:
  PXELINUX implementation doesn't respect dhcp ConfigFile or PathPrefix
  values

Status in Linaro U-Boot:
  New
Status in “u-boot-linaro” package in Ubuntu:
  In Progress

Bug description:
  The part implementation of PXELINUX in uboot doesn't respect RFC5071 dhcp options:
     o  "MAGIC" - 208 - An option whose presence and content verifies to
        the PXELINUX bootloader that the options numbered 209-211 are for
        the purpose as described herein.

     o  "ConfigFile" - 209 - Configures the path/filename component of the
        configuration file's location, which this bootloader should use to
        configure itself.

     o  "PathPrefix" - 210 - Configures a value to be prepended to the
        ConfigFile to discern the directory location of the file.

     o  "RebootTime" - 211 - Configures a timeout after which the
        bootstrap program will reboot the system (most likely returning it
        to PXE).

  These have the obvious interest in being able to provide customised
  config and kernels at run time.

  Thanks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/u-boot-linaro/+bug/927781/+subscriptions