summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2017-05-01cmd: add Kconfig option for 'date' commandChris Packham
Signed-off-by: Chris Packham <judge.packham@gmail.com> [trini: default y if DM_RTC, re-sync] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30Convert CONFIG_CMD_DISPLAY to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_DISPLAY Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-30Convert CONFIG_CMD_DIAG to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_DIAG Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply CMD_DIAG on some keymile configs] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30fs: Kconfig: Add a separate option for FS_CRAMFSSimon Glass
Rather than using CMD_CRAMFS for both the filesystem and its command, we should have a separate option for each. This allows us to enable CRAMFS support without the command, if desired, which reduces U-Boot's size slightly. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply FS_CRAMFS for keymile] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30fs: Convert CONFIG_CMD_CRAMFS to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_CRAMFS Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply CMD_CRAMFS for keymile] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30Convert CONFIG_CMD_CLK to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_CLK Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply CMD_CLK on ARCH_ZYNQ] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30fs: Kconfig: Add a separate config for FS_CBFSSimon Glass
Rather than using CMD_CBFS for both the filesystem and its command, we should have a separate option for each. This allows us to enable CBFS support without the command, if desired, which reduces U-Boot's size slightly. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply FS_CBFS on SYS_COREBOOT] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30fs: Convert CONFIG_CMD_CBFS to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_CBFS Signed-off-by: Simon Glass <sjg@chromium.org> [trini: imply CMD_CBFS on SYS_COREBOOT] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30Convert CONFIG_CMD_BSP to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_BSP Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-30Convert CONFIG_CMD_BMP to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_BMP Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add depends on LCD || DM_VIDEO || VIDEO] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30Convert CONFIG_CMD_BLOB to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_BLOB Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add imply CMD_BLOB under CHAIN_OF_TRUST] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-30Convert CONFIG_CMD_BEDBUG to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_BEDBUG Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-30Convert CONFIG_CMD_AES et al to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_AES CONFIG_AES Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Add select AES to CMD_AES] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-27add Kconfig for fsuuid commandJosua Mayer
CONFIG_CMD_FS_UUID was neither whitelisted, nor was it declared in Kconfig. Now it can be enabled in .config and defconfig as expected. Signed-off-by: Josua Mayer <josua.mayer97@gmail.com>
2017-04-18Merge branch 'master' of git://git.denx.de/u-boot-ubiTom Rini
2017-04-18cmd: remove Blackfin specific commandsMasahiro Yamada
These commands have no user since commit ea3310e8aafa ("Blackfin: Remove"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-04-18cmd: cramfs: use map_sysmem for sandbox supportTyler Hall
As with most other commands, this needs to factor in the sysmem offset in the sandbox or it will try to dereference the simulated physical address directly. Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
2017-04-18cmd: ubi: remove unnecessary logical constraintxypron.glpk@gmx.de
A size_t variable can never be negative. The problem was indicated by cppcheck. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-04-14dm: led: Add a new 'led' commandSimon Glass
When driver model is used for LEDs, provide a command to allow LED access. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14led: Mark existing driver as legacySimon Glass
The existing 'led' command does not support driver model. Rename it to indicate that it is legacy code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-14sandbox: Add some test LEDsSimon Glass
Add some LEDs to the standard sandbox device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ziping Chen <techping.chan@gmail.com>
2017-04-13Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
Drop CONFIG_STACKSIZE from include/configs/imx6_logic.h Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-13pci: Add a command to show PCI regionsSimon Glass
Add 'pci regions' which lists the I/O and memory regions accessible from the PCI controller. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-04-12Rename aes.h to uboot_aes.hStefano Babic
aes.h is a too generic name if this file can be exported and used by a program. Rename it to avoid any conflicts with other files (for example, from openSSL). Signed-off-by: Stefano Babic <sbabic@denx.de>
2017-04-12cmd_mmc: fix arg parsing for setdsr subcmdMarkus Niebel
The handler do_setdsr receives only the dsr parameter, the action is parsed before. Error was introduced when restructuring the mmc command implementation in commit 1fd93c6e7d8a1e4d6261058cefab11b875ded252. Reported-by: Michael Krummsdorf <Michael.Krummsdorf@tq-group.com> Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-04-07cmd: nand: Make the NAND options default to NAND_SUNXIMaxime Ripard
If we depend on the ARCH_SUNXI configuration option, the boards that do not have NAND support enabled (with the associated options) will not compile anymore. Depend on the NAND driver configuration option to make sure that is not the case. Reported-by: Chen-Yu Tsai <wens@csie.org> Tested-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-04-07cmd: ubifs: Add a dependency on CMD_UBIMaxime Ripard
CMD_UBIFS can't compile without CMD_UBI enabled. Make sure we can't end up in that case. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Heiko Schocher <hs@denx.de>
2017-04-07sunxi: Enable UBI and NAND supportHans de Goede
Enable the NAND and UBI support in the configuration header so that we can (finally) use it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jagan Teki <jagan@openedev.com>
2017-04-07cmd: nand: Expose optional suboptions in KconfigBoris Brezillon
Sometime we need to enable advanced suboptions of the nand command set. Expose these suboptions in Kconfig. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-07cmd: Expose a Kconfig option to enable UBIFS commandsBoris Brezillon
Create a new Kconfig entry to allow CMD_UBIFS selection from Kconfig and add an hidden LZO option that can be selected by CMD_UBIFS. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jagan Teki <jagan@openedev.com>
2017-04-07cmd: Add Kconfig option for CMD_MTDPARTS and related optionsMaxime Ripard
CMD_MTDPARTS is something the user might or might not want to select, and might depends on (or be selected by) other options too. This is even truer for the MTDIDS_DEFAULT and MTDPARTS_DEFAULT options that might change from one board to another, or from one user to the other, depending on what it expects and what storage devices are available. In order to ease that configuration, add those options to Kconfig. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2017-04-05OpenRISC: RemoveTom Rini
The OpenRISC architecture is currently unmaintained, remove. Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-04-05SPARC: RemoveTom Rini
The SPARC architecture is currently unmaintained, remove. Cc: Francois Retief <fgretief@spaceteq.co.za> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-05Blackfin: RemoveTom Rini
The architecture is currently unmaintained, remove. Cc: Benjamin Matthews <mben12@gmail.com> Cc: Chong Huang <chuang@ucrobotics.com> Cc: Dimitar Penev <dpn@switchfin.org> Cc: Haitao Zhang <hzhang@ucrobotics.com> Cc: I-SYST Micromodule <support@i-syst.com> Cc: M.Hasewinkel (MHA) <info@ssv-embedded.de> Cc: Marek Vasut <marex@denx.de> Cc: Martin Strubel <strubel@section5.ch> Cc: Peter Meerwald <devel@bct-electronic.com> Cc: Sonic Zhang <sonic.adi@gmail.com> Cc: Valentin Yakovenkov <yakovenkov@niistt.ru> Cc: Wojtek Skulski <info@skutek.com> Cc: Wojtek Skulski <skulski@pas.rochester.edu> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-04-04dm: core: Add flags parameter to device_remove()Stefan Roese
This patch adds the flags parameter to device_remove() and changes all calls to this function to provide the default value of DM_REMOVE_NORMAL for "normal" device removal. This is in preparation for the driver specific pre-OS (e.g. DMA cancelling) remove support. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2017-04-04Merge git://git.denx.de/u-boot-dmTom Rini
2017-03-28i2c: Set default I2C bus numberLukasz Majewski
This patch allows using i2c commands (e.g. "i2c probe", "i2c md", etc) without the need to first select the bus number with e.g. "i2c dev 0". This is the "i2c" command behavior similar to the one from pre DM, where by default bus 0 was immediately accessible. Signed-off-by: Lukasz Majewski <lukma@denx.de>
2017-03-26lib: tpm: Add command to list resourcesmario.six@gdsys.cc
It is sometimes convenient to know how many and/or which resources are currently loaded into a TPG, e.g. to test is a flush operation succeeded. Hence, we add a command that lists the resources of a given type currently loaded into the TPM. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-26cmd: tpm: Fix flush commandmario.six@gdsys.cc
Commit 7690be35de ("lib: tpm: Add command to flush resources") added a command to flush resources from a TPM. However, a previous development version was accidentially used to generate the patch, resulting in a non-functional command. This patch fixes the flush command. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-26tpm: Add function to load keys via their parent's SHA1 hashmario.six@gdsys.cc
If we want to load a key into a TPM, we need to know the designated parent key's handle, so that the TPM is able to insert the key at the correct place in the key hierarchy. However, if we want to load a key whose designated parent key we also previously loaded ourselves, we first need to memorize this parent key's handle (since the handles for the key are chosen at random when they are inserted into the TPM). If we are, however, unable to do so, for example if the parent key is loaded into the TPM during production, and its child key during the actual boot, we must find a different mechanism to identify the parent key. To solve this problem, we add a function that allows U-Boot to load a key into the TPM using their designated parent key's SHA1 hash, and the corresponding auth data. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-17gpt: Fix uuid string formatVincent Tinelli
Change GPT UUID string format from UUID to GUID per specification. Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-17cmd: itest: correct calculus for long formatSebastien Colleur
itest shell command doesn't work correctly in long format when doing comparaison due to wrong mask value calculus that overflow on 32 bits values. Signed-off-by: Sebastien Colleur <sebastienx.colleur@intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-17Kconfig: introduce md5sum command selectionAndre Przywara
So far CONFIG_MD5SUM would need to be set by a board's include file. Since the command is really generic, move it over to Kconfig to allow it to be defined by either a board's defconfig, menuconfig or some config snippet merged via mergeconfig.sh. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-16Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini
2017-03-14arm64: booti: allow to place kernel image anywhere in physical memoryMasahiro Yamada
At first, the ARM64 Linux booting requirement recommended that the kernel image be placed text_offset bytes from 2MB aligned base near the start of usable system RAM because memory below that base address was unusable at that time. This requirement was relaxed by Linux commit a7f8de168ace ("arm64: allow kernel Image to be loaded anywhere in physical memory"). Since then, the bit 3 of the flags field indicates the tolerance of the kernel physical placement. If this bit is set, the 2MB aligned base may be anywhere in physical memory. For details, see Documentation/arm64/booting.txt of Linux. The booti command should be also relaxed. If the bit 3 is set, images->ep is respected, and the image is placed at the nearest bootable location. Otherwise, it is relocated to the start of the system RAM to keep the original behavior. Another wrinkle we need to take care of is the unknown endianness of text_offset for a kernel older than commit a2c1d73b94ed (i.e. v3.16). We can detect this based on the image_size field. If the field is zero, just use a fixed offset 0x80000. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-03-14armv8: Add global variable resv_ramYork Sun
Use gd->arch.resv_ram to track reserved memory allocation. Signed-off-by: York Sun <york.sun@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-12flash: complete CONFIG_SYS_NO_FLASH move with renamingMasahiro Yamada
We repeated partial moves for CONFIG_SYS_NO_FLASH, but this is not completed. Finish this work by the tool. During this move, let's rename it to CONFIG_MTD_NOR_FLASH. Actually, we have more instances of "#ifndef CONFIG_SYS_NO_FLASH" than those of "#ifdef CONFIG_SYS_NO_FLASH". Flipping the logic will make the code more readable. Besides, negative meaning symbols do not fit in obj-$(CONFIG_...) style Makefiles. This commit was created as follows: [1] Edit "default n" to "default y" in the config entry in common/Kconfig. [2] Run "tools/moveconfig.py -y -r HEAD SYS_NO_FLASH" [3] Rename the instances in defconfigs by the following: find . -path './configs/*_defconfig' | xargs sed -i \ -e '/CONFIG_SYS_NO_FLASH=y/d' \ -e 's/# CONFIG_SYS_NO_FLASH is not set/CONFIG_MTD_NOR_FLASH=y/' [4] Change the conditionals by the following: find . -name '*.[ch]' | xargs sed -i \ -e 's/ifndef CONFIG_SYS_NO_FLASH/ifdef CONFIG_MTD_NOR_FLASH/' \ -e 's/ifdef CONFIG_SYS_NO_FLASH/ifndef CONFIG_MTD_NOR_FLASH/' \ -e 's/!defined(CONFIG_SYS_NO_FLASH)/defined(CONFIG_MTD_NOR_FLASH)/' \ -e 's/defined(CONFIG_SYS_NO_FLASH)/!defined(CONFIG_MTD_NOR_FLASH)/' [5] Modify the following manually - Rename the rest of instances - Remove the description from README - Create the new Kconfig entry in drivers/mtd/Kconfig - Remove the old Kconfig entry from common/Kconfig - Remove the garbage comments from include/configs/*.h Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-02-08cmd: move CONFIG_CMD_UNZIP and CONFIG_CMD_ZIP to KconfigMasahiro Yamada
CONFIG_CMD_ZIP is not defined by any board. I am moving CONFIG_CMD_UNZIP to defconfig files except UniPhier SoC family. I am the maintainer of UniPhier platform, so I know "select CMD_UNZIP" is better for this platform. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Ryan Harkin <ryan.harkin@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
2017-02-08cmd: bootm: fix build when CONFIG_CMD_IMLS_NANDGrygorii Strashko
Now when CONFIG_CMD_IMLS_NAND is enabled the u-boot build will fail, because nand_read_skip_bad() function has been changed to accept more parameters, hence fix it. CC cmd/bootm.o cmd/bootm.c: In function 'nand_imls_legacyimage': cmd/bootm.c:390:8: error: too few arguments to function 'nand_read_skip_bad' ret = nand_read_skip_bad(mtd, off, &len, imgdata); ^ In file included from cmd/bootm.c:18:0: include/nand.h:101:5: note: declared here int nand_read_skip_bad(struct mtd_info *mtd, loff_t offset, size_t *length, ^ LD drivers/block/built-in.o Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-02-08cmd: rework "license" commandMasahiro Yamada
The previous commit ("add a new command to show .config contents") improves the basic infrastructure of "embed a compressed file into the U-Boot image, and print it by a command". The same pattern for the "license" command. This commit reworks the command to improve the following: [1] Improve log style Kbuild style log GZIP cmd/license_data.gz CHK cmd/license_data_gz.h UPD cmd/license_data_gz.h CHK cmd/license_data_size.h UPD cmd/license_data_size.h instead of the bare Make log: cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \ tools/bin2header license_gzip > ./include/license.h [2] Collect related code into the "cmd" directory Prior to this commit, the license.h was created by tools/Makefile, placed under the "include" directory, included from cmd/license.c, and deleted by the top-level Makefile. It is not a good idea to scatter related code. [3] Drop the fixed-malloc size LICENSE_MAX Just allocate the minimum required size of buffer because we know the size of the original gpl-2.0.txt. [4] Fix more issues Terminate the buffer with zero to prevent puts() from over-running. Add "static" to do_license. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>