summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-01-16menu: Factor out menu-keypress decodingSimon Glass
Move this code into a separate function so that it can be used in the new VBE menu. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootstd: Allow reading a logo for the OSSimon Glass
Some operating systems provide a logo in bmp format. Read this in if present so it can be displayed in the menu. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootstd: Read the Operating System name for distro/scriptsSimon Glass
Add the concept of an OS name to the bootflow. This typically includes the OS name, version and kernel version. Implement this for the distro and script bootmeths so that it works with Armbian and older version of Fedora. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16video: Add font functions to the vidconsole APISimon Glass
Support for fonts currently depends on the type of vidconsole in use. Add two new methods to enumerate fonts and to set the font. Fix a few other method comments while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16video: Fix unchnaged typoSimon Glass
Fix this typo in the header file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-01-16video: truetype: Rename the metrics functionSimon Glass
This should really have a 'truetype' prefix. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16video: Enable VIDEO_ANSI by default only with EFISimon Glass
This is not generally needed unless EFI_LOADER is used. Adjust the default setting to reduce the size of the U-Boot build. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16image: Move common image code to image_board and commandSimon Glass
We should use the cmd/ directory for commands rather than for common code used elsewhere in U-Boot. Move the common 'source' code into image-board.c to achieve this. The image_source_script() function needs to call run_command_list() so seems to belong better in the command library. Move and rename it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16image: Add a function to find a script in an imageSimon Glass
Split this functionality out of the 'source' command so it can be used from another place. For now leave it where it is, but a future patch will move it out of cmd/ Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Make use of CLI character processingSimon Glass
Avoid duplicating some of the escape-sequence processing here and use the CLI function instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Use a switch statementSimon Glass
Convert the long line of if() statements to a switch() since this makes better use of the C language. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Update bootmenu_loop() to return the codeSimon Glass
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Update bootmenu_autoboot_loop() to return the codeSimon Glass
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16menu: Rename KEY_... to BKEY_...Simon Glass
This enum values conflict with linux/input.h so rename them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16bootmenu: Add a few commentsSimon Glass
The behaviour of these two functions is completely undocumented. Add some notes so the poor, suffering dev can figure out what is going on. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16cli: Move readline character-processing to a state machineSimon Glass
The current cread_line() function is very long. It handles the escape processing inline. The menu command does similar processing but at the character level, so there is some duplication. Split the character processing into a new function cli_ch_process() which processes individual characters and returns the resulting input character, taking account of escape sequences. It requires the caller to set up and maintain its state. Update cread_line() to use this new function. The only intended functional change is that an invalid escape sequence does not add invalid/control characters into the input buffer, but instead discards these. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-16sandbox: Enable mmc command and legacy imagesSimon Glass
The mmc command is useful for testing mmc disk images in sandbox, so enable it. We also need to enable legacy images so that we can run tests which use them. Disable it for a few avb tests since MMC is not implemented there yet. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-01-15Merge https://source.denx.de/u-boot/custodians/u-boot-shTom Rini
2023-01-15Merge https://source.denx.de/u-boot/custodians/u-boot-usbTom Rini
2023-01-14usb: gadget: dwc2_udc_otg: implement pullup()Mattijs Korpershoek
Pullup is used by the usb framework in order to do software-controlled usb_gadget_connect() and usb_gadget_disconnect(). Implement pullup() for dwc2 using the SOFT_DISCONNECT bit in the dctl register: * when pullup is on, clear SOFT_DISCONNECT * when pullup is off, set SOFT_DISCONNECT This is especially useful when a gadget disconnection is initiated but no board_usb_cleanup() is called. Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2023-01-14usb: gadget: fastboot: detach usb just before rebootingDario Binacchi
The patch fixes the following error when updating a BSH SMM S2 board: 3:72>Start Cmd:FB[-t 8000]: ucmd nand write ${loadaddr} nanddtb ${filesize} 3:72>Okay (0.023s) 3:72>Start Cmd:FB: reboot 3:72>Fail Bulk(R):LIBUSB_ERROR_IO(0s) The "fastboot reboot" command detaches the USB when it still needs to be used. So let's detach the USB just before the reset. CC: Mattijs Korpershoek <mkorpershoek@baylibre.com> Fixes: 5f7e01e9d5d800 ("usb: gadget: fastboot: detach usb on reboot commands") Suggested-by: Michael Trimarchi <michael@amarulasolutions.com> Co-developed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2023-01-14usb: hub: allow to increase HUB_DEBOUNCE_TIMEOUTPatrick Delaunay
Add a new CONFIG_USB_HUB_DEBOUNCE_TIMEOUT to increase the HUB_DEBOUNCE_TIMEOUT value, for example to 2s because some usb device needs around 1.5s or more to make the hub port status to be connected steadily after being powered off and powered on. This 2s value is aligned with Linux driver and avoids to configure "usb_pgood_delay" as a workaround for connection timeout on some USB device; normally the env variable "usb_pgood_delay" is used to delay the first query after power ON and thus the device answer, but this variable not used to increase the connection timeout delay. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-14configs: r8a77980: Condor: Enable MMC support by defaultAndrey Dolnikov
This enables MMC support, which is available on Condor board, by default. Signed-off-by: Andrey Dolnikov <andrey.dolnikov@cogentembedded.com> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
2023-01-14ARM: renesas: condor: switch eMMC bus to 1V8Hai Pham
The eMMC card has two supplies, VCC and VCCQ. The VCC supplies the NAND array and the VCCQ supplies the bus. On Condor, the VCC is connected to 3.3V rail, while the VCCQ is connected to 1.8V rail. Adjust the pinmux to match the bus, which is always operating in 1.8V mode. Based on Linux commit 69efe4bbeda50745 ("arm64: dts: renesas: condor: Switch eMMC bus to 1V8") from Wolfram Sang Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
2023-01-14ARM: dts: renesas: condor: Enable SPI NOR fast-readMarek Vasut
This board requires SPI NOR fast-read, otherwise the SPI NOR access returns corrupted data. Enable the fast-read explicitly in DT as it has been disabled in the MTD subsystem by commit d008190920 ("mtd: spi-nor: Mask out fast read if not requested in DT") Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: ulcb: Set CONFIG_TEXT_BASE=0x0 on R-Car Gen3 ULCBMarek Vasut
Since R-Car Gen3 already enables position independent build, also set CONFIG_TEXT_BASE=0x0 to finalize the switch. This is possible since 534f0fbd65 ("arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=y") fixed current env_get_char() crash with CONFIG_TEXT_BASE=0x0 . This change permits us to start U-Boot from any location in DRAM instead of specific TEXT_BASE. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: condor: Set CONFIG_TEXT_BASE=0x0 on R-Car Gen3 CondorMarek Vasut
Since R-Car Gen3 already enables position independent build, also set CONFIG_TEXT_BASE=0x0 to finalize the switch. This is possible since 534f0fbd65 ("arm64: Fix relocation of env_addr if POSITION_INDEPENDENT=y") fixed current env_get_char() crash with CONFIG_TEXT_BASE=0x0 . This change permits us to start U-Boot from any location in DRAM instead of specific TEXT_BASE. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 FalconMarek Vasut
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 30 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 DraakMarek Vasut
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 29 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 EbisuMarek Vasut
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 34 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 CondorMarek Vasut
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 32 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 EagleMarek Vasut
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 32 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-14ARM: renesas: Enable LTO on R-Car3 ULCBMarek Vasut
Enable LTO (link time optimization) to improve optimization and reduce code size by cca. 31 kiB. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
2023-01-13Merge tag 'u-boot-stm32-20230113' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-stm Add driver to manage onboard hub supplies Add calibration support for stm32-adc Linux kernel v6.1 DT synchronization for stm32mp151.dtsi stm32mp157a-dk1-scmi-u-boot.dtsi update Add support of OP-TEE and STM32MP13x in bsec driver ECDSA various fixes for stm32mp
2023-01-13Merge tag 'efi-2023-04-rc1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc1 Documentation: * build infodocs target on Gitlab CI, Azure UEFI: * fix function descriptions * add .rela sections to .text on arm64 * use EFI_EXIT in efi_riscv_get_boot_hartid * improve specification conformance of set_keyboard_layout()
2023-01-13ARM: stm32: Make ECDSA authentication available to U-BootMarek Vasut
With U-Boot having access to ROM API call table, it is possible to use the ROM API call it authenticate e.g. signed kernel fitImages using the BootROM ECDSA support. Make this available by pulling the ECDSA BootROM call support from SPL-only guard. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-13ARM: stm32: Pass ROM API table pointer to U-Boot properMarek Vasut
The ROM API table pointer is no longer accessible from U-Boot, fix this by passing the ROM API pointer through. This makes it possible for U-Boot to call ROM API functions to authenticate payload like signed fitImages. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-13ARM: stm32: Factor out save_boot_paramsMarek Vasut
The STM32MP15xx platform currently comes with two incompatible implementations of save_boot_params() weak function override. Factor the save_boot_params() implementation into common cpu.c code and provide accessors to read out both ROM API table address and DT address from any place in the code instead. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-13ARM: stm32: Fix ECDSA authentication with Dcache enabledMarek Vasut
In case Dcache is enabled while the ECDSA authentication function is called via BootROM ROM API, the MMU tables are set up and the BootROM region is not marked as executable, so an attempt to run code from it results in a hang. Mark the BootROM region as executable as suggested by Patrick to prevent the hang. Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-13efi_loader: provide agent_handle to efi_disk_add_dev()Heinrich Schuchardt
In efi_disk_add_dev() we have to open protocols with BY_DRIVER and BY_CHILD_CONTROLLER. Provide the handle of the EFI block driver. The actual usage of the value will follow in a later patch. Change function descriptions to Sphinx style. Remove a TODO: tag. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-13efi_selftest: add hii set keyboard layout test caseVincent Stehlé
Add a test for the case when the HII database protocol set_keyboard_layout() function is called with a NULL key_guid argument. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-13efi_loader: refine set_keyboard_layout() statusVincent Stehlé
As per the EFI specification, the HII database protocol function set_keyboard_layout() must return EFI_INVALID_PARAMETER when it is called with a NULL key_guid argument. Modify the function accordingly to improve conformance. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-13efi_loader: use EFI_EXIT in efi_riscv_get_boot_hartidHeinrich Schuchardt
After calling EFI_ENTRY we have to call EFI_EXIT before returning. Add a missing EFI_EXIT(). Fixes: 1ccf87165e38 ("efi_loader: Enable RISCV_EFI_BOOT_PROTOCOL support") Reported-by: Dave Jones <dave.jones@canonical.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
2023-01-13efi_loader: add .rela sections to .text on arm64Heinrich Schuchardt
_relocate() needs the information in .rela* for self relocation of the EFI binary. Fixes: d7ddeb66a6ce ("efi_loader: fix building aarch64 EFI binaries") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-13efi_loader: fix description of memory functionsHeinrich Schuchardt
* Add missing function descriptions * Adjust to Sphinx style Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-13doc: build infodocs target on Gitlab CI, AzureHeinrich Schuchardt
Add infodocs target to CI testing. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-13doc: fix description of u16_strcasecmp()Heinrich Schuchardt
Remove non-existent parameter 'n' from function description. Fixes: 7a9b366cd9b7 ("lib: add function u16_strcasecmp()") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-12Merge branch '2023-01-12-further-assorted-general-updates'Tom Rini
- Bring in a number of assorted updates, some of which have been waiting around for a bit. Make silent console really be silent, get rid of gpio_hog_probe_all, add RNG for imx6, make net/fm use fs_loader, get rid of a bad __weak usage and set distro_bootpart_uuid in another case.
2023-01-12gpio: Get rid of gpio_hog_probe_all()Marek Vasut
The gpio_hog_probe_all() functionality can be perfectly well replaced by DM_FLAG_PROBE_AFTER_BIND DM flag, which would trigger .probe() callback of each GPIO hog driver instance after .bind() and thus configure the hogged GPIO accordingly. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Samuel Holland <samuel@sholland.org>
2023-01-12dm: fix probing of all devices that have u-boot, dm-pre-reloc in SPL/TPLQuentin Schulz
Currently, dm_probe_devices checks that the flags of the device contains DM_FLAG_PRE_RELOC. However DM_FLAG_PRE_RELOC is a driver - and not a device - flag. This means that the check in pre_reloc_only mode would always fail. Instead, what was aimed to be checked is that either the driver of the device has the flag set, or that the device has the u-boot,dm-pre-reloc Device Tree property set. So let's fix the check to allow u-boot,dm-pre-reloc devices to be probed. Cc: Quentin Schulz <foss+uboot@0leil.net> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>