rtems-tftp server not working with iPXE.

Karel Gardas karel.gardas at centrum.cz
Mon Sep 7 07:44:42 UTC 2020


On 9/7/20 8:34 AM, Chris Johns wrote:
> 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.

-F with real path to smp01.exe works fine.


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

W/o -F and with --show-backtrace I get this:

Exception happened during processing of request from ('10.0.30.128', 16313)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 599, in
process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
    self.handle()
  File
"/export/home/karel/git/rtems/rtems-tools/tester/rt/tftpserver.py", line
460, in handle
    self.handle_session(self.server.tftp.next_session())
  File
"/export/home/karel/git/rtems/rtems-tools/tester/rt/tftpserver.py", line
406, in handle_session
    response = session.process(client_ip, client_port, data)
  File
"/export/home/karel/git/rtems/rtems-tools/tester/rt/tftpserver.py", line
279, in process
    return self._read_req(data)
  File
"/export/home/karel/git/rtems/rtems-tools/tester/rt/tftpserver.py", line
229, in _read_req
    err, message = self.data_reader('open', filename=self.filename)
  File
"/export/home/karel/git/rtems/rtems-tools/tester/rt/tftpserver.py", line
121, in _file_reader
    except FileNotFoundError:
NameError: global name 'FileNotFoundError' is not defined

Thanks,
Karel


More information about the users mailing list