| Age | Commit message (Collapse) | Author |
|
Move this fairly uncommon header out of the common header.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.
Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.
Signed-off-by: Simon Glass <[email protected]>
|
|
This is defined in bootstage.h and is not called in this file anyway. Drop
it.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Move this function out of common.h and into a better place.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Simon Goldschmidt <[email protected]>
|
|
Move these functions into the command.h header file which is a better fit.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Move env_set() over to the new header file.
Acked-by: Joe Hershberger <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
The function name indicates that it does something, but its entire
operation is actually condition on a CONFIG. Move the condition outside
the function so this is clearer, and use if() instead of #ifdef, like the
reset of the file.
Signed-off-by: Simon Glass <[email protected]>
|
|
Now that many things are converted to Kconfig we can drop most of the
Signed-off-by: Simon Glass <[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]>
|
|
We have a large number of places where while we historically referenced
gd in the code we no longer do, as well as cases where the code added
that line "just in case" during development and never dropped it.
Signed-off-by: Tom Rini <[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 option is always enabled and is about to be removed. Drop references
to it.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Andreas Bießmann <[email protected]>
|
|
Normally board_run_command() will handle command processed. But if for some
reason it returns then we should panic to avoid further processing.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Signed-off-by: David Müller <[email protected]>
|
|
The console includes a global variable and several functions that are only
used by a small subset of U-Boot files. Before adding more functions, move
the definitions into their own header file.
Signed-off-by: Simon Glass <[email protected]>
|
|
This code allows using DFU defined mediums for storing data received via
TFTP protocol.
It reuses and preserves functionality of legacy code at common/update.c.
The update_tftp() function now accepts parameters - namely medium device
name and its number (e.g. mmc 1).
Without this information passed old behavior is preserved.
Signed-off-by: Lukasz Majewski <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
This not only looks a bit better it also prevents a
warning with W=1 (no previous prototype).
Signed-off-by: Jeroen Hofstee <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
It doesn't seem necessary to use memory allocation in this code. The setenv()
will make a copy anyway.
Signed-off-by: Simon Glass <[email protected]>
|
|
bootdelay_process() never returns in some circumstances, whichs makes the
control flow confusing. Change it so that the decision about how to execute
the boot command is made in the main_loop() code, so it is easier to follow.
Move CLI stuff to cli.c.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move these details from main (which doesn't care which parser is used) to
cli.c where they belong.
Signed-off-by: Simon Glass <[email protected]>
|
|
The main loop is easier to follow if the code is grouped into separate
functions. Make this change, so that main_loop() is easier to read.
Signed-off-by: Simon Glass <[email protected]>
|
|
This code seems unnecessarily complex. We really just need to check the
global_data. Now that is it all in one place, and not arch-specific, this
is pretty easy.
Signed-off-by: Simon Glass <[email protected]>
|
|
We now have a single entry point to the CLI, whether simple or hush. Put
this in its own file.
Signed-off-by: Simon Glass <[email protected]>
|
|
The autoboot code is complex and long. It deserves its own file with
a simple interface from main.c.
Signed-off-by: Simon Glass <[email protected]>
|
|
It doesn't make sense to have the simple parser and the readline code
all in main. Split them out into separate files.
Signed-off-by: Simon Glass <[email protected]>
|
|
Move the CLI prototypes from common.h to cli.h as part of an effort to
reduce the size of common.h.
Signed-off-by: Simon Glass <[email protected]>
|
|
Hush is a command-line interpreter, so rename it to make that clearer.
Signed-off-by: Simon Glass <[email protected]>
|
|
In the case where an environment variable spans multiple lines, we should
use run_command_list() so that all lines are executed. This shold be
backwards compatible with existing behaviour for existing scripts.
Signed-off-by: Simon Glass <[email protected]>
|
|
We should move forward to remove the old board init code. Add a
prominent message to encourage maintainers to get started on this
work.
Signed-off-by: Simon Glass <[email protected]>
|
|
As originally implemented, setting the AUTOBOOT_KEYED config option will
prevent users from breaking into the autoboot script with ctrl-c. Restore
that option with a new config symbol.
Signed-off-by: Mark Langsdorf <[email protected]>
|
|
Signed-off-by: Wolfgang Denk <[email protected]>
[trini: Drop changes for PEP 4 following python tools]
Signed-off-by: Tom Rini <[email protected]>
|
|
Signed-off-by: Wolfgang Denk <[email protected]>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <[email protected]>
|
|
This can be useful to force bootcmd to execute as soon as U-Boot has
started.
My use-case is: An SoC-specific tool pushes U-Boot into RAM, along with
an image to be written to device boot flash, with the DT config property
"bootcmd" set to contain a command to write that image to flash. In this
scenario, we don't want to allow any stale bootdelay value taken from
the current flash content to affect how long it takes before the
flashing process starts.
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
Acked-by: Gerald Van Baren <[email protected]>
|
|
Define a simple debug condition at the top of the file, to avoid using
lots of #ifdefs later on.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
Define a simple debug condition at the top of the file, to avoid using
lots of #ifdefs later on.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
The headers are a bit out of order, so fix them.
Signed-off-by: Simon Glass <[email protected]>
|
|
There are a few over-long lines and other checkpatch problems in this area
of the code. Prepare the ground for the next patch by tidying these up.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
These functions are now available, so use them to avoid extra code here.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
Move this code into its own function, since it clutters up main_loop().
Signed-off-by: Simon Glass <[email protected]>
|
|
There are two implementations of abortboot(). Turn these into two separate
functions, and create a single abortboot() which calls either one or the
other.
Also it seems that nothing uses abortboot() outside main, so make it static.
At this point there is no further use of CONFIG_MENU in main.c.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
This function should be declared in net.h.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
This reverts commit 3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56.
In practice it doesn't seem like a good idea to make the the working
FDT point to the control FDT. Now that we can access the control FDT
using the 'fdt' command, there is no need for this feature. Remove it.
Signed-off-by: Simon Glass <[email protected]>
|
|
Because the code that handles bootdelay is compiled in conditionally
based on the default value, you are restricted in the default,
regardless of what you want the runtime options to be.
Change the source to always check if any default is given so that other
values can be selected and used at runtime.
Signed-off-by: Joe Hershberger <[email protected]>
|
|
When using $fdtaddr in $bootcmd and $bootcmd is automatically called,
$fdtaddr is yet not defined.
Signed-off-by: Barak Wasserstrom <[email protected]>
|
|
As far as every arch has a get_timer function,
run_command_and_time_it code can now disappear.
Signed-off-by: Richard Genoud <[email protected]>
Acked-By: Che-Liang Chiou <[email protected]>
[trini: s/ulong/unsigned long/ in command.h portion]
Signed-off-by: Tom Rini <[email protected]>
|
|
Autoboot timeout defined by CONFIG_BOOTDELAY will not be accurate if
CONFIG_USB_KEYBOARD and CONFIG_SYS_USB_EVENT_POLL are defined in
configuration file and when tstc() function for checking key pressed
takes longer time than 10 ms (e.g., 50 ms) to finish.
Signed-off-by: Jim Lin <[email protected]>
|
|
Conflicts:
README
arch/arm/cpu/armv7/exynos/clock.c
board/samsung/universal_c210/universal.c
drivers/misc/Makefile
drivers/power/power_fsl.c
include/configs/mx35pdk.h
include/configs/mx53loco.h
include/configs/seaboard.h
|
|
Mark when we get to the main loop.
Signed-off-by: Simon Glass <[email protected]>
|
|
We need an extra condition here in case we want to use fdt without the
silent console/cmdline editing/post options. It is easier to just remove
the #ifdef.
Signed-off-by: Simon Glass <[email protected]>
|