Commit Graph

547 Commits

Author SHA1 Message Date
Suneel Garapati
abd7cedb19 cmd: usb: ignore blk, emulation devices in usb tree/info display
Usb tree/info commands iterate over all usb uclass devices recursively.
Blk uclass devices based on struct blk_desc are created for mass storage
device, treating them as usb uclass devices based on struct usb_device
and referencing usb config interface descriptors cause crash.
To fix, ignore blk and usb_emul uclass devices in usb_show_info
and usb_tree_graph. Also avoid addition of preamble for blk uclass
child devices, otherwise tree dump gets messed up.

Signed-off-by: Suneel Garapati <suneelglinux@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-26 02:22:36 +01:00
Tom Rini
29c4992256 Merge git://git.denx.de/u-boot-dm 2017-11-19 20:35:45 -05:00
Bernhard Messerklinger
6dfd65f81f cmd/fdt.c align data buffer to avoid unaligned word access
Since the compiler is free to place a char array to any address in
memory (in this case the stack), also to a non word aligned address the
function "fdt_prop_parse" runs into troubles upon it wants to write some
(fdt32_t *) to such a variable (if it has been placed to a none word
aligned address).

To avoid this we tell the compiler to always align this scratchpad to a
word aligned address.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-11-16 18:45:05 -07:00
Prabhakar Kushwaha
3e27e1678b cmd: mac: Update description of help
Update help message for "mac" command to reflect correct descriptions
and parameters.

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
2017-11-15 10:54:06 -08:00
Tom Rini
43ede0bca7 Kconfig: Migrate MTDIDS_DEFAULT / MTDPARTS_DEFAULT
We move all instances of CONFIG_MTDIDS_DEFAULT and
CONFIG_MTDPARTS_DEFAULT from the header files to the defconfig files.
There's a few cases here where we need to expand upon what was in the
header file.

Tested-by: Adam Ford <aford173@gmail.com>  #omap3_logic
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-11-05 11:21:35 -05:00
Benjamin Young
7dec673ea9 cmd: fastboot: Enable FASTBOOT_FLASH_NAND for SUNXI_NAND devices
Encountered an issue where fastboot can't write to NAND on a CHIP_pro,
the symbol was neither present in the board's config header, nor the
Kconfig, this patch puts it in the Kconfig and defaults on when
SUNXI_NAND is selected.

Signed-off-by: Ben Young <computermouth@crunchbangplusplus.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-25 10:05:06 +02:00
Patrick Delaunay
3a2605fa87 cmd: gpt: solve issue for swap and rename command
don't use prettyprint_part_size() in create_gpt_partitions_list()
that avoid to align offset and size to 1 MiB and increase precision for
start and size.
This patch avoid the risk to change partition size and lost data during
rename or swap.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
2017-10-23 17:28:11 -04:00
Tom Rini
59ee8f83b6 cmd/pxe.c: Rework bootargs construction to clarify string checks
As the code currently stands, we first check that the length of the
given command line, along with ip_str/mac_str along with an additional 1
for the NULL termination will fit within the buffer we have, and if not,
we return an error.  The way this code was originally written however
left Coverity "unhappy" due to using strcat rather than strncat.
Switching this to strncat however causes clang to be unhappy that we
aren't enforcing the "1" portion within strncat.  Rather than further
re-work the code to include a "- 1" in this case as well, make the
strcat code only be done within the else side of the length test.  This
keeps both clang and Coverity happy.

Fixes: 48ee0a87bc ("cmd/pxe.c: Rework initrd and bootargs handling slightly")
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-16 09:42:51 -04:00
Tuomas Tynkkynen
c68c03f52b Drop CONFIG_HAS_DATAFLASH
Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-16 09:42:51 -04:00
Tuomas Tynkkynen
7b7341d7f3 env: Drop CONFIG_ENV_IS_IN_DATAFLASH
Last user of this option went away in commit:

fdc7718999 ("board: usb_a9263: Update to support DT and DM")

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-16 09:42:51 -04:00
Tom Rini
f855a7bc12 Patch queue for efi - 2017-10-13
This is the second batch of amazing improvements for efi_loader in 2017.11:
 
   - New self tests to verify our own code
   - A few bug fixes
   - colored text support
   - event and SNP improvements, should get us close to iPXE working
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJZ4HqlAAoJECszeR4D/txgZ0YQAIwd158lVczf/cMnzf3UcIsH
 e4YUFvQJaGxJw5hccaewaEQJqtPhEEJuHnzc683XDoYISTgvzCyhNEs8o0f7LcX3
 41c50x2bQPz7oFO5N60m58RknHqKiGd5VAC6+r4vBM8C0zFHeNTULo4fzn1qRgb3
 YUHDiRMlToVZXCOkbCeFm+dEJvjkXWmDDDdJpFIgDs6Oj+jOuV+H1GRMF2d56V6r
 Dd4/QPAFl4sRprBAMlvsmuI7obwnGV7/aA4CHIlUqKOVcbddBq2KigX8ZpIYEpaf
 FhRfxRLuWqvDRKpn+ixKfgl4KiBE/CH7sg7F6Un0mIjQVvo8k22Jbetqi9m1j/+x
 YzIFnwzb9ZhQEFOmfHnH8M9+bMmHyW46wkS4gdO4OAd/W0SeyIZ0a0gB1prgb2LK
 RfYQ37WsZM5TRARlcvmJt4H5+EtRYLT8lLf+yPSuyX8/8ubVnYHWtVE1IMLCiCAG
 eVmTwfjLzo3c703RJd9rwDtE13lTQmIHczM4cWybQzooXA6ePLJpSZSWx7EJxdQq
 GC7jNIKyKpu2NjhM9fUssbU+SiYLaIvtUBSOlGrcP1TCVR/j8OQ0Y1eIc9xOprIi
 +VEZVB/Z59D8j2TMTn1Xr+hB9i5h9ZxcO88gdEwfs65uihfvJGVhV1AxTyiaxvNv
 novPhik2UyHG5buRHb2Y
 =PiNi
 -----END PGP SIGNATURE-----

Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

Patch queue for efi - 2017-10-13

This is the second batch of amazing improvements for efi_loader in 2017.11:

  - New self tests to verify our own code
  - A few bug fixes
  - colored text support
  - event and SNP improvements, should get us close to iPXE working
2017-10-13 09:53:58 -04:00
Tom Rini
26f9184e09 Merge git://git.denx.de/u-boot-fsl-qoriq 2017-10-12 13:36:58 -04:00
Rob Clark
bf19273e81 efi_loader: Add mem-mapped for fallback
When we don't have a real device/image path, such as 'bootefi hello',
construct a mem-mapped device-path.

This fixes 'bootefi hello' after devicepath refactoring.

Fixes: 95c5553ea2 ("efi_loader: refactor boot device and loaded_image handling")
Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-10-12 17:22:58 +02:00
Tuomas Tynkkynen
ad12dc1844 cmd: Toggle the default value of CONFIG_CMD_IMLS
Having this as a 'default y' is rather annoying because it doesn't
actually compile unless other options are defined in the board header:

../cmd/bootm.c: In function 'do_imls_nor':
../cmd/bootm.c:330:7: error: 'CONFIG_SYS_MAX_FLASH_BANKS' undeclared (first use in this function); did you mean 'CONFIG_SYS_MAX_FLASH_SECT'?
   i < CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {

Make it 'default n' so people who develop new boards that start from a
blank defconfig have one less compilation failure to debug.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-10 17:51:04 -04:00
York Sun
b65ac633f5 cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined
CONFIG_CMD_SPL_WRITE_SIZE is used for writing parameters to non-volatile
storage. So far it is only used for NAND. Fix compiling error when this
macro is not used for SD.

Signed-off-by: York Sun <york.sun@nxp.com>
CC: Anatolij Gustschin <agust@denx.de>
2017-10-09 08:48:44 -07:00
Tom Rini
99e46dfc6a cmd: Make CMD_LZMA / CMD_UNZIP default y if CMD_BOOTI
In the Linux Kernel on ARM64, the Image.COMPRESSION file is not
self-extracting in the way that x86 and ARM images are.  So when
CMD_BOOTI is enabled we should also default to enabling CMD_UNZIP and
CONFIG_LZMA in order for the user to be able to decompress many of the
common compressions that will be done to an Image file.

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-08 16:19:56 -04:00
Sam Protsenko
610eec7f05 scripts: Move Kconfig contents to cmd/Kconfig
On case-insensitive file systems we have collision between
scripts/kconfig/ directory and scripts/Kconfig file. This patch moves
scripts/Kcofnig contents to cmd/Kconfig to fix that.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-08 16:19:56 -04:00
Tom Rini
bf52fcdef4 cmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for Coverity
The recent changes to these files did not completely fix the previous
issues, or introduced different (minor) issues.  In cmd/gpt.c we need to
dereference str_disk_guid to be sure that malloc worked.  In
cmd/nvedit.c we need to be careful that we can also fit in that leading
space when adding to the string.  And in tools/fit_image.c we need to
re-work the error handling slightly in fit_import_data() so that we only
call munmap() once.  We have two error paths here, one where we have an
fd to close and one where we do not.  Adjust labels to match this.

Reported-by: Coverity (CID: 167366, 167367, 167370)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-07 11:27:59 -04:00
Tom Rini
146dda3911 cmd/time.c: Initialize 'repeatable' variable
We cannot leave this uninitialized, set it to 0.

Reported-by: Coverity (CID: 144426)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06 11:28:21 -04:00
Tom Rini
48ee0a87bc cmd/pxe.c: Rework initrd and bootargs handling slightly
For the initrd portion of handling our bootm arguments we do not have a
sufficiently long enough buffer for some improbable 64bit cases.  Expand
this buffer to allow for a 64bit address and almost 256MB initrd to be
used.  Make use of strncpy/strncat when constructing the values here
since we know what the worst case valid values are, length wise.

Similarly for bootargs themselves, we need to make use of strlen/sizeof
and strncpy/strncat to ensure that we don't overflow bootargs itself.

Cc: Simon Glass <sjg@chromium.org>
Cc: Alexander Graf <agraf@suse.de>
Reported-by: Coverity (CID: 131256)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06 11:28:21 -04:00
Tom Rini
c667723ffb cmd/nvedit.c: Update input handling to cover overflow cases
When we have multiple messages provided, we need to be sure that we do
not exceed the length of our 'message' buffer.  In the for loop, make
sure that pos is not larger than message.  Only copy in at most however
much of the message buffer remains.  Finally, if we have not reached the
end of the message buffer, put in a space and NULL, and if we have,
ensure the buffer is now NULL termined.

Reported-by: Coverity (CID: 165116)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06 11:28:21 -04:00
Alison Chaiken
18030d04d2 GPT: fix memory leaks identified by Coverity
Create a common exit for most of the error handling code in
do_rename_gpt_parts.   Delete the list elements in disk_partitions
before calling INIT_LIST_HEAD from get_gpt_info() a second time.

The SIZEOF_MISMATCH error is not addressed, since that problem was
already fixed by "GPT: incomplete initialization in
allocate_disk_part".

Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reported-by: Coverity (CID: 167222, 167235, 167237)
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-10-06 11:28:19 -04:00
Tom Rini
4f42a0d721 Merge git://git.denx.de/u-boot-sunxi 2017-10-05 08:26:36 -04:00
Masahiro Yamada
9b643e312d treewide: replace with error() with pr_err()
U-Boot widely uses error() as a bit noisier variant of printf().

This macro causes name conflict with the following line in
include/linux/compiler-gcc.h:

  # define __compiletime_error(message) __attribute__((error(message)))

This prevents us from using __compiletime_error(), and makes it
difficult to fully sync BUILD_BUG macros with Linux.  (Notice
Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)

Let's convert error() into now treewide-available pr_err().

Done with the help of Coccinelle, excluing tools/ directory.

The semantic patch I used is as follows:

// <smpl>
@@@@
-error
+pr_err
 (...)
// </smpl>

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Re-run Coccinelle]
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-04 11:59:44 -04:00
Maxime Ripard
de86fc3859 sunxi: Remove the MMC index hack
The current code, if there's both an eMMC and an MMC slot available on the
board, will swap the MMC indices based on whether we booted from the eMMC
or the MMC. This way, the MMC we're supposed to boot on will always have
the index 0.

However, this causes various issues, for example when using other
components that base their behaviour on the MMC index, such as fastboot.

Let's remove that hack, and take the opposite approach. The MMC will always
have the same index, but the bootcmd will pick the same device than the one
we booted from. This is done through the introduction of the mmc_bootdev
environment variable that will be filled by the board code based on the
boot device informations we can get from the SoC.

In order to not introduce regressions, we also need to adjust the fastboot
MMC device and the environment device in order to set it to the eMMC, over
the MMC, like it used to be the case.

Tested-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03 19:12:06 +02:00
Maxime Ripard
47738acced cmd: Move CONFIG_RANDOM_UUID to Kconfig
CONFIG_RANDOM_UUID is used by the GPT command to generate random UUID when
none are provided.

Move that option to Kconfig.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03 19:12:05 +02:00
Maxime Ripard
cfa34996b0 cmd: fastboot: Rework fastboot dependency
Fastboot need a bunch of options to be operating properly, such as the
g_dnl gadget, the fastboot command, and some options that make sense. Since
fastboot is now part of Kconfig, make sure we have them right.

That will also reduce the boilerplate in the defconfigs.

Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-10-03 19:12:05 +02:00
Marek Behún
9d84550955 cmd: Add the 'btrsubvol' command to list BTRFS subvolumes
Signed-off-by: Marek Behun <marek.behun@nic.cz>

 create mode 100644 cmd/btrfs.c
2017-10-02 21:52:18 -04:00
Tom Rini
958046fc78 Patch queue for efi - 2017-10-01
Lots of new things this time. High level highlights are:
 
   - Shim support (to boot Fedora)
   - Initial set of unit tests
   - Preparations to support UEFI Shell
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJZ0KdpAAoJECszeR4D/txga+AQAL8ehBlkr3R6b/n00p3kuAVE
 cfM+o/16b+P/r3U2/wvlNtw7L+UPlGaQNk8o7n4xTu0DpVlIt7DhFrSBIcK6VbYB
 8BFJ/EL9NRj/sd/wb9B1Bc0SlXJcGxzRM+JxNseVmc7rz9sWdARvx/diQlP+YAX4
 qjp2YRzsErjUgix4eGDXvgFQdFmh4Pnp7UnHlSq4WkINo14navGLe/PwChxsL91M
 AZV7JulVcm7XtOPTON8udec3O15O8BExAM1cH2ITjtD99Je+4VcuI99nLm2aIE++
 U6vTuoogHAU+oCutD3qZU85uj2VJ2kYy2k5A/RK/i6Ug/QrTa+JA8PNWP78/TZ+8
 xmyDVzG5MQhMIddDjJlMXbxIwgKhr0SjUJ1iVaGI0bS/6Glc7h9m+hhIXKudqOvs
 lxqPhy7mahtBwETjoUlM1WJg+TG+vIGDJtT22njjOSTh0CVYw2H3xihyFKE3AjaW
 L26EOEsxArErtzF17GgF5KxFOGaYAmVmA3XnCcEZEIY5gzL65uok1GX/apf4sIsi
 j8HSbW3UH6QwjWKBhF+RVuK4CcTDUS9K2YmJlrdZ69elDZyg5PWbpMLNdYIP+VVG
 +j91c7e3O2q2AHAzTprpmkyeIeqZfFhgyu4H/jPQ8Yi8N/b7wbugcLm3fHuUNal4
 RB0KjbyJzJPQwbYGSLYi
 =9HkH
 -----END PGP SIGNATURE-----

Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

Patch queue for efi - 2017-10-01

Lots of new things this time. High level highlights are:

  - Shim support (to boot Fedora)
  - Initial set of unit tests
  - Preparations to support UEFI Shell
2017-10-01 08:48:38 -04:00
Heinrich Schuchardt
f66bc0e0be GPT: incomplete initialization in allocate_disk_part
memset(newpart, '\0', sizeof(newpart));
only initializes the firest 4 or 8 bytes of *newpart and not the whole
structure disk_part.

We should use sizeof(struct disk_part).

Instead of malloc and memset we can use calloc.

Identified by cppcheck.

Fixes: 09a49930e4 GPT: read partition table from device into a data structure
Reported-by: Coverity (CID: 167228)
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-26 12:54:42 -04:00
Rob Clark
7dd5d44753 efi_loader: fix efi_exit
efi_exit() already restores gd, so we shouldn't EFI_EXIT() on the
otherside of the longjmp().

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-21 09:04:25 +02:00
Heinrich Schuchardt
7aca68ca06 efi_loader: reenable selftest
ad503ffe9c6 efi_loader: refactor boot device and loaded_image handling
leads to an error when building with CONFIG_CMD_BOOTEFI_SELFTEST=y
This patch fixes the problem.

Fixes: ad503ffe9c6 efi_loader: refactor boot device and loaded_image handling
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-20 23:34:41 +02:00
Rob Clark
9975fe96b6 efi_loader: add bootmgr
Similar to a "real" UEFI implementation, the bootmgr looks at the
BootOrder and BootXXXX variables to try to find an EFI payload to load
and boot.  This is added as a sub-command of bootefi.

The idea is that the distro bootcmd would first try loading a payload
via the bootmgr, and then if that fails (ie. first boot or corrupted
EFI variables) it would fallback to loading bootaa64.efi.  (Which
would then load fallback.efi which would look for \EFI\*\boot.csv and
populate BootOrder and BootXXXX based on what it found.)

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-20 11:08:01 +02:00
Rob Clark
ad644e7c18 efi_loader: efi variable support
Add EFI variable support, mapping to u-boot environment variables.
Variables are pretty important for setting up boot order, among other
things.  If the board supports saveenv, then it will be called in
ExitBootServices() to persist variables set by the efi payload.  (For
example, fallback.efi configuring BootOrder and BootXXXX load-option
variables.)

Variables are *not* currently exposed at runtime, post ExitBootServices.
On boards without a dedicated device for storage, which the loaded OS
is not trying to also use, this is rather tricky.  One idea, at least
for boards that can persist RAM across reboot, is to keep a "journal"
of modified variables in RAM, and then turn halt into a reboot into
u-boot, plus store variables, plus halt.  Whatever the solution, it
likely involves some per-board support.

Mapping between EFI variables and u-boot variables:

  efi_$guid_$varname = {attributes}(type)value

For example:

  efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_OsIndicationsSupported=
     "{ro,boot,run}(blob)0000000000000000"
  efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_BootOrder=
     "(blob)00010000"

The attributes are a comma separated list of these possible
attributes:

  + ro   - read-only
  + boot - boot-services access
  + run  - runtime access

NOTE: with current implementation, no variables are available after
ExitBootServices, and all are persisted (if possible).

If not specified, the attributes default to "{boot}".

The required type is one of:

  + utf8 - raw utf8 string
  + blob - arbitrary length hex string

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-20 11:00:57 +02:00
Rob Clark
95c5553ea2 efi_loader: refactor boot device and loaded_image handling
Get rid of the hacky fake boot-device and duplicate device-path
constructing (which needs to match what efi_disk and efi_net do).
Instead convert over to use efi_device_path helpers to construct
device-paths, and use that to look up the actual boot device.

Also, extract out a helper to plug things in properly to the
loaded_image.  In a following patch we'll want to re-use this in
efi_load_image() to handle the case of loading an image from a
file_path.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-20 10:36:56 +02:00
Heinrich Schuchardt
623b3a5797 efi_selftest: provide an EFI selftest application
A testing framework for the EFI API is provided.
It can be executed with the 'bootefi selftest' command.

It is coded in a way that at a later stage we may turn it
into a standalone EFI application. The current build system
does not allow this yet.

All tests use a driver model and are run in three phases:
setup, execute, teardown.

A test may be setup and executed at boottime,
it may be setup at boottime and executed at runtime,
or it may be setup and executed at runtime.

After executing all tests the system is reset.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-18 23:53:57 +02:00
Heinrich Schuchardt
5e44489bc1 efi_loader: rename __efi_hello_world_*
In scripts/Makefile.lib we build section including helloworld.efi.
This allows to load the EFI binary with command 'bootefi hello'.

scripts/Makefile.lib contains explicit references to strings
containing helloworld and hello_world. This makes it impossible
to generalize the coding to accomodate additional built in
EFI binaries.

Let us rename the variables __efi_hello_world_* to
__efi_helloworld_*.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-18 23:53:56 +02:00
Heinrich Schuchardt
51c533fdce efi_loader: bootefi hello should use loadaddr
Command 'bootefi hello' currently uses CONFIG_SYS_LOAD_ADDR
as loading address.

qemu machines have by default 128 MiB RAM.
CONFIG_SYS_LOAD_ADDR for x86 is 0x20000000 (512 MiB).
This causes 'bootefi hello' to fail.

We should use the environment variable loadaddr if available.
It defaults to 0x1000000 (16 MiB) on qemu_x86.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-09-18 23:53:56 +02:00
Tom Rini
08cebeeaad Merge git://git.denx.de/u-boot-fdt 2017-09-15 22:34:34 -04:00
Tom Rini
1c7b5d0309 Merge git://git.denx.de/u-boot-ubi 2017-09-15 08:45:21 -04:00
Bin Meng
e2888a7fa7 cmd: blk: Use LBAFU in the common block command
There is already a macro LBAFU to aid formatted print with lbaint_t
variables. Let's use it in the common block command codes.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-15 08:05:10 -04:00
Bin Meng
723b43daec blk: Remove various places that do flush cache after read
All these places seem to inherit the codes from the MMC driver where
a FIXME was put in the comment. However the correct operation after
read should be cache invalidate, not flush.

The underlying drivers should be responsible for the cache operation.
Remove these codes completely.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: York Sun <york.sun@nxp.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: York Sun <york.sun@nxp.com>
2017-09-15 08:05:10 -04:00
Pantelis Antoniou
81ecc5d92b fdt: Switch to using the verbose overlay application method
The verbose overlay application method prints out more helpful
messages, so switch to it.

Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15 05:27:48 -06:00
Holger Dengler
985fa93e61 cmd: set filesize variable in ubi read
After a successful read of a UBI volume, the variable filesize is set
to the number of read bytes. To boot linux with a raw initramfs/initrd,
you must specify the exact size of the initramfs/initrd image in boot
command. If the initramfs/inird is read from UBI volume, $filesize is
required to access the number of read bytes.

Example:
  ubi read ${loadaddr} kernelvol
  ubi read ${fdtaddr} dtbvol
  ubi read ${initrd_addr} initrdvol
  bootz ${loadaddr} ${initrd_addr}:${filesize} ${fdt_addr}

Signed-off-by: Holger Dengler <dengler@linutronix.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
2017-09-12 10:08:05 +02:00
York Sun
d1f2ee7021 cmd: spl: Fix compiling warning
Fix warning "cast from pointer to integer of different size".

Signed-off-by: York Sun <york.sun@nxp.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-09-11 07:55:36 -07:00
Bin Meng
584f316f11 cmd: ide: Make the first device the default one
At present the IDE device number is initialized to -1, which means
we cannot type "ide read" command before setting the device number
via "ide device #".

For convenience, let's set the first device as the default one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-10 12:27:43 -04:00
Hannes Schmelzer
cee8c35d1b fdt: fix 'prop (...) not found!' error in 'fdt set' command
This commit brings things back to the well known working state of the
command.
-
With commit 9620d87259
(cmd/fdt: support single value replacement within an array)

there was an error introduced modifying (inserting) a property to a
device-tree node.
fdt_getprop(...) returnes a len with -1 for a non-existing property, but
a memcpy with len -1 isn't a good idea and things went wrong (crash).
-
Some times later Tom did repair this
with commit 99bb38e2cc
(fdt: Check for NULL return from fdt_getprop in 'fdt set')

This repairs the crash but the behaviour of the command isn't like
before, it makes it impossible to insert a property.
-

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Acked-by: Simon Glass <sjg@chromium.org>
2017-09-04 02:10:06 -06:00
Tom Rini
48f6232e58 Kconfig: Migrate all of cmd/fastboot/Kconfig to defconfigs
- Move ANDROID_IMAGE_SUPPORT to top level Kconfig under images as it's
  not strictly part of fastboot.
- Add some defaults for the fastboot buffer location and size
- Migrate all options listed in cmd/fastboot/Kconfig
- Cleanup the README

Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-01 16:18:21 -04:00
Tom Rini
6aee2ab68c Merge git://git.denx.de/u-boot-imx
Signed-off-by: Tom Rini <trini@konsulko.com>

Conflicts:
	configs/imx6qdl_icore_mmc_defconfig
	configs/imx6qdl_icore_rqs_defconfig
2017-09-01 10:40:59 -04:00
Bin Meng
fceadc1459 nvme: Adjust the 'nvme' command to use blk_common_cmd()
Instead of having separate code in the 'nvme' command, adjust it to use
the common function.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-28 07:17:15 -04:00
Tom Rini
c3b572c4e2 cmd/spl.c: Include <libfdt.h> for fdt_totalsize
In order to be able to reliably use fdt_totalsize, we must have
<libfdt.h> included.

Fixes: 767cb74a00 ("cmd: spl: provide address and size of prepared FDT ...")
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26 21:17:05 -04:00
Tom Rini
8b3cec7da1 mtdparts: Fix uninitialized scalar usage
When reworking this code to fix other issues found by Coverity, I forgot
to ensure tmp_ep was always cleared before use.

Reported-by: Coverity (CID: 166612)
Fixes: bc028345ac ("mtdparts: Fix final outstanding issue reported by Coverity")
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26 16:59:24 -04:00
Tom Rini
bc028345ac mtdparts: Fix final outstanding issue reported by Coverity
As part of fixing the previously reported issues, it was missed that in
the case of mtdparts_init() we need to make sure that tmp_ep is long
enough to contain PARTITION_MAXLEN and a NULL termination.  Then, to be
sure the buffer is NULL terminated, zero the entire buffer rather than
just ensuring the first character is NULL.

Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Coverity (CID: 166329)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-26 14:56:13 -04:00
Anatolij Gustschin
767cb74a00 cmd: spl: provide address and size of prepared FDT in environment
Writing prepared FDT to persistent storage should be possible in
scripts. Create environment variables containing address and size
of the updated FDT. Scripts can use these variables after running
'spl export fdt ...' command to write the new blob to persistent
storage.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-08-26 14:56:12 -04:00
Stefan Agner
2f005695df cmd: add sdp command
Add a new command to start USB Serial Download Protocol (SDP)
state machine.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Reviewed-by: Łukasz Majewski <lukma@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-08-23 10:41:58 +02:00
Tom Rini
d03618d5cb cmd/read.c: Fix checking blk_dread return value
The function blk_dread will return -ENOSYS on failure or on success the
number of blocks read, which must be the number asked to read (otherwise
it failed somewhere).  Correct this check.

Reported-by: Coverity (CID: 166335)
Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-20 09:54:30 -04:00
Tom Rini
54f1792c8d mtdparts: Fix various issues reported by Coverity
Now that sandbox is building cmd/mtdparts.c Coverity has looked at the
code and found a number of issues.  In index_partitions() it is possible
that part will be NULL, so re-work the checks and debug statements to
take this into account.  We have a number of string buffers that we
print to in the exact size of, and use string functions on, so we need
to ensure they are large enough to be NULL terminated.  In
device_parse() it is not possible for num_partitions to be 0 (we would
have hit a different error first) so remove logically dead code.
Finally, in parse_mtdparts() if we have an error we need to free the
memory allocated to dev.

Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Reported-by: Coverity (CID: 166334, 166333, 166332, 166329, 166328)
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-20 09:54:29 -04:00
Tom Rini
5619295995 EFI Fixes for 2017.09:
- Fix GOP w/o display
   - Fix LocateHandle
   - Fix exit return value truncation
   - Fix missing EFIAPI in efi_locate_handle (for x86)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJZlq5xAAoJECszeR4D/txgM9MP/3lZ8gUWCb5iNnIUhTwNyTPG
 T2tCvoI90YkNTY67L/J5JtDR8BaW4D+yJTeR+tIxB7BMMeF/UJ+kLPdncNyF082b
 9h6Ht5m47osSuBji0v8G2/wjkzNAIonXdoVFQxKQ9t3WgjvyWlp4sK6wrmGyukQJ
 Pb6cqEo/BH3u9/+xPZvyv9eZErJukfs4GHawzP1olH50mF8yVGUbJT2ctKhk5m3b
 F5gdp0pPsebISjWhoq8CKxQitDH6WG6IsLJTu0htEGjP5qPtXSIQhKMj4zIBSH9U
 paiO0k7DeQyfiKqeenk9zY+X33T/JlVPmLco4osP70pg6bzYdnjPGAuwpEhiL1cN
 QZcNb+liZceik5iWO1bjAoUd4rOKD4snl6kg6qLUiYCNF2oSo5h8Em3oyHiiw6Dw
 ohX840jdtnl3Xuuo0jCtHZoOH5glWCO+HTZTPhdE0K/9s79yPy59v9RqBNRM5LB+
 dH7Zg/50AtebOLqqd35YQdSaV1im80EbdxLaV1yJsMtQw2xucVHJC099oyTDXcSg
 0pzBDYsQia/hDDvum8TVHheHfz0cJi9u+VrjgauTK2GmcYNr1hxSyM0pSFveB3C3
 C9qP/20yI3ZMuECC67SIfYK5E03bI2gHH8/k+fQEqxYgqqr50I7aWYGw2nFZTecC
 sdWxgTolQsjn/xlfFBWY
 =wyGe
 -----END PGP SIGNATURE-----

Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

EFI Fixes for 2017.09:
  - Fix GOP w/o display
  - Fix LocateHandle
  - Fix exit return value truncation
  - Fix missing EFIAPI in efi_locate_handle (for x86)
2017-08-18 18:24:58 -04:00
Tom Rini
1fdafb2e3d Merge branch 'master' of git://git.denx.de/u-boot-mmc 2017-08-18 18:24:36 -04:00
Angelo Dureghello
bdb6099666 cmd: mmc: add mmc partconf read capability
This patch allows to show the EXT_CSD[179] partition_config
register info, just by specifying the dev param:

  U-Boot> mmc partconf 0
  EXT_CSD[179], PARTITION_CONFIG:
  BOOT_ACK: 0x0
  BOOT_PARTITION_ENABLE: 0x0
  PARTITION_ACCESS: 0x0

Signed-off-by: Angelo Dureghello <angelo@sysam.it>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-08-17 17:00:11 +09:00
Simon Glass
f19f1ecb60 dm: sata: Support driver model with the 'sata' command
Update this command to support driver model. This has a different way of
starting and stopping SATA.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17 16:44:17 +09:00
Simon Glass
c16ad675d5 dm: usb: Adjust the 'usb' command to use blk_common_cmd()
Instead of having separate code in the 'usb' command, adjust it to use
the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17 16:44:16 +09:00
Simon Glass
09ed0d616d dm: ide: Adjust the 'ide' command to use blk_common_cmd()
Instead of having separate code in the 'ide' command, adjust it to use
the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17 16:44:16 +09:00
Simon Glass
1eaadd3423 dm: scsi: Adjust the 'scsi' command to use blk_common_cmd()
Instead of having separate code in the 'scsi' command, adjust it to use
the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17 16:44:16 +09:00
Simon Glass
e29e71e93a dm: sata: Adjust the 'sata' command to use blk_common_cmd()
Instead of having separate code in the 'sata' command, adjust it to use
the common function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-08-17 16:44:16 +09:00
Simon Glass
4395f66739 dm: blk: Add a generic function for block device commands
Most block devices provide a command (e.g. 'sata', 'scsi', 'ide') and
these commands generally do the same thing. This makes it harder to
maintain this code and keep it consistent.

We now have a block device interface which is either implemented by driver
model (when CONFIG_BLK is enabled) or with a legacy interface. Therefore
it is possible to handle most of what these commands do with generic code.

Add a new generic function to process block-device commands using the
interface type and the current device number for that type.

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-17 16:44:16 +09:00
Simon Glass
723806cc5b env: Rename some other getenv()-related functions
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 <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:31:11 -04:00
Simon Glass
35affd7a2f env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()
Rename this function for consistency with env_get().

Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:44 -04:00
Simon Glass
bfebc8c965 env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()
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 <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:32 -04:00
Simon Glass
00caae6d47 env: Rename getenv/_f() to env_get()
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 <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:24 -04:00
Simon Glass
018f530323 env: Rename common functions related to setenv()
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 <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:23:32 -04:00
Simon Glass
382bee57f1 env: Rename setenv() to env_set()
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 <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:22:18 -04:00
Simon Glass
01510091de env: Drop saveenv() in favour of env_save()
Use the env_save() function directly now that there is only one
implementation of saveenv().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Denk <wd@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15 20:50:30 -04:00
Simon Glass
ac358beb85 env: Drop the env_name_spec global
Add a name to the driver and use that instead of the global variable
declared by each driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-15 20:50:28 -04:00
Chris Packham
7b07a20c5e cmd/bdinfo: correct comment in board_detail
This appears to be a simple typo that dates back to the original
implementation of board_detail in commit e79394643b ("common: Update
cmd_bdinfo for PPC").

Signed-off-by: Chris Packham <judge.packham@gmail.com>
2017-08-13 15:17:37 -04:00
Zhikang Zhang
0adc38be3d nvme: Add nvme commands
Add nvme commands in U-Boot command line.

1. "nvme scan" - scan NVMe blk devices
2. "nvme list" - show all available NVMe blk devices
3. "nvme info" - show current or a specific NVMe blk device
4. "nvme device" - show or set current device
5. "nvme part" - print partition table
6. "nvme read" - read data from NVMe blk device
7. "nvme write" - write data to NVMe blk device

Signed-off-by: Zhikang Zhang <zhikang.zhang@nxp.com>
Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-13 15:17:32 -04:00
xypron.glpk@gmx.de
a44bffcc95 efi_loader: use EFI_PAGE_SIZE instead of 4096
We should use constant EFI_PAGE_SIZE instead of 4096 where the
coding relies on 4096 being EFI_PAGE_SIZE.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2017-08-12 14:06:23 +02:00
Simon Glass
00fd59dd1a README: Drop information about commands
Most of this is duplicated in Kconfig help. Add some of that which is not,
and remove the help from the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:54 -04:00
Simon Glass
54feea17d6 Convert CONFIG_CMD_ZFS to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_ZFS

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:53 -04:00
Simon Glass
e7a815f32e Convert CONFIG_CMD_ZBOOT to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_ZBOOT

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:53 -04:00
Simon Glass
1aa4e8d0de Convert CONFIG_CMD_UUID to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_UUID

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:52 -04:00
Simon Glass
2a242e3e80 Convert CONFIG_CMD_UNIVERSE to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_UNIVERSE

Since no board uses this, perhaps we should drop this command?

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:52 -04:00
Simon Glass
5605aa8ab6 Convert CONFIG_CMD_TSI148 to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_TSI148

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:51 -04:00
Simon Glass
ce058ae5f2 Convert CONFIG_CMD_TRACE to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_TRACE

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:51 -04:00
Simon Glass
7a76431845 Convert CONFIG_CMD_YAFFS2 to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_YAFFS2

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:50 -04:00
Simon Glass
9b92a8d76a Convert CONFIG_CMD_THOR_DOWNLOAD to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_THOR_DOWNLOAD

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 17:44:46 -04:00
Simon Glass
3cef3b3185 Convert CONFIG_CMD_TERMINAL to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_TERMINAL

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:42:00 -04:00
Simon Glass
00805d7ad8 Convert CONFIG_CMD_STRINGS to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_STRINGS

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:59 -04:00
Simon Glass
ba71be547c Kconfig: Sort the memory commands
These are currently not quite in alphabetical order. Before adding more,
sort them. Not all options have a CMD_ prefix, so ignore that when
sorting.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:59 -04:00
Simon Glass
3a91a25376 Convert CONFIG_CMD_SPL_WRITE_SIZE to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SPL_WRITE_SIZE

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:58 -04:00
Simon Glass
203dc1b3a8 Convert CONFIG_CMD_SPL_NAND_OFS to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SPL_NAND_OFS

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:58 -04:00
Simon Glass
72c3033fd1 Convert CONFIG_CMD_SPL to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SPL

Note that trats does not actually use SPL, so this option can no-longer be
set.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:57 -04:00
Simon Glass
719d36ee36 Convert CONFIG_CMD_SF_TEST to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SF_TEST

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:56 -04:00
Simon Glass
efce2442d3 Convert CONFIG_CMD_SDRAM to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SDRAM

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:56 -04:00
Simon Glass
0941f597a2 Convert CONFIG_CMD_SCSI to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SCSI

Also update the Makefile to use CONFIG_CMD_SCSI instead of CONFIG_SCSI to
enable the command, fixing an earlier error.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
[trini: Rework to default y if SCSI, drop cl-som-am57x which did not use
CMD_SCSI for real]
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-08-11 15:41:55 -04:00
Simon Glass
15dc63d646 Convert CONFIG_CMD_SAVES to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_SAVES

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:55 -04:00
Simon Glass
f8803a99fe Convert CONFIG_CMD_REISER to Kconfig
This converts the following to Kconfig:
   CONFIG_CMD_REISER

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:54 -04:00
Christophe Leroy
fa379223cd Convert CONFIG_CMD_REGINFO to Kconfig
This patch converts CONFIG_CMD_REGINFO to Kconfig

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:53 -04:00
Simon Glass
b75dfd2d46 Kconfig: Convert CMD_READ to Kconfig
Convert this option and enable it in sandbox. Also correct a bug which
was introduced with the block-device driver model conversion.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:53 -04:00
Simon Glass
6f62d7c4f7 Kconfig: Drop CONFIG_CMD_PORTIO and associated command
This command is not used by any board. It also looks quite similar to the
'iod' and 'iow' commands which use the correct I/O macros.

Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-08-11 15:41:52 -04:00