summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-12-04efi_loader: efi_net: add EFI_HTTP_PROTOCOLAdriano Cordova
Add an EFI HTTP driver. This commit implements the EFI_HTTP_PROTOCOL and the EFI_HTTP_SERVICE_BINDING_PROTOCOL. The latter is attached to the handle of th efi network device. This is the same handle where snp, pxe, and ipconfig are attached to. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-12-04efi_loader: efi_net: add EFI_IP4_CONFIG2_PROTOCOLAdriano Cordova
Add an implementation of the EFI_IP4_CONFIG2_PROTOCOL. The protocol is attached to the handle of the efi network device. This is the same handle where snp and pxe are attached to. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-12-04efi_loader: net: add support to send http requests and parse http headersAdriano Cordova
Add network-stack agnostic way to send an http request and parse http headers from efi drivers. This uses wget as a backend and communicates with it via efi_wget_info. The function efi_net_do_request allocates a buffer on behalf of an efi application using efi_alloc and passes it to wget to receive the data. If the method is GET and the buffer is too small, it re-allocates the buffer based on the last received Content-Length header and tries again. If the method is HEAD it just issues one request. So issuing a HEAD request (to update Content-Length) and then a GET request is preferred but not required. The function efi_net_parse_headers parses a raw buffer containing an http header into an array of EFI specific 'http_header' structs. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-12-04efi_loader: net: set EFI bootdevice device path to HTTP when loaded from wgetAdriano Cordova
Set the device path of the efi boot device to an HTTP device path (as formed by efi_dp_from_http) when the next boot stage is loaded using wget (i.e., when wget is used with wget_info.set_bootdev=1). When loaded from HTTP, the device path should account for it so that the next boot stage is aware (e.g. grub only loads its http stack if it itself was loaded from http, and it checks this from its device path). Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-12-04efi_loader: device_path: add support for HTTP device pathAdriano Cordova
Add efi_dp_from_http to form a device path from HTTP. The device path is the concatenation of the device path returned by efi_dp_from_ipv4 together with an URI node and an END node. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-12-04efi_loader: efi_net: add efi_net_set_addr, efi_net_get_addrAdriano Cordova
Add the functions efi_net_set_addr and efi_net_get_addr to set and get the ip address from efi code in a network agnostic way. This could also go in net_common, or be compiled conditionally for each network stack. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-12-04efi_api: add definitions for HTTP and IP4_CONFIG2 protocolsAdriano Cordova
Add EFI definitions for EFI_IP4_CONFIG2_PROTOCOL, EFI_HTTP_SERVICE_BINDING_PROTOCOL, and EFI_HTTP_PROTOCOL. According to UEFI spec 2.10. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-12-04efi_loader: add IPv4() to device path to text protocolHeinrich Schuchardt
Implement Ipv4() node support in the device path to text protocol. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-12-04efi_loader: device_path: add efi_dp_from_ipv4Adriano Cordova
Add efi_dp_from_ipv4 to form a device path from an ipv4 address. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-12-04efi_loader: device_path: add definition of DEVICE_PATH_SUB_TYPE_MSG_IPV4Adriano Cordova
Add definition for DEVICE_PATH_SUB_TYPE_MSG_IPV4 device path subtype. Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-12-04net: wget: let wget_with_dns work with dns disabledAdriano Cordova
This was marked as TODO in the code: - Enable use of wget_with_dns even if CMD_DNS is disabled if the given uri has the ip address for the http server. - Move the check for CMD_DNS inside wget_with_dns. - Rename wget_with_dns to wget_do_request Signed-off-by: Adriano Cordova <adrianox@gmail.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2024-12-04net-lwip: zero terminate string with headers in wget_lwip_fill_info()Adriano Cordova
This patch comes as a companion to the same patch but for the legacy net stack. Commit 1327c2a8d6 ("net/lwip: wget: integrate struct wget_info into wget code") introduced function wget_fill_info() which retrieves the headers from the HTTP server response. As we want to parse the string in later patches we need to ensure that it is NUL terminated. We must further check that wget_info->headers in not NULL. Otherwise a crash occurs. Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-12-04net: zero terminate string with headers in wget_fill_info()Heinrich Schuchardt
Commit 2dd076a9c1b4 ("net: wget: integrate struct wget_info into legacy wget code") introduced function wget_fill_info() which retrieves the headers from the HTTP server response. As we want to parse the string in later patches we need to ensure that it is NUL terminated. We must further check that wget_info->headers in not NULL. Otherwise a crash occurs. Fixes: 2dd076a9c1b4 ("net: wget: integrate struct wget_info into legacy wget code") Signed-off-by: Adriano Cordova <adrianox@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-12-04lwip: wget: pass port and server_name via wget_ctxAdriano Cordova
Commit 5907c81 ("net: lwip: Enable https:// support for wget") was not correctly rebased on top of the changes introduced by Commit 6cc4d04 ("net/lwip: wget: put server_name and port into wget_ctx") in next. This commit re-applies a couple of lines from 6cc4d04. Fixes: Commit 5907c81 ("net: lwip: Enable https:// support for wget") Signed-off-by: Adriano Cordova <adrianox@gmail.com>
2024-12-03Merge tag 'xilinx-for-v2025.04-rc1' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze into next AMD/Xilinx changes for v2025.04-rc1 binman: - Separate binman description from main DT zynqmp: - Enable binman for ZynqMP platforms - DT sync with Linux v6.12 - Update usb5744 hub for SOMs common: - Drop SPL_FIT_GENERATOR support versal2 - Enable OPTEE layers ospi: - Refactor the flash reset functionality pytest: - Fix tcminit mode handling
2024-12-03Merge patch series "CI: Set up for an arm64 runner"Tom Rini
Tom Rini <trini@konsulko.com> says: Hey all, This is picking up Simon's v5 of the above-named series and making a few more changes so that the follow-up series I have leads to arm64 being supported for almost all jobs. To quote Simon's cover letter: All gitlab runners are currently amd64 machines. This series attempts to create a docker image which can also support arm64 so that sandbox tests can be run on it. The TARGET_... environment variables for grub could perhaps be adjusted, using the new variables, but I have not done that for now. Adding to what Simon said, we now build grub for all architectures as the reason to install it was to be able to use the binaries in QEMU. That won't provide us with amd64 binaries on arm64 hosts so we can't use that shortcut anymore. Link: https://lore.kernel.org/r/20241127172247.1488685-1-trini@konsulko.com
2024-12-02CI: Add platform variableSimon Glass
Add a list of possible platforms that can be used by gitlab runners. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-12-02docker: Install toolchains on arm64 hostSimon Glass
Refactor the code to support downloading toolchains for arm64 as well as x86_64 There doesn't seem to be an xtensa toolchain for arm64 at the same location, so download that only on x86 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-02docker: Fix LegacyKeyValueFormat warning with PYTHONPATHSimon Glass
Fix a warning due to the syntax used for PYTHONPATH: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 304) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-02docker: Adjust installed packages slightlySimon Glass
We no longer need to install libc6-i386 so we can drop that. Switch to installing linux-image-generic as that will be available on all hosts, to provide the /boot/vmlinu* file that's requires for various tools. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-02docker: Support building for multiple architecturesSimon Glass
Add instructions on how to build the file for multiple architectures. Add a message indicating what is happening. Update the documentation as well. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2024-12-02docker: Use cache mounts for aptTom Rini
Instead of deleting /var/lib/apt/lists after each relevant RUN line, use a cache mount as is the current best practices. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02docker: Build grub for all architecturesTom Rini
For consistency now, and future ease of testing with non-amd64 hosts, build grub for all architectures rather than relying on host binaries for i386/x86_64. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02docker: Update to grub-2.12Tom Rini
The current release of grub is 2.12 and it will be good to pick this up now so that we can update other parts of our stack. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02docker: Use "make -j$(nproc)" when invoking makeTom Rini
We had a few places that were not using "make -j$(nproc)" but instead just plain "make" and so slowing down the overall build. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02docker: Add kernel.org x86_64 toolchainTom Rini
Add in the x86_64 toolchain, but do not enforce using it for sandbox. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-02test: Adjust print_ut test to use unsigned charSimon Glass
Since char is unsigned on arm64, this test currently fails. It seems better to use unsigned anyway, since 0xff is written into the string at the start. Update the terminator-assert to use a character instead of a byte. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Changes in v6: - Re-introduce Changes in v2: - Use '\0' instead of 0 test/print_ut.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
2024-12-02sandbox: efi_loader: Correct use of addresses as pointersSimon Glass
The cache-flush function is incorrect which causes a crash in the remoteproc tests with arm64. Fix both problems by using map_sysmem() to convert an address to a pointer and map_to_sysmem() to convert a pointer to an address. Also update the image-loader's cache-flushing logic. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 3286d223fd7 ("sandbox: implement invalidate_icache_all()") Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Changes in v6: - Re-introduce Changes in v2: - Drop message about EFI_LOADER arch/sandbox/cpu/cache.c | 8 +++++++- drivers/remoteproc/rproc-elf-loader.c | 18 +++++++++++------- lib/efi_loader/efi_image_loader.c | 3 ++- 3 files changed, 20 insertions(+), 9 deletions(-) Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-11-29test: add command to 'Boot fail' messageHeinrich Schuchardt
When a timeout occurs while executing a command a 'Boot fail' message is written and testing is stopped. The user is left in the dark about the failure cause. ! _pytest.outcomes.Exit: Boot fail: Marking connection bad - no other tests will run ! Add the executed command to the message. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-11-29test: add command to 'Lab failure' timeout messageHeinrich Schuchardt
When a timeout occurs while executing a command a 'Lab failure' message is written and testing is stopped. The user is left in the dark about the failure cause. ! _pytest.outcomes.Exit: Lab failure: Marking connection bad - no other tests will run ! Add the word 'Timeout' and the executed command to the message. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-11-29cmd: add a fetch utilityCaleb Connolly
Add a small utility for displaying some information about U-Boot and the hardware it's running on in a similar fashion to the popular neofetch tool for Linux [1]. While the output is meant to be useful, it should also be pleasing to look at and perhaps entertaining. The ufetch command aims to bring this to U-Boot, featuring a colorful ASCII art version of the U-Boot logo. [1]: https://en.wikipedia.org/wiki/Neofetch Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # vim3 Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8560-QRD Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Tony Dinh <mibodhi@gmail.com> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-11-29Merge patch series "test: Avoid needing sudo for image-creation"Tom Rini
Simon Glass <sjg@chromium.org> says: This series rebases and tidies up a series sent by Richard Weinberger to use unprivileged code to build the test images. Link: https://patchwork.ozlabs.org/project/uboot/list/?series=417786&state=* Link: https://lore.kernel.org/r/20241121223217.330117-1-sjg@chromium.org Signed-off-by: Tom Rini <trini@konsulko.com>
2024-11-29bootstd: Remove prepared imagesSimon Glass
These are no-longer used. Drop them. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-29test_ut: Drop support for fallback filesSimon Glass
We don't need the fallback anymore. Remove the code which uses these files. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Richard Weinberger <richard@nod.at>
2024-11-29test_ut: Use the built mkimageSimon Glass
The mkimage tool is not present in the docker image. Use the one in the build directory. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-29test_ut: Drop exeception handlingSimon Glass
We don't need the fallback anymore. As a first step to removing it, drop the try...except clauses and unindent the code. This produces a large diff but there are no other code changes. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-29test_ut: Allow running unprivilegedRichard Weinberger
Like for test_fs, no need to mess with loop mounts. Tweaks to reduce diff (keep mnt variable): Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-29test_ut: Add an image size to setup_image()Simon Glass
Add a parameter to indicate the size of the image to build. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Richard Weinberger <richard@nod.at>
2024-11-29test_fs: Rename mount dir to scratchRichard Weinberger
Since no mounting happens anymore, rename the "mnt" directory to "scratch" and the related variables. Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2024-11-29test_fs: Allow running unprivilegedRichard Weinberger
There is no need to mount the filesystem on the host side. All filesystem tools offer some way to fill the fs without mounting. So, create the content on the host side, create and fill the fs without mounting. No more sudo or guestmount needed. This new approach works because the tests don't care about user IDs and no device files are needed. If user IDs start to matter it's still possible to use wrapper tools like fakeroot in future while filling the fs. Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-11-29Merge tag 'u-boot-at91-2025.04-a' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-at91 into next - at91 gpio driver function alternate mode for pins - assorted fixes.
2024-11-29arm64: zynqmp: Update the usb5744 hub node as per bindingVenkatesh Yadav Abbarapu
Updating the usb5744 hub node as per the latest upstream DT binding https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ tree/Documentation/devicetree/bindings/usb/microchip,usb5744.yaml?h=v6.8.8 Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Acked-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20241129110631.672637-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-11-29arm64: zynqmp: Sync with v6.12 kernelMichal Simek
Sync zynqmp* DTS files with v6.12 Linux kernel. Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/cf37760117765c4cece94736dc2a7b583d5987de.1732805351.git.michal.simek@amd.com
2024-11-29test/py: zynqmp_rpu: Fix tcminit mode valueLove Kumar
Update the tcminit value to string and number both as per commit 342ccba5586a ("arm64: zynqmp: Fix tcminit mode value based on argv") and also adds negative cases based on invalid command sequences. Signed-off-by: Love Kumar <love.kumar@amd.com> Link: https://lore.kernel.org/r/48f75577f6735a0d14105658e89b625d45537bb1.1731672024.git.love.kumar@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-11-29cadence_qspi: Refactor the flash reset functionalityVenkatesh Yadav Abbarapu
As the flash reset is handled in spi nor core, removing the flash reset functionality. As the configuration like tristate and hysterisis need to be enabled by the cdo. Handle the flash reset only for mini u-boot case. Rename the "cadence_qspi_versal_flash_reset" to generic name "cadence_qspi_flash_reset" as this can be used by other platforms as well. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20241108063537.13180-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-11-29configs: versal2: Enable OPTEE supportVenkatesh Yadav Abbarapu
Add OPTEE support for versal2 platform. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Link: https://lore.kernel.org/r/20241127043745.249580-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-11-29configs: zynqmp_kria: Enable the USB onboard hubVenkatesh Yadav Abbarapu
USB host support on ZYNQMP KRIA SOM needs onboard USB hub driver for handling reset GPIO and for i2c initialization sequence. Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> Acked-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20241126041238.1969723-1-venkatesh.abbarapu@amd.com Signed-off-by: Michal Simek <michal.simek@amd.com>
2024-11-29mtd: nand: raw: atmel: Remove redundant PMECC probeAlexander Dahl
Always probing pmecc in the generic nand controller probe function and bailing out if pmecc is missing, prevents the driver to be usable for SoCs which do not have a pmecc hardware ecc engine like older sam9 SoCs, for example at91sam9g20. Tested on sam9x60 that the call, which the comment was moved to, is sufficient to probe the pmecc. Signed-off-by: Alexander Dahl <ada@thorsis.com>
2024-11-29gpio: at91: Implement ops get_flagsZixun LI
Add ops get_dir_flags() to read status from GPIO registers. Signed-off-by: Zixun LI <admin@hifiphile.com>
2024-11-29gpio: at91: Implement ops set_flagsZixun LI
Support GPIO configuration with following flags: - in, out, out_active - open_drain, pull_up Signed-off-by: Zixun LI <admin@hifiphile.com>