29 Nov, 2010

2 commits


18 Nov, 2010

1 commit

  • Before this commit, weak symbols were not overridden by non-weak symbols
    found in archive libraries when linking with recent versions of
    binutils. As stated in the System V ABI, "the link editor does not
    extract archive members to resolve undefined weak symbols".

    This commit changes all Makefiles to use partial linking (ld -r) instead
    of creating library archives, which forces all symbols to participate in
    linking, allowing non-weak symbols to override weak symbols as intended.
    This approach is also used by Linux, from which the gmake function
    cmd_link_o_target (defined in config.mk and used in all Makefiles) is
    inspired.

    The name of each former library archive is preserved except for
    extensions which change from ".a" to ".o". This commit updates
    references accordingly where needed, in particular in some linker
    scripts.

    This commit reveals board configurations that exclude some features but
    include source files that depend these disabled features in the build,
    resulting in undefined symbols. Known such cases include:
    - disabling CMD_NET but not CMD_NFS;
    - enabling CONFIG_OF_LIBFDT but not CONFIG_QE.

    Signed-off-by: Sebastien Carlier

    Sebastien Carlier
     

15 Nov, 2010

2 commits

  • This has always been confusing, and the idea of these functions returning the
    number of interfaces initialized was half-baked and ultimately pointless.
    Instead, act more like regular functions and return < 0 on failure, >= 0 on
    success.

    This change shouldn't break anything.

    Signed-off-by: Ben Warren

    Ben Warren
     
  • Can't get IP address with dhcp due to the dhcp server not
    allow the empty param list request under some network env

    This patch is based on Gray Remlin's initial patch.

    Signed-off-by: Jason Liu
    Signed-off-by: Gray Remlin

    Jason Liu
     

12 Oct, 2010

2 commits


10 Aug, 2010

1 commit

  • Commit 6e37b1a3a25004d3df5867de49fff6b3fc9c4f04 modifies several net calls
    to take a (const char *) parameter instead of (char *), but in some cases
    the modified functions call other functions taking (char *). The end result
    is warnings about discarding the const qualifier.

    This patch fixes these other function signatures.

    Signed-off-by: Ben Warren

    Ben Warren
     

12 Jul, 2010

1 commit

  • Some commands operate on eth device names (like 'mii'), but those cannot
    be passed on the command line as one argument. So detect devices like
    these and warn about them so someone will fix it.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Ben Warren

    Mike Frysinger
     

21 Jun, 2010

2 commits


04 May, 2010

3 commits


22 Mar, 2010

1 commit

  • So far, TFTP negotiated a fixed retransmission timeout of 5 seconds.
    In some cases (busy networks, slow TFTP servers) this caused very
    slow transfers. A new environment variable "tftptimeout" allows to
    set this timeout. Lowering this value may make downloads succeed
    faster in networks with high packet loss rates or with unreliable
    TFTP servers.

    Signed-off-by: Wolfgang Denk
    Cc: Ben Warren
    Signed-off-by: Ben Warren

    Wolfgang Denk
     

18 Jan, 2010

1 commit

  • There are boards out there that do not have network support in
    U-Boot (CONFIG_CMD_NET not set), but they do so in Linux. This
    makes it desirable to be able to port network configuration (like
    the IP address) to the Linux kernel.

    We should not make the passing of the IP configuration to Linux
    dependent on U-Boot features / settings.

    For this, make getenv_IPaddr() global. This fixes build error

    u-boot/lib_xxx/board.c:360: undefined reference to `getenv_IPaddr'

    on various architectures.

    Signed-off-by: Dirk Behme
    Acked-by: Ben Warren

    Dirk Behme
     

14 Dec, 2009

2 commits


08 Dec, 2009

2 commits

  • - NfsTimeout() does not correctly update the NFS timeout value which
    results in NfsTimeout() only being called once in certain situations.
    This can result in the 'nfs' command hanging indefinetly. For
    example, the command:

    nfs 192.168.0.1:/home/user/file

    will not exit until ctrl-c is pressed if 192.168.0.1 does not have an
    NFS server running.

    This issue is resolved by reinitializting the NFS timeout value inside
    NfsTimeout() when a timeout occurs.

    - Make the 'nfs' command print the 'T' character when a timeout occurs.
    Previously there was no indication that timeouts were occuring.

    - Mimic the 'tftpboot' command and when a download fails print "Retry
    count exceeded; starting again", and restart the download taking the
    'netretry' environment variable into account.

    Signed-off-by: Evan Samanas
    Signed-off-by: Peter Tyser

    Tested on TQM8xxL.

    Tested by: Wolfgang Denk

    Tested on MPC8527DS.

    Tested by: Ed Swarthout

    Evan Samanas
     
  • An off by one error may cause nfs readlink lookup fail if
    nfs_path_buff has non-zero data from a previous use.

    Loading: *** ERROR: File lookup fail

    Signed-off-by: Ed Swarthout

    Ed Swarthout
     

25 Nov, 2009

1 commit


11 Sep, 2009

1 commit


26 Aug, 2009

4 commits

  • Optionally add RFC 2349 "Transfer Size Option", so we can minimize the
    time spent sending data over the UART (now print a single line during a
    tftp transfer).

    - If turned on (CONFIG_TFTP_TSIZE), U-Boot asks for the size of the file.
    - if receives the file size, a single line (50 chars) are printed.
    one hash mark == 2% of the file downloaded.
    - if it doesn't receive the file size (the server doesn't support RFC
    2349, prints standard hash marks (one mark for each UDP frame).

    Signed-off-by: Robin Getz
    Signed-off-by: Ben Warren

    Robin Getz
     
  • To take advantage of defragmented packets, the config file
    can define CONFIG_NFS_READ_SIZE to override the 1kB default.
    No support is there for an environment variable by now.

    Signed-off-by: Alessandro Rubini
    Signed-off-by: Ben Warren

    Alessandro Rubini
     
  • Increasing the block size is useful if CONFIG_IP_DEFRAG is
    used. Howerver, the last fragments in a burst may overflow the
    receiving ethernet, so the default is left at 1468, with thre new
    CONFIG_TFTP_BLOCKSIZE for config files. Further, "tftpblocksize"
    can be set in the environment.

    Signed-off-by: Alessandro Rubini
    Signed-off-by: Ben Warren

    Alessandro Rubini
     
  • The defragmenting code is enabled by CONFIG_IP_DEFRAG; the code is
    useful for TFTP and NFS transfers. The user can specify the maximum
    defragmented payload as CONFIG_NET_MAXDEFRAG (default 16k).
    Since NFS has a bigger per-packet overhead than TFTP, the static
    reassembly buffer can hold CONFIG_NET_MAXDEFRAG + the NFS overhead.

    The packet buffer is used as an array of "hole" structures, acting as
    a double-linked list. Each new fragment can split a hole in two,
    reduce a hole or fill a hole. No support is there for a fragment
    overlapping two diffrent holes (i.e., thre new fragment is across an
    already-received fragment).

    Signed-off-by: Alessandro Rubini
    Signed-off-by: Ben Warren

    Alessandro Rubini
     

10 Aug, 2009

1 commit


08 Aug, 2009

2 commits

  • In the previous enetaddr refactoring, the assumption with commit 56b555a644
    was that the eth layer would handle the env -> device enetaddr syncing.
    This was not the case as eth_initialize() is called only once and the sync
    occurs there. So make sure the eth_init() function does the env -> device
    sync with every network init.

    Reported-by: Andrzej Wolski
    Signed-off-by: Mike Frysinger
    Signed-off-by: Ben Warren

    Mike Frysinger
     
  • Minor ./net cleanups - no functional changes
    - change #ifdef DEBUG printf(); #endif to just debug()
    - changed __FUNCTION__ to __func__
    - got rid of extra whitespace between function and opening brace
    - removed unnecessary braces on if statements

    gcc dead code elimination should make this functionally/size equivalent
    when DEBUG is not defined. (confirmed on Blackfin, with gcc 4.3.3).

    Signed-off-by: Robin Getz

    Signed-off-by: Ben Warren

    Robin Getz
     

24 Jul, 2009

1 commit


23 Jul, 2009

5 commits

  • Linux's netconsole works much better when you can pass it the MAC address of
    the server. (otherwise it just uses broadcast, which everyone else on my
    network complains about :)

    This sets the env var "serveraddr" (to match ethaddr), so that you can pass
    it to linux with whatever bootargs you want to....

    addnetconsole=set bootargs $(bootargs) netconsole=@$(ipaddr)/eth0,@$(serverip)/$(serveraddr)

    Signed-of-by: Robin Getz

    Signed-off-by: Ben Warren

    Robin Getz
     
  • Fixed the DHCP/BOOTP/RARP regression introduced in u-boot-2009.06
    by initializing our IP addr to 0 in order to accept any IP addr
    assigned to us by the DHCP/BOOTP/RARP server.

    Ack-by: Robin Getz
    Signed-off-by: Michael Zaidman
    Signed-off-by: Ben Warren

    Michael Zaidman
     
  • Signed-off-by: Ben Warren

    Ben Warren
     
  • On 04 Oct 2008 Pieter posted a dns implementation for U-Boot.

    http://www.mail-archive.com/u-boot-users@lists.sourceforge.net/msg10216.html
    >
    > DNS can be enabled by setting CFG_CMD_DNS. After performing a query,
    > the serverip environment var is updated.
    >
    > Probably there are some cosmetic issues with the patch. Unfortunatly I
    > do not have the time to correct these. So if anybody else likes DNS
    > support in U-Boot and has the time, feel free to patch it in the main tree.

    Here it is again - slightly modified & smaller:
    - update to 2009-06 (Pieter's patch was for U-Boot 1.2.0)
    - README.dns is added
    - syntax is changed (now takes a third option, the env var to store
    the result in)
    - add a random port() function in net.c
    - sort Makefile in ./net/Makefile
    - dns just returns unless a env var is given
    - run through checkpatch, and clean up style issues
    - remove packet from stack
    - cleaned up some comments
    - failure returns much faster (if server responds, don't wait for
    timeout)
    - use built in functions (memcpy) rather than byte copy.

    Signed-off-by: Robin Getz
    Signed-off-by: Pieter Voorthuijsen
    Signed-off-by: Ben Warren

    Robin Getz
     
  • The net code is mostly consistent in using 'Packet' rather than 'Pkt', so
    rename the minor detractor to follow suite.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Ben Warren

    Mike Frysinger
     

15 Jun, 2009

3 commits


16 May, 2009

1 commit

  • Fix some issues introduced from commit:
    2f70c49e5b9813635ad73666aa30f304c7fdeda9
    suggested by Mike Frysinger.

    - added some comment for the env_id variable in common_cmd_nvedit.c
    - moved some variables in fn scope instead of file scope
    - NetInitLoop now static void

    Signed-off-by: Heiko Schocher
    Acked-by: Ben Warren

    Heiko Schocher
     

28 Apr, 2009

1 commit