06 May, 2020
1 commit
-
When booting from USB device, change u-boot autoboot to default
run UUU bootcmd or enter fastboot directly for android.Signed-off-by: Ye Li
(cherry picked from commit eba8710106348a283940b851080b049bc7fbe466)
06 Feb, 2020
1 commit
-
At present dm/device.h includes the linux-compatible features. This
requires including linux/compat.h which in turn includes a lot of headers.
One of these is malloc.h which we thus end up including in every file in
U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
which needs to use the system malloc() in some files.Move the compatibility features into a separate header file.
Signed-off-by: Simon Glass
03 Dec, 2019
2 commits
-
Move these functions into the command.h header file which is a better fit.
Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
This function belongs in time.h so move it over and add a comment.
Signed-off-by: Simon Glass
Reviewed-by: Tom Rini
12 Aug, 2019
1 commit
-
Move env_set_hex() over to the new header file along with env_set_addr()
which uses it.Signed-off-by: Simon Glass
Acked-by: Joe Hershberger
08 Aug, 2019
1 commit
-
if CONFIG_AUTOBOOT_KEYED, CONFIG_AUTOBOOT_ENCRYPTION and
CONFIG_AUTOBOOT_STOP_STR_SHA256 are enabled in conjunction
with CONFIG_SHA_HW_ACCEL and CONFIG_FSL_CAAM, we get the
Error when pressing a key while waiting for bootdelay:Error: Address arguments are not aligned
CAAM was not setup properly or it is faultyReason is, that used variables are not cache aligned,
so malloc this variables cache aligned.Probably this is also a bugfix for other hw accelerators
than CAAM.Signed-off-by: Heiko Schocher
02 Aug, 2019
11 commits
-
Avoid use of #ifdef and keep the common condion in a variable. This makes
the code easier to read.Signed-off-by: Simon Glass
-
Adjust some of the code which can be trivially moved to use IS_ENABLED()
instead of #ifdef.Signed-off-by: Simon Glass
-
Rename this option to CONFIG_AUTOBOOT_MENU_SHOW this it relates to the
autoboot functionality.Signed-off-by: Simon Glass
-
Move the variable to the top of the file and adjust the code which uses it
to use if() rather than #ifdef, to make it easier to read.Signed-off-by: Simon Glass
-
Since this is part of the autoboot functionality, it makes sense to name
it with an AUTOBOOT prefix. No mainline boards use it so this should be
safe, and downstream boards will need to adjust.Since this option is just an integer value, it really needs another option
to control whether the feature is enabled or not. Add a new
CONFIG_USE_AUTOBOOT_MENUKEY for that. This fits better with how things are
done with Kconfig, avoiding the need to use a specific value to disable
the feature.Signed-off-by: Simon Glass
-
This is not defined by any board. We could use CONFIG_AUTOBOOT_PROMPT
instead perhaps, but this depends on CONFIG_AUTOBOOT_KEYED which is not
used for the single-key case.So let's just remove CONFIG_MENUPROMPT.
Signed-off-by: Simon Glass
-
At present we have two functions named __autoboot() which do different
things. This is confusing. Fix it by using if() instead of #ifdef for
selecting the functions, and renaming them to meaningful names.Signed-off-by: Simon Glass
-
Avoid an #ifdef in this function, to improve readability.
Signed-off-by: Simon Glass
-
This option is not documented properly at present. Fix it.
Signed-off-by: Simon Glass
-
Use if() instead for this option, renaming the two different
passwd_abort() functions to indicate their purpose.Signed-off-by: Simon Glass
-
This CONFIG option is only present if CONFIG_AUTOBOOT_ENCRYPTION is
enabled so it cannot be used in code without that #ifdef. But we want to
reduce the use of #ifdef in this file and in particular to avoid having
two different functions both named passwd_abort() but which do different
things.In preparation for this, create an intermediate value which is set to an
empty string if there is no value for CONFIG_AUTOBOOT_STOP_STR_SHA256.Signed-off-by: Simon Glass
11 May, 2018
1 commit
-
The code has been refactored to use common wrappers from bootcount.h
header.Signed-off-by: Lukasz Majewski
Reviewed-by: Stefan Roese
Reviewed-by: Tom Rini
Reviewed-by: Alex Kiernan
07 May, 2018
1 commit
-
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
28 Jan, 2018
1 commit
-
The call to hash_block in passwd_abort fails with error ENOSPC on some
systems. The reason is that the variable which specifies the size of the
buffer to contain the computed hash does not get initialized.This patch initializes the variable with the size of the buffer.
Signed-off-by: Martin Etnestad
16 Aug, 2017
3 commits
-
We are now using an env_ prefix for environment functions. Rename these
for consistency. Also add function comments in common.h.Suggested-by: Wolfgang Denk
Signed-off-by: Simon Glass -
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
Signed-off-by: Simon Glass -
We are now using an env_ prefix for environment functions. Rename these
commonly used functions, for consistency. Also add function comments in
common.h.Suggested-by: Wolfgang Denk
Signed-off-by: Simon Glass
02 Jul, 2016
4 commits
-
Move the bootdelay >= 0 check to the caller, which simplifies
the callees.Signed-off-by: Masahiro Yamada
Reviewed-by: Stefan Roese
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher -
Factor out the same code from the callees to the caller.
Signed-off-by: Masahiro Yamada
Reviewed-by: Stefan Roese
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher -
Because abortboot_keyed() and abortboot_normal() are not compiled
at the same time, we can rename both of them to __abortboot().
This allows to drop #ifdef from the caller.Signed-off-by: Masahiro Yamada
Reviewed-by: Stefan Roese
Reviewed-by: Simon Glass
Reviewed-by: Heiko Schocher -
As the help message of CONFIG_BOOTDELAY says, CONFIG_BOOTDELAY=-2
means the autoboot with no delay, with no abort check even if
CONFIG_ZERO_BOOTDELAY_CHECK is defined.To sum up, the autoboot behaves as follows:
[1] CONFIG_BOOTDELAY=0 && CONFIG_ZERO_BOOTDELAY_CHECK=y
autoboot with no delay, but you can abort it by key input[2] CONFIG_BOOTDELAY=0 && CONFIG_ZERO_BOOTDELAY_CHECK=n
autoboot with no delay, with no check for abort[3] CONFIG_BOOTDELAY=-1
disable autoboot[4] CONFIG_BOOTDELAY=-2
autoboot with no delay, with no check for abortAs you notice, [2] and [4] come to the same result, which means we
do not need CONFIG_ZERO_BOOTDELAY_CHECK. We can control all the
cases only by CONFIG_BOOTDELAY, like this:[1] CONFIG_BOOTDELAY=0
autoboot with no delay, but you can abort it by key input[2] CONFIG_BOOTDELAY=-1
disable autoboot[3] CONFIG_BOOTDELAY=-2
autoboot with no delay, with no check for abortThis commit converts the logic as follow:
CONFIG_BOOTDELAY=0 && CONFIG_ZERO_BOOTDELAY_CHECK=n
--> CONFIG_BOOTDELAY=-2Signed-off-by: Masahiro Yamada
Reviewed-by: Stefan Roese
Acked-by: Igor Grinberg
Reviewed-by: Simon Glass
Acked-by: Vladimir Zapolskiy
Reviewed-by: Heiko Schocher
Acked-by: Christian Riesch
Acked-by: Hannes Schmelzer
05 Feb, 2016
1 commit
-
The x86 build target "efi-x86" has no TEXT_BASE configured. And with the
introduction of CONFIG_BOOTDELAY for x86, this function is now called
for this board as well. Resulting in compile errors for this target.Without TEXT_BASE it makes no sense to fill these values. So lets only
configure the env variable if TEXT_BASE is defined.Signed-off-by: Stefan Roese
Cc: Simon Glass
Cc: Bin Meng
Cc: Tom Rini
Reviewed-by: Simon Glass
Reviewed-by: Bin Meng
20 Nov, 2015
1 commit
-
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
09 Jun, 2015
2 commits
-
This patch adds the feature to only stop the autobooting, and therefor
boot into the U-Boot prompt, when the input string / password matches
a values that is encypted via a SHA256 hash and saved in the environment.This feature is enabled by defined these config options:
CONFIG_AUTOBOOT_KEYED
CONFIG_AUTOBOOT_STOP_STR_SHA256Signed-off-by: Stefan Roese
Reviewed-by: Simon Glass -
This patch moves the following config options to Kconfig:
CONFIG_AUTOBOOT_KEYED
CONFIG_AUTOBOOT_PROMPT
CONFIG_AUTOBOOT_DELAY_STR
CONFIG_AUTOBOOT_STOP_STR
AUTOBOOT_KEYED_CTRLCSigned-off-by: Stefan Roese
Reviewed-by: Simon Glass
[trini: Drop ip04 and pm9263 configs/ additions, those boards previously
set CONFIG_AUTOBOOT_PROMPT but never used it, re-run savedefconfig over
all boards that did change. Make digsy_mtc_* string include seconds to
match others and not warn. ]
Signed-off-by: Tom Rini
Cc: Masahiro Yamada
08 Jun, 2015
1 commit
-
These defines for a 2nd autoboot stop and delay string are nearly unused. Only
sc3 defines CONFIG_AUTOBOOT_DELAY_STR2. And a patch to remove this most likely
unmaintained board is also posted to the list.By removing these defines the code will become cleaner and moving the remaining
compile options to Kconfig will get easier.Signed-off-by: Stefan Roese
Reviewed-by: Tom Rini
Reviewed-by: Simon Glass
Cc: Wolfgang Denk
Cc: Heiko Schocher
19 Jul, 2014
1 commit
-
Signed-off-by: Jeroen Hofstee
19 Jun, 2014
1 commit
-
Signed-off-by: Jeroen Hofstee
30 May, 2014
4 commits
-
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
-
Add a bootretry_ prefix to these two functions, and remove the need for
the #ifdef around everything (it moves to the Makefile).Signed-off-by: Simon Glass
-
This code is only used by one board, so it seems a shame to clutter up
the readline code with it. Move it into its own file.Signed-off-by: Simon Glass
-
The autoboot code is complex and long. It deserves its own file with
a simple interface from main.c.Signed-off-by: Simon Glass