[fpga-miniconf] Unable to download boot.bin over TFTP

Tim 'mithro' Ansell me at mith.ro
Tue Jan 16 13:49:53 AEDT 2018


Hi Marc!

There are a couple of options here;

 (a) Use an existing tftp server and set TFTP_DIR environment variable to
the root of the server. "make tftp" will then copy the current firmware you
are operating on into the tftp serving directory.
 (b) Let litex-buildenv start a tftp server for you. You can do this with
"make tftpd_start" and "make tftpd_stop". This has the advantage that if
you have aftpd you get debugging output on the console every time a tftp
transfer is started.

Many people have found that installing tftpd ends up with it configured to
load automatically via inetd or xinetd which prevents the litex-buildenv
from starting up it's own tftp server.

A whole bunch of people have run into various issues with getting the tftp
server going, so I've opened an issue here ->
https://github.com/timvideos/litex-buildenv/issues/3 to look at doing a
better job of detecting and verifying a working tftp set up.

It would also be good if we could run the tftp server on an unprivileged
port, so I've logged https://github.com/timvideos/litex-buildenv/issues/6
for that.

Of course being an open source project, we would love help fixing those! :-)

Tim 'mithro' Ansell

On 16 January 2018 at 00:51, Marc MERLIN <marc at merlins.org> wrote:

> Seems that (LX P=arty C=or1k) $ ./scripts/build-qemu.sh does not copy
> boot.bin to /srv/tftp/initrd.bin and then tftp fails?
>
> mkdir -p build/tftpd/
> cp build/arty_net_or1k//software/firmware/firmware.bin
> build/tftpd//boot.bin
> + EXTRA_ARGS+=("-gdb tcp::10001")
> ++ grep spiflash_model platforms/arty.py
> ++ sed '-es/[^"]*"//' '-es/".*$//'
> + SPIFLASH_MODEL=n25q128a13
> + echo n25q128a13
> n25q128a13
> + build/arty_net_or1k//qemu/or32-softmmu/qemu-system-or32 -M litex
> -nographic -nodefaults -monitor telnet::10000,server,nowait -serial stdio
> -bios build/arty_net_or1k//software/bios/bios.bin -drive
> if=mtd,format=qcow2,file=build/arty_net_or1k//qemu.qcow2,serial=n25q128a13
> -net nic -net tap,ifname=tap0,script=no,downscript=no -gdb tcp::10001
> bitbang_ssi: init(cpol:0, cpha:0, size:8)
> Using spiflash type n25q128a13
> : m25p80_realize: Binding to IF_MTD drive
> Resetting PC to: 0x0
> : reset_memory: Reset done.
>
> LiteX SoC BIOS (or1k)
> (c) Copyright 2012-2017 Enjoy-Digital
> (c) Copyright 2007-2017 M-Labs Limited
> Built Jan  7 2018 20:53:45
>
> BIOS CRC passed (3f31133f)
> Timer with delta zero, disabling
> Timer with delta zero, disabling
> Timer with delta zero, disabling
> Initializing SDRAM...
> Read delays: 1:32-33  0:32-33  completed
> Memtest OK
> Booting from serial...
> Press Q or ESC to abort boot completely.
> sL5DdSMmkekro
> Timer with delta zero, disabling
> Timeout
> Booting from network...
> Local IP : 192.168.100.50
> Remote IP: 192.168.100.100
> Unable to download boot.bin over TFTP
> Network boot failed
> No boot medium found
> BIOS>
>
>
> It seems however that said server isn't configured right?
> [pid 22066] sendto(3, "<29>Jan 15 14:35:48 atftpd[17187"..., 74,
> MSG_NOSIGNAL, NULL, 0) = 74
> [pid 22066] open("/srv/tftp/boot.bin", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> [pid 22066] sendto(4, "\0\5\0\1File not found\0", 19, 0,
> {sa_family=AF_INET, sin_port=htons(7642), sin_addr=inet_addr("192.168.100.50")},
> 128) = 19
>
> /srv/tftp was empty. Was I supposed to symlink it to my tree?
>
> Ok, I did this manually:
> (LX P=arty C=or1k) saruman:~/src/fpga/litex-buildenv$ sudo cp
> build/tftpd/boot.bin /srv/tftp/boot.bin
>
> This seems to help, now I finally have:
> Reading value 0000bc00 fr MDIO PHY 00000000 REG 00000011
> MDIO mode: 1000Mbps / link: up
> uIP init done with ip 192.168.100.50
> Etherbone listening on port 1234
> Telnet listening on port 23
> H2U 00:00:00>
> H2U 00:00:24>
> H2U 00:00:24>
>
> I'm better now, but what's the correct fix?
>
> Thanks,
> Marc
> --
> "A mouse is a device used to point at the xterm you want to type in" -
> A.S.R.
> Microsoft is to operating systems ....
>                                       .... what McDonalds is to gourmet
> cooking
> Home page: http://marc.merlins.org/                         | PGP
> 1024R/763BE901
> --
> fpga-miniconf mailing list
> fpga-miniconf at lists.lca2018.linux.org.au
> http://lists.lca2018.linux.org.au/mailman/listinfo/fpga-miniconf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lca2018.linux.org.au/pipermail/fpga-miniconf/attachments/20180116/f5139e90/attachment.html>


More information about the fpga-miniconf mailing list