summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)Author
2020-01-08cmd/Kconfig: Add more dependencies to OSE bootm supportTom Rini
Per Enea OSE documentation, it supports some classes of ARM, PowerPC and X86. Limit the option to those platforms. Signed-off-by: Tom Rini <trini@konsulko.com>
2020-01-07bdinfo: show multi_dtb_fitHeiko Schocher
if MULTI_DTB_FIT is enabled it is helpful to display the value of gd->multi_dtb_fit in bdinfo. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-12-15x86: Update the fsp command for FSP2Simon Glass
The current 'fsp' command only works with FSP1. Update it to handle FSP2 as well. Convert everything to hex which is what U-Boot uses. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-12-15x86: sandbox: Add a PMC emulator and testSimon Glass
Add a simple PMC for sandbox to permit tests to run. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-12-09cmd: pxe: Increase maximum path lengthBen Wolsieffer
On NixOS, cross compiled kernels have long suffixes that cause them to exceed the current maximum path length. The PXE/TFTP max path length is used for extlinux.conf support as well, which is where this problem usually manifest's itself. Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09cmd: mdio/mii: add Kconfig help and allow break dependencyRamon Fried
* Add Kconfig help describing the purpose of each command. * Add CONFIG_CMD_MDIO so it could be selected individually, as it doesn't depend on the mii command. * Add Kconfig imply to mii to automatically select the mdio command. Signed-off-by: Ramon Fried <rfried.dev@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09net: Always build the string_to_enetaddr() helperJoe Hershberger
Part of the env cleanup moved this out of the environment code and into the net code. However, this helper is sometimes needed even when the net stack isn't included. Move the helper to lib/net_utils.c like it's similarly-purposed string_to_ip(). Also rename the moved function to similar naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reported-by: Ondrej Jirman <megous@megous.com>
2019-12-06rtc: move date.c from drivers/rtc/ to lib/AKASHI Takahiro
In the next commit, rtc_mktime(), for compatibility with linux, will be implemented using rtc_mktime(), which is no longer drivers/rtc specific. So move this file under lib/. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2019-12-06cmd: pxe: Fix checkpatch WARNING/CHECKPatrice Chotard
Fix checkpatch WARNING and CHECK issues Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-12-06cmd: sysboot: Fix checkpatch WARNING/CHECKPatrice Chotard
Fix checkpatch WARNING and CHECK issues Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-12-06cmd: pxe_utils: Fix checkpatch WARNING/CHECKPatrice Chotard
Fix checkpatch WARNING and CHECK issues Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-12-06cmd: sysboot: Create a sysboot command dedicated filePatrice Chotard
Extract all sysboot command related code from pxe.c to new sysboot.c Update Kconfig to insure that DISTRO_DEFAULT select new CMD_SYSBOOT command. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-12-06cmd: Prepare sysboot command independencePatrice Chotard
As sysboot and pxe commands are sharing piece of code, migrate this common code into a new file pxe_utils.c to prepare sysboot command code extraction from pxe.c Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-12-06cmd: Migrate from_env() from pxe.c to nvedit.cPatrice Chotard
Migrate from_env() from pxe.c to nvedit.c as it's not pxe specific. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-12-05cmd: cp: add missing map_sysmemPhilippe Reynes
The command cp fails on sandbox because the address is used directly. To fix this issue, we call the function map_sysmem to translate the address. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-12-05iminfo: add missing map_sysmemPhilippe Reynes
The command iminfo fails on sandbox because the address is used directly. To fix this issue, we call the function map_sysmem to translate the address. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
2019-12-04cmd: make MTD commands depend on MTDMiquel Raynal
Defconfigs have been fixed, now we can add proper dependencies in Kconfig. SPI FLASH is still not dependent on MTD (deeper rework needed). Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-04cmd: nand/sf: isolate legacy codeMiquel Raynal
The 'sf' command is not supposed to rely on the MTD stack, but both 'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite their location, these functions do not depend at all on the MTD stack. This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD is selected, which is inconsistent with the current situation. Solve this by moving these three functions (which are only used by the above two commands) out of mtd_uboot.c and put them in a C file only compiled with cmd/sf.c and cmd/nand.c. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [trini: Don't export get_part function now] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-04cmd: mtdparts: Kconfig: join mtdparts command entry with its optionsMiquel Raynal
Move the Kconfig entry of the option right after the entry of the mtdparts command. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2019-12-03mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTDMiquel Raynal
Like in Linux, just use CONFIG_MTD to compile the MTD stack. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NANDMiquel Raynal
Add more clarity by changing the Kconfig entry name. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> [trini: Re-run migration, update a few more cases] Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
2019-12-03Merge tag 'efi-2020-01-rc5' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-01-rc5 A type error in the implementation of the efidebug command is fixed.
2019-12-03cmd: efidebug: fix a build error in show_efi_boot_opt()AKASHI Takahiro
I detected the following error in sandbox with Clang on Travis CI: +cmd/efidebug.c:703:15: error: result of comparison of constant 9223372036854775822 with expression of type 'int' is always false [-Werror,-Wtautological-constant-out-of-range-compare] + else if (ret == EFI_NOT_FOUND) + ~~~ ^ ~~~~~~~~~~~~~ Simply changing a type of 'ret' to efi_status_t will fix this error. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-12-03cmd: pxe: Fix bootm argument countAbhishek Shah
pxe command parses the init ramfs address(through initrd lable in pxe config file), but is not passing it to bootm command as argument as bootm_argc count is not increased. Signed-off-by: Abhishek Shah <abhishek.shah@broadcom.com> Signed-off-by: Vladimir Olovyannikov <vladimir.olovyannikov@broadcom.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-12-03blk: Make use of CONFIG_HAVE_BLOCK_DEVICE moreTom Rini
When we do not have CONFIG_BLK (or SPL/TPL) enabled there are very few cases where we need the blk_legacy code linked in. To catch these, build when we have CONFIG_HAVE_BLOCK_DEVICE set. In addition, we only need cmd/blk_common.o to be linked in when we have CONFIG_HAVE_BLOCK_DEVICE set, so make use of that directly. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move old EEPROM functions into a new headerSimon Glass
These functions do not use driver model but are still used. Move them to a new eeprom.h header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Drop board_show_dram()Simon Glass
This function is not defined by any boards so the feature is not used. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move enable/disable_interrupts out of common.hSimon Glass
Move these two functions into the irq_funcs.h header file. Also move interrupt_handler_t as this is used by the irq_install_handler() function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move ARM cache operations out of common.hSimon Glass
These functions are CPU-related and do not use driver model. Move them to cpu_func.h Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move some cache and MMU functions out of common.hSimon Glass
These functions belong in cpu_func.h. Another option would be cache.h but that code uses driver model and we have not moved these cache functions to use driver model. Since they are CPU-related it seems reasonable to put them here. Move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move some SMP functions out of common.hSimon Glass
These functions belong in cpu_func.h so move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move serial functions out of common.hSimon Glass
These functions belong in serial.h so move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02Move strtomhz() to vsprintf.hSimon Glass
At present this function sits in its own file but it does not really justify it. There are similar string functions in vsprintf.h, so move it there. Also add the missing function comment. Use the vsprintf.h include file explicitly where needed. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move sorting functions to their own header fileSimon Glass
These don't need to be in common.h so move them out into a new header. Also add some missing comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02crc32: Use the crc.h header for crc functionsSimon Glass
Drop inclusion of crc.h in common.h and use the correct header directly instead. With this we can drop the conflicting definition in fw_env.h and rely on the crc.h header, which is already included. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02crc: Fix code style with crc functionsSimon Glass
Some of these have a space before the bracket. Drop it to fix the style. Add some missing function comments while here. Note that u32 and u8 cannot be used here since crc.h is included on the host side. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Move older CPU functions to their own headerSimon Glass
These should be moved to driver model, but in the meantime, move them out of the common header to help reduce its size. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-12efi_loader: support building UEFI binaries on sandboxHeinrich Schuchardt
On the sandbox the UEFI binaries must match the host architectures. Adjust the Makefiles. Provide the PE/COFF header and relocation files. Allow building helloworld.efi on the sandbox. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-11-08cmd: move down CONFIG_CMD_BOOTEFI after CONFIG_BOOTM_VXWORKSAKASHI Takahiro
Due to the commit 4b0bcfa7c4ec ("Kconfig: Migrate CONFIG_BOOTM_* options") BOOTEFI and BOOTEFI_HELLO_COMPILE (and other BOOTEFI configs) are displayed in a long distance. This will make it difficult for us to understand that those configurations are closely related. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-07cmd: mtdparts: Fix build with option ..._SHOW_NET_SIZESAlexander Dahl
That option is currently not used by any defconfig and could not be set anymore since it became mandatory to used Kconfig when introducing new options with U-Boot v2016.11 or commit eed921d92348 ("Kconfig: Add a whitelist of ad-hoc CONFIG options") and commit 371244cb19f9 ("Makefile: Give a build error if ad-hoc CONFIG options are added"). It was also not considered when fixing build warnings in commit 39ac34473f3c ("cmd_mtdparts: use 64 bits for flash size, partition size & offset") and could probably not be compiled anyway after commit dfe64e2c8973 ("mtd: resync with Linux-3.7.1"), which renamed some members of struct mtd_info … so it was probably broken since then, which was U-Boot v2013.07-rc1. However it still seems to work, see example output below: U-Boot 2019.10-00035-g06a9b259ca-dirty (Oct 30 2019 - 14:03:44 +0100) CPU: SAMA5D27 1G bits DDR2 SDRAM Crystal frequency: 24 MHz CPU clock : 492 MHz Master clock : 164 MHz Model: *** DRAM: 128 MiB NAND: 256 MiB Loading Environment from NAND... OK In: serial@f8020000 Out: serial@f8020000 Err: serial@f8020000 Net: eth0: ethernet@f8008000 Hit keys 'tt' to stop autoboot (3 seconds). U-Boot> mtdparts device nand0 <atmel_nand>, # parts = 8 #: name size net size offset mask_flags 0: bootstrap 0x00040000 0x00040000 0x00000000 1 1: uboot 0x000c0000 0x000c0000 0x00040000 1 2: env1 0x00040000 0x00040000 0x00100000 0 3: env2 0x00040000 0x00040000 0x00140000 0 4: fpga_led 0x00040000 0x00040000 0x00180000 1 5: reserved 0x00040000 0x00040000 0x001c0000 1 6: rootfs_rec 0x03200000 0x03200000 0x00200000 1 7: filesystem 0x0cc00000 0x0cb80000 (!) 0x03400000 0 active partition: nand0,0 - (bootstrap) 0x00040000 @ 0x00000000 defaults: mtdids : nand0=atmel_nand mtdparts: mtdparts=atmel_nand:256k(bootstrap)ro,768k(uboot)ro,256k(env1),256k(env2),256k(fpga_led)ro,256k(reserved)ro,50M(rootfs_rec)ro,-(filesystem) Signed-off-by: Alexander Dahl <ada@thorsis.com>
2019-11-07cmd: nand: Remove not used declarationAlexander Dahl
This declaration is not used anywhere in the whole tree. There is a function 'mtd_id_parse()' which was renamed from 'id_parse()' in commit 68d7d65100e8 ("Separate mtdparts command from jffs2"), but that function is not used (anymore?) in cmd nand and build is fine without that declaration, so it's probably just safe to remove. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2019-11-06Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini
- DFU updates - USB Storage updates
2019-11-01Merge tag 'efi-2020-01-rc2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-01-rc2 Provide a better user interface for setting UEFI variables. Bug fixes: - ext4 file system not discovered on UEFI block device - 'make tests' build error on 32bit systems
2019-10-31cmd: avb: Support A/B slotsSam Protsenko
Add optional parameter to 'avb verify' sub-command, so that user is able to specify which slot to use, in case when user's partitions are slotted. If that parameter is omitted, the behavior of 'avb verify' will be the same as before, so user API is content. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com> Acked-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-10-31cmd: avb: Fix requested partitions listSam Protsenko
The requested_partitions[] array should contain only boot partitions. Usually it's only 'boot' partition, as can be seen in [1]. Also, seems like the requested_partitions[] are only used when there is no 'vbmeta' partition [2], which is not a regular use-case. Make requested_partitions[] contain only 'boot' partition as it was supposed to be, and also make that array to be a local in do_avb_verify_part() function, as nobody else needs that. [1] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/test/avb_slot_verify_unittest.cc#108 [2] https://android.googlesource.com/platform/external/avb/+/5fbb42a189aa/libavb/avb_slot_verify.c#1461 Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2019-10-31dfu: allow to manage DFU on several devicesPatrick Delaunay
Add support of DFU for several interface/device with one command. The format for "dfu_alt_info" in this case is : - <interface> <dev>'='alternate list (';' separated) - each interface is separated by '&' The previous behavior is always supported. One example for NOR (bootloaders) + NAND (rootfs in UBI): U-Boot> env set dfu_alt_info \ "sf 0:0:10000000:0=spl part 0 1;u-boot part 0 2; \ u-boot-env part 0 3&nand 0=UBI partubi 0,3" U-Boot> dfu 0 list DFU alt settings list: dev: SF alt: 0 name: spl layout: RAW_ADDR dev: SF alt: 1 name: ssbl layout: RAW_ADDR dev: SF alt: 2 name: u-boot-env layout: RAW_ADDR dev: NAND alt: 3 name: UBI layout: RAW_ADDR U-Boot> dfu 0 $> dfu-util -l Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ intf=0, alt=3, name="UBI", serial="002700333338511934383330" Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ intf=0, alt=2, name="u-boot-env", serial="002700333338511934383330" Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ intf=0, alt=1, name="u-boot", serial="002700333338511934383330" Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ intf=0, alt=0, name="spl", serial="002700333338511934383330" Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-10-31thor: fix error path after g_dnl_register() failureMarek Szyprowski
Set command return value and perform needed cleanup when g_dnl_register() function fails. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2019-10-31cmd: thor: select DFU subsystem also for 'thor' download toolMarek Szyprowski
'THOR' download command requires DFU infrastructure to properly flash board images. It can be used without enabling DFU command, so add such dependency to Kconfig. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Lukasz Majewski <lukma@denx.de>
2019-10-30cmd: env: extend "env [set|print] -e" to manage UEFI variablesAKASHI Takahiro
With this patch, when setting UEFI variable with "env set -e" command, we will be able to - specify vendor guid with "-guid guid", - specify variable attributes, BOOTSERVICE_ACCESS, RUNTIME_ACCESS, respectively with "-bs" and "-rt", - append a value instead of overwriting with "-a", - use memory as variable's value instead of explicit values given at the command line with "-i address,size" If guid is not explicitly given, default value will be used. Meanwhile, "env print -e," will be modified so that it will NOT dump a variable's value if '-n' is specified. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-10-30Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
- H6 dts(i) sync (Clément) - H6 PIO (Icenowy) - Fix pll1 clock calculation (Stefan) - H6 dram, half DQ (Jernej) - A64 OLinuXino eMMC (Sunil)