summaryrefslogtreecommitdiff
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'efi-2020-07-rc2-2' of ↵Tom Rini2020-05-051-21/+19
|\ | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-07-rc2-2 This patch contains error corrections and code simplifications for the UEFI sub-system.
| * cmd: efidebug: simplify UEFI protocol callsHeinrich Schuchardt2020-05-041-21/+19
| | | | | | | | | | | | | | We should not to refer to a function via the run-time or boot services tables if the function is exported. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86WIP/04May2020Tom Rini2020-05-041-0/+20
|\ \ | | | | | | | | | - Support 64-bit U-Boot as the payload for coreboot x86
| * | cmd: Add an indication of 32/64-bit to bdinfoSimon Glass2020-05-041-0/+20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | It is useful to know what mode U-Boot is running in. Add a message at the end of the 'bdinfo' output. Suggested-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: change commit tag to 'cmd' as this is not x86 specific] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* | cmd: mvebu: bubt: fix quoted string split across linesJoel Johnson2020-05-041-2/+2
|/ | | | | | | | | Update quoted string alignment to address checkpatch.pl warning originally introduced in commit f60a66ef5d7d ("cmd: mvebu: bubt: show image boot device"). Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd/bedbug.c: Make bedbug_init have a return valueOvidiu Panait2020-05-011-2/+2
| | | | | | | | Do this as a preparation for removing initr_bedbug wrapper from common/board_r.c. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* cmd/gpt: avoid NULL check before free()Heinrich Schuchardt2020-05-011-4/+2
| | | | | | | | free() checks if its argument is NULL. Do not duplicate this in the calling code. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* Merge tag 'efi-2020-07-rc2' of ↵Tom Rini2020-04-303-53/+52
|\ | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-07-rc2 This pull request contains bug fixes needed due to the merged changes for EFI secure boot. Patches are supplied to identify EFI system partitions.
| * efi_loader: fix 'efidebug bootorder'Heinrich Schuchardt2020-04-301-21/+26
| | | | | | | | | | | | | | | | | | * don't copy GUIDs for no reason * shorten print format strings by using variable names * don't use the run-time table to access exported functions * check the result of malloc() (fixes Coverity CID 300331) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: efidebug, avoid illegal memory accessHeinrich Schuchardt2020-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | For EFI_PERSISTENT_MEMORY_TYPE the 'efidebug memmap' command produces an illegal memory access. * Add the missing descriptive string for EFI_PERSISTENT_MEMORY_TYPE. * Replace the check for EFI_MAX_MEMORY_TYPE by the ARRAY_SIZE() macro. Reported-by: Coverity (CID 300336) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: fix 'efidebug boot dump'Heinrich Schuchardt2020-04-301-25/+20
| | | | | | | | | | | | | | | | | | | | | | | | * Do not recreate a variable name that we already have as u16 string. * Check the return value of malloc() * EFI_NOT_FOUND cannot occur for a variable name returned by GetNextVariableName(). Remove a print statement. * Don't copy a GUID for no reason. * Don't use the run-time service table to call exported functions. * Don't pass NULL to show_efi_boot_opt_data() (fixes Coverity CID 300338). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * part: detect EFI system partitionHeinrich Schuchardt2020-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Up to now for MBR and GPT partitions the info field 'bootable' was set to 1 if either the partition was an EFI system partition or the bootable flag was set. Turn info field 'bootable' into a bit mask with separate bits for bootable and EFI system partition. This will allow us to identify the EFI system partition in the UEFI sub-system. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * efi_loader: remove superfluous NULL check in bootefi.cHeinrich Schuchardt2020-04-301-4/+2
| | | | | | | | | | | | | | efi_free_pool() and efi_delete_handle() both check if their argument is NULL. The caller should not duplicate this check. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | acpi: Add an acpi commandSimon Glass2020-04-303-0/+201
|/ | | | | | | | | | | | | It is useful to dump ACPI tables in U-Boot to see what has been generated. Add a command to handle this. To allow the command to find the tables, add a position into the global data. Support subcommands to list and dump the tables. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
* CMD: random: fix return codeEugeniy Paltsev2020-04-271-5/+4
| | | | | | | | | | | | As of today 'random' command return 1 (CMD_RET_FAILURE) in case of successful execution and 0 (CMD_RET_SUCCESS) in case of bad arguments. Fix that. NOTE: we remove printing usage information from command body so it won't print twice. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellWIP/22Apr2020Tom Rini2020-04-221-6/+127
|\ | | | | | | | | | | - mvebu bubt cmd: Add A38x support (Joel) - Clearfog: Fix SCSI boot duplication (Joel) - Armada-37xx: Fix DDR PHY clock divider values (Marek)
| * cmd: mvebu: bubt: show image boot deviceJoel Johnson2020-04-221-1/+11
| | | | | | | | | | | | | | | | | | When a mismatch is found trying to write an image for one boot method to a different boot device, print an error message including the image header marked target boot device type. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
| * cmd: mvebu: bubt: verify A38x target device typeJoel Johnson2020-04-221-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | Ensure that the device to which an image is being written includes header information indicating boot support for the destination device. This is derived from the support in the SolidRun master-a38x vendor fork. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
| * cmd: mvebu: bubt: correct U-Boot spellingJoel Johnson2020-04-221-3/+3
| | | | | | | | | | | | | | Replace "U-BOOT" text with correct spelling Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
| * cmd: mvebu: bubt: add A38x supportJoel Johnson2020-04-221-1/+68
| | | | | | | | | | | | | | | | | | Add support for Armada 38x devices in bubt flashing utility. This is based on (and streamlined from) the support in the SolidRun master-a38x vendor fork. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
* | Merge tag 'mmc-2020-4-22' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmcTom Rini2020-04-222-11/+61
|\ \ | |/ |/| | | | | | | | | - iproc_sdhci memory leak fix and enable R1B resp quirk - more mmc cmds and several mmc updates from Heinirich - Use bounce buffer for tmio sdhci - Alignment check for tmio sdhci
| * mmc: adjust Kconfig for mmc sub-commandsHeinrich Schuchardt2020-04-221-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All sub-commands of the mmc command should be shown in the Kconfig menu next to the mmc command. This includes: * mmc bkops * mmc rpmb * mmc swrite The mmc rpmb sub-command is not usable without CONFIG_SUPPORT_EMMC_RPMB. Add the missing dependency. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * cmd: mmc: provide boot area protection commandHeinrich Schuchardt2020-04-221-0/+22
| | | | | | | | | | | | | | | | | | | | Provide command 'mmc wp' to power on write protect boot areas on eMMC devices. The B_PWR_WP_EN bit in the extended CSD register BOOT_WP is set. The boot area are write protected until the next power cycle occurs. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * cmd: mmc: display write protect state of boot partitionHeinrich Schuchardt2020-04-221-0/+24
| | | | | | | | | | | | | | Boot partitions of eMMC devices can be power on or permanently write protected. Let the 'mmc info' command display the protection state. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* | Merge tag 'for-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2cTom Rini2020-04-211-1/+1
|\ \ | | | | | | | | | | | | | | | | | | i2c changes for 2020.07 - add new i2c driver for Broadcom iproc-based socs - fix cmd: eeprom: Staticize eeprom_i2c_bus - i2c: muxes: pca954x: add PCA9546 variant
| * | cmd: eeprom: Staticize eeprom_i2c_busMarek Vasut2020-04-201-1/+1
| |/ | | | | | | | | | | | | | | | | The eeprom_i2c_bus is not used outside of this file, make it static. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Heiko Schocher <hs@denx.de>
* | Merge tag 'for-v2020.07' of https://gitlab.denx.de/u-boot/custodians/u-boot-ubiTom Rini2020-04-212-0/+47
|\ \ | | | | | | | | | new ubi command for renaming an UBI volume
| * | cmd: ubi: add a command to rename volumePhilippe Reynes2020-04-202-0/+47
| |/ | | | | | | | | | | | | | | | | This commit adds the command ubi rename to rename an ubi volume. The format of the command is: ubi rename <oldname> <newname>. To enable this command, the option CMD_UBI_RENAME must be selected. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Kconfig: fix typos in CMD_BEDBUG descriptionHeinrich Schuchardt2020-04-171-1/+1
| | | | | | | | | | | | | | | | Fix documentation bug reported by 'make refcheckdocs'. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
* | image: Add compressed Image parsing support in booti.Atish Patra2020-04-171-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add compressed Image parsing support so that booti can parse both flat and compressed Image to boot Linux. Currently, it is difficult to calculate a safe address for every board where the compressed image can be decompressed. It is also not possible to figure out the size of the compressed file as well. Thus, user need to set two additional environment variables kernel_comp_addr_r and filesize to make this work. Following compression methods are supported for now. lzma, lzo, bzip2, gzip. lz4 support is not added as ARM64 kernel generates a lz4 compressed image with legacy header which U-Boot doesn't know how to parse and decompress. Tested on HiFive Unleashed and Qemu for RISC-V. Tested on Qemu for ARM64. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Tom Rini <trini@konsulko.com> [trini: Fix minor rST formatting problems] Signed-off-by: Tom Rini <trini@konsulko.com>
* | cmd: mem: Add bitflip memory test to alternate mtestStefan Roese2020-04-171-0/+60
| | | | | | | | | | | | | | | | | | This additional bitflip memory test is inspired by the bitflip test in memtester v4.3.0. It show some errors on some problematic GARDENA MT7688 based boards. The other memory tests usually don't show any errors here. Signed-off-by: Stefan Roese <sr@denx.de>
* | cmd: mem: Use IS_ENABLED instead of alt_test variableStefan Roese2020-04-171-6/+1
| | | | | | | | | | | | | | This patch uses the IS_ENABLED() macro to check, which mtest variant is enabled. Signed-off-by: Stefan Roese <sr@denx.de>
* | cmd: mem: Drop eldk-4.2 workaround and use cast in unmap_sysmem()Stefan Roese2020-04-171-12/+2
| | | | | | | | | | | | Use a cast instead of the "eldk-4.2" workaround for unmap_sysmem(). Signed-off-by: Stefan Roese <sr@denx.de>
* | cmd: mem: Correctly count the errors in mtestStefan Roese2020-04-171-7/+4
| | | | | | | | | | | | | | This patch changes mtest to correctly count the overall errors and print them even in the abort (Ctrl-C) case. Signed-off-by: Stefan Roese <sr@denx.de>
* | cmd: fat: remove unused includesHeinrich Schuchardt2020-04-171-6/+0
| | | | | | | | | | | | | | Remove unused includes from cmd/fat.c. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* | cmd: Add unlz4 commandYusuke Ashiduka2020-04-173-0/+53
|/ | | | | | | | | | This command is a new command called "unlz4" that decompresses from memory into memory. Used with the CONFIG_CMD_UNLZ4 optionenabled. Signed-off-by: Yusuke Ashiduka <ashiduka@fujitsu.com> [trini: Use %zd / %zX not %ld / %lX in printf] Signed-off-by: Tom Rini <trini@konsulko.com>
* Merge tag 'efi-2020-07-rc1' of ↵WIP/16Apr2020Tom Rini2020-04-163-8/+98
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-efi Pull request for UEFI sub-system for efi-2020-07-rc1 This pull request * provides an implementation of UEFI secure booting * fixes a problem with the rsa_mod_exp driver which stops some boards from booting when CONFIG_RSA is enabled which is needed for UEFI secure booting * enables the EFI_RNG_PROTOCOL if DM_RNG is enabled * fixes some function comments
| * cmd: efidebug: add "test bootmgr" sub-commandAKASHI Takahiro2020-04-161-1/+77
| | | | | | | | | | | | | | | | | | | | | | This sub-command will be used to test image authentication, in particular, a case where efi_load_image() failed with EFI_SECURITY_VIOLATION but we still want to try efi_start_image(). We won't run such a case under normal bootmgr because it simply refuses to call efi_start_image() if anything but EFI_SUCCESS is returned when loading an image. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
| * cmd: env: add "-at" option to "env set -e" commandAKASHI Takahiro2020-04-162-3/+7
| | | | | | | | | | | | | | With "-at" option, EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS will be passed to SetVariable() to authenticate the variable. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
| * cmd: env: use appropriate guid for authenticated UEFI variableAKASHI Takahiro2020-04-161-4/+14
| | | | | | | | | | | | | | | | A signature database variable is associated with a specific guid. For convenience, if user doesn't supply any guid info, "env set|print -e" should complement it. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
* | fdt: Fix 'system' commandTom Warren2020-04-161-1/+1
|/ | | | | | | | | | 'fdt systemsetup' wasn't working, due to the fact that the 'set' command was being parsed in do_fdt() by only testing for the leading 's' instead of "se", which kept the "sys" test further down from executing. Changed to test for "se" instead, now 'fdt systemsetup' works (to test the ft_system_setup proc w/o having to boot a kernel). Signed-off-by: Tom Warren <twarren@nvidia.com>
* Merge branch 'next'Tom Rini2020-04-132-229/+1
|\ | | | | | | | | | | | | | | | | | | | | Pull in changes that have been pending in our 'next' branch. This includes: - A large number of CI improvements including moving to gcc-9.2 for all platforms. - amlogic, xilinx, stm32, TI SoC updates - USB and i2c subsystem updtaes - Re-sync Kbuild/etc logic with v4.19 of the Linux kernel. - RSA key handling improvements
| * Merge tag 'xilinx-for-v2020.07' of ↵WIP/07Apr2020-nextTom Rini2020-04-073-6/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2020.07 common: - Align ENV_FAT_INTERFACE - Fix MAC address source print log - Improve based autodetection code xilinx: - Enable netconsole Microblaze: - Setup default ENV_OFFSET/ENV_SECT_SIZE Zynq: - Multiple DT updates/fixes - Use DEVICE_TREE environment variable for DTB selection - Switch to single zynq configuration - Enable NOR flash via DM - Minor SPL print removal - Enable i2c mux driver ZynqMP: - Print multiboot register - Enable cache commands in mini mtest - Multiple DT updates/fixes - Fix firmware probing when driver is not enabled - Specify 3rd backup RAM boot mode in SPL - Add SPL support for zcu102 v1.1 and zcu111 revA - Redesign debug uart enabling and psu_init delay - Enable full u-boot run from EL3 - Enable u-boot.itb generation without ATF with U-Boot in EL3 Versal: - Enable distro default - Enable others SPI flashes - Enable systems without DDR Drivers: - Gem: - Flush memory after freeing - Handle mdio bus separately - Watchdog: - Get rid of unused global data pointer - Enable window watchdog timer - Serial: - Change reinitialization logic in zynq serial driver Signed-off-by: Tom Rini <trini@konsulko.com>
| * \ Merge branch 'next' of git://git.denx.de/u-boot-usb into nextWIP/31Mar2020-nextTom Rini2020-03-313-18/+51
| |\ \
| * \ \ Merge tag 'ti-v2020.07-next' of ↵WIP/17Mar2020Tom Rini2020-03-172-229/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://gitlab.denx.de/u-boot/custodians/u-boot-ti into next K3 J721E: * OSPI boot support * Support for loading remote cores in R5 SPL * PMIC ESM Support * Minor fixes for R5F and C7x remoteproc drivers K3 AM654: * Update AVS class 0 voltages. * Add I2C nodes DRA7xx/AM57xx: * Fixed Android boot on AM57xx AM33/AM43/Davinci: * switch to driver model for the net and mdio driver for baltos * Add DM/DTS support for omap video driver * Enable fastboot on am335x-evm
| | * | | lib: elf: Move the generic elf loading/validating functions to libKeerthy2020-03-032-229/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the generic elf loading/validating functions to lib/ so that they can be re-used and accessed by code existing outside cmd. While at it remove the duplicate static version of load_elf_image_phdr under arch/arm/mach-imx/imx_bootaux.c. Signed-off-by: Keerthy <j-keerthy@ti.com> Suggested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
* | | | | cmd: Add test and fix bugs for dm driversSean Anderson2020-04-091-2/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a test for the dm drivers command. Also fix a null pointer dereference revealed by said test. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | | Merge branch '2020-03-31-master-imports'WIP/31Mar2020Tom Rini2020-03-311-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | - mpc8xxx GPIO, SPI bugfixes - Add VxWorks to FIT images - macb ethernet driver bugfix
| * | | | cmd: mmc: fix typo 'a EMMC'Heinrich Schuchardt2020-03-311-2/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | %s/a EMMC/an eMMC/g Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
* | | | efi_loader: only reserve memory if fdt node enabledHeinrich Schuchardt2020-03-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sub-nodes of /reserved-memory may be disabled. In this case we should not reserve memory in the memory map. Reported-by: Patrick DELAUNAY <patrick.delaunay@st.com> Fixes: fef907b2e440 ("efi_loader: create reservations after ft_board_setup") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Atish Patra <atish.patra@wdc.com>