22 Sep, 2017

1 commit


16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

08 Aug, 2017

1 commit

  • For strncpy() select a minimal string length of destination and source
    strings, here DEFAULT_NAME_LEN is preferable to MAX_LEN.

    Due to the NUL-terminated contents of default_string the change is
    a noop, however it removes a compilation warning if SH2/3/4 platform
    specific strncpy() function is used:

    In file included from include/linux/string.h:21:0,
    from include/common.h:28,
    from net/tftp.c:9:

    net/tftp.c: In function 'tftp_start':
    arch/sh/include/asm/string.h:52:42: warning: array subscript is above array bounds [-Warray-bounds]
    : "0" (__dest), "1" (__src), "r" (__src+__n)

    Signed-off-by: Vladimir Zapolskiy
    Acked-by: Joe Hershberger

    Vladimir Zapolskiy
     

27 May, 2016

1 commit

  • We can now successfully boot EFI applications from disk, but users
    may want to also run them from a PXE setup.

    This patch implements rudimentary network support, allowing a payload
    to send and receive network packets.

    With this patch, I was able to successfully run grub2 with network
    access inside of QEMU's -M xlnx-ep108.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

29 Oct, 2015

1 commit

  • TFTP source and destination port variable names are
    'tftpsrcp' and 'tftpdstp' in the code, but 'tftpsrcport'
    and 'tftpdstport' in the README file. Fix the README.

    Add environment variable 'tftptimeoutcountmax'. As per the
    comments about the global variable tftp_timeout_count_max,
    make sure tftptimeoutcountmax is nonnegative.

    Introduce configuration option CONFIG_NET_TFTP_VARS,
    which controls whether environment variables tftpblocksize,
    tftptimeout, and tftptimoueoutcountmax are read by the TFTP
    client code. CONFIG_NET_TFTP_VARS defaults to y but can be
    set to n by targets with to tight size contraints.

    Make bf527-ezkit set CONFIG_NET_TFTP_VARS to n to keep the
    target size below limit.

    Albert ARIBAUD \(3ADEV\)
     

09 Sep, 2015

1 commit

  • Commit 620776d "tftp: adjust settings to be suitable for 100Mbit ethernet"
    causes the following error message when trying to load a file using 'tftp'
    command via a tftp server.

    TFTP error: 'Unsupported option(s) requested' (8)

    This is due to with commit 620776d changes, the tftp option 'timeout'
    value is now set to zero which is an invalid value as per RFC2349 [1].
    Valid values range between "1" and "255" seconds, inclusive. With some
    tftp servers that strictly implement the RFC requirement, it reports
    such an error message.

    Revert commit 620776d for RFC compliance.

    [1] https://www.ietf.org/rfc/rfc2349.txt

    Signed-off-by: Bin Meng
    Acked-by: Joe Hershberger

    Bin Meng
     

07 Sep, 2015

1 commit


22 Aug, 2015

1 commit

  • Adjust timouts and retry counts to be suitable for loaded ethernet
    network. With 5 seconds timeout, 10 retries maximum, tftp is
    impossible even on local network with single full-speed TCP
    connection.

    100msec timeout should be suitable for most networks tftp is used on,
    that is local ethernets. Timeout count really needs to be way higher,
    as lost packets are normal when TCP is running over the same network.

    Enforce 10msec minimum.

    Signed-off-by: Pavel Machek
    Acked-by: Joe Hershberger

    Pavel Machek
     

13 Aug, 2015

1 commit

  • CONFIG_TFTP_TSIZE should limit a tftp downloads progress to 50 '#'
    chars. Make this work also for small files.

    If the file size is small, i.e. smaller than 2 tftp block sizes the
    number of '#' can get much larger. i.e. with a 1 byte file 65000
    characters are printed, with a 512 byte file around 500.

    When using CONFIG TFTP BLOCKSIZE together with CONFIG_IP_DEFRAG the
    issue is more notable.

    Signed-off-by: Max Krummenacher
    Signed-off-by: Marcel Ziswiler
    Reviewed-by: Marek Vasut
    Acked-by: Joe Hershberger

    Max Krummenacher
     

19 Apr, 2015

7 commits


23 Oct, 2014

1 commit


23 Nov, 2013

2 commits

  • NetServerEther was not being cleared in the tftp server code, so the
    destination MAC address would be whatever the last destination MAC
    address was.

    Scenario:
    U-Boot:
    dhcp
    tftpsrv
    Host:
    Send device WRQ
    Device:
    Responds with ACK to dhcp server mac address with
    host ip address

    By clearing NetServerEther, we force a lookup of the host MAC address
    to go with the associated host IP.

    Signed-off-by: Andrew Ruder

    Andrew Ruder
     
  • When the block 0 store to the memory of client and timeout at this
    moment. Because of no ACK packet, the server will send block 0 again,
    if this client reconnect to the server at this time,
    TftpBlockWrapOffset will become larger than it should be.

    Signed-off-by: Rockly
    Patch: 264417

    rockly
     

25 Jun, 2013

1 commit

  • tftp.c:464:17: warning: cast to restricted __be16
    tftp.c:552:29: warning: cast to restricted __be16
    tftp.c:640:33: warning: cast to restricted __be16
    tftp.c:642:25: warning: cast to restricted __be16

    Signed-off-by: Kim Phillips
    Cc: Joe Hershberger

    Kim Phillips
     

16 Dec, 2012

1 commit

  • This prints a tftp speed indication after the download completes. This
    is the 3.6 MiB/s indicator below.

    Tegra2 (SeaBoard) # tftp ...
    Using asx0 device
    TFTP from server 172.22.72.144; our IP address is 172.22.73.81
    Filename '/tftpboot/uImage-user-seaboard-1'.
    Load address: 0x408000
    Loading: #################################################
    3.6 MiB/s
    done

    Signed-off-by: Simon Glass
    Acked-by: Igor Grinberg

    Simon Glass
     

12 Jul, 2012

1 commit

  • The block argument for store_block can be -1 when the tftp sequence
    number rolls over (i.e TftpBlock == 0), so the first argument to
    store_block has to be of type 'int' instead of 'unsigned'.

    In our environment (gcc 4.4.5 mips toolchain), this causes incorrect
    'offset' to be generated for storing the block, and the tftp block
    with number 0 will be written elsewhere, resulting in a bad block in
    the downloaded file and a memory corruption.

    Signed-off-by: Jayachandran Chandrasekharan Nair

    Jayachandran Chandrasekharan Nair
     

24 May, 2012

3 commits


16 May, 2012

2 commits


07 Dec, 2011

1 commit

  • When building u-boot as 64 bit application (e.g. sandbox) ulong might be
    64 bits in size. This breaks network code as IPaddr_t is 64 bytes in
    size then and an IPv4 address is 32 bits in size. This patch makes sure
    that IPaddr_t is always 32 bits in size. Also some warnings introduced
    by this patch are fixed.

    Signed-off-by: Matthias Weisser
    Acked-by: Mike Frysinger

    Matthias Weisser
     

28 Oct, 2011

3 commits


27 Oct, 2011

4 commits


06 Oct, 2011

1 commit

  • This is long over due. All but two net drivers have been converted, but
    those have now been dropped.

    The only thing left to do is actually delete all references to NET_MULTI
    and code that is compiled when that is not defined. So here we scrub the
    core code.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

20 May, 2011

4 commits