aboutsummaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)AuthorFilesLines
2019-06-21cmd/led.c: fix typos in online helpAnatolij Gustschin1-1/+1
Remove square brackets around label in state command description. Fixes: ea41b15617fa ("cmd/led: check subcommand "list" instead "l"") Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-06-17Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini1-0/+3
- Drop zipitz2 board (Tom) - Add DEPRECATED option (Tom) - Mark legacy or non-dm drivers as DEPRECATED (Jagan)
2019-06-14usb: gadget: error out if g_dnl registration failsSjoerd Simons1-3/+8
If g_dnl_register fails return an error rather then stubornly continuing onwards. Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
2019-06-13Kconfig: Add SPI / SPI_FLASH as dependenciesTom Rini1-0/+3
In order to use CMD_SF / CMD_SPI / ENV_IS_IN_SPI_FLASH we need to have the SPI (or SPI_FLASH/DM_SPI_FLASH, for CMD_SF) enabled. Express this in the Kconfigs. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2019-06-11Merge tag 'u-boot-stm32-20190606' of https://github.com/pchotard/u-bootTom Rini1-15/+21
- Add Ethernet support for STM32MP1 - Add saveenv support for STM32MP1 - Add STM32MP1 Avenger96 board support - Add SPI driver suport for STM32MP1 - Add watchdog support for STM32MP1 - Update power supply check via USB TYPE-C for STM32MP1 discovery board
2019-06-06env: enable saveenv command when one CONFIG_ENV_IS_IN is activatedPatrick Delaunay1-15/+21
Introduce ENV_IS_IN_DEVICE to test if one the CONFIG_ENV_IS_IN_ is defined and support the command saveenv even if CONFIG_ENV_IS_NOWHERE is activated Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-06-05Merge tag 'efi-2019-07-rc4-2' of git://git.denx.de/u-boot-efiTom Rini3-4/+17
Pull request for UEFI sub-system for v2019.07-rc4-2 Support for managing the non-volatile attribute of UEFI variables is added though we do not have a backend for persistence yet. Error messages for changes of UEFI variables are provided. UEFI boottime service implementations are corrected.
2019-06-05cmd/led: check subcommand "list" instead "l"Heiko Schocher1-2/+2
current implementation for checking if "led list" command is called checks only if "l" is passed to the led command. This prevents switching leds with name which starts also with a "l". So check for passing "list". While at it, also fix a typo in led command usage. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-06-04cmd: env: add -nv option for UEFI non-volatile variableAKASHI Takahiro2-4/+14
With this option, -nv, at "setenv -e" command, a variable will be defined as non-volatile. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04cmd: efidebug: make some boot variables non-volatileAKASHI Takahiro1-0/+3
Boot####, BootOrder and BootNext should be non-volatile. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-04cmd: env: print a message when setting UEFI variable failedAKASHI Takahiro1-1/+9
Error message will alert a user that setting/deleting a variable failed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-06-02Merge tag 'efi-2019-07-rc4' of git://git.denx.de/u-boot-efiTom Rini1-1/+9
Pull request for UEFI sub-system for v2019.07-rc4 Corrections for boottime services for protocols and for the SetTime() service are provided. Error messages for the 'setenv -e' and 'bootefi bootmgr' commands are added.
2019-06-01cmd: mdio: Fix access to arbitrary PHY addressesVladimir Oltean1-2/+7
Alex reported the following: " I'm doing some MDIO work on a freescale/NXP platform and I bumped into errors with this command: => mdio r emdio#3 5 3 Reading from bus emdio#3 "Synchronous Abort" handler, esr 0x8600000e elr: ffffffff862b8000 lr : 000000008200cce4 (reloc) ... mdio list does not list any PHYs currently because ethernet is using DM and the interfaces are not probed at this time. The PHY does exist on the bus though. The above scenario works with this commit reverted: e55047ec51a662c12ed53ff543ec7cdf158b2137 cmd: mdio: Switch to generic helpers when accessing the registers The current code using generic helpers only works for PHYs that have been registered and show up in bus->phymap and crashes for arbitrary IDs. I find it useful to allow reading from other addresses over MDIO too, certainly helpful for people debugging MDIO on various boards. " Fix this by reverting to use the raw MDIO bus operations in case there is no PHY probed based on DT at the specified address. This restores the old behavior for these PHYs, which means that the newly introduced MMD-over-C22 helpers won't be available for them, but at least they will be accessible again without crashing the system. Fixes: commit e55047ec51a6 ("cmd: mdio: Switch to generic helpers when accessing the registers") Reported-by: Alex Marginean <alexm.osslist@gmail.com> Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Reviewed-by: Alex Marginean <alexm.osslist@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-05-31cmd: env: print a message when setting UEFI variable failedAKASHI Takahiro1-1/+9
Error message will alert a user that setting/deleting a variable failed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-28cmd: remove unused `display` commandHeinrich Schuchardt3-62/+0
Compiling the display command leads to an error undefined reference to `display_set' No implementation of display_set() exists in U-Boot. Eliminate the `display` command as well as the accompanying files. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-05-21cmd: binop: Use hex2binMario Six1-25/+3
Use the new hex2bin function in the binop command instead of converting the data manually. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-05-21cmd: binop: Use new environment apiMario Six1-2/+2
Since the binop command was introduced, the environment API was changed. Use the new API to make the command work again. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-05-18CONFIG_SPL_SYS_[DI]CACHE_OFF: addTrevor Woerner1-1/+1
While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances where these configuration items are conditional on SPL. This commit adds SPL variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates the configurations as required. Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Trevor Woerner <trevor@toganlabs.com> [trini: Make the default depend on the setting for full U-Boot, update more zynq hardware] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-05-12efi_loader: comments for efi_install_fdt()Heinrich Schuchardt1-3/+8
Describe that efi_install_fdt() defaults to using the device tree indicated by environment variable fdtcontroladdr. ACPI tables and device trees are mutually exclusive. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: deduplicate code in cmd/bootefi.cHeinrich Schuchardt1-62/+37
Move duplicate initialization code to single instance. Adjust comments of concerned functions. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-12efi_loader: make device path to text protocol customizableHeinrich Schuchardt1-0/+1
The device path to text protocol is not needed for EBBR compliance. So let's make it a customizable option. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-10cmd: ubifs: Remove select for non-existent optionChris Packham1-2/+0
There is no 'config CRC32', remove the select that was attempting to use it. Reported-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-05-09Merge git://git.denx.de/u-boot-riscvTom Rini2-3/+7
- Correct SYS_TEXT_BASE for qemu. - Support booti. - Increase SYSBOOTM_LEN for Fedora/RISCV kernel. - Support SMP booting from flash.
2019-05-09RISCV: image: Add booti supportAtish Patra2-3/+7
This patch adds booti support for RISC-V Linux kernel. The existing bootm method will also continue to work as it is. It depends on the following kernel patch which adds the header to the flat Image. Gzip compressed Image (Image.gz) support is not enabled with this patch. https://patchwork.kernel.org/patch/10925543/ Tested on HiFive Unleashed and QEMU. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Karsten Merker <merker@debian.org> Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
2019-05-08Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini1-11/+16
- Various PHY fixes / enhancements. - TI K2G fixes
2019-05-07cmd: mdio: Switch to generic helpers when accessing the registersCarlo Caione1-11/+16
Switch to use the generic helpers to access the MMD registers so that we can used the same command also for C45 PHYs, C22 PHYs with direct and indirect access and PHYs implementing a custom way to access the registers. Signed-off-by: Carlo Caione <ccaione@baylibre.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-05-07efi_loader: clean up UEFI sub-system initializationHeinrich Schuchardt1-27/+0
allow_unaligned(), switch_to_non_secure_mode(), and efi_init_obj_list() are called in sequence in multiple places. Move calls to allow_unaligned() and switch_to_non_secure_mode() to efi_init_obj_list(). Remove unused includes. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-06Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini2-11/+15
- Various pinctrl / gpio fixes for R-Car
2019-05-05cmd: pxe: add board specific PXE default pathMarek Behún1-0/+3
The list of PXE default paths contains ARCH and SOC specific paths, but one PXE server can serve different board with the same ARCH and SOC. This is the case for Turris Omnia and Turris Mox, where ARCH=arm and SOC=mvebu. If CONFIG_SYS_BOARD is defined, also try "default-$ARCH-$SOC-$BOARD" path. Signed-off-by: Marek Behún <marek.behun@nic.cz>
2019-05-04cmd: mmc: Make Mode: printout consistentMarek Vasut1-1/+1
The "Mode :" line is the only one in "mmc info" output that has a space in front of the colon. Drop the space to make it consistent with the rest of the output, e.g.: => mmc dev 1 ; mmc info switch to partitions #0, OK mmc1 is current device Device: sd@ee160000 Manufacturer ID: 3 OEM: 5344 Name: SL08G Bus Speed: 50000000 Mode : SD High Speed (50MHz) ^------------------------------ Remove this space Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 7.4 GiB Bus Width: 1-bit Erase Group Size: 512 Bytes Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Jaehoon Chung <jh80.chung@samsung.com> CC: Tom Rini <trini@konsulko.com>
2019-05-04cmd: clk: Handle ENODEV from clk_get_rateIsmael Luceno Cortes1-10/+14
clk_get_rate may return -ENODEV if the clock isn't valid. Also, make the error cases go through a single path. Fixes: ff8eee0330a6 ("cmd: clk: Add trivial implementation of clock dump for DM") Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
2019-05-03Merge tag 'efi-2019-07-rc2' of git://git.denx.de/u-boot-efiTom Rini4-48/+90
Pull request for UEFI sub-system for v2019.07-rc2 This pull request provides error fixes for the handling of GPT partitions and for the UEFI subsystem.
2019-05-02cmd: gpt: fix and tidy up help messageEugeniu Rosca1-6/+6
Apply the following changes: - Guard the 'gpt read' command by 'ifdef CONFIG_CMD_GPT_RENAME', since 'gpt read' is not available on CMD_GPT_RENAME=n - Prefix the {read,swap,rename} commands with one space for consistency - Prefix the 'guid' commands with 'gpt' for consistency Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-02efi_loader: implement support of exit dataHeinrich Schuchardt1-3/+8
In case of a failure exit data may be passed to Exit() which in turn is returned by StartImage(). Let the `bootefi` command print the exit data string in case of an error. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-02efi_loader: memory leak in append valueHeinrich Schuchardt1-1/+4
When printing an UEFI variable an error may arise while converting an illegal hexadecimal value. In this case a buffer is leaked. Close the memory leak. Provide an error message. Reported-by: Coverity (CID 185830) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-02efi_loader: optional data in load options are binaryHeinrich Schuchardt1-10/+17
The field boot OptionalData in structure _EFI_LOAD_OPTIONS is for binary data. When we use `efidebug boot add` we should convert the 5th argument from UTF-8 to UTF-16 before putting it into the BootXXXX variable. When printing boot variables with `efidebug boot dump` we should support the OptionalData being arbitrary binary data. So let's dump the data as hexadecimal values. Here is an example session protocol: => efidebug boot add 00a1 label1 scsi 0:1 doit1 'my option' => efidebug boot add 00a2 label2 scsi 0:1 doit2 => efidebug boot dump Boot00A0: attributes: A-- (0x00000001) label: label1 file_path: .../HD(1,MBR,0xeac4e18b,0x800,0x3fffe)/doit1 data: 00000000: 6d 00 79 00 20 00 6f 00 70 00 74 00 69 00 6f 00 m.y. .o.p.t.i.o. 00000010: 6e 00 00 00 n... Boot00A1: attributes: A-- (0x00000001) label: label2 file_path: .../HD(1,MBR,0xeac4e18b,0x800,0x3fffe)/doit2 data: Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-02cmd: efidebug: rework "boot dump" sub-command using GetNextVariableName()AKASHI Takahiro1-24/+55
Currently in do_efi_boot_dump(), we directly read EFI variables from related environment variables. To accommodate alternative storage backends, we should switch to using the UEFI API instead. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-02efi_loader: set OsIndicationsSupported at initAKASHI Takahiro1-4/+0
UEFI variables should be installed using well-defined API. Currently we don't support much, but the value of OsIndicationsSupported will be updated once some features are added in the future. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Add comments. Rename a variable. Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-05-01rockchip: use 'arch-rockchip' as header file pathKever Yang1-1/+1
Rockchip use 'arch-rockchip' instead of arch-$(SOC) as common header file path, so that we can get the correct path directly. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-04-26avb: add support for named persistent valuesIgor Opaniuk1-0/+78
AVB 2.0 spec. revision 1.1 introduces support for named persistent values that must be tamper evident and allows AVB to store arbitrary key-value pairs [1]. Introduce implementation of two additional AVB operations read_persistent_value()/write_persistent_value() for retrieving/storing named persistent values. Correspondent pull request in the OP-TEE OS project repo [2]. [1]: https://android.googlesource.com/platform/external/avb/+/android-9.0.0_r22 [2]: https://github.com/OP-TEE/optee_os/pull/2699 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-04-26cmd: pxe: Display splashscreen from extlinux.conf inputPatrice Chotard1-0/+24
The objective is to provide a simple way to retrieve a BMP file, and display it as splashscreen, from extlinux.conf file input. For this, we take example on https://www.syslinux.org/wiki/ index.php?title=Menu#The_advanced_menu_system and more particularly on MENU BACKGROUND chapter. For this, add "menu background" support in pxe command. As example, extlinux.conf content will look like: # Generic Distro Configuration file generated by OpenEmbedded menu title Select the boot mode TIMEOUT 20 menu background ../splash.bmp DEFAULT stm32mp157c-ev1-sdcard LABEL stm32mp157c-ev1-sdcard KERNEL /uImage FDT /stm32mp157c-ev1.dtb APPEND root=/dev/mmcblk0p6 rootwait rw earlyprintk console=ttySTM0,115200 Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-04-26Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini2-9/+15
2019-04-25Revert "cmd: Kconfig: Do not include EEPROM if DM_I2C is used without ↵Simon Goldschmidt1-1/+0
DM_I2C_COMPAT" This reverts commit 65a97e7fcf54feb7c4ebe1aee8a572830af4cf51. The 'eeprom' command has been converted to work with DM_I2C in a patch submitted around the same time as this commit: commit 0c07a9b4078d ("eeprom: Add device model based I2C support to eeprom command") Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-04-25eeprom: fix DM_I2C support without CONFIG_SYS_I2C_EEPROM_BUSSimon Goldschmidt1-8/+15
The current device model enabled eeprom code only works if CONFIG_SYS_I2C_EEPROM_BUS is set. This patch makes it work without that define so that the bus number passed to 'eeprom_init' is used. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2019-04-24Merge tag 'pull-24apr19' of git://git.denx.de/u-boot-dmTom Rini1-1/+12
Various minor sandbox iumprovements Fixes for tracing with sandbox Refactoring for boot_get_fdt()
2019-04-24Merge tag 'efi-2019-07-rc1-3' of git://git.denx.de/u-boot-efiTom Rini2-190/+372
Pull request for UEFI sub-system for v2019.07-rc1 (3) This patch series reworks the implementation of the `bootefi` command to remove code duplication by using the LoadImage() boot service to load binaries. Missing short texts for UEFI protocols are added for display by the `efidebug dh` command. Missing parameter checks for AllocatePages() and CreateDeviceNode() are implemented. The constants for protocol GUIDs are changed to match the names in the UEFI specification.
2019-04-23Convert CONFIG_TRACE to KconfigSimon Glass1-1/+1
This converts the following to Kconfig: CONFIG_TRACE Signed-off-by: Simon Glass <sjg@chromium.org>
2019-04-23common: command: Add command execution tracer.Christoph Muellner1-0/+11
When using boot scripts it can become quite hard to understand which commands are actually executed during bootup (e.g. where is a kernel image loaded from or which DTB is in use). Shell scripts suffer from a similar problem and many shells address this problem with a command execution tracer (e.g. BASH has xtrace, which can be enabled by "set -x"). This patch introduces a command tracer for U-Boot, which prints every command with its arguments before it is executed. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2019-04-23efi_loader: need either ACPI table or device treeHeinrich Schuchardt1-26/+72
The EBBR specification prescribes that we should have either an ACPI table or a device tree but not both. Let us enforce this condition in the `bootefi` command. If the bootefi command is called without a device tree parameter use a previously device tree or fall back to the internal device tree. The fdt unit test should not be run on boards with an ACPI table. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-04-23efi_loader: rework bootmgr/bootefi using load_image APIAKASHI Takahiro1-86/+94
In the current implementation, bootefi command and EFI boot manager don't use load_image API, instead, use more primitive and internal functions. This will introduce duplicated code and potentially unknown bugs as well as inconsistent behaviours. With this patch, do_efibootmgr() and do_boot_efi() are completely overhauled and re-implemented using load_image API. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Use efi_root as parent handle for the loaded image. LoadImage() should be called with BootPolicy = true by the boot manager. Avoid duplicate free_pool(). Eliminate variable memdp which is not needed after anymore due to "efi_loader: correctly split device path of loaded image". Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>