rtems-tftp server not working with iPXE.

Chris Johns chrisj at rtems.org
Mon Sep 7 06:34:26 UTC 2020


On 7/9/20 4:06 pm, Karel Gardas wrote:
> On 9/7/20 2:34 AM, Chris Johns wrote:
>> On 7/9/20 8:29 am, Chris Johns wrote:
>>>
>>> Hmm looks like the socket returns a string in Python 2 and bytes in Python 3. I
>>> will need to play around to find a suitable solution for this.
>>>
>>
>> Fixed on master. Please test and let me know how you go.
> 
> Thanks, but no go here on Ubuntu 18.04 LTS. Perhaps I don't know usage
> well, but I:
> 
> - dhcp
> - boot tftp://<host>/smp01.exe
> 
> on iPXE hardware side.
> 
> But tftp server throws FileNotFoundError on me as if the file smp01.exe
> was not presented in base. But it's there look:

Try the -F option to force the file. This causes the TFTP server to ignore the
requested file name and to send the file you specify on the command line. The
idea is the DHCP (BOOTP) server does not need to be touched to change the file
you select to load using TFTP. This is how the `rtems-test` command internally
handles downloading the different tests.

But ...

> sudo ~/git/rtems/rtems-tools/tester/rtems-tftp-server -v -b
> ~/sfw/rtems/5.1-smp2-vga80x50-key-to-reset/i386-rtems5/pc686/tests/
> RTEMS Tools - TFTP Server, undefined (b1c6a98da4a2)
>  Command Line:
> /export/home/karel/git/rtems/rtems-tools/tester/rtems-tftp-server -v -b
> /export/home/karel/sfw/rtems/5.1-smp2-vga80x50-key-to-reset/i386-rtems5/pc686/tests/
>  Host: Linux silence 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10
> 07:21:24 UTC 2020 x86_64
>  Python: 2.7.17 (default, Jul 20 2020, 15:37:01) [GCC 7.5.0]
> ] tftp: server: all:69
> ] tftp: 1: start: 10.0.30.128:2057
> ] tftp: 1: error: <type 'exceptions.NameError'>: global name
> 'FileNotFoundError' is not defined
> ] tftp: 1: end: 10.0.30.128:2057
> ] tftp: 2: start: 10.0.30.128:2057
> ] tftp: 2: error: <type 'exceptions.NameError'>: global name
> 'FileNotFoundError' is not defined
> ] tftp: 2: end: 10.0.30.128:2057
> ] tftp: 3: start: 10.0.30.128:2057
> ] tftp: 3: error: <type 'exceptions.NameError'>: global name
> 'FileNotFoundError' is not defined
> ] tftp: 3: end: 10.0.30.128:2057
> ] tftp: 4: start: 10.0.30.128:2057
> ] tftp: 4: error: <type 'exceptions.NameError'>: global name
> 'FileNotFoundError' is not defined
> ] tftp: 4: end: 10.0.30.128:2057
> ] tftp: 5: start: 10.0.30.128:2057
> ] tftp: 5: error: <type 'exceptions.NameError'>: global name
> 'FileNotFoundError' is not defined
> ] tftp: 5: end: 10.0.30.128:2057
> ] tftp: 6: start: 10.0.30.128:2057
> ] tftp: 6: error: <type 'exceptions.NameError'>: global name
> 'FileNotFoundError' is not defined
> ] tftp: 6: end: 10.0.30.128:2057
> ^Cabort: user terminated
> 
> 
> $ ls -la
> /export/home/karel/sfw/rtems/5.1-smp2-vga80x50-key-to-reset/i386-rtems5/pc686/tests/smp01.exe
> -rwxr-xr-x 1 karel karel 4797752 Sep  7 00:02
> /export/home/karel/sfw/rtems/5.1-smp2-vga80x50-key-to-reset/i386-rtems5/pc686/tests/smp01.exe
> 
> 
> so it looks like there is some issue with file handling on tftp server
> or have I done anything wrong?

... it looks like there is an issue so please run with `--show-backtrace` so I
can see where the "global name" issue is.


Thanks
Chris


More information about the users mailing list