summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* Kconfig: Migrate all of cmd/fastboot/Kconfig to defconfigsTom Rini2017-09-011-7/+16
| | | | | | | | | | - 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>
* Merge git://git.denx.de/u-boot-imxTom Rini2017-09-013-0/+58
|\ | | | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: configs/imx6qdl_icore_mmc_defconfig configs/imx6qdl_icore_rqs_defconfig
| * cmd: add sdp commandStefan Agner2017-08-233-0/+58
| | | | | | | | | | | | | | | | | | 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>
* | nvme: Adjust the 'nvme' command to use blk_common_cmd()Bin Meng2017-08-281-168/+27
| | | | | | | | | | | | | | 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>
* | cmd/spl.c: Include <libfdt.h> for fdt_totalsizeTom Rini2017-08-261-0/+1
| | | | | | | | | | | | | | | | In order to be able to reliably use fdt_totalsize, we must have <libfdt.h> included. Fixes: 767cb74a0028 ("cmd: spl: provide address and size of prepared FDT ...") Signed-off-by: Tom Rini <trini@konsulko.com>
* | mtdparts: Fix uninitialized scalar usageTom Rini2017-08-261-0/+1
| | | | | | | | | | | | | | | | | | 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: bc028345acc4 ("mtdparts: Fix final outstanding issue reported by Coverity") Signed-off-by: Tom Rini <trini@konsulko.com>
* | mtdparts: Fix final outstanding issue reported by CoverityTom Rini2017-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | cmd: spl: provide address and size of prepared FDT in environmentAnatolij Gustschin2017-08-261-0/+5
|/ | | | | | | | | | 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>
* cmd/read.c: Fix checking blk_dread return valueTom Rini2017-08-201-1/+1
| | | | | | | | | | | | 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>
* mtdparts: Fix various issues reported by CoverityTom Rini2017-08-201-15/+18
| | | | | | | | | | | | | | | | | | 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>
* Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2017-08-181-2/+2
|\ | | | | | | | | | | | | | | 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)
| * efi_loader: use EFI_PAGE_SIZE instead of 4096xypron.glpk@gmx.de2017-08-121-2/+2
| | | | | | | | | | | | | | | | 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>
* | Merge branch 'master' of git://git.denx.de/u-boot-mmcTom Rini2017-08-187-387/+231
|\ \
| * | cmd: mmc: add mmc partconf read capabilityAngelo Dureghello2017-08-171-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | dm: sata: Support driver model with the 'sata' commandSimon Glass2017-08-171-11/+84
| | | | | | | | | | | | | | | | | | | | | 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>
| * | dm: usb: Adjust the 'usb' command to use blk_common_cmd()Simon Glass2017-08-171-108/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | dm: ide: Adjust the 'ide' command to use blk_common_cmd()Simon Glass2017-08-171-104/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | dm: scsi: Adjust the 'scsi' command to use blk_common_cmd()Simon Glass2017-08-171-76/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | dm: sata: Adjust the 'sata' command to use blk_common_cmd()Simon Glass2017-08-171-82/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | dm: blk: Add a generic function for block device commandsSimon Glass2017-08-172-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | env: Rename some other getenv()-related functionsSimon Glass2017-08-163-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | env: Rename eth_getenv_enetaddr() to eth_env_get_enetaddr()Simon Glass2017-08-162-4/+3
| | | | | | | | | | | | | | | | | | Rename this function for consistency with env_get(). Signed-off-by: Simon Glass <sjg@chromium.org>
* | | env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()Simon Glass2017-08-165-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | env: Rename getenv/_f() to env_get()Simon Glass2017-08-1623-82/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | env: Rename common functions related to setenv()Simon Glass2017-08-1617-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | env: Rename setenv() to env_set()Simon Glass2017-08-1611-59/+62
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | env: Drop saveenv() in favour of env_save()Simon Glass2017-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | env: Drop the env_name_spec globalSimon Glass2017-08-151-1/+3
|/ / | | | | | | | | | | | | | | 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>
* | cmd/bdinfo: correct comment in board_detailChris Packham2017-08-131-1/+1
| | | | | | | | | | | | | | | | This appears to be a simple typo that dates back to the original implementation of board_detail in commit e79394643b26 ("common: Update cmd_bdinfo for PPC"). Signed-off-by: Chris Packham <judge.packham@gmail.com>
* | nvme: Add nvme commandsZhikang Zhang2017-08-133-0/+205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | README: Drop information about commandsSimon Glass2017-08-112-1/+5
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_ZFS to KconfigSimon Glass2017-08-111-0/+11
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_ZBOOT to KconfigSimon Glass2017-08-111-0/+12
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_UUID to KconfigSimon Glass2017-08-111-0/+11
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_UNIVERSE to KconfigSimon Glass2017-08-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_TSI148 to KconfigSimon Glass2017-08-111-0/+6
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_TRACE to KconfigSimon Glass2017-08-111-0/+9
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_YAFFS2 to KconfigSimon Glass2017-08-112-1/+12
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_THOR_DOWNLOAD to KconfigSimon Glass2017-08-111-0/+8
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_TERMINAL to KconfigSimon Glass2017-08-111-0/+8
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_STRINGS to KconfigSimon Glass2017-08-111-0/+8
| | | | | | | | | | | | | | | | | | 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>
* | Kconfig: Sort the memory commandsSimon Glass2017-08-111-30/+30
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_SPL_WRITE_SIZE to KconfigSimon Glass2017-08-111-0/+9
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_SPL_NAND_OFS to KconfigSimon Glass2017-08-111-0/+10
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_SPL to KconfigSimon Glass2017-08-111-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_SF_TEST to KconfigSimon Glass2017-08-111-0/+11
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_SDRAM to KconfigSimon Glass2017-08-111-0/+7
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_SCSI to KconfigSimon Glass2017-08-112-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_SAVES to KconfigSimon Glass2017-08-111-0/+6
| | | | | | | | | | | | | | | | | | 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>
* | Convert CONFIG_CMD_REISER to KconfigSimon Glass2017-08-111-0/+9
| | | | | | | | | | | | | | | | | | 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>