summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dmTom Rini2018-10-103-35/+19
|\ | | | | | | | | | | Test improvements to tidy up output and drop duplicate tests Sandbox SPL/TPL support Various dm-related improvements
| * cros_ec: Update cros_ec_read_hash() to specify the imageSimon Glass2018-10-091-1/+1
| | | | | | | | | | | | Allow selection of which EC image to hash. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Update mtrr functions to allow leaving cache aloneSimon Glass2018-10-091-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | At present the mtrr functions disable the cache before making changes and enable it again afterwards. This is fine in U-Boot, but does not work if running in CAR (such as we are in SPL). Update the functions so that the caller can request that caches be left alone. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * cros: Update ec_commands to latest versionSimon Glass2018-10-091-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This file has changed quite a bit in the last 5 years as the capabilities of the ECs have grown. Sync it up with the copy in coreboot commit b9141f2215. The only change is the addition of EC_VBNV_BLOCK_SIZE_V2. This is needed because U-Boot uses the new v2 vboot API and this is not currently fully supported by Chromium OS firmware. Signed-off-by: Simon Glass <sjg@chromium.org>
| * tpm: Add a few new commands for v1Simon Glass2018-10-091-15/+0
| | | | | | | | | | | | | | These are needed for the 2018 version of Chromium OS vboot. Add an implementation for TPM v1, with v2 to come later. Signed-off-by: Simon Glass <sjg@chromium.org>
| * cros: Update cros_ec code to use struct udeviceSimon Glass2018-10-091-12/+12
| | | | | | | | | | | | | | | | At present we pass around a private pointer to specify the cros_ec device. With driver model it makes more sense to pass the device. Update the code to do this. Signed-off-by: Simon Glass <sjg@chromium.org>
* | fdt: add call to ft_board_setup_ex() for ks2 boardsNicholas Faustini2018-10-101-0/+3
| | | | | | | | | | | | | | | | | | When updating the board FDT, some of the operations are performed by ft_board_setup_ex() and should be executed also by the fdt command. Signed-off-by: Nicholas Faustini <nicholas.faustini@azcomtech.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | cmd: pxe: add support for FIT config selectionPatrick Delaunay2018-10-081-3/+51
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | Add a way in configuration files (exlinux.conf for sysboot command) to select a specific FIT configuration. The configuration is selected with a string added after the FIT filename in the label "KERNEL" or "LINUX", using the same format than bootm command: KERNEL [Filename]#<conf>[#<extra-conf[#...]] This configuration string, beginning by '#', is directly appended to bootm argument 1 after <kernel_addr_r>. bootm [<kernel_addr_r>]#<conf>[#<extra-conf[#...]] see doc/uImage.FIT/command_syntax_extensions.txt for details Example : KERNEL /fit.itb#cfg1 KERNEL /fit.itb#cfg2 Configuration can be use also for overlay management : KERNEL /fit.itb#cfg1#dtbo1#dtbo3 see doc/uImage.FIT/overlay-fdt-boot.txt for details Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
* cmd: avb: print error message if command failsJens Wiklander2018-10-071-0/+17
| | | | | Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
* cmd: avb read_rb: print rb_idx in hexadecimalJens Wiklander2018-10-071-1/+1
| | | | | | | | | | | Prior to this patch was do_avb_write_rb() reading supplied rb_idx as a hexadecimal number while do_avb_read_rb() printed the read out rb_idx as decimal number. For consistency change do_avb_read_rb() to print rb_idx as a hexadecimal number too. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
* riscv: cmd: bdinfo: Print the relocation addressBin Meng2018-10-031-0/+2
| | | | | | | Add printing of U-Boot relocation address. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
* riscv: Remove mach typeBin Meng2018-10-031-1/+0
| | | | | | | Since the mach_id is not used by RISC-V, remove it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2018-10-025-95/+531
|\ | | | | | | | | | | | | This is the PR for SPI-NAND changes along with few spi changes. [trini: Re-sync changes for ls1012afrwy_qspi*_defconfig] Signed-off-by: Tom Rini <trini@konsulko.com>
| * cmd: mtdparts: describe as legacyMiquel Raynal2018-10-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | The 'mtdparts' command is not needed anymore. While the environment variable is still valid (and useful, along with the 'mtdids' one), the command has been replaced by 'mtd' which is much more close to the MTD stack and do not add its own specific glue. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
| * cmd: ubi: clean the partition handlingMiquel Raynal2018-10-022-71/+27
| | | | | | | | | | | | | | | | | | | | UBI should not mess with MTD partitions, now that the partitions are handled in a clean way, clean the ubi command and avoid using this uneeded extra-glue to reference the devices. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
| * cmd: mtd: add 'mtd' commandMiquel Raynal2018-10-023-2/+482
| | | | | | | | | | | | | | | | | | | | | | | | There should not be a 'nand' command, a 'sf' command and certainly not a new 'spi-nand' command. Write a 'mtd' command instead to manage all MTD devices/partitions at once. This should be the preferred way to access any MTD device. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
| * cmd: mtdparts: remove mandatory 'mtdparts=' prefixMiquel Raynal2018-09-201-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All U-Boot users must define the mtdparts environment variable with: setenv mtdparts mtdparts=... While this may ease the partition declaration job to be passed to Linux, this is a pure software limitation and forcing this prefix is a complete non-sense. Let the user to declare manually the mtdparts variable without the prefix. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Stefan Roese <sr@denx.de>
| * cmd: mtdparts: accept spi-nand devicesMiquel Raynal2018-09-201-5/+8
| | | | | | | | | | | | | | | | | | | | Let spi-nand devices be recognized by mtdparts. This is superfluous but a full mtdparts rework would be very time-consuming. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Stefan Roese <sr@denx.de>
| * cmd: mtdparts: add fallthrough in switch statementMiquel Raynal2018-09-201-0/+3
| | | | | | | | | | | | | | Switch blocks for deriving size naturally use fallthrough between 'case' statements. Make it explicit. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
| * cmd: ubi: delete useless and misleading definitionsMiquel Raynal2018-09-201-5/+0
| | | | | | | | | | | | | | | | | | | | | | These definitions are simply not used and are misleading because similar definitions exist in jffs2/load_kernel.h and are used widely to define MTD device types (which is, by the way, totally redundant with what the MTD core does). Remove these definitions. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
* | Merge git://git.denx.de/u-boot-dmTom Rini2018-09-301-0/+37
|\ \
| * | cmd: clk: Add trivial implementation of clock dump for DMMarek Vasut2018-09-291-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add trivial implementation of the clk dump in case DM is enabled. This implementation just iterates over all the clock registered with the CLK uclass and prints their rate. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Chin Liang See <chin.liang.see@intel.com> Cc: Dinh Nguyen <dinguyen@kernel.org> Cc: Ley Foon Tan <ley.foon.tan@intel.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Ley Foon Tan <ley.foon.tan@intel.com>
* | | u-boot: align cache flushes in load_elf_image_shdr to line boundariesNeil Stainton2018-09-301-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent cache warning messages when using the 'bootelf' command on an Arm target. Round down each section start address and round up the respective section end to the nearest cache line. Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk> [trini: Manually apply, rework whitespace] Signed-off-by: Tom Rini <trini@konsulko.com>
* | | cmd: env: Fix CRC calculation for 'env export -c -s'Neil Stainton2018-09-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix failure to reimport exported checksummed, size constrained data block. 'env export -c' command ignores optional -s size argument when calculating checksum causing subsequent 'env import -c' to fail. Signed-off-by: Neil Stainton <nstainton@asl-control.co.uk>
* | | Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2018-09-293-0/+300
|\ \ \ | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com>
| * | | cmd: Add osd commandsMario Six2018-09-283-0/+300
| |/ / | | | | | | | | | | | | | | | | | | | | | Add command to query information from and write text to on-screen display (OSD) devices. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | cmd: Relocate poweroff under Device access commandsAdam Ford2018-09-291-5/+5
| | | | | | | | | | | | | | | | | | | | | Previously poweroff was located under boot. It seems to make more sense to have it located under the Device access commands. Signed-off-by: Adam Ford <aford173@gmail.com>
* | | w1: add command for onewire protocolEugen Hristev2018-09-283-0/+134
| | | | | | | | | | | | | | | | | | | | | Add basic command for bus information and read for onewire bus using Dallas 1-Wire protocol. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
* | | cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount()Tien Fong Chee2018-09-281-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmd_ubifs_mount() function would be called directly instead of involving whole command machinery for mounting ubifs in generic firmware loader, so some checking codes need to be factored out into cmd_ubifs_mount() without breaking original functionality design. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de>
* | | cmd: ubifs: Move ubifs_initialized checking into cmd_ubifs_umount()Tien Fong Chee2018-09-282-11/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | cmd_ubifs_umount() function would be called directly instead of involving whole command machinery in generic firmware loader, so checking on ubifs_initialized status need to be done in cmd_ubifs_umount() without breaking original functionality design. Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de> [trini: Fix conflicting type error in cmd/ubi.c] Signed-off-by: Tom Rini <trini@konsulko.com>
* | Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2018-09-262-70/+151
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch queue for efi - 2018-09-26 A lot of goodness in this release. We're *very* close to running the UEFI Shell and SCT natively. The only missing piece are HII protocols. - FAT write support (needed for SCT) - improved FAT directory support (needed for SCT) - RTC support with QEMU -M virt - Sandbox support (run UEFI binaries in Linux - yay) - Proper UTF-16 support - EFI_UNICODE_COLLATION_PROTOCOL support (for UEFI Shell) - EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL support (for UEFI Shell) - Fix window size determination - Fix Tegra by explicitly unmapping RAM - Clean up handle entanglement - Lots of generic code cleanup [trini: Fixup merge conflict in include/configs/qemu-arm.h] Signed-off-by: Tom Rini <trini@konsulko.com>
| * | efi_loader: refactor efi_setup_loaded_image()Heinrich Schuchardt2018-09-231-27/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create the handle of loaded images and the EFI_LOADED_IMAGE_PROTOCOL inside efi_setup_loaded_image(). Do not use local variables. Currently we expect the loaded image handle to point to the loaded image protocol. Additionally we have appended private fields to the protocol. With the patch the handle points to a loaded image object and the private fields are added here. This matches how we handle the net and the gop object. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: Fix loaded_image handle passing from EL3Alexander Graf2018-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running in EL3 mode on AArch64, we have to first drop to EL2 to execute a UEFI payload. When dropping down, the arguments to the entry point have to stay identical to the ones for normal entry though. In commit ea54ad59286 ("efi_loader: pass handle of loaded image") we incorrectly changed that logic and had the el3 entry path diverge. Fix it up by syncing it back to what it's supposed to be. Fixes: ea54ad59286 ("efi_loader: pass handle of loaded image") Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
| * | efi_loader: create root nodeHeinrich Schuchardt2018-09-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we assign a lot of protocols to loaded images though these protocols are not related to them. Instead they should be installed on a separate handle. Via the device path it is the parent to the devices like the network adapter. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: memory leak in efi_set_bootdev()Heinrich Schuchardt2018-09-231-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | efi_set_bootdev() may be called repeatedly. Free the memory allocated for device paths in previous calls. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: do not use local variable for handleHeinrich Schuchardt2018-09-231-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | Do not use a local variable for the handle backing the memory device path. Adjust relate comments. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | cmd: fat: add fatrm commandAKASHI Takahiro2018-09-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | In this patch, a new command, fatrm, is added so as to delete a file or directory. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | cmd: fat: add fatmkdir commandAKASHI Takahiro2018-09-231-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this patch, a new command, fatmkdir, is added. Please note that, as there is no notion of "current directory" on u-boot, a directory name specified must contains an absolute directory path as a parent directory. Otherwise, "/" (root directory) is assumed. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | cmd: fat: add offset parameter to fatwriteAKASHI Takahiro2018-09-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | In this patch, fatwrite command is extended so as to accept an additional parameter of file offset. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi_loader: buffer size for load optionsHeinrich Schuchardt2018-09-231-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The number of bytes in an utf-8 string is an upper limit for the number of words in the equivalent utf-16 string. In so far the inumbant coding works correctly. For non-ASCII characters the utf-16 string is shorter. With the patch only the necessary buffer size is allocated for the load options. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi: sandbox: Tidy up copy_fdt() to work with sandboxSimon Glass2018-09-231-29/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present this function takes a pointer as its argument, then passes this to efi_allocate_pages(), which actually takes an address. It uses casts, which are not supported on sandbox. Also the function calculates the FDT size rounded up to the neared EFI page size, then its caller recalculates the size and adds a bit more to it. This function is much better written as something that works with addresses only, and returns both the address and the size of the relocated FDT. Also, copy_fdt() returns NULL on error, but really should propagate the error from efi_allocate_pages(). To do this it needs to return an efi_status_t, not a void *. Update the code in this way, so that it is easier to follow, and also supports sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * | efi: Relocate FDT to 127MB instead of 128MBSimon Glass2018-09-231-2/+2
| |/ | | | | | | | | | | | | | | Sandbox only has 128MB of memory so we cannot relocate the device tree up to start at 128MB. Use 127MB instead, which should be safe. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
* | cmd: add conitrace commandHeinrich Schuchardt2018-09-253-0/+58
|/ | | | | | | | | | The 'conitrace' command prints the codes received from the console input as hexadecimal numbers. This developer utility is useful for testing the handling of special keys by keyboard drivers. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* fix: cmd: mvebu: Exclude mvebu commands from SPL buildsKonstantin Porotchkin2018-09-191-1/+2
| | | | | | | | | Exclude mvebu commands from SPL builds Signed-off-by: Konstantin Porotchkin <kostap@marvell.com> Cc: Igal Liberman <igall@marvell.com> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge tag 'fpga-for-v2018.11' of git://git.denx.de/u-boot-microblazeTom Rini2018-09-111-316/+336
|\ | | | | | | | | | | | | | | | | | | FPGA changes for v2018.11 - add fpga tests to cover fpga commands - fpga Kconfig cleanup - fix cmd/fpga.c - add support for missing fpga loadmk commands - add fpga fragment to MAINTAINERS
| * cmd: fpga: Fix loads commandMichal Simek2018-09-111-112/+36
| | | | | | | | | | | | | | Convert last loads command to fpga subcommands. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cmd: fpga: Use CMD_RET_FAILURE instead of simple 1Michal Simek2018-09-111-7/+7
| | | | | | | | | | | | | | Use standard return command failure macro. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cmd: fpga: Add support for missing fpga loadmk commandsMichal Simek2018-09-111-20/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are ways how to call fpga loadmk 1. Full command fpga loadmk [dev] [address] 2. Dev setup via variable set fpga [dev] fpga loadmk [address] 3. Address setup via variable set fpgadata [address] fpga loadmk [dev] 4. Dev and address setup via variables set fpga [dev] set fpgadata [address] fpga loadmk Before this patch only cases 1 and 3 are working but the part of code was trying to support also cases 2 and 4. This patch is adding support for cases 2 and 4 to have all of combinations supported. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cmd: fpga: Fix loadmk commandMichal Simek2018-09-111-115/+123
| | | | | | | | | | | | | | | | Convert loadmk command to fpga subcommands. Not all combinations are working but they have never worked properly. This will be fixed later. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * cmd: fpga: Fix loadfs commandMichal Simek2018-09-111-30/+28
| | | | | | | | | | | | | | Convert loadfs command to fpga subcommands. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>