Skip to contentSkip to conversation

pxe incompatibility with x86

U-Boot Ian Campbell 2 participants 3 messages Oct 15, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

I've noticed what appears to be an incompatibility between u-boot's pxe support and the x86 pxelinux stuff. I'm running on a Calxeda midway but AFAICT this not specific to the platform. It seems that Rob and Jason are both involved in u-boot pxe support as well as being from Calxeda so I guess I don't have to be too sure either way ;-)

syslinux/README says:
Note that all filename references are relative to the directory pxelinux.0 lives in.

And u-boots emulation of pxelinux's behaviour seems to implement this for loading pxelinux.cfg but not for loading any files referenced by the config. This seems to have been related to
https://bugs.launchpad.net/ubuntu/+source/u-boot-linaro/+bug/927781

The Xen.org osstest infrastructure has in dhcpd.conf:
filename "pxe/syslinux.0"
and runs a tftp server exporting /tftpboot with all the files in /tftpboot/pxe.

This leads to:

        TFTP from server 10.80.248.135; our IP address is 10.80.229.106; sending through
         gateway 10.80.224.1
        Filename 'pxe/syslinux.0'.
        Load address: 0x800000
        Loading: ## 
        done
        Bytes transferred = 26793 (68a9 hex)
        [...]
        TFTP from server 10.80.248.135; our IP address is 10.80.229.106; sending through
         gateway 10.80.224.1
        Filename 'pxe/pxelinux.cfg/01-fc-2f-40-11-72-5c'.
        Load address: 0x700000
        Loading: #  
        done
        Bytes transferred = 513 (201 hex)
        Config file found
However the config file contains:
        serial 0 115200
        timeout 5
        label overwrite
                menu label ^Overwrite
                menu default
                kernel /ianc/osstest/debian-installer/armhf/2013-09-23-wheezy/linux.armmp [...]
                append [...] initrd=/ianc/osstest/tmp/marilith-n4--initrd.gz [...]

leading to:
Retrieving file: /ianc/osstest/tmp/marilith-n4--initrd.gz
Using xgmac0 device
TFTP from server 10.80.248.135; our IP address is 10.80.229.106; sending through gateway 10.80.224.1 Filename '/ianc/osstest/tmp/marilith-n4--initrd.gz'.
Load address: 0x4000000
Loading: *
TFTP error: 'File not found' (1)

The actual path to the initrd is /tftpboot/pxe/ianc/osstest/... IOW the /pxe prefix has been dropped.

I think this differs from how real pxelinux on x86 behaves, at least judging from the osstest setup...

Cheers,
Ian.

#1 lore raw
Quoted 62 lines · Ian Campbell

Hi,

I've noticed what appears to be an incompatibility between u-boot's pxe support and the x86 pxelinux stuff. I'm running on a Calxeda midway but AFAICT this not specific to the platform. It seems that Rob and Jason are both involved in u-boot pxe support as well as being from Calxeda so I guess I don't have to be too sure either way ;-)

syslinux/README says:
Note that all filename references are relative to the directory pxelinux.0 lives in.

And u-boots emulation of pxelinux's behaviour seems to implement this for loading pxelinux.cfg but not for loading any files referenced by the config. This seems to have been related to
https://bugs.launchpad.net/ubuntu/+source/u-boot-linaro/+bug/927781

The Xen.org osstest infrastructure has in dhcpd.conf:
filename "pxe/syslinux.0"
and runs a tftp server exporting /tftpboot with all the files in /tftpboot/pxe.

This leads to:

        TFTP from server 10.80.248.135; our IP address is 10.80.229.106; sending
through
         gateway 10.80.224.1
        Filename 'pxe/syslinux.0'.
        Load address: 0x800000
        Loading: ##
        done
        Bytes transferred = 26793 (68a9 hex)
        [...]
        TFTP from server 10.80.248.135; our IP address is 10.80.229.106; sending
through
         gateway 10.80.224.1
        Filename 'pxe/pxelinux.cfg/01-fc-2f-40-11-72-5c'.
        Load address: 0x700000
        Loading: #
        done
        Bytes transferred = 513 (201 hex)
        Config file found

However the config file contains:
serial 0 115200
timeout 5
label overwrite
menu label ^Overwrite
menu default
kernel
/ianc/osstest/debian-installer/armhf/2013-09-23-wheezy/linux.armmp [...]
append [...] initrd=/ianc/osstest/tmp/marilith-n4--initrd.gz
[...]
leading to:
Retrieving file: /ianc/osstest/tmp/marilith-n4--initrd.gz Using xgmac0 device
TFTP from server 10.80.248.135; our IP address is 10.80.229.106; sending
through gateway 10.80.224.1
Filename '/ianc/osstest/tmp/marilith-n4--initrd.gz'.
Load address: 0x4000000
Loading: *
TFTP error: 'File not found' (1)

Quoted 5 lines

The actual path to the initrd is /tftpboot/pxe/ianc/osstest/... IOW the /pxe prefix has been dropped.

I think this differs from how real pxelinux on x86 behaves, at least judging from the osstest setup...

Thanks for the heads up.

Could this be a tftp server setup issue? Should the server prepend "/whatever" with it's root? If not then I guess u-boot needs to strip any leading /.

Rob

#2 lore raw
Quoted 1 line · rob.herring at calxeda.com

Could this be a tftp server setup issue?

The exact same server and pxelinux.cfg setup works for x86 machines using proper pxelinux.

Quoted 1 line

Should the server prepend "/whatever" with it's root?

I don't think so.

Quoted 1 line

If not then I guess u-boot needs to strip any leading /.

Actually I think it needs to prepend /whatever to all the paths it reads, not just the pxelinux.cfg ones.

IOW /ianc/osstest/tmp/marilith-n4--initrd.gz needs to become /pxe/ianc/osstest/tmp/marilith-n4--initrd.gz when the DHCP supplied filename was /pxe/pxelinux.0 because that implicitly sets the prefix to /pxe.

Ian.