25 Jan, 2019

2 commits

  • No mainline board enables CONFIG_MCAST_TFTP and there have been
    compilation issues with the code for some time. Additionally, it has a
    potential buffer underrun issue (reported as a side note in
    CVE-2018-18439).

    Remove the multicast TFTP code but keep the driver API for the future
    addition of IPv6.

    Cc: Simon Goldschmidt
    Signed-off-by: Chris Packham
    Acked-by: Joe Hershberger

    Chris Packham
     
  • When dealing with two ethernet ports and having "netretry" set
    to "once", it could occur that the connection (e.g. an ARP
    request) failed, hence the status of the netloop was
    "NETLOOP_FAIL". Due to the setting of "netretry", the network
    logic would then switch to the other network interface,
    assigning "ret" with the return value of "net_start_again()".
    If this call succeeded we would return 0 (i.e. success) to
    the caller when in reality the network action failed.

    Signed-off-by: Thomas RIENOESSL
    Reviewed-by: Christian Gmeiner
    Acked-by: Joe Hershberger

    Thomas RIENOESSL
     

11 Oct, 2018

2 commits

  • Make it possible to add TCP versions of the same, while reusing
    IP portions. This patch should not change any behavior.

    Signed-off-by: Duncan Hare
    Acked-by: Joe Hershberger

    Duncan Hare
     
  • Peter originally sent a fix, but it breaks a number of other things.
    This addresses the original reported issue in a different way.

    That report was:

    > U-Boot has 1 common buffer to send Ethernet frames, pointed to by
    > net_tx_packet. When sending to an IP address without knowing the MAC
    > address, U-Boot makes an ARP request (using the arp_tx_packet buffer)
    > to find out the MAC address of the IP addressr. When a matching ARP
    > reply is received, U-Boot continues sending the frame stored in the
    > net_tx_packet buffer.
    >
    > However, in the mean time, if U-Boot needs to send out any network
    > packets (e.g. replying ping packets or ARP requests for its own IP
    > address etc.), it will use the net_tx_packet buffer to prepare the
    > new packet. Thus this buffer is no longer the original packet meant
    > to be transmitted after the ARP reply. The original packet will be
    > lost.

    This instead uses the ARP tx buffer to send async replies in the case
    where we are actively waiting for an ARP reply.

    Signed-off-by: Joe Hershberger

    Reported-by: Tran Tien Dat
    Reviewed-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng

    Joe Hershberger
     

27 Jul, 2018

5 commits


03 Jul, 2018

2 commits

  • We can call commands like dhcp and bootp without arguments or with
    explicit command line arguments that really should tell the code where
    to look for files instead.

    Unfortunately, the current code simply overwrites command line arguments
    in the dhcp case with dhcp values.

    This patch allows the code to preserve the command line values if they
    were set on the command line. That way the semantics are slightly more
    intuitive.

    The reason this patch does that by introducing a new variable is that we
    can not rely on net_boot_file_name[0] being unset, as today it's
    completely legal to call "dhcp" and afterwards run "tftp" and expect the
    latter to repeat the same query as before. I would prefer not to break
    that behavior in case anyone relies on it.

    Signed-off-by: Alexander Graf
    Acked-by: Joe Hershberger

    Alexander Graf
     
  • Add a new command 'wol': Wait for an incoming Wake-on-LAN packet or
    time out if no WoL packed is received.
    If the WoL packet contains a password, it is saved in the environment
    variable 'wolpassword' using the etherwake format (dot or colon
    separated decimals).

    Intended use case: a networked device should boot an alternate image.
    It's attached to a network on a client site, modifying the DHCP server
    configuration or setup of a tftp server is not allowed.
    After power on the device waits a few seconds for a WoL packet. If a
    packet is received, the device boots the alternate image. Otherwise
    it boots the default image.

    This method is a simple way to interact with a system via network even
    if only the MAC address is known. Tools to send WoL packets are
    available on all common platforms.

    Some Ethernet drivers seem to pad the incoming packet. The additional
    padding bytes might be recognized as Wake-on-LAN password bytes.

    By default enabled in pengwyn_defconfig.

    Signed-off-by: Lothar Felten
    Acked-by: Joe Hershberger

    Lothar Felten
     

14 Jun, 2018

1 commit

  • Global variable "net_state" is used in net_loop() state-machine.
    But it happens that some times the net_loop() can be called
    multiple times in the same call stack. For example when the
    netconsole is enabled and we print the message while some other
    net protocol is in action. Netconsole will overwrite the "net_state"
    and that will break the logic for earlier started protocol.

    To protect the state save and restore "net_state" variable each
    time when we enter and exit net_loop().

    Signed-off-by: Leonid Iziumtsev
    Acked-by: Joe Hershberger

    Leonid Iziumtsev
     

30 May, 2018

1 commit

  • Merge UDP fastboot support from AOSP:

    https://android.googlesource.com/platform/external/u-boot/+/android-o-mr1-iot-preview-8

    Signed-off-by: Alex Kiernan
    Signed-off-by: Alex Deymo
    Signed-off-by: Jocelyn Bohr
    Reviewed-by: Simon Glass

    Alex Kiernan
     

11 May, 2018

1 commit

  • As part of the main conversion a few files were missed. These files had
    additional whitespace after the '*' and before the SPDX tag and my
    previous regex was too strict. This time I did a grep for all SPDX tags
    and then filtered out anything that matched the correct styles.

    Fixes: 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
    Reported-by: Heinrich Schuchardt
    Signed-off-by: Tom Rini

    Tom Rini
     

28 Apr, 2018

1 commit


23 Mar, 2018

1 commit

  • The "net_try_count" counter starts from "1".
    And the "retrycnt" contains requested amount of retries.

    With current logic, that means that the actual retry amount
    will be one time less then what we set in "netretry" env.
    For example setting "netretry" to "once" will make "retrycnt"
    equal "1", so no retries will be triggered at all.

    Fix the logic by changing the statement of "if" condition.

    Signed-off-by: Leonid Iziumtsev
    Acked-by: Joe Hershberger

    Leonid Iziumtsev
     

16 Aug, 2017

4 commits


08 Aug, 2017

1 commit


22 Jan, 2017

1 commit

  • Move all of the status LED feature to drivers/led/Kconfig.
    The LED status definitions were moved from the board configuration
    files to the defconfig files.

    TBD: Move all of the definitions in the include/status_led.h to the
    relevant board's defconfig files.

    Tested boards: CL-SOM-AM57x, CM-T335

    Signed-off-by: Uri Mashiach

    Uri Mashiach
     

23 Aug, 2016

1 commit

  • At least on bfin, this "specimen" is actually allocated in the BSS and
    wastes lots of memory in already tight memory conditions.

    Also, with the introduction of NFSv3 support, this waste got
    substantially larger.

    Just remove it. If a board needs a specific different defragment size,
    that board can override this setting.

    Signed-off-by: Joe Hershberger

    Joe Hershberger
     

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
     

08 Jan, 2016

1 commit

  • Introduced in 45b4773 (net/arp: account for ARP delay, avoid duplicate packets on timeout)

    Check the arp timeout and adjust the timeout start time before the call
    to eth_recv() so that the sandbox driver has the opportunity to adjust
    the sandbox timer after the new start time has been recorded.

    Also, change the adjustment amount by 11 seconds instead of exactly the
    10 seconds that the ping timout is expecting since the timeout check is
    looking for the time elapsed to be greater than but not equal to the
    specified delay.

    Signed-off-by: Joe Hershberger
    Reviewed-by: Stefan Brüns
    Acked-by: Simon Glass

    Joe Hershberger
     

20 Nov, 2015

1 commit


30 Oct, 2015

1 commit

  • The net_boot_file_name buffer is used as storage for the bootfilename
    command line argument to network boot commands such as tftp and nfs.

    Increase the size of this buffer to 1024 bytes as the current size of
    128 bytes is restrictive for arbitrary paths on the server.

    Signed-off-by: Jacob Stiffler
    Acked-by: Joe Hershberger

    Jacob Stiffler
     

29 Oct, 2015

1 commit


07 Sep, 2015

1 commit


22 Aug, 2015

1 commit

  • Current behavior is that if CTRL+C is pressed command returns 0 that was
    successful which is not correct behavior.
    The easiest test case is "tftpboot 80000 uImage && echo yes"
    and press CTRL+C. Then the second command is called which is incorrect.

    Error log:
    zynq-uboot> tftpb 80000 uImage && echo yes
    Gem.e000b000:7 is connected to Gem.e000b000. Reconnecting to
    Gem.e000b000
    Gem.e000b000 Waiting for PHY auto negotiation to complete....... done
    Using Gem.e000b000 device
    TFTP from server 192.168.0.102; our IP address is 192.168.0.101
    Filename 'uImage'.
    Load address: 0x80000
    Loading: ################
    Abort
    yes
    zynq-uboot>

    This patch adds -EINTR return value when CTRL+C is pressed.

    Signed-off-by: Michal Simek
    Reviewed-by: Tom Rini
    Acked-by: Joe Hershberger

    Michal Simek
     

21 May, 2015

1 commit

  • Instead of checking for changes to the env each time we enter the
    net_loop, use the env callbacks to update the values of the variables.
    Don't update the variables when the source was programmatic, since the
    variables were the source of the new value.

    Signed-off-by: Joe Hershberger
    Reviewed-by: Simon Glass

    Joe Hershberger
     

19 Apr, 2015

9 commits