| Age | Commit message (Collapse) | Author |
|
Add a new netboot_run() function which can be used for simple network
operations, such as loading a file. Put the implementation in an
internal function, used by the existing code.
Place this function into the net/ code, so that it does not need the
command line to be available.
Document which network operations are supported, i.e. a limited subset,
for now.
For the one board which uses lwip, it is not quite clear how to avoid
using the cmdline interface. This will need some discussion.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use IS_ENABLED() to avoid an extra build path.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
|
|
Move the core code for starting an netboot operation into a separate
function, so that we can (with additional work) move towards calling it
from outside the file.
Signed-off-by: Simon Glass <[email protected]>
|
|
Rather than setting global variables, return the size, if provided. For
tftput, use the addr argument to store the save address, to avoid adding
yet another parameter.
Signed-off-by: Simon Glass <[email protected]>
|
|
Rather than updating the global, update the value of some parameters,
so the action of the function is simpler.
Signed-off-by: Simon Glass <[email protected]>
|
|
Rather than updating the global, update the value of a parameter, so the
action of the function is simpler.
Signed-off-by: Simon Glass <[email protected]>
|
|
This function repeats the same code in a few places, namely setting
net_boot_file_name_explicit and copying of the filename to
net_boot_file_name
Move these two operations to the caller, with just the filename (or
NULL) returned by parse_args()
This makes things a little easier to follow.
Signed-off-by: Simon Glass <[email protected]>
|
|
This function is a bit vague as to what it does. Expand the comment a
little, to specify which args are provided and which variables are
updated.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
|
|
Move the bootstage_mark() function just before net_loop(), so that the
IPv6 code is not in the way.
Signed-off-by: Simon Glass <[email protected]>
|
|
Each wget request now fills the struct wget_info. The efi
bootdevice is now set conditionally to the set_bootdevice
variable in wget_info, and the same holds for lmb memory check.
Signed-off-by: Adriano Cordova <[email protected]>
|
|
Extract some code from cmd/net.c that will be useful in a subsequent
commit to implement wget with NET_LWIP.
Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Ilias Apalodimas <[email protected]>
|
|
Drop all duplicate newlines. No functional change.
Signed-off-by: Marek Vasut <[email protected]>
|
|
As part of bringing the master branch back in to next, we need to allow
for all of these changes to exist here.
Reported-by: Jonas Karlman <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay
Ethernet"' I failed to notice that b4 noticed it was based on next and
so took that as the base commit and merged that part of next to master.
This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing
changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35.
Reported-by: Jonas Karlman <[email protected]>
Signed-off-by: Tom Rini <[email protected]>
|
|
Remove <common.h> from all "cmd/" files and when needed add
missing include files directly.
Signed-off-by: Tom Rini <[email protected]>
|
|
Prepare v2023.07-rc6
|
|
CID 453851 : sprintf() shouldn't copy from/to tmp
CID 436278 : DHCP6 option_len should be checked before use
Signed-off-by: Sean Edmond <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
|
|
Add a new option to the 'net' command which can be used to dump network
statistics.
To do this, 3 new callbacks are added to the eth_ops structure:
.get_sset_count(), .get_strings(), .get_stats(). These callbacks
have the same functions as in Linux: to return the number of counters,
the strings which describe those counters and the actual values.
Signed-off-by: Ioana Ciornei <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
|
|
Adds commands to support DHCP and PXE with IPv6.
New configs added:
- CMD_DHCP6
- DHCP6_PXE_CLIENTARCH
- DHCP6_PXE_DHCP_OPTION
- DHCP6_ENTERPRISE_ID
New commands added (when IPv6 is enabled):
- dhcp6
- pxe get -ipv6
- pxe boot -ipv6
Signed-off-by: Sean Edmond <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
|
|
Fix "setenv gatewayip6".
Synchronize IPv6 local variables with environment variables
in netboot_update_env()
Signed-off-by: Sean Edmond <[email protected]>
|
|
This converts 3 usages of this option to the non-SPL form, since there is
no SPL_CMD_TFTPPUT defined in Kconfig
Signed-off-by: Simon Glass <[email protected]>
|
|
At present this must be done by executing the command. Also it involves
fiddling with the environment to determine the correct autoload behaviour.
Ideally it should be possible to run network operations without even
having the command line present (CONFIG_CMDLINE).
For now, add a function to handle DHCP, so it can be called from a bootdev
more easily.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
|
|
As there are no more non-DM_ETH cases for networking, remove this legacy
file and update the Makefile to match current usage.
Signed-off-by: Tom Rini <[email protected]>
|
|
Implement ping6 command to ping hosts using IPv6. It works the same way as
an ordinary ping command. There is no ICMP request so it is not possible
to ping our host. This patch adds options in Kconfig and Makefile to
build ping6 command.
Series-changes: 3
- Added structures and functions descriptions
- Added to ping6_receive() return value instead of void
Series-changes: 4
- Fixed structures and functions description style
Signed-off-by: Viacheslav Mitrofanov <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
The command tftpboot uses IPv4 by default. Add the possibility to use IPv6
instead. If an address in the command is an IPv6 address it will use IPv6
to boot or if there is a suffix -ipv6 in the end of the command it also
force using IPv6. All other tftpboot features and parameters are left
the same.
Signed-off-by: Viacheslav Mitrofanov <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
This commit adds a simple wget command that can download files
from http server.
The command syntax is
wget ${loadaddr} <path of the file from server>
Signed-off-by: Duncan Hare <[email protected]>
Signed-off-by: Ying-Chun Liu (PaulLiu) <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Cc: Christian Gmeiner <[email protected]>
Cc: Joe Hershberger <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Ramon Fried <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
|
|
Adds an "ncsi" command to manually start NC-SI configuration.
Signed-off-by: Samuel Mendoza-Jonas <[email protected]>
Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
|
|
The command's name is a misnomer.
The command loads a file but does not run (boot) it.
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Calling tftpput with less than 2 arguments must lead to a failure.
If tftpput is called with two arguments, these are the address and
the size of the file to be transferred.
Signed-off-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Use IS_ENABLED() instead, to reduce the number of build paths.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
|
|
It is a pain to have to specify the value 16 in each call. Add a new
hextoul() function and update the code to use it.
Add a proper comment to simple_strtoul() while we are here.
Signed-off-by: Simon Glass <[email protected]>
|
|
In a system with multiple network controllers it can be difficult
to know the names of the various devices available. This is especially
true for USB ether devices as they do not display device names upon
detection.
This is being added as a net sub-system in case other commands may
want to be added or moved here.
Note that this is only enabled for DM_ETH
Example:
U-Boot > net
net - NET sub-system
Usage:
net list - list available devices
U-Boot > net list
eth0 : ethernet@2188000 00:d0:12:98:f5:47 active
eth1 : e1000#0 00:d0:12:98:f5:48
eth2 : asix_eth 8c:ae:4c:f5:84:9d
eth3 : asix_eth 8c:ae:4c:f9:41:e3
Signed-off-by: Tim Harvey <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
|
|
This commits update the support of sntp to use
the framework udp. This change allows to remove
all the reference to sntp in the main network
file net/net.c.
Signed-off-by: Philippe Reynes <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
If 'CONFIG_CMD_TFTPBOOT' or 'CONFIG_CMD_BOOTP' are disabled, the usage must be disabled, too!
Signed-off-by: Olaf Krebs <[email protected]>
CC: Joe Hershberger <[email protected]>
|
|
We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.
Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.
This requires quite a few header-file additions.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move this fairly uncommon header out of the common header.
Signed-off-by: Simon Glass <[email protected]>
|
|
These three globals relate to image handling. Move them to the image
header file.
Signed-off-by: Simon Glass <[email protected]>
|
|
These global variables are quite short and generic. In fact the same name
is more often used locally for struct members and function arguments.
Add a image_ prefix to make them easier to distinguish.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move env_set() over to the new header file.
Acked-by: Joe Hershberger <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
Instead of depending on a env callback for bootfile, read it explicitly.
We do this because the bootfile can be specified on the command line and
if it is, we will overwrite the internal variable. If a netboot_common()
is called again with no bootfile parameter, we want to use the one in
the environment.
Signed-off-by: Joe Hershberger <[email protected]>
|
|
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 <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.
In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.
This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.
Signed-off-by: Tom Rini <[email protected]>
|
|
Previously, CMD_NET was an alias for 2 commands (bootp and tftpboot) and
they we not able to be disabled. Separate out those 2 commands and move
CMD_NET up to the menu level, which more accurately represents the code.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Chris Packham <[email protected]>
Reviewed-by: Duncan Hare <[email protected]>
|
|
We are now using an env_ prefix for environment functions. Rename these
other functions as well, for consistency:
getenv_vlan()
getenv_bootm_size()
getenv_bootm_low()
getenv_bootm_mapsize()
env_get_default()
Suggested-by: Wolfgang Denk <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
We are now using an env_ prefix for environment functions. Rename setenv()
for consistency. Also add function comments in common.h.
Suggested-by: Wolfgang Denk <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
This is only used in cmd/net.c
Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
In commit 7044c6bb6 (net: cosmetic: Clean up DHCP variables and functions)
BootpCopyNetParams() was renamed to store_net_params(). Update the reference in
comment.
Cc: Joe Hershberger <[email protected]>
Signed-off-by: Baruch Siach <[email protected]>
|
|
After any operation that downloads a file (e.g., pxe get, or dhcp), the
buffer containing the downloaded data is flushed. This is unnecessary
and annoying. Unnecessary, because
the network driver should already have fliushed the cache for the DMAed area,
and annoying because it generates a cache misalignment message.
Signed-off-by: Peter Chubb <[email protected]>
Acked-by: Heiko Schocher <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Now that they are in their own directory, we can remove this prefix.
This makes it easier to find a file since the prefix does not get in the
way.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
Reviewed-by: Heiko Schocher <[email protected]>
Acked-by: Stefan Roese <[email protected]>
Acked-by: Przemyslaw Marczak <[email protected]>
|