aboutsummaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)AuthorFilesLines
2018-10-24cmd: mii: don't check address for 'device' subcommandHector Palacios1-1/+1
All mii operations require a valid PHY address except the 'device' command, which expects the PHY name rather than the address. Signed-off-by: Hector Palacios <hector.palacios@digi.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-17Merge tag 'signed-efi-2018.11' of git://github.com/agraf/u-bootTom Rini1-17/+7
Patch queue for efi - 2018-10-17 A few bug fixes for the 2018.11 release: - Fix block seeking on 32bit - Fix execution with DEBUG set - Fix a few Coverity found bugs - Fix warnings Heinrich Schuchardt (13): efi_loader: fix relocation on x86_64 efi_loader: correct signature of GetPosition, SetPosition efi_loader: execute efi_save_gd() first efi_loader: efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES, ...) efi_loader: error handling in read_console() efi_loader: return type efi_console_register() efi_loader: superfluous statement in is_dir() efi_loader: memory leak in efi_set_variable() efi_loader: remove lcd.h from efi_net.c arm: do not include efi_loader.h twice efi_loader: fix typo in efi_boottime.c efi_selftest: creating new handle in controller test efi_loader: efi_dp_get_next_instance() superfluous statement Tom Rini (2): efi_loader: Fix warning in efi_load_image() fs: fat: Fix warning in normalize_longname()
2018-10-16cmd: kgdb: Enable kgdb only for PPCMichal Simek1-0/+1
Only PPC supports this option that's why there should be proper dependency setup via Kconfig. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2018-10-16efi_loader: execute efi_save_gd() firstHeinrich Schuchardt1-17/+7
If DEBUG is defined we may be calling EFI_CALL already during the initialization of the EFI subsystem. We must make sure efi_save_gd() has already been called at that moment. Anyway it is better to have this call in one location instead of three. This fixes an illegal memory access occurring since 4e6b5d6503ce ("efi_loader: create root node") with DEBUG = 1. Fixes: 4e6b5d6503ce ("efi_loader: create root node") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-10-10Merge tag 'dm-9oct18' of git://git.denx.de/u-boot-dmTom Rini3-35/+19
Test improvements to tidy up output and drop duplicate tests Sandbox SPL/TPL support Various dm-related improvements
2018-10-10fdt: add call to ft_board_setup_ex() for ks2 boardsNicholas Faustini1-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>
2018-10-09cros_ec: Update cros_ec_read_hash() to specify the imageSimon Glass1-1/+1
Allow selection of which EC image to hash. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-09x86: Update mtrr functions to allow leaving cache aloneSimon Glass1-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>
2018-10-09cros: Update ec_commands to latest versionSimon Glass1-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>
2018-10-09tpm: Add a few new commands for v1Simon Glass1-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>
2018-10-09cros: Update cros_ec code to use struct udeviceSimon Glass1-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>
2018-10-08cmd: pxe: add support for FIT config selectionPatrick Delaunay1-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>
2018-10-07cmd: avb: print error message if command failsJens Wiklander1-0/+17
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2018-10-07cmd: avb read_rb: print rb_idx in hexadecimalJens Wiklander1-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>
2018-10-03riscv: cmd: bdinfo: Print the relocation addressBin Meng1-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>
2018-10-03riscv: Remove mach typeBin Meng1-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>
2018-10-02Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini5-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>
2018-10-02cmd: mtdparts: describe as legacyMiquel Raynal1-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>
2018-10-02cmd: ubi: clean the partition handlingMiquel Raynal2-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>
2018-10-02cmd: mtd: add 'mtd' commandMiquel Raynal3-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>
2018-09-30Merge git://git.denx.de/u-boot-dmTom Rini1-0/+37
2018-09-30u-boot: align cache flushes in load_elf_image_shdr to line boundariesNeil Stainton1-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>
2018-09-30cmd: env: Fix CRC calculation for 'env export -c -s'Neil Stainton1-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>
2018-09-29Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini3-0/+300
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-09-29cmd: clk: Add trivial implementation of clock dump for DMMarek Vasut1-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>
2018-09-29cmd: Relocate poweroff under Device access commandsAdam Ford1-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>
2018-09-28w1: add command for onewire protocolEugen Hristev3-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>
2018-09-28cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount()Tien Fong Chee1-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>
2018-09-28cmd: ubifs: Move ubifs_initialized checking into cmd_ubifs_umount()Tien Fong Chee2-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>
2018-09-28cmd: Add osd commandsMario Six3-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>
2018-09-26Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2-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>
2018-09-25cmd: add conitrace commandHeinrich Schuchardt3-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>
2018-09-23efi_loader: refactor efi_setup_loaded_image()Heinrich Schuchardt1-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>
2018-09-23efi_loader: Fix loaded_image handle passing from EL3Alexander Graf1-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>
2018-09-23efi_loader: create root nodeHeinrich Schuchardt1-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>
2018-09-23efi_loader: memory leak in efi_set_bootdev()Heinrich Schuchardt1-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>
2018-09-23efi_loader: do not use local variable for handleHeinrich Schuchardt1-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>
2018-09-23cmd: fat: add fatrm commandAKASHI Takahiro1-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>
2018-09-23cmd: fat: add fatmkdir commandAKASHI Takahiro1-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>
2018-09-23cmd: fat: add offset parameter to fatwriteAKASHI Takahiro1-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>
2018-09-23efi_loader: buffer size for load optionsHeinrich Schuchardt1-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>
2018-09-23efi: sandbox: Tidy up copy_fdt() to work with sandboxSimon Glass1-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>
2018-09-23efi: Relocate FDT to 127MB instead of 128MBSimon Glass1-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>
2018-09-20cmd: mtdparts: remove mandatory 'mtdparts=' prefixMiquel Raynal1-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>
2018-09-20cmd: mtdparts: accept spi-nand devicesMiquel Raynal1-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>
2018-09-20cmd: mtdparts: add fallthrough in switch statementMiquel Raynal1-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>
2018-09-20cmd: ubi: delete useless and misleading definitionsMiquel Raynal1-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>
2018-09-19fix: cmd: mvebu: Exclude mvebu commands from SPL buildsKonstantin Porotchkin1-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>
2018-09-11Merge tag 'fpga-for-v2018.11' of git://git.denx.de/u-boot-microblazeTom Rini1-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
2018-09-11cmd: fpga: Fix loads commandMichal Simek1-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>