summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2017-07-24configs: Migrate RBTREE, LZO, CMD_MTDPARTS, CMD_UBI and CMD_UBIFSTom Rini
The above CONFIG options are in Kconfig, and now have correct depends and inter-dependencies. Migrate these to configs/ from include/configs/. In the case of CMD_UBIFS also change it to be a default y if CMD_UBI. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-24cmd: Kconfig: Fix CMD_UBIFS dependenciesKarl Beldan
Remove the ARCH_SUNXI and RBTREE dependencies. CMD_UBIFS already gets RBTREE from CMD_UBI (from MTD_UBI), and should the first become independant from the latter, there would likely be a dependency on MTD_UBI anyway. Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Jagan Teki <jagan@openedev.com> Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-24cmd: Kconfig: Make CMD_UBI select CMD_MTDPARTSKarl Beldan
Many configs still define CMD_MTDPARTS in their non-Kconfig but CMD_MTDPARTS has now moved to Kconfig. Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-24cmd: Kconfig: Fix a dependency of CMD_MTDPARTSKarl Beldan
Remove the ARCH_SUNXI dependency. Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Jagan Teki <jagan@openedev.com> Signed-off-by: Karl Beldan <karl.beldan-ext@sagemcom.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-22powerpc: Remove unneccessary #ifdefs in reginfoChristophe Leroy
reginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo() or mpc86xx_reginfo() based on CONFIG_ symbol. As those 3 functions can't me defined at the same time, let's rename them print_reginfo() to avoid the #ifdefs The name is kept generic as it is not at all dependent on powerpc arch and any other arch could want to also print such information. In addition, as the Makefile compiles cmd/reginfo.c only when CONFIG_CMD_REGINFO is set, there is no need to enclose the U_BOOT_CMD definition inside a #ifdef CONFIG_CMD_REGINFO Lets all remove the #ifdefs around the U_BOOT_CMD as this file is only compiled when CONFIG_CMD_REGINFO is defined Finally, this is a PowerPC-only command, disable it on a number of non-PowerPC platforms. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-19mmc: use new hwpart API when CONFIG_BLK enabledKever Yang
When CONFIG_BLK is enabled, the hwpart id is different with legacy interface, update it to kame driver work with CONFIG_BLK. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
2017-07-11cmd: mvebu: bubt: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11cmd: nand: remove direct access to struct mtd_info->privGrygorii Strashko
Replace direct access to struct mtd_info->priv with proper accessor mtd_to_nand(). Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11cmd: jffs2: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11cmd: bootm: use get_nand_dev_by_index()Grygorii Strashko
As part of preparation for nand DM conversion the new API has been introduced to remove direct access to nand_info array. So, use it here instead of accessing to nand_info array directly. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11cmd: nand: abstract global variable usage for dm conversionMugunthan V N
nand_info is used all over the file so abstract it with get_nand_dev_by_index() which will help for DM conversion. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
2017-07-11fdt: Check for NULL return from fdt_getprop in 'fdt set'Tom Rini
While the previous pass through fixed one place where we knew that fdt_getprop would be given a positive len, in the case of 'fdt set' we do not, so check that we did no get NULL from fdt_getprop(). Cc: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163249) Fixes 72c98ed1ab48 ("fdt: Add a check to do_fdt() for coverity") Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-11display_options: Refactor to allow obtaining the bannerSimon Glass
Move the display options code into a separate function so that the U-Boot banner can be obtained from other code. Adjust the 'version' command to use it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
2017-07-11dm: scsi: Document and rename the scsi_scan() parameterSimon Glass
The 'mode' parameter is actually a flag to determine whether to display a list of devices found during the scan. Rename it to reflect this, add a function comment and adjust callers to use a boolean. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11dm: scsi: Add a device pointer to scan_exec(), scsi_bus_reset()Simon Glass
With driver model these functions need a device pointer. Add one even when CONFIG_DM_SCSI is not defined. This avoids having ugly conditional function prototypes, When CONFIG_DM_SCSI is not defined we can just ignore the pointer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11Kconfig: Add CONFIG_SATA to enable SATASimon Glass
At present CONFIG_CMD_SATA enables the 'sata' command which also brings in SATA support. Some boards may wish to enable SATA without the command. Add a separate CONFIG to permit this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-11Convert CONFIG_CMD_SATA to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_SATA Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-10cmd, nand: fix broken output of "nand info"Lothar Waßmann
If the value of either "nand options" or "bbt options" has a zero in the most significant nibble, the '0x' prefix will be isolated from the value like shown below: |Device 0: nand0, sector size 128 KiB | Page size 2048 b | OOB size 64 b | Erase size 131072 b | subpagesize 2048 b | options 0x40000200 | bbt options 0x 60000 Change the format string to produce leading zeroes filling the gap. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
2017-07-08powerpc, 8xx: move specific reginfoChristophe Leroy
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Reviewed-by: Heiko Schocher <hs@denx.de>
2017-07-08powerpc: Partialy restore core of mpc8xxChristophe Leroy
CS Systemes d'Information (CSSI) manufactures 8xx boards for critical communication systems. Those boards have been running U-Boot since 2010 and will have to be maintained until at least 2027. commit 5b8e76c35ec312a3f73126bd1a2d2c0965b98a9f ("powerpc, 8xx: remove support for 8xx") orphaned those boards by removing support for the mpc8xx CPU. This commit partially restores support for the 8xx, with the following limitations: - Restores support for MPC866 and MPC885 only - Does not restore IDE, PCMCIA, I2C, USB - Does not restore examples - Does not restore POST - Does not restore Ethernet on SCC - Does not restore console on SCC - Does not restore bedbug and kgdb support As the 866 and 885 do not support the following features, they are not restored either: - VIDEO / LCD - RTC clock The CPM uCODE patch is not restored either, because: - 866 and 885 already have support for I2C and SPI relocation without a uCODE patch - relocation of SMC, I2C or SPI is only needed for using SCCs for Ethernet or QMC The dynamic setup/calculation of clocks is removed, we expect the target being use with the clock and PLPRCR register defined in the configuration. All the clock settings for 8xx prior to 866 is removed as well as we now only support 866 and 885. This code is mature and addresses mature boards. Therefore all code enclosed in '#if 0/#endif' and '#if XX_DEBUG/#endif' is unneeded. The following files are not restored by this patch: - arch/powerpc/cpu/mpc8xx/bedbug_860.c - arch/powerpc/cpu/mpc8xx/fec.h - arch/powerpc/cpu/mpc8xx/kgdb.S - arch/powerpc/cpu/mpc8xx/plprcr_write.S - arch/powerpc/cpu/mpc8xx/scc.c - arch/powerpc/cpu/mpc8xx/upatch.c - arch/powerpc/cpu/mpc8xx/video.c - arch/powerpc/include/asm/status_led.h - arch/powerpc/lib/ide.c - arch/powerpc/lib/ide.h - doc/README.MPC866 - drivers/pcmcia/mpc8xx_pcmcia.c - drivers/rtc/mpc8xx.c - drivers/usb/gadget/mpc8xx_udc.c - drivers/video/mpc8xx_lcd.c - examples/standalone/test_burst.c - examples/standalone/test_burst.h - examples/standalone/test_burst_lib.S - examples/standalone/timer.c - include/mpc823_lcd.h - include/usb/mpc8xx_udc.h - post/cpu/mpc8xx/Makefile - post/cpu/mpc8xx/cache.c - post/cpu/mpc8xx/cache_8xx.S - post/cpu/mpc8xx/ether.c - post/cpu/mpc8xx/spr.c - post/cpu/mpc8xx/uart.c - post/cpu/mpc8xx/usb.c - post/cpu/mpc8xx/watchdog.c Some of the restored files are not located in a proper location. In order to keep traceability of the changes, they will be moved to their correct location and moved to Kconfig in a followup patch. This patch also declares CSSI as point of contact for the update of the 8xx platform, as those boards are the only ones still being maintained on the 8xx area. A later patch will add those boards to the tree. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
2017-07-06avr32: Retire AVR32 for goodAndy Shevchenko
AVR32 is gone. It's already more than two years for no support in Buildroot, even longer there is no support in GCC (last version is heavily patched 4.2.4). Linux kernel v4.12 got rid of it (and v4.11 didn't build successfully). There is no good point to keep this support in U-Boot either. Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-07-04Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini
Patch queue for efi - 2017-07-04 Highlights this time: bugfixes. With these changes, OpenBSD should be more happy.
2017-07-03powerpc: remove 4xx supportHeiko Schocher
There was for long time no activity in the 4xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 4xx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-07-03efi_loader: Add check for fallback fdt memory reservationAlexander Graf
When running bootefi, we allocate new space but never check whether the allocation succeeded. This patch adds a check so that in case things go wrong, we at least know they did. Signed-off-by: Alexander Graf <agraf@suse.de>
2017-06-23bdinfo: print fdt_blobHeiko Schocher
for debugging it is handy to know the fdt_blob address. So print it in bdinfo. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-06-18cmd: usb_mass_storage: Staticize do_usb_mass_storage()Fabio Estevam
Make do_usb_mass_storage() static to fix the following sparse warning: cmd/usb_mass_storage.c:136:5: warning: symbol 'do_usb_mass_storage' was not declared. Should it be static? Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-06-18cmd: usb_mass_storage: Use NULL for pointerFabio Estevam
Use NULL for pointer to fix the following sparse warning: cmd/usb_mass_storage.c:47:15: warning: Using plain integer as NULL pointer Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-06-16powerpc, 5xxx, 512x: remove support for mpc5xxx and mpc512xHeiko Schocher
There was for long time no activity in the mpx5xxx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in mpc5xxx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-16cmd: ethsw: Fix out-of-bounds errorYork Sun
The for loop in cmd_keywords_opt_check() seems to use wrong array to set boundary, reported by Coverity analysis. Signed-off-by: York Sun <york.sun@nxp.com> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Tom Rini <trini@konsulko.com> CC: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> Reported-by: Coverity (CID: 163251) Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-06-12cmd: nvedit: bring error message in sync with condition under which it appearsLothar Waßmann
The list of symbols listed in the error message for missing Kconfig symbols is out of sync with the symbols actually tested. Add the missing symbols and reorder their appearance to be in sync with the #if statement for easier checking. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
2017-06-12cmd: mtdparts: fix uninitialized variable warningLothar Waßmann
commit 06a040a31bcf ("cmd: mtdparts: fix null pointer dereference in parse_mtdparts") removed the initialization of a pointer variable, which is subsequently used in a debug() call. This produces an uninitialized variable warning, when compiling with DEBUG defined. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
2017-06-12fdt: Add a check to fdt_print() for coveritySimon Glass
We know that fdt_getprop() does not return NULL when len is > 0 but coverity does not. Add an extra check to keep it happy. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163248)
2017-06-12fdt: Add a check to do_fdt() for coveritySimon Glass
We know that fdt_getprop() does not return NULL when len is > 0 but coverity does not. Add an extra check to keep it happy. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163249) Fixes: bc80295b (fdt: Add get commands to fdt)
2017-06-12powerpc, 5xx: remove support for 5xxHeiko Schocher
There was for long time no activity in the 5xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 5xx, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-12powerpc, 8260: remove support for mpc8260Heiko Schocher
There was for long time no activity in the 8260 area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 8260, so remove it. Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-12powerpc, 8xx: remove support for 8xxHeiko Schocher
There was for long time no activity in the 8xx area. We need to go further and convert to Kconfig, but it turned out, nobody is interested anymore in 8xx, so remove it (with a heavy heart, knowing that I remove here the root of U-Boot). Signed-off-by: Heiko Schocher <hs@denx.de>
2017-06-10Merge git://git.denx.de/u-boot-dmTom Rini
2017-06-09Kconfig: Add description for CMD_POWEROFFMichal Simek
Add poweroff description to Kconfig to make it selectable via menuconfig. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-09cmd/fdt: support single value replacement within an arrayHannes Schmelzer
With this commit we can modify single values within an array of a dts property. This is useful if we have for example a pwm-backlight where we want to modifiy the pwm frequency per u-boot script. The pwm is described in dts like this: backlight { pwms = <0x0000002b 0x00000000 0x004c4b40>; }; For changing the frequency, here the 3rd parameter, we simply type: fdt set /backlight pwms <? ? 0x1E8480>; For doing all this we: - backup the property content into our 'SCRATCHPAD' - only modify the array-cell if the new content doesn't start with '?' Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-06-09cmd: jffs2: Rename command ls to fslsSiva Durga Prasad Paladugu
Rename command ls to fsls as its conflicting with generic file systesm command ls and this is causing compilation failure as below, if both are enabled and this patch fixes it. cmd/jffs2.o:(.u_boot_list_2_cmd_2_ls+0x0): multiple definition of `_u_boot_list_2_cmd_2_ls' cmd/fs.o:(.u_boot_list_2_cmd_2_ls+0x0):first defined here scripts/Makefile.build:359: recipe for target 'cmd/built-in.o' failed make[1]: *** [cmd/built-in.o] Error 1 Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2017-06-05cmd/ethsw: Disable implicit enum conversion warningTom Rini
With clang-3.8 we see warnings like: cmd/ethsw.c:304:6: warning: implicit conversion from enumeration type 'enum ethsw_keyword_opt_id' to different enumeration type 'enum ethsw_keyword_id' [-Wenum-conversion] ethsw_id_pvid_no, ^~~~~~~~~~~~~~~~ Because we have one enum for ethsw_keyword_id and a second enum for ethsw_keyword_opt_id. This ends up being safe as ethsw_keyword_opt_id explicitly starts after ethsw_keyword_id enum ends. Disable the warning here rather than collapse these into one enum and rely on comments to denote where optional keywords begin. Cc: Codrin Ciubotariu <codrin.ciubotariu@freescale.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2017-06-05cmd/elf.c: Support passing arguments with bootelfTom Rini
The bootelf command could, but does not, pass additional arguments along on the command line. Make do_bootelf consume bootelf/flags/address as needed and then pass along anything else to the ELF application we've launched. Reported-by: Thomas Doerfler <thomas.doerfler@embedded-brains.de> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-04Merge git://git.denx.de/u-boot-fdtTom Rini
2017-06-03fs: fat: add kbuild configuration supportSekhar Nori
Add Kconfig symbols for various configurations supported by FAT filesystem support code. CONFIG_SUPPORT_VFAT has been left out since its force enabled in include/fat.h and probably should get removed at some point. Signed-off-by: Sekhar Nori <nsekhar@ti.com> [trini: add select FS_FAT for CMD_FAT and SPL_FAT_SUPPORT] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-06-02pci: Correct cast for sandboxSimon Glass
This gives a warning with some native compilers: cmd/pci.c:152:11: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘u64 {aka long unsigned int}’ [-Wformat=] Fix it with a cast. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-06-01dm: Use dm.h header when driver mode is usedSimon Glass
This header includes things that are needed to make driver build. Adjust existing users to include that always, even if other dm/ includes are present Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-31Kconfig: Finish migration of hashing commandsDaniel Thompson
Currently these (board agnostic) commands cannot be selected using menuconfig and friends. Fix this the obvious way. As part of this, don't muddle the meaning of CONFIG_HASH_VERIFY to mean both 'hash -v' and "we have a hashing command" as this makes the Kconfig logic odd. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> [trini: Re-apply, add imply for a few cases, run moveconfig.py, also migrate CRC32_VERIFY] Signed-off-by: Tom Rini <trini@konsulko.com>
2017-05-22Convert CONFIG_CMD_LZMADEC to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_LZMADEC Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-22Convert CONFIG_CMD_KGDB to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_KGDB Signed-off-by: Simon Glass <sjg@chromium.org>
2017-05-22Convert CONFIG_CMD_IRQ to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_CMD_IRQ Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>