summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2018-07-27mtest: disable physical memory cell test for teziStefan Agner
For faster test time shorten the alternative memory test to only do the stuck address/data line tests instead of full memory write pattern tests. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-06-06cmd: ubi: print load size after establishing volume sizeStefan Agner
When using static volumes, the file size stored in the volume is determined at runtime. Currently the ubi command prints the file size specified on the console, which leads to a rather confusing series of messages: # ubi read ${fdt_addr_r} testvol Read 0 bytes from volume testvol to 82000000 No size specified -> Using max size (179924992) Make sure to print the actual size read in any case: # ubi read ${fdt_addr_r} testvol No size specified -> Using max size (179924992) Read 179924992 bytes from volume testvol to 82000000 Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-06-06cmd: set filesize variable in ubi readHolger Dengler
After a successful read of a UBI volume, the variable filesize is set to the number of read bytes. To boot linux with a raw initramfs/initrd, you must specify the exact size of the initramfs/initrd image in boot command. If the initramfs/inird is read from UBI volume, $filesize is required to access the number of read bytes. Example: ubi read ${loadaddr} kernelvol ubi read ${fdtaddr} dtbvol ubi read ${initrd_addr} initrdvol bootz ${loadaddr} ${initrd_addr}:${filesize} ${fdt_addr} Signed-off-by: Holger Dengler <dengler@linutronix.de> Reviewed-by: Heiko Schocher <hs@denx.de> (cherry picked from commit 985fa93e61706a78fad130b006aefa1c098145de) [backported to 2016.11] Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2017-01-18cmd: add sdp commandStefan Agner
Add new command to start USB Serial Download Protocol (SDP) state machine. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2017-01-11cmd: fdt: Print error message when fdt application failsStefan Agner
There are lots of reason why a FDT application might fail, the error code might give an indication. Let the error code translate in a error string so users can try to understand what went wrong. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2017-01-11cmd_writebcb_mx7: add command to write FCB and DBBT for i.MX 7Max Krummenacher
Code mostly ported from imx-kobs-5.3. MTD partitioning is set accordingly. writebcb: Write Boot Control Block (FCB and DBBT) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> [ported to U-Boot 2016.11] Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-10-31cmd: load: align cache flushChris Packham
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>
2016-10-31Fix spelling of "extended".Vagrant Cascadian
Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-10-19efi_loader: Revert device_handle to disk after net bootAlexander Graf
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>
2016-10-19efi: Fix missing EFIAPI specifiersSimon Glass
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>
2016-10-19smbios: Expose in efi_loader as tableAlexander Graf
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>
2016-10-18efi_loader: Allow boards to implement get_time and reset_systemAlexander Graf
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>
2016-10-13Merge git://git.denx.de/u-boot-fdtTom Rini
2016-10-13cmd/fdt: add possibilty to have 'extrasize' on fdt resizeHannes Schmelzer
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>
2016-10-13Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini
2016-10-13net: Fix cache misalignment message after network load operationsPeter Chubb
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>
2016-10-11cmd: cros_ec: Move crosec commands to cmd subdirectoryMoritz Fischer
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
2016-10-06cmd/onenand.c: block align warningLadislav Michl
An attempt to write non block aligned data fails silently, add warning and set result. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2016-10-06Various, accumulated typos collected from around the tree.Robert P. J. Day
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>
2016-10-01fastboot: move FASTBOOT_FLASH options into KconfigPetr Kulhavy
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>
2016-09-30Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: include/configs/dra7xx_evm.h
2016-09-27common: dfu: saperate the dfu common functionalityB, Ravi
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>
2016-09-27Merge branch 'master' of git://git.denx.de/u-boot-ubiTom Rini
2016-09-27dfu: Migrate to KconfigTom Rini
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>
2016-09-27cmd: ubi: add option to specify volume idLadislav Michl
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
2016-09-26kconfig: introduce kconfig for UBIHeiko Schocher
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>
2016-09-23treewide: replace #include <asm/errno.h> with <linux/errno.h>Masahiro Yamada
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>
2016-09-23cmd/fat: Do not crash on write when <bytes> is not specifiedStefan Brüns
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>
2016-09-18sandbox: Add "host size" hostfs command for fs testStefan Brüns
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>
2016-09-12sf: fix sf probeCyrille Pitchen
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>
2016-09-09cmd: Rework disk.c usageTom Rini
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>
2016-09-07pxe: Fix pxe boot with FIT imageYork Sun
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>
2016-09-01nand: Fix some more NULL name testsScott Wood
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>
2016-09-01nand: Fix nand info for no deviceTony Lindgren
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>
2016-08-26nand: Fix set_dev checks for no deviceTony Lindgren
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>
2016-08-20fastboot: implement KconfigSteve Rae
implement Kconfig for the 'fastboot' feature set Signed-off-by: Steve Rae <steve.rae@raedomain.com>
2016-08-20cmd: efi_loader: Return CMD_RET_USAGE in case of not enough argumentsBin Meng
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>
2016-08-20cmd: booti: move CONFIG_CMD_BOOTI to KconfigMasahiro Yamada
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>
2016-08-20cmd: Split 'bootz' and 'booti' out from 'bootm'Tom Rini
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>
2016-08-20cmd: fdt: add fdt overlay application subcommandMaxime Ripard
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>
2016-08-20cmd: fdt: Narrow the check for fdt addrMaxime Ripard
The current code only checks if the fdt subcommand is fdt addr by checking whether it starts with 'a'. Since this is a pretty widely used letter, narrow down that check a bit. Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-08-16x86: bdinfo: Drop meaningless valuesSimon Glass
These are not useful on x86 so do not print them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-08-16bdinfo: Don't print out empty DRAM banksSimon Glass
There is no sense in printing out DRAM banks of size 0 since this means they are empty. Skip them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2016-08-15xtensa: add support for the xtensa processor architecture [1/2]Chris Zankel
The Xtensa processor architecture is a configurable, extensible, and synthesizable 32-bit RISC processor core provided by Cadence. This is the first part of the basic architecture port with changes to common files. The 'arch/xtensa' directory, and boards and additional drivers will be in separate commits. Signed-off-by: Chris Zankel <chris@zankel.net> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-08-08efi_loader: disk: Fix CONFIG_BLK breakageAlexander Graf
When using CONFIG_BLK, there were 2 issues: 1) The name we generate the device with has to match the name we set in efi_set_bootdev() 2) The device we pass into our block functions was wrong, we should not rediscover it but just use the already known pointer. This patch fixes both issues. Signed-off-by: Alexander Graf <agraf@suse.de>
2016-08-05cmd: gpt: fix the wrong size parse for the last partitionKever Yang
The calculation of "dev_desc->lba - 34 - 1 - offset" is not correct for size '-', because both fist_usable_lba and last_usable_lba will remain 34 sectors. We can simply use 0 for size '-' because the part_efi module will decode the size and auto extend the size to maximum available size. Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2016-08-05cmd/bdinfo: extract print_std_bdinfoMax Filippov
print_std_bdinfo outputs typical set of board information entries: boot params location, memory and flash addresses and sizes, network interfaces information and configured serial baud rate. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-05cmd/bdinfo: extract print_baudrateMax Filippov
print_baudrate outputs serial baud rate. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-05cmd/bdinfo: extract print_eth_ip_addrMax Filippov
print_eth_ip_addr outputs eth configurations for up to 6 interfaces and configured IP address. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2016-08-05cmd/bdinfo: extract print_bi_flashMax Filippov
print_bi_flash outputs flashstart, flashsize and flashoffset lines. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>