| Age | Commit message (Collapse) | Author |
|
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]>
|
|
This provides an option for the LCD to flush the dcache after each update
(puts, scroll or clear).
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Tom Warren <[email protected]>
|
|
If kernel-offset is specified in the fdt, set an environment variable
so that scripts can access the attached kernel.
This can be used by a packaging program to tell U-Boot about a kernel
that has been downloaded alongside U-Boot. The value in the fdt is
the offset of the kernel from the start of the U-Boot image, so we can
find it just by adding CONFIG_SYS_TEXT_BASE.
It is then fairly easy to put something like this in the environment
variables in the board header file:
"if test ${kernaddr} != \"\"; then "\
"echo \"Using bundled kernel\"; "\
"bootm ${kernaddr};" \
"fi; "\
/* rest of boot sequence follows here */
Signed-off-by: Simon Glass <[email protected]>
|
|
When secure booting is chosen:
* The u-boot shell is never invoked during boot--we just do a simple
table lookup to find the command. This means we could even remove
the shell parsing from u-boot and still be able to boot.
* The boot command can't be interruped.
* Failure doesn't cause us to fall back to the shell.
Signed-off-by: Gabe Black <[email protected]>
Signed-off-by: Doug Anderson <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
This change adds a call to set_working_fdt_addr near the end of u-boot
initialization which tells the fdt command/library where the device tree is.
This makes it possible to use the fdt command to look at the active device tree
since otherwise there would be no way to know what address it was at to set
things up manually.
Signed-off-by: Gabe Black <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
Load boot command from /config/bootcmd of device tree if present.
Signed-off-by: Tom Wai-Hong Tam <[email protected]>
Signed-off-by: Che-Liang Chiou <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
command.c:44:38: error: bad constant expression
dlmalloc.c:1468:2: warning: Using plain integer as NULL pointer
dlmalloc.c:1468:5: warning: Using plain integer as NULL pointer
dlmalloc.c:2176:12: warning: Using plain integer as NULL pointer
dlmalloc.c:2179:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2382:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2436:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2582:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2585:17: warning: Using plain integer as NULL pointer
dlmalloc.c:2646:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2659:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2692:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2707:19: warning: Using plain integer as NULL pointer
dlmalloc.c:2708:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2786:31: warning: Using plain integer as NULL pointer
dlmalloc.c:2801:12: warning: Using plain integer as NULL pointer
dlmalloc.c:2801:22: warning: Using plain integer as NULL pointer
dlmalloc.c:2926:27: warning: Using plain integer as NULL pointer
dlmalloc.c:2928:14: warning: Using plain integer as NULL pointer
dlmalloc.c:2929:12: warning: Using plain integer as NULL pointer
dlmalloc.c:3075:14: warning: Using plain integer as NULL pointer
hush.c:292:14: warning: symbol 'last_return_code' was not declared. Should it be static?
hush.c:293:5: warning: symbol 'nesting_level' was not declared. Should it be static?
hush.c:2175:20: warning: Using plain integer as NULL pointer
hush.c:2175:34: warning: Using plain integer as NULL pointer
hush.c:2210:41: warning: Using plain integer as NULL pointer
hush.c:2216:45: warning: Using plain integer as NULL pointer
hush.c:2249:25: warning: Using plain integer as NULL pointer
hush.c:2332:13: warning: symbol 'new_pipe' was not declared. Should it be static?
hush.c:2390:5: warning: symbol 'reserved_word' was not declared. Should it be static?
hush.c:2927:5: warning: symbol 'parse_stream' was not declared. Should it be static?
hush.c:3127:6: warning: symbol 'mapset' was not declared. Should it be static?
hush.c:3133:6: warning: symbol 'update_ifs_map' was not declared. Should it be static?
hush.c:3161:5: warning: symbol 'parse_stream_outer' was not declared. Should it be static?
hush.c:3295:34: warning: Using plain integer as NULL pointer
hush.c:3631:5: warning: symbol 'do_showvar' was not declared. Should it be static
image.c:1282:29: warning: Using plain integer as NULL pointer
image.c:1315:41: warning: Using plain integer as NULL pointer
image.c:1330:25: warning: Using plain integer as NULL pointer
image.c:1706:25: warning: Using plain integer as NULL pointer
main.c:510:10: warning: symbol 'hist_num' was not declared. Should it be static?
main.c:512:5: warning: symbol 'hist_list' was not declared. Should it be static?
main.c:513:6: warning: symbol 'hist_lines' was not declared. Should it be static?
usb_storage.c:195:6: warning: symbol 'usb_show_progress' was not declared. Should it be static?
usb_storage.c:440:48: warning: Using plain integer as NULL pointer
usb_storage.c:503:5: warning: symbol 'usb_stor_BBB_comdat' was not declared. Should it be static?
usb_storage.c:551:5: warning: symbol 'usb_stor_CB_comdat' was not declared. Should it be static?
usb_storage.c:629:55: warning: Using plain integer as NULL pointer
usb_storage.c:620:5: warning: symbol 'usb_stor_CBI_get_status' was not declared. Should it be static?
usb_storage.c:675:43: warning: Using plain integer as NULL pointer
usb_storage.c:668:5: warning: symbol 'usb_stor_BBB_clear_endpt_stall' was not declared. Should it be static?
usb_storage.c:679:5: warning: symbol 'usb_stor_BBB_transport' was not declared. Should it be static?
usb_storage.c:801:5: warning: symbol 'usb_stor_CB_transport' was not declared. Sh
xyzModem.c:104:1: warning: symbol 'CYGACC_COMM_IF_GETC_TIMEOUT' was not declared. Should it be static?
xyzModem.c:122:1: warning: symbol 'CYGACC_COMM_IF_PUTC' was not declared. Should it be static?
xyzModem.c:169:1: warning: symbol 'parse_num' was not declared. Should it be stat
note: hush.c's nesting_level deleted because not used.
Signed-off-by: Kim Phillips <[email protected]>
|
|
Define the new "-2" value for bootdelay to mean autoboot with no delay
and don't check for an abort key (while "0" value means do check).
Signed-off-by: Joe Hershberger <[email protected]>
|
|
When CONFIG_ZERO_BOOTDELAY_CHECK is not defined, bootdelay==0
prevents the check for console input (as stated in README.autoboot).
This must also work in CONFIG_AUTOBOOT_KEYED mode.
Signed-off-by: Dirk Eibach <[email protected]>
|
|
Any environment variable can hold commands to be executed by the 'run'
command. The environment variables preboot, bootcmd and menucmd have
special code for triggering execution in certain circumstances.
We adjust these calls to use run_command_list() instead of run_command().
This change permits these variables to have embedded newlines so that
they work the same as the 'source' command.
Signed-off-by: Simon Glass <[email protected]>
|
|
This new function runs a list of commands separated by semicolon or newline.
We move this out of cmd_source so that it can be used by other code. The
PXE code also uses the new function.
Suggested-by: Michael Walle <[email protected]>
Signed-off-by: Simon Glass <[email protected]>
|
|
Signed-off-by: Joe Hershberger <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
If one command fails, 'run' command should terminate and not execute
any remaining variables.
Signed-off-by: Timo Ketola <[email protected]>
Tested-by: Wolfgang Denk <[email protected]>
Tested-by: Simon Glass <[email protected]>
Acked-by: Simon Glass <[email protected]>
|