summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeLines
* Merge git://www.denx.de/git/u-boot-marvellTom Rini2016-12-12-0/+832
|\
| * arm64: mvebu: Add bubt command for flash image burnKonstantin Porotchkin2016-12-12-0/+832
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for mvebu bubt command for flash image load, check and burn on boot device. Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Reviewed-by: Stefan Roese <sr@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Nadav Haklai <nadavh@marvell.com> Cc: Neta Zur Hershkovits <neta@marvell.com> Cc: Omri Itach <omrii@marvell.com> Cc: Igal Liberman <igall@marvell.com> Cc: Haim Boot <hayim@marvell.com> Cc: Hanna Hawa <hannah@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
* | cmd: pci: add option to parse and display BAR informationYehuda Yitschak2016-12-09-0/+83
|/ | | | | | | | | | Currently the PCI command only allows to see the BAR register values but not the size and actual base address. This little extension parses the BAR registers and displays the base, size and type of each BAR. Signed-off-by: Yehuda Yitschak <yehuday@marvell.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://www.denx.de/git/u-boot-dmTom Rini2016-12-03-18/+39
|\
| * cmd: crosec: Move cros_ec_decode_region helper to cmd/cros_ec.cMoritz Fischer2016-12-02-0/+23
| | | | | | | | | | | | | | | | | | | | | | The cros_ec_decode_region() function is only used in combination with the crosec cmds. Move the function to the correct place. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Cc: Simon Glass <sjg@chromium.org> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: u-boot@lists.denx.de Acked-by: Simon Glass <sjg@chromium.org>
| * cmd/fdt: fix uncallable systemsetup commandFabien Parent2016-12-02-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function that is processing the 'fdt' parameters is one big if-else if. In order to be able to type command faster only the first few letter are checked to know which block of code to execute. For systemsetup, the block of code that was executed was always the wrong one and ended up in a failure. } else if (argv[1][0] == 's') { process "fdt set" command } else if (strncmp(argv[1], "sys", 3) == 0) { process "fdt systemsetup" command. } When typing "fdt systemsetup", the code that was executed was the code for "fdt set". This commit fix this issue by moving the "else if" for systemsetup before the else if for "fdt set". This allow us to keep compatibility with any script that make use of "fdt s" to set node values. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Simon Glass <sjg@chromium.org>
| * cmd/tpm_test: Fix misleading code indentationStefan Brüns2016-12-02-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC 6.2 reasonably complains about the current code: ../cmd/tpm_test.c: In function ‘do_tpmtest’: ../cmd/tpm_test.c:540:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] for (i = 0; i < argc; i++) ^~~ ../cmd/tpm_test.c:542:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘for’ printf("\n------\n"); ^~~~~~ Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Simon Glass <sjg@chromium.org> Updated to remove C99 variable decl: Signed-off-by: Simon Glass <sjg@chromium.org>
* | cmd: move CMD_PXE to KconfigYann E. MORIN2016-12-03-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, CMD_PXE is forcibly enabled in config_distro_defaults.h, so that general purpose distributions can rely on it being defined. This header is included, under conditions or not, by various archs or famillies of archs / SoCs. However, it is very possible that boards based on those SoCs will not have a physical ethernet connector at all, even if the have a MAC; for example, the Nanopi Neo AIR (sunxi H3) does not. It is also possible that network booting is absolutely not necessary for a device. However, it is not possible to disable the PXE command, as it is forcibly enabled and is non-configurable. But it turns out we already have a config option to build a distro-ready image, in the name of DISTRO_DEFAULTS. Move CMD_PXE out of the hard-coded config_distro_defaults.h into a Kconfig option, that gets selected by DISTRO_DEFAULTS when it is set. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Joe Hershberger <joe.hershberger@ni.com> [trini: Make it select MENU, run moveconfig.py] Signed-off-by: Tom Rini <trini@konsulko.com>
* | cmd: Convert CMD_BOOTMENUTom Rini2016-12-03-0/+6
| | | | | | | | | | | | Also convert MENU while we're in here. Signed-off-by: Tom Rini <trini@konsulko.com>
* | cmd: scsi: Make private functions staticMichal Simek2016-12-02-2/+2
| | | | | | | | | | | | | | | | | | | | Two functions should be static because they are not exported to any other file. Warnings were reported by sparse C=1. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | scsi: Change scsi_scan() to be able to return valueMichal Simek2016-12-02-4/+10
| | | | | | | | | | | | | | | | | | | | With DM_SCSI this function will return more than one return value to cover errors. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | common: miiphyutil: Work and report phy address in hex in mdio cmdMichal Simek2016-12-02-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | It is confusing that mdio commands work and report phy id as decimal value when mii is working with hex values. For example: ZynqMP> mdio list gem: 21 - TI DP83867 <--> ethernet@ff0e0000 ZynqMP> mdio read ethernet@ff0e0000 0 Reading from bus gem PHY at address 21: 0 - 0x1140 ZynqMP> mii dump 21 0 Incorrect PHY address. Range should be 0-31 ... ZynqMP> mii dump 15 0. (1140) -- PHY control register -- (8000:0000) 0.15 = 0 reset U-Boot normally takes hex values that's why this patch is changing mdio command to handle hex instead of changing mii command to handle decimal values. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* mmc: add bkops-enable commandTomas Melin2016-12-01-0/+41
| | | | | | | | | | | | Add new command that provides possibility to enable the background operations handshake functionality (BKOPS_EN, EXT_CSD byte [163]) on eMMC devices. This is an optional feature of eMMCs, the setting is write-once. The command must be explicitly taken into use with CONFIG_CMD_BKOPS_ENABLE. Signed-off-by: Tomas Melin <tomas.melin@vaisala.com>
* sata: fix sata command can not being executed bugTang Yuantian2016-11-28-3/+6
| | | | | | | | | | | | | | | | | | | | | Commit d97dc8a0 separated the non-command code into its own file which caused variable sata_curr_device can not be set to a correct value. Before commit d97dc8a0, variable sata_curr_device can be set correctly in sata_initialize(). After commit d97dc8a0, sata_initialize() is moved out to its own file. Accordingly, variable sata_curr_device is removed from sata_initialize() too. This caused sata_curr_device never gets a chance to be set properly which prevent other commands from being executed. This patch sets variable sata_curr_device properly. Fixes: d97dc8a0 (dm: sata: Separate the non-command code into its own file) Signed-off-by: Tang Yuantian <yuantian.tang@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* efi_loader: Allow to compile helloworld.efi w/o bundling itAlexander Graf2016-11-27-1/+14
| | | | | | | | | | | | | | | | | Today we can compile a self-contained hello world efi test binary that allows us to quickly verify whether the EFI loader framwork works. We can use that binary outside of the self-contained test case though, by providing it to a to-be-tested system via tftp. This patch separates compilation of the helloworld.efi file from including it in the u-boot binary for "bootefi hello". It also modifies the efi_loader test case to enable travis to pick up the compiled file. Because we're now no longer bloating the resulting u-boot binary, we can enable compilation always, giving us good travis test coverage. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* Merge git://git.denx.de/u-boot-rockchipTom Rini2016-11-26-1/+4
|\
| * power: regulator: Introduce regulator_set_value_force functionKeerthy2016-11-25-1/+4
| | | | | | | | | | | | | | | | | | In case we want to force a particular value on a regulator irrespective of the min/max constraints for testing purposes one can call regulator_set_value_force function. Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini2016-11-25-3/+20
|\ \ | |/ |/| | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: arch/arm/Kconfig
| * armv8: Support loading 32-bit OS in AArch32 execution stateAlison Wang2016-11-22-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | To support loading a 32-bit OS, the execution state will change from AArch64 to AArch32 when jumping to kernel. The architecture information will be got through checking FIT image, then U-Boot will load 32-bit OS or 64-bit OS automatically. Signed-off-by: Ebony Zhu <ebony.zhu@nxp.com> Signed-off-by: Alison Wang <alison.wang@nxp.com> Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | fastboot: simplify the Kconfig logicYann E. MORIN2016-11-21-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the fastboot item in menuconfig is a comment followed by a boolean option withan empty prompt, followed by a menu: *** FASTBOOT *** [*] Fastboot support ---> This is not "nice-looking" at all... Change the logic to make the boolean option a "menuconfig" rather than a mere "config", so that all dependent options gets groupped under a menu. The layout is now: *** FASTBOOT *** [*] Fastboot support ---> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* | fastboot: Add CONFIG_FASTBOOT_USB_DEV optionSemen Protsenko2016-11-21-0/+8
|/ | | | | | | | | | | | | | | | Some boards (like AM57x EVM) has USB OTG controller other than 0. So in order to use correct controller number in compiled environment we should define CONFIG_FASTBOOT_USB_DEV option. For example, when doing "fastboot reboot-bootloader" we want to enter fastboot mode automatically. But to do so we need to provide controller number to "fastboot" command. If this procedure is defined in some config which is common to bunch of boards, and boards have different USB controller numbers, we can't just hardcode "fastboot 0" in the environment. We need to use configurable option, which this patch adds. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* efi_loader: AArch64: Run EFI payloads in EL2 if U-Boot runs in EL3Alexander Graf2016-11-17-0/+11
| | | | | | | | | | Some boards decided not to run ATF or other secure firmware in EL3, so they instead run U-Boot there. The uEFI spec doesn't know what EL3 is though - it only knows about EL2 and EL1. So if we see that we're running in EL3, let's get into EL2 to make payloads happy. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: York Sun <york.sun@nxp.com>
* efi: x86: Adjust EFI files support efi_loaderSimon Glass2016-11-14-1/+1
| | | | | | | | | Add compiler flags and make a few minor adjustments to support the efi loader. Signed-off-by: Simon Glass <sjg@chromium.org> [agraf: Add Kconfig dep] Signed-off-by: Alexander Graf <agraf@suse.de>
* efi: arm: Add aarch64 EFI app supportSimon Glass2016-11-14-1/+1
| | | | | | | | | Add support for EFI apps on aarch64. This includes start-up and relocation code plus a link script. Signed-off-by: Simon Glass <sjg@chromium.org> [agraf: add kconfig dep] Signed-off-by: Alexander Graf <agraf@suse.de>
* efi: arm: Add EFI app supportSimon Glass2016-11-14-1/+1
| | | | | | | | | Add support for EFI apps on ARM. This includes start-up and relocation code, plus a link script and some compiler setting changes. Signed-off-by: Simon Glass <sjg@chromium.org> [agraf: Remove whitespace change, add kconfig dep] Signed-off-by: Alexander Graf <agraf@suse.de>
* efi: Add support for a hello world test programSimon Glass2016-11-14-6/+30
| | | | | | | | | It is useful to have a basic sanity check for EFI loader support. Add a 'bootefi hello' command which loads HelloWord.efi and runs it under U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> [agraf: Fix documentation, add unfulfilled kconfig dep] Signed-off-by: Alexander Graf <agraf@suse.de>
* efi: Fix debug message address formatSimon Glass2016-11-14-1/+1
| | | | | | | This should use U-Boot's standard format for hex address. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
* cmd: load: align cache flushChris Packham2016-10-31-1/+1
| | | | | | | | Prevent cache misalignment message by ensuring that a whole cache line is flushed. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
* Fix spelling of "extended".Vagrant Cascadian2016-10-31-1/+1
| | | | | Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* efi_loader: Revert device_handle to disk after net bootAlexander Graf2016-10-19-0/+2
| | | | | | | | | | | | | | | When you boot an efi payload from network, then exit that payload and load another payload from disk afterwords, the disk payload will currently see the network device as its boot path. This breaks grub2 for example which tries to find its modules based on the path it was loaded from. This patch fixes that issue by always reverting to disk paths if we're not in the network boot. That way the data structures after a network boot look the same as before. Signed-off-by: Alexander Graf <agraf@suse.de>
* efi: Fix missing EFIAPI specifiersSimon Glass2016-10-19-2/+5
| | | | | | | | | These are missing in some functions. Add them to keep things consistent. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alexander Graf <agraf@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* smbios: Expose in efi_loader as tableAlexander Graf2016-10-19-0/+3
| | | | | | | | | | | | We can pass SMBIOS easily as EFI configuration table to an EFI payload. This patch adds enablement for that case. While at it, we also enable SMBIOS generation for ARM systems, since they support EFI_LOADER. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* efi_loader: Allow boards to implement get_time and reset_systemAlexander Graf2016-10-18-0/+4
| | | | | | | | | | | | | | | EFI allows an OS to leverage firmware drivers while the OS is running. In the generic code we so far had to stub those implementations out, because we would need board specific knowledge about MMIO setups for it. However, boards can easily implement those themselves. This patch provides the framework so that a board can implement its own versions of get_time and reset_system which would actually do something useful. While at it we also introduce a simple way for code to reserve MMIO pointers as runtime available. Signed-off-by: Alexander Graf <agraf@suse.de>
* Merge git://git.denx.de/u-boot-fdtTom Rini2016-10-13-2/+7
|\
| * cmd/fdt: add possibilty to have 'extrasize' on fdt resizeHannes Schmelzer2016-10-13-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes devicetree nodes and or properties are added out of the u-boot console, maybe through some script or manual interaction. The devicetree as loaded or embedded is quite small, so the devicetree has to be resized to take up those new nodes/properties. In original the devicetree was only extended by effective 4 * add_mem_rsv. With this commit we can add an argument to the "fdt resize" command, which takes the extrasize to be added. Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com> Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini2016-10-13-3/+0
|\ \ | |/ |/|
| * net: Fix cache misalignment message after network load operationsPeter Chubb2016-10-13-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | After any operation that downloads a file (e.g., pxe get, or dhcp), the buffer containing the downloaded data is flushed. This is unnecessary and annoying. Unnecessary, because the network driver should already have fliushed the cache for the DMAed area, and annoying because it generates a cache misalignment message. Signed-off-by: Peter Chubb <peter.chubb@data61.csiro.au> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | cmd: cros_ec: Move crosec commands to cmd subdirectoryMoritz Fischer2016-10-11-0/+379
|/ | | | | | | | | | | | | | | | | | Move crosec commands from drivers/misc/cros_ec.c to cmd/cros_ec.c Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Cc: Simon Glass <sjg@chromium.org> Cc: Heiko Schocher <hs@denx.de> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Miao Yan <yanmiaobest@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Stefan Roese <sr@denx.de> Cc: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Nishanth Menon <nm@ti.com> Cc: u-boot@lists.denx.de
* cmd/onenand.c: block align warningLadislav Michl2016-10-06-0/+6
| | | | | | | An attempt to write non block aligned data fails silently, add warning and set result. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* Various, accumulated typos collected from around the tree.Robert P. J. Day2016-10-06-5/+5
| | | | | | | | | | | | | | | | | | | | | Fix various misspellings of: * deprecated * partition * preceding,preceded * preparation * its versus it's * export * existing * scenario * redundant * remaining * value * architecture Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Reviewed-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de>
* fastboot: move FASTBOOT_FLASH options into KconfigPetr Kulhavy2016-10-01-0/+24
| | | | | | | | | | | | | Move FASTBOOT_MBR_NAME and FASTBOOT_GPT_NAME into Kconfig. Add dependency on the FASTBOOT_FLASH setting (also for FASTBOOT_MBR_NAME). Remove the now redundant GPT_ENTRY_NAME. Signed-off-by: Petr Kulhavy <brain@jikos.cz> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Steve Rae <steve.rae@raedomain.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Add FIXME about xxx_PARTITION needing to be in Kconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2016-09-30-59/+2
|\ | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: include/configs/dra7xx_evm.h
| * common: dfu: saperate the dfu common functionalityB, Ravi2016-09-27-59/+2
| | | | | | | | | | | | | | | | | | The cmd_dfu functionality is been used by both SPL and u-boot, saperating the core dfu functionality moving it to common/dfu.c. Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-ubiTom Rini2016-09-27-4/+11
|\ \
| * | cmd: ubi: add option to specify volume idLadislav Michl2016-09-27-4/+11
| |/ | | | | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* | dfu: Migrate to KconfigTom Rini2016-09-27-0/+1
|/ | | | | | | | | | | Introduce a hidden USB_FUNCTION_DFU Kconfig option and select it for CMD_DFU (as we must have the DFU command enabled to do anything DFU). Make all of the entries in drivers/dfu/Kconfig depend on CMD_DFU and add options for all of the back end choices that DFU can make use of. Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
* kconfig: introduce kconfig for UBIHeiko Schocher2016-09-26-0/+12
| | | | | | | | | move the UBI config options into Kconfig. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Andrew F. Davis <afd@ti.com> Reviewed by: Evgeni Dobrev <evgeni at studio-punkt.com>
* treewide: replace #include <asm/errno.h> with <linux/errno.h>Masahiro Yamada2016-09-23-3/+3
| | | | | | | | | | | Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>) Replace all include directives for <asm/errno.h> with <linux/errno.h>. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Fixup include/clk.] Signed-off-by: Tom Rini <trini@konsulko.com>
* cmd/fat: Do not crash on write when <bytes> is not specifiedStefan Brüns2016-09-23-2/+2
| | | | | | | | argc is checked, but is off by one. In case <bytes> is not specified, create an empty file, which is identical to the ext4write behaviour. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* sandbox: Add "host size" hostfs command for fs testStefan Brüns2016-09-18-0/+8
| | | | | | | | | | This complements the size/fatsize/ext4size commands added in commit cf6598193aed5de8855eaf70c1994f2bc437255a load, save and ls are already implemented for hostfs, now tests can cover the same operations on hostfs and emulated block devices. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Simon Glass <sjg@chromium.org>