summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeLines
* cmd: fdt: Narrow the check for fdt addrMaxime Ripard2016-08-20-1/+1
| | | | | | | | | | | 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>
* x86: bdinfo: Drop meaningless valuesSimon Glass2016-08-16-10/+0
| | | | | | | 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>
* bdinfo: Don't print out empty DRAM banksSimon Glass2016-08-16-3/+5
| | | | | | | | | 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>
* xtensa: add support for the xtensa processor architecture [1/2]Chris Zankel2016-08-15-0/+8
| | | | | | | | | | | | | | 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>
* efi_loader: disk: Fix CONFIG_BLK breakageAlexander Graf2016-08-08-5/+18
| | | | | | | | | | | | | | | 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>
* cmd: gpt: fix the wrong size parse for the last partitionKever Yang2016-08-05-2/+2
| | | | | | | | | | | 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>
* cmd/bdinfo: extract print_std_bdinfoMax Filippov2016-08-05-20/+12
| | | | | | | | | | 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>
* cmd/bdinfo: extract print_baudrateMax Filippov2016-08-05-14/+25
| | | | | | | | 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>
* cmd/bdinfo: extract print_eth_ip_addrMax Filippov2016-08-05-77/+36
| | | | | | | | | | 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>
* cmd/bdinfo: extract print_bi_flashMax Filippov2016-08-05-27/+27
| | | | | | | | 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>
* cmd/bdinfo: extract print_bi_dramMax Filippov2016-08-05-41/+19
| | | | | | | | print_bi_dram outputs start address and size for each DRAM bank. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd/bdinfo: extract print_bi_memMax Filippov2016-08-05-16/+26
| | | | | | | | print_bi_mem outputs memstart and memsize lines. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd/bdinfo: extract print_bi_boot_paramsMax Filippov2016-08-05-7/+13
| | | | | | | | print_bi_boot_params outputs boot parameters structure location. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* crypto/fsl: Update blob cmd to accept 64bit addressesSumit Garg2016-08-02-1/+1
| | | | | | | | | Update blob cmd to accept 64bit source, key modifier and destination addresses. Also correct output result print format for fsl specific implementation of blob cmd. Signed-off-by: Sumit Garg <sumit.garg@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* dm: usb: Use blk_dread/write() instead of direct callsSimon Glass2016-07-27-2/+2
| | | | | | Update the USB mass storage code to allow it to work with driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* arm: Show early-malloc() usage in bdinfoSimon Glass2016-07-27-0/+5
| | | | | | | | | | | | | This is useful information to show how close we are to the limit. At present it is only available by enabling DEBUG in board_r.c. Make it available with the 'bdinfo' command also. Note that this affects ARM only. The bdinfo command is different for each architecture. Rather than duplicating the code it would be better to refactor it (as was done with global_data). Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-nand-flashTom Rini2016-07-25-7/+12
|\
| * mtd: fix compiler warningsSteve Rae2016-07-24-2/+2
| | | | | | | | | | | | | | - add missing declaration - update debug output format specifiers Signed-off-by: Steve Rae <steve.rae@raedomain.com>
| * cmd, nand: add an option to disable the verification when writing in raw modeBoris Brezillon2016-07-24-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modern NANDs do not guarantee that data written in raw mode will not contain bitflips just after writing them. This is fine since the number of bitflips should be rather low and thus fixable by the ECC engine, but since we are reading data in raw mode to verify if they match the input data we cannot prevent failures if some bits are flipped. The option of using standard mode to verify the data is not acceptable either, since one of the usage of raw mode is to allow flashing images that do not respect the standard NAND page layout or the default ECC config (this is the case on Allwinner platforms, where the ROM code tests several hardcoded configs, which are not necessarily matching the NAND characteristics). Add an extension to the nand write.raw command allowing one to disable the verification step. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | lzmadec: Use the same type as the lzma callSimon Glass2016-07-25-2/+3
| | | | | | | | | | | | | | | | With sandbox on 32-bit the size_t type can be a little inconsistent. Use the same type as the caller expects to avoid a compiler warning. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* | efi_loader: Make exposed image loader path absoluteAlexander Graf2016-07-25-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | When loading an efi image, we pass it the location it was loaded from. On file system backends, there are no relative paths, so we should always pass in absolute ones. For network paths, we may be relative. This fixes distro booting with grub2 for me when it fetches the grub2 config file from the loader partition. Reported-by: york sun <york.sun@nxp.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* | cmd: misc: Add support for fractions in sleepmario.six@gdsys.cc2016-07-25-1/+20
|/ | | | | | | | | | | | | | | | | | | | | A feasible way to communicate certain errors for devices that have no other way of signalling besides LEDs is to flash these LEDs. For errors in U-Boot, a script that utilizes the led and sleep commands would be a practicable way, but currently the sleep command can only delay for an integral amount of seconds, which is too slow to create an easily noticeable pattern for flashing LEDs. Therefore, this patch adds support for fractions (down to .001 seconds) to the sleep command. The parsing is kept minimal, simplistic and as robust as possible: After converting the passed string using simple_strtoul and multiplying it with 1000, we search for the first dot, convert the three characters after that into a number (if they are not numbers, we ignore the fractional part and just use the delay we got from simple_strtoul), and add this number to the delay. Signed-off-by: Mario Six <mario.six@gdsys.cc>
* cmd: mtdparts: support runtime generated mtdpartsLadislav Michl2016-07-22-9/+12
| | | | | | | | | | | Some CPUs contains boot ROM code capable reading first few blocks (where SPL resides) of NAND flash and executing it. It is wise to create separate partition here for SPL. As block size depends on NAND chip used, we could either use worst case (biggest) partition size or base its size on actual block size. This patch adds support for the latter option. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* cmd: mtdparts: use defaults by defaultLadislav Michl2016-07-22-6/+16
| | | | | | | | | | | Boards which are defining default mtdparts often need them early in boot process (to load environment from UBI volume, for example). This is currently solved by adding mtdparts and mtdids variable definitions also to default environment. With this change, default partitions are used by default unless explicitely deleted or redefined. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* cmd: mtdparts: consolidate mtdparts reading from envLadislav Michl2016-07-22-22/+20
| | | | Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* cmd: mtdparts: fix null pointer dereference in parse_mtdpartsLadislav Michl2016-07-22-10/+13
| | | | | | | | | | In case there is no mtdparts variable in relocated environment, NULL is assigned to p, which is later fed to strncpy. Also function parameter mtdparts is completely ignored, so use it in case mtdparts variable is not found in environment. This parameter is checked not to be NULL in caller. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* cmd: mtdparts: fix mtdparts variable presence confusion in mtdparts_initLadislav Michl2016-07-22-4/+6
| | | | | | | | | A private buffer is used to read mtdparts variable from non-relocated environment. A pointer to that buffer is returned unconditionally, confusing later test for variable presence in the environment. Fix it by returning NULL when getenv_f fails. Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
* Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini2016-07-19-2/+2
|\ | | | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: arch/arm/cpu/armv8/Makefile arch/arm/lib/bootm-fdt.c
| * armv8: Move secure_ram variable out of generic global dataYork Sun2016-07-15-2/+2
| | | | | | | | | | | | | | Secure_ram variable was put in generic global data. But only ARMv8 uses this variable. Move it to ARM specific data structure. Signed-off-by: York Sun <york.sun@nxp.com>
* | Various, unrelated tree-wide typo fixes.Robert P. J. Day2016-07-16-1/+1
|/ | | | | | | | | | | | | | | | | | | Fix a number of typos, including: * "compatble" -> "compatible" * "eanbeld" -> "enabled" * "envrionment" -> "environment" * "FTD" -> "FDT" (for "flattened device tree") * "ommitted" -> "omitted" * "overriden" -> "overridden" * "partiton" -> "partition" * "propogate" -> "propagate" * "resourse" -> "resource" * "rest in piece" -> "rest in peace" * "suport" -> "support" * "varible" -> "variable" Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
* Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2016-07-11-0/+2
|\
| * dm: spi: Read default speed and mode values from DTVignesh R2016-07-09-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | In case of DT boot, don't read default speed and mode for SPI from CONFIG_*, instead read from DT node. This will make sure that boards with multiple SPI/QSPI controllers can be probed at different bus frequencies and SPI modes. Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
* | usb: dm: Make "usb info" use usb_for_each_root_dev()Hans de Goede2016-07-05-25/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old dm "usb info" implementation has several issues: 1) NULL pointer deref when a bus has no children 2) Not showing usb devices on busses without an emulated root-hub (otg host) 3) Attempting to show devices on inactive busses 4) "usb info" Would cause some hosts to get re-probed something which only "usb reset" should do TL;DR: proper iterating over usb bus root devs is hard, use the helper for it. Reported-by: Bernhard Nortmann <bernhard.nortmann@web.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* | usb: dm: Add a usb_for_each_root_dev() helper functionHans de Goede2016-07-05-3/+12
|/ | | | | | | | Iterating over usb-root devs and doing something for all of them is a bit tricky with dm, factor out the proven usb_show_tree() for this into a helper function. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* hush: complete renaming CONFIG_SYS_HUSH_PARSER to CONFIG_HUSH_PARSERMasahiro Yamada2016-06-24-8/+2
| | | | | | | There is no more define of CONFIG_SYS_HUSH_PARSER. Rename some remaining references and drop the backward compatible Kconfig entry. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* common: image: minimal android image iminfo supportMichael Trimarchi2016-06-24-0/+6
| | | | | | | | | We already support iminfo for other images. The idea of this patch is start to have a minimal support for android image format. We still need to print id[] array Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd: bootefi: cosmeticSergey Kubushyn2016-06-24-1/+1
| | | | | | | | | | | | | | | | | | Short help (description) in bootefi command has a trailing "\n" that breaks the "help" command output (empty line after "bootefi"). Nothing important, doesn't affect anything but better be fixed in the upcoming release. Still working on i.MX6 and their siblings NAND U-Boot update -- it works here but not ready for a submission yet. Anyway it is for the next cycle, not going to go into this release because it is too big and may affect something else. Also have some thoughts about fastboot (using multiple devices) but this will go into separate email with RFC. Signed-off-by: Sergey Kubushyn <ksi@koi8.net>
* autoboot: add CONFIG_AUTOBOOT to allow to not compile autoboot.cMasahiro Yamada2016-06-20-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit bb597c0eeb7e ("common: bootdelay: move CONFIG_BOOTDELAY into a Kconfig option"), CONFIG_BOOTDELAY is defined for all boards. Prior to that commit, it was allowed to unset CONFIG_BOOTDELAY to not compile common/autoboot.c, as described in common/Makefile: # This option is not just y/n - it can have a numeric value ifdef CONFIG_BOOTDELAY obj-y += autoboot.o endif It was a bit odd to enable/disable code with an integer type option, but it was how this option worked before that commit, and several boards actually unset it to opt out of the autoboot feature. This commit adds a new bool option, CONFIG_AUTOBOOT, and makes CONFIG_BOOTDELAY depend on it. I chose "default y" for this option because most boards use the autoboot. I added "# CONFIG_AUTOBOOT is not set" for the boards that had not set CONFIG_BOOTDELAY prior to the bad commit. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* Merge git://git.denx.de/u-boot-nand-flashTom Rini2016-06-20-6/+35
|\
| * nand: extend nand tortureMax Krummenacher2016-06-19-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nand torture currently works on exactly one nand block which is specified by giving the byteoffset to the beginning of the block. Extend this by allowing for a second parameter specifying the byte size to be tested. e.g. ==> nand torture 1000000 NAND torture: device 0 offset 0x1000000 size 0x20000 (block size 0x20000) Passed: 1, failed: 0 ==> nand torture 1000000 40000 NAND torture: device 0 offset 0x1000000 size 0x40000 (block size 0x20000) Passed: 2, failed: 0 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com> [scottwood: fix usage to show size as optional, and add misssing braces] Signed-off-by: Scott Wood <oss@buserror.net>
* | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2016-06-18-1/+2
|\ \ | | | | | | | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
| * | cmd: usb: check if_type before using this devicePeng Fan2016-06-18-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For legacy usb storage driver, USB_MAX_STOR_DEV is defined as 7. If we only have one usb disk on board, `usb dev 0` is ok. But if `usb dev 1`, still ok, then `usb read xxx` will trigger system fault and reboot. So check if_type before using this device. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Stephen Warren <swarren@nvidia.com>
* | | cmd: gpt: add - partition size parsingMichael Trimarchi2016-06-12-2/+11
|/ / | | | | | | | | | | | | | | | | | | This patch try to parse name=userdata,size=-,uuid=${uuid_gpt_userdata}; gpt mmc write 0 $partitions gpt mmc verify 0 $partitions Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | ubi: add new ubi command "ubi detach"Heiko Schocher2016-06-09-11/+27
| | | | | | | | | | | | simple detachs ubi from the mtd partition. Signed-off-by: Heiko Schocher <hs@denx.de>
* | efi_loader: Move to normal debug infrastructureAlexander Graf2016-06-06-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | We introduced special "DEBUG_EFI" defines when the efi loader support was new. After giving it a bit of thought, turns out we really didn't have to - the normal #define DEBUG infrastructure works well enough for efi loader as well. So this patch switches to the common debug() and #define DEBUG way of printing debug information. Signed-off-by: Alexander Graf <agraf@suse.de>
* | efi_loader: Add exit supportAlexander Graf2016-06-06-0/+6
|/ | | | | | | | | | | Some times you may want to exit an EFI payload again, for example to default boot into a PXE installation and decide that you would rather want to boot from the local disk instead. This patch adds exit functionality to the EFI implementation, allowing EFI payloads to exit. Signed-off-by: Alexander Graf <agraf@suse.de>
* mtd: nand: Add+use mtd_to/from_nand and nand_get/set_controller_dataScott Wood2016-06-03-2/+2
| | | | | | | | | These functions are part of the Linux 4.6 sync. They are being added before the main sync patch in order to make it easier to address the issue across all NAND drivers (many/most of which do not closely track their Linux counterparts) separately from other merge issues. Signed-off-by: Scott Wood <oss@buserror.net>
* nand: Embed mtd_info in struct nand_chipScott Wood2016-06-03-24/+24
| | | | | | | | | | | | nand_info[] is now an array of pointers, with the actual mtd_info instance embedded in struct nand_chip. This is in preparation for syncing the NAND code with Linux 4.6, which makes the same change to struct nand_chip. It's in a separate commit due to the large amount of changes required to accommodate the change to nand_info[]. Signed-off-by: Scott Wood <oss@buserror.net>
* mtd: nand: Remove nand_info_t typedefScott Wood2016-06-03-99/+98
| | | | | | | This typedef serves no purpose other than causing confusion with struct nand_chip. Signed-off-by: Scott Wood <oss@buserror.net>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-05-27-62/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | For odroid-c2 (arch-meson) for now disable designware eth as meson now needs to do some harder GPIO work. Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: lib/efi_loader/efi_disk.c Modified: configs/odroid-c2_defconfig