summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeLines
* 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>
* 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>
* sf: fix sf probeCyrille Pitchen2016-09-12-1/+0
| | | | | | | | | | | | | This patch fixes the "sf probe" command. The very first SPI flash probe passes, for instance when u-boot tries to read its environment settings from a (Q)SPI memory but next "sf probe" commands fail because the flash memory node is unbound from the SPI controller children nodes. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Tested-by: Stefan Roese <sr@denx.de> Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd: Rework disk.c usageTom Rini2016-09-09-7/+3
| | | | | | | | | | We only need the function found in cmd/disk.c when we have IDE, SCSI or USB_STORAGE enabled. While the first two are easy to get right, in the 3rd case we assume that the set of cases where we do have USB and do not enable USB_STORAGE are small enough that we can take the small bloat of un-discarded strings on gcc prior to 6.x Signed-off-by: Tom Rini <trini@konsulko.com>
* pxe: Fix pxe boot with FIT imageYork Sun2016-09-07-4/+5
| | | | | | | | | | | | | | | | | When FIT image is used, a single image provides kernel, device tree and optionally ramdisk. Argc and argv need to be adjusted to support this. Test cases: 1. Booting with legacy images 2. Booting with legacy images without initrd 3. Booting with FIT image Test commands: 1. pxe get && pxe boot 2. sysboot Signed-off-by: York Sun <york.sun@nxp.com> Signed-off-by: Wenbin Song <wenbin.song@nxp.com>
* nand: Fix some more NULL name testsScott Wood2016-09-01-1/+1
| | | | | | | | | | | Now that nand_info[] is an array of pointers we need to test the pointer itself rather than using name as a proxy for NULLness. Fixes: b616d9b0a708eb9 ("nand: Embed mtd_info in struct nand_chip") Signed-off-by: Scott Wood <oss@buserror.net> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Tony Lindgren <tony@atomide.com> Acked-by: Tony Lindgren <tony@atomide.com>
* nand: Fix nand info for no deviceTony Lindgren2016-09-01-3/+3
| | | | | | | | | | | | Looks like we have few more places where we're testing for nand_info[i]->name. We can now use just test for nand_info[i] instead. This fixes a data abort on devices with no NAND when doing nand info. Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* nand: Fix set_dev checks for no deviceTony Lindgren2016-08-26-2/+1
| | | | | | | | | | | | If we do nand device 0 command in u-boot on a device that has NAND support enabled but no NAND chip, we can get data abort at least on omaps. Fix the issue by replacing the check with nand_info[dev] as suggested by Scott Wood. The check for name existed before because before the array-to-pointer conversion there was no way to directly test nand_info[dev] for emptiness. Signed-off-by: Tony Lindgren <tony@atomide.com>
* fastboot: implement KconfigSteve Rae2016-08-20-0/+62
| | | | | | implement Kconfig for the 'fastboot' feature set Signed-off-by: Steve Rae <steve.rae@raedomain.com>
* cmd: efi_loader: Return CMD_RET_USAGE in case of not enough argumentsBin Meng2016-08-20-1/+1
| | | | | | | | When typing 'bootefi' from U-Boot shell, nothing outputs. Like other commands, return CMD_RET_USAGE so that it can print help message. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Alexander Graf <agraf@suse.de>
* cmd: booti: move CONFIG_CMD_BOOTI to KconfigMasahiro Yamada2016-08-20-0/+7
| | | | | | | | | | This command is used to boot ARM64 Linux. I made DISTRO_DEFAULTS select this option for ARM64 to respect include/config_distro_defaults.h. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* cmd: Split 'bootz' and 'booti' out from 'bootm'Tom Rini2016-08-20-250/+269
| | | | | | | | | | | | The bootz and booti commands rely on common functionality that is found in common/bootm.c and common/bootm_os.c. They do not however rely on the rest of cmd/bootm.c to be implemented so split them into their own files. Have various Makefiles include the required infrastructure for CONFIG_CMD_BOOT[IZ] as well as CONFIG_CMD_BOOTM. Move the declaration of 'images' over to common/bootm.c. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Tom Rini <trini@konsulko.com>
* cmd: fdt: add fdt overlay application subcommandMaxime Ripard2016-08-20-0/+24
| | | | | | | | | | | | | | | | | | | | | | | The device tree overlays are a good way to deal with user-modifyable boards or boards with some kind of an expansion mechanism where we can easily plug new board in (like the BBB or the raspberry pi). However, so far, the usual mechanism to deal with it was to have in Linux some driver detecting the expansion boards plugged in and then request these overlays using the firmware interface. That works in most cases, but in some cases, you might want to have the overlays applied before the userspace comes in. Either because the new board requires some kind of an early initialization, or because your root filesystem is accessed through that expansion board. The easiest solution in such a case is to simply have the component before Linux applying that overlay, removing all these drawbacks. Reviewed-by: Stefan Agner <stefan@agner.ch> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>