summaryrefslogtreecommitdiff
path: root/cmd
AgeCommit message (Collapse)AuthorFilesLines
2024-09-21cmd/efidebug: fix some function descriptionsHeinrich Schuchardt1-2/+2
The function name must match the name used in the description. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-09-10cmd: add rdcycle test to RISC-V exception commandHeinrich Schuchardt1-2/+13
Some versions of KVM don't allow access to the cycle CSR. Provide a command 'exception rdcycle' for testing. If the cycle CSR is accessible, we get an output like: => exception rdcycle cycle = 0x41f7563de If the cycle CSR is not accessible, we get an output like: => exception rdcycle Unhandled exception: Illegal instruction Put subcommands into alphabetical order in long help. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-08-22cmd: bcb: Fix segfault on invalid block deviceMattijs Korpershoek1-2/+2
When blk_get_dev() fails, block NULL and gets de-referenced in the error path by a printf(), resulting in a crash. This can be reproduced on sandbox with: $ ./u-boot --command "bcb load mmc 0 0" Fix the message by using the functions arguments (iface, devnum) instead. Note: partition (being a global static initialized) can be used safely. This issue has been reported by coverity [1] [1] https://lore.kernel.org/all/20240723141844.GF989285@bill-the-cat/ Fixes: dfeb4f0d7935 ("cmd: bcb: extend BCB C API to allow read/write the fields") Reviewed-by: Dmitrii Merkurev <dimorinny@google.com> Link: https://lore.kernel.org/r/20240724-bcb-crash-v1-1-44caff15bce4@baylibre.com Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-08-08ubi: allow to write to volume with offsetAlexey Romanov1-3/+69
Introduce ubi_volume_offset_write() helper, which allow to write to ubi volume with specified offset. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-08ubi: allow to read from volume with offsetAlexey Romanov1-3/+3
Now user can pass an additional parameter 'offset' to ubi_volume_read() function. Signed-off-by: Alexey Romanov <avromanov@salutedevices.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2024-08-02cmd: cpu: add release subcommandHou Zhiqiang1-2/+42
Add a new subcommand 'release' to bring up a core to run baremetal and RTOS applications. For example on i.MX8M Plus EVK, release the LAST core to run a RTOS application, passing the sequence number of the CPU core to release, here it is 3: u-boot=> cpu list 0: cpu@0 NXP i.MX8MP Rev1.1 A53 at 1200 MHz at 31C 1: cpu@1 NXP i.MX8MP Rev1.1 A53 at 1200 MHz at 30C 2: cpu@2 NXP i.MX8MP Rev1.1 A53 at 1200 MHz at 31C 3: cpu@3 NXP i.MX8MP Rev1.1 A53 at 1200 MHz at 31C u-boot=> load mmc 1:2 c0000000 /hello_world.bin 66008 bytes read in 5 ms (12.6 MiB/s) u-boot=> dcache flush; icache flush u-boot=> cpu release 3 c0000000 Released CPU core (mpidr: 0x3) to address 0xc0000000 Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-30Merge patch series "led: implement software blinking"Tom Rini1-8/+0
Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> says: v2 changes: * Drop sw_blink_state structure, move its necessary fields to led_uc_plat structure. * Add cyclic_info pointer to led_uc_plat structure. This simplify code a lot. * Remove cyclic function search logic. Not needed anymore. * Fix blinking period. It was twice large. * Other cleanups. v3 changes: * Adapt code to recent cyclic function changes * Move software blinking functions to separate file * Other small changes v4 changes: * Refactoring of led_set_period() function v5 changes * Fix compilation if CONFIG_LED_BLINK is not defined v6 changes: * Enable LEDST_BLINK state unconditionally. * Function led_set_period() becomes available when CONFIG_LED_BLINK is disabled. This makes led code simpler. * Software blinking requires about 100 bytes of data for a led. It's not a good idea to allocate so much memory for each supported led. Change the code to allocate blinking data only for required leds.
2024-07-30led: enable LEDST_BLINK state unconditionallyMikhail Kshevetskiy1-8/+0
Changes: * enable LEDST_BLINK state unconditionally * function led_set_period() becomes available when CONFIG_LED_BLINK is disabled. This makes led code simpler. * fix cmd/led.c to work properly when LEDST_BLINK present, but CONFIG_LED_BLINK is disabled Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-19cmd: move CMD_DHCP6 options beneath CMD_DHCP6Heinrich Schuchardt1-17/+17
All Kconfig options that depend on CONFIG_CMD_DHCP6 should immediately follow it. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-07-19cmd: correct ELF-related commands dependenciesMaxim Moskalets1-3/+2
Enable BOOTM_ELF by default for all configs with LIB_ELF selected. Use OF_LIBFDT as dependency for CMD_ELF_FDT_SETUP. Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
2024-07-19bootstash: Do not provide a default address for allTom Rini1-1/+7
A valid memory location to stash bootstage information at will be architecture dependent. Move the existing defaults to the main Kconfig file for this option and set 0x0 as the default only for sandbox. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-07-18Merge patch series "bootstd: Add Android support"Tom Rini1-0/+10
Mattijs Korpershoek <mkorpershoek@baylibre.com> says: Android boot flow is a bit different than a regular Linux distro. Android relies on multiple partitions in order to boot. A typical boot flow would be: 1. Parse the Bootloader Control Block (BCB, misc partition) 2. If BCB requested bootonce-bootloader, start fastboot and wait. 3. If BCB requested recovery or normal android, run the following: a. Get slot (A/B) from BCB b. Run AVB (Android Verified Boot) on boot partitions c. Load boot and vendor_boot partitions d. Load device-tree, ramdisk and boot The AOSP documentation has more details at [1], [2], [3] This has been implemented via complex boot scripts such as [4]. However, these boot script are neither very maintainable nor generic. Moreover, DISTRO_DEFAULTS is being deprecated [5]. Add a generic Android bootflow implementation for bootstd. For this initial version, only boot image v4 is supported. This has been tested on sandbox using: $ ./test/py/test.py --bd sandbox --build -k test_ut This has also been tested on the AM62X SK EVM using TI's Android SDK[6] To test on TI board, the following (WIP) patch is needed as well: https://gitlab.baylibre.com/baylibre/ti/ti-u-boot/-/commit/84cceb912bccd7cdd7f9dd69bca0e5d987a1fd04 [1] https://source.android.com/docs/core/architecture/bootloader [2] https://source.android.com/docs/core/architecture/partitions [3] https://source.android.com/docs/core/architecture/partitions/generic-boot [4] https://source.denx.de/u-boot/u-boot/-/blob/master/include/configs/meson64_android.h [5] https://lore.kernel.org/r/all/20230914165615.1058529-17-sjg@chromium.org/ [6] https://software-dl.ti.com/processor-sdk-android/esd/AM62X/09_02_00/docs/android/Overview.html
2024-07-18android: boot: Add set_abootimg_addr() and set_avendor_bootimg_addr()Mattijs Korpershoek1-0/+10
The only way to configure the load addresses for both bootimg and vendor_bootimg is by using the "abootimg" command. If we want to use the C API, there is no equivalent. Add set_abootimg_addr() and set_avendor_bootimg_addr() so that we can specify the load address from C. This can be useful for implementing an Android bootmethod. Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by: Julien Masson <jmasson@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Guillaume La Roque <glaroque@baylibre.com> Tested-by: Guillaume La Roque <glaroque@baylibre.com> Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-07-15cmd: Remove duplicate newlinesMarek Vasut23-44/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-10cmd: add resize for FDT in bootelfMaxim Moskalets1-0/+2
In some FDTs, there is not enough free memory to add nodes, so this operation fails. Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-10gpt: allow spaces in partition listMikhail Kshevetskiy1-0/+2
This allows spliting partition list to several lines in environment file ex: -------------------- gpt_partition_list= name=boot1,size=5MiB,start=0x100000; name=boot2,size=5MiB; name=rootfs1,size=70MiB; name=rootfs2,size=70MiB; name=overlay1,size=20MiB; name=overlay2,size=20MiB; name=art,size=4MiB; Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Tested-by: Sam Protsenko <semen.protsenko@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-05Fix Kconfig coding style from spaces to tabAnand Moon1-10/+10
Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Anand Moon <linux.amoon@gmail.com>
2024-07-05cmd: bootm: add ELF file supportMaxim Moskalets1-0/+7
Some operating systems (e.g. seL4) and embedded applications are ELF images. It is convenient to use FIT-images to implement trusted boot. Added "elf" image type for booting using bootm command. Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
2024-07-03Merge patch series "m68k: Implement a default flush_dcache_all"Tom Rini1-16/+2
Tom Rini <trini@konsulko.com> says: Prior to this series we had some de-facto required cache functions that were either unimplemented on some architectures or differently named. This would lead in some cases to having multiple "weak" functions available as well. Rework things so that an architecture must provide these functions and it is up to that architecture if a "weak" default function makes sense, or not.
2024-07-03cmd: cache: Remove weak functionsTom Rini1-16/+2
It should be up to an architecture to decide how to implement cache functions, and if they need to use weak functions or not. Allowing the cache command to be built without cache functionality implemented is unhelpful. Further, guard the call to noncached_set_region with CONFIG_SYS_NONCACHED_MEMORY as that's when it's implemented and again is an architecture specific detail. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-07-03Merge tag 'ubifixes-for-v2024-10-rc1' of ↵Tom Rini1-6/+15
https://source.denx.de/u-boot/custodians/u-boot-ubi ubi changes for v2024.10-rc1 fs: ubifs: Add support for ZSTD decompression from Piotr Wojtaszczyk Fixes for ubi command from Martin Kurbanov
2024-07-03sandbox: enable support for the unlz4 commandJonathan Liu1-1/+3
This does not work with sandbox at present. Fix it up to use map_sysmem() to convert an address to a pointer. Signed-off-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Fix conflict and reformat to 80cols: Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-03cmd: ubi: check 'updating' before calling ubi_more_update_data()Martin Kurbanov1-0/+9
If 0 is passed to the 'bytes' parameter in the ubi_start_update(), there is no need to call the ubi_more_update_data(). Otherwise, there will be a double-free of 'vol->upd_buf'. Also check that the ubi_start_update() was called before calling the ubi_more_update_data(). Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
2024-07-03cmd: ubi: remove redundant initializationsMartin Kurbanov1-6/+6
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
2024-06-30Merge tag 'efi-2024-10-rc1' of ↵Tom Rini2-1/+2
https://source.denx.de/u-boot/custodians/u-boot-efi into next Pull request efi-2024-10-rc1 Documentation: Update requirements.txt to use current Python module versions Add a page describing debugging U-Boot with GDB FIT: describe data-size as a conditionally mandatory property Correct link to FIT specification in SPL code. Correct kaslrseed command long text description UEFI: Add unit test checking that don't have kaslr-seed when measuring boot Deduplicate code for measured boot. Other: Print size information in fwu command
2024-06-30cmd: correct kaslrseed descriptionHeinrich Schuchardt1-1/+1
The number of random bytes generated is hard coded as 8. The command takes no argument. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-06-30cmd: fwu: Also print information about sizeMichal Simek1-0/+1
It is useful when structure is also used for saving vendor data covered by CRC32. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-06-28Merge patch series "automatically add /chosen/kaslr-seed and deduplicate code"Tom Rini1-42/+7
Tim Harvey <tharvey@gateworks.com> says: This series will automatically add /chosen/kaslr-seed to the dt if DM_RNG is enabled during the boot process. If RANDOMIZE_BASE is enabled in the Linux kernel instructing it to randomize the virtual address at which the kernel image is loaded, it expects entropy to be provided by the bootloader by populating /chosen/kaslr-seed with a 64-bit value from source of entropy at boot. If we have DM_RNG enabled populate this value automatically when fdt_chosen is called. We skip this if ARMV8_SEC_FIRMWARE_SUPPORT is enabled as its implementation uses a different source of entropy that is not yet implemented as DM_RNG. We also skip this if MEASURED_BOOT is enabled as in that case any modifications to the dt will cause measured boot to fail (although there are many other places the dt is altered). As this fdt node is added elsewhere create a library function and use it to deduplicate code. We will provide a parameter to overwrite the node if present. For our automatic injection, we will use the first rng device and not overwrite if already present with a non-zero value (which may have been populated by an earlier boot stage). This way if a board specific ft_board_setup() function wants to customize this behavior it can call fdt_kaslrseed with a rng device index of its choosing and set overwrite true. Note that the kalsrseed command (CMD_KASLRSEED) is likely pointless now but left in place in case boot scripts exist that rely on this command existing and returning success. An informational message is printed to alert users of this command that it is likely no longer needed. Note that the Kernel's EFI STUB only relies on EFI_RNG_PROTOCOL for randomization and completely ignores the kaslr-seed for its own randomness needs (i.e the randomization of the physical placement of the kernel). It gets weeded out from the DTB that gets handed over via efi_install_fdt() as it would also mess up the measured boot DTB TPM measurements as well.
2024-06-28use fdt_kaslrseed function to de-duplicate codeTim Harvey1-42/+7
Use the fdt_kaslrseed function to deduplicate code doing the same thing. Note that the kalsrseed command (CMD_KASLRSEED) is likely pointless now but left in place in case boot scripts exist that rely on this command existing and returning success. An informational message is printed to alert users of this command that it is likely no longer needed. Note that the Kernel's EFI STUB only relies on EFI_RNG_PROTOCOL for randomization and completely ignores the kaslr-seed for its own randomness needs (i.e the randomization of the physical placement of the kernel). It gets weeded out from the DTB that gets handed over via efi_install_fdt() as it would also mess up the measured boot DTB TPM measurements as well. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Michal Simek <michal.simek@amd.com> Cc: Andy Yan <andy.yan@rock-chips.com> Cc: Akash Gajjar <gajjar04akash@gmail.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Simon Glass <sjg@chromium.org> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Patrice Chotard <patrice.chotard@foss.st.com> Cc: Devarsh Thakkar <devarsht@ti.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com> Cc: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Chris Morgan <macromorgan@hotmail.com> Acked-by: Michal Simek <michal.simek@amd.com>
2024-06-26zboot: Correct use of state_mask argumentSimon Glass1-6/+6
There is confusion in this function between the flag and state_mask parameters, which prevents the boot from actually happening. Correct this by using state_mask instead of flag for deciding which states to go through. This fixes booting of some 32-bit Debian kernels. Note: Some sort of CI for this is in the works. Fixes: 228c6722d44 ("x86: zboot: Avoid iteration in do_zboot_states()") Signed-off-by: Simon Glass <sjg@chromium.org>
2024-06-26zboot: Add debugging for bootingSimon Glass1-1/+10
Show the boot arguments and the state mask, to aid debugging. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-06-26cmd: gpt: Fix freeing gpt_pte in gpt_verify()Sam Protsenko1-1/+2
In case when either gpt_verify_headers() or gpt_verify_partitions() fails, the memory allocated for gpt_pte will be freed in those functions internally, but gpt_pte will still contain non-NULL dangling pointer. The attempt to free it in those cases in gpt_verify() leads to "use after free" error, which leads to a "Synchronous abort" exception. This issue was found by running the next command on the device with incorrect partition table: => gpt verify mmc 0 $partitions which results to: No partition list provided - only basic check "Synchronous Abort" handler, esr 0x96000021, far 0xba247bff .... Fix the issue by only freeing gpt_pte if none of those functions failed. Fixes: bbb9ffac6066 ("gpt: command: Extend gpt command to support GPT table verification") Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2024-06-26cmd: Make use of U_BOOT_LONGHELP when missingTom Rini8-26/+16
After adding the U_BOOT_LONGHELP macro some new commands came in still that were not making use if it. Switch these cases over and in a few places add missing newlines as well. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-06-24Merge tag 'v2024.07-rc5' into nextTom Rini3-5/+2
Prepare v2024.07-rc5
2024-06-22cmd: link to doc/usage/fit/x86-fit-boot.rstHeinrich Schuchardt1-1/+1
Replace the outdated link. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-06-20cmd: fix typo in CMD_BOOTMETH help textQuentin Schulz1-1/+1
It's bootmeths and not bootmethds. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-06-16Merge branch 'next' of ↵Tom Rini1-7/+5
https://source.denx.de/u-boot/custodians/u-boot-watchdog into next - misc cyclic infrastructure improvements (Rasmus) - watchdog_reset cleanup (Rasmus) CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=369&view=results
2024-06-16cyclic: make clients embed a struct cyclic_info in their own data structureRasmus Villemoes1-7/+5
There are of course not a whole lot of examples in-tree yet, but before they appear, let's make this API change: Instead of separately allocating a 'struct cyclic_info', make the users embed such an instance in their own structure, and make the convention that the callback simply receives the 'struct cyclic_info *', from which the clients can get their own data using the container_of() macro. This has a number of advantages. First, it means cyclic_register() simply cannot fail, simplifying the code. The necessary storage will simply be allocated automatically when the client's own structure is allocated (often via uclass_priv_auto or similar). Second, code for which CONFIG_CYCLIC is just an option can more easily be written without #ifdefs, if we just provide an empty struct cyclic_info {}. For example, the nested CONFIG_IS_ENABLED()s in https://lore.kernel.org/u-boot/20240316201416.211480-1-marek.vasut+renesas@mailbox.org/ are mostly due to the existence of the 'struct cyclic_info *' member being guarded by #ifdef CONFIG_CYCLIC. And we do probably want to avoid the extra memory overhead of that member when !CONFIG_CYCLIC. But that is automatic if, instead of a 'struct cyclic_info *', one simply embeds a 'struct cyclic_info', which will have size 0 when !CONFIG_CYCLIC. Also, the no-op cyclic_register() function can just unconditionally be called, and the compiler will see that (1) the callback is referenced, so not emit a warning for a maybe-unused function and (2) see that it can actually never be reached, so not emit any code for it. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2024-06-14cmd: move ELF load and boot to lib/elf.cMaxim Moskalets1-36/+22
Loading and running the ELF image is the responsibility of the library and should not be associated with the command line interface. It is also required to run ELF images from FIT with the bootm command so as not to depend on the command line interface. Signed-off-by: Maxim Moskalets <maximmosk4@gmail.com>
2024-06-13imxtract: add support for zstd-compressed imagesDmitry Gerasimov1-0/+23
Allow extraction of zstd-compressed images from FIT using imxtract command. This is especially useful when one has to load an image via some interface (e.g. SPI) rather that just to the memory. Signed-off-by: Dmitry Gerasimov <di.gerasimov@gmail.com>
2024-06-13cmd: sound: fix help textQuentin Schulz1-1/+1
There's never been a -q or -s argument handled in the command, so let's remove it. This was highlighted during review[1] but somehow still got through. While at it, slightly "reword" in the help text how the len + freq arguments are defined. Indeed, len and freq work in pair, it is possible to define none of either, n of both, or n - 1 of freq if there are n len, in which case the freq that goes with the last len would be the n - 1 (and not the default of 400Hz if neither len nor freq is passed). I assume this isn't what's expected but leaving it for another patch if need be to fix what happens in that very odd scenario. [1] https://lore.kernel.org/u-boot/CAPnjgZ0QWNqVFZfEWHxRcFOA3E3gRAZCYs77nGUXKL0pLp+JLQ@mail.gmail.com/ Fixes: ea58b9a404d4 ("cmd: allow sound command to play multiple sounds") Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-06-11Merge tag 'efi-next-20240611' of ↵Tom Rini2-57/+155
https://source.denx.de/u-boot/custodians/u-boot-efi into next Pull request efi-next-20240611 UEFI: * Allow specifying a device-tree in an EFI load option using the efidebug or eficonfig command. * Let the EFI boot manager fall back to an OS provided device-tree if no device-tree is specified.
2024-06-10efi_loader: rename struct efi_initrd_dp to efi_lo_dp_prefixHeinrich Schuchardt2-4/+4
As we now also store device-tree device-paths in load options rename struct efi_initrd_dp to efi_lo_dp_prefix. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-06-10cmd: efidebug: add support for setting fdtHeinrich Schuchardt1-37/+92
We already support creating a load option where the device-path field contains the concatenation of the binary device-path and optionally the device path of the initrd which we expose via the EFI_LOAD_FILE2_PROTOCOL. Allow to append another device-path pointing to the device-tree identified by the device-tree GUID. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-06-10cmd: eficonfig: add support for setting fdtHeinrich Schuchardt1-18/+61
We already support creating a load option where the device-path field contains the concatenation of the binary device-path and optionally the device path of the initrd which we expose via the EFI_LOAD_FILE2_PROTOCOL. Allow to append another device-path pointing to the device-tree identified by the device-tree GUID. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-06-10efi_loader: allow concatenation with contained end nodeHeinrich Schuchardt2-5/+5
Allow appending a device-path to a device-path that contains an end node as separator. We need this feature for creating boot options specifying kernel, initrd, and dtb. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-06-07abootimg: Add init_boot image supportRoman Stratiienko1-5/+21
Quote from [1]: "For devices launching with Android 13, the generic ramdisk is removed from the boot image and placed in a separate init_boot image. This change leaves the boot image with only the GKI kernel." While at it, update wrong error handling message when vendor_boot cannot be loaded. [1]: https://source.android.com/docs/core/architecture/partitions/generic-boot Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-06-07Merge patch series "'eeprom' command improvements"Tom Rini2-84/+230
Marek Behún <kabel@kernel.org> says: This series contains improvements for the 'eeprom' command: - refactors - fixes - improvements - ability to use driver model EEPROMs (uclass UCLASS_I2C_EEPROM) - more flexible EEPROM layout support It should not cause any behavior change for any existing board. This series is a dependency for some DDR issue fixes for Turris Omnia. I will be sending that one separately. github PR link (with CI): https://github.com/u-boot/u-boot/pull/540 - there is a failure for test.py for sandbox sandbox_clang but it seems unrelated to these changes
2024-06-07cmd: eeprom: Extend to EEPROMs probed via driver modelMarek Behún1-10/+112
Extend the 'eeprom' command to allow accessing EEPROMs probed via driver model, uclass UCLASS_I2C_EEPROM. When the CONFIG_I2C_EEPROM config option is enabled (and so the i2c-eeprom driver is built), the 'eeprom' command now accepts driver model device name as EEPROM specifier for the 'eeprom' command, in addition to the legacy [[bus] devaddr] specifier. Moreover if no device specifier is given, then the first UCLASS_I2C_EEPROM device is used, if found. Signed-off-by: Marek Behún <kabel@kernel.org>
2024-06-07cmd: eeprom: Don't read/write whole EEPROM if not necessaryMarek Behún1-9/+2
Don't read/write whole EEPROM if not necessary when printing / updating EEPROM layout fields. Only read/write layout.data_size bytes. Signed-off-by: Marek Behún <kabel@kernel.org>