Tom Rini [Wed, 22 Jan 2025 15:48:24 +0000 (09:48 -0600)]
Merge patch series "vbe: Series part F"
Simon Glass <sjg@chromium.org> says:
This includes various patches towards implementing the VBE abrec
bootmeth in U-Boot. It mostly focuses on introducing a relocating
SPL-loader so that VBE can run in the limited amount of SRAM available
on many devices.
Another minor new feature is support in VBE for specifying the image
phase when loading from a FIT. This allows a single FIT to include
images for several boot phases, thus simplifying image-creation.
One lingering niggle in this series is that it has a different code path
for sandbox, since it does not support the relocating jump. It should be
possible to resolve this with additional work, but I have not attempted
this so far.
For v2, I have split the first patch into 5 pieces, to make it easier to
see the code-size impact, plus added a few tweaks to reduce code size.
Again, only MMC is supported so far.
Looking ahead, series G will have some more plumbing and H some rk3399
pieces. That should be enough to complete these feature.
Here is a run in my lab, with the VBE ABrec bootmeth. You can see that
VPL runs before memory is set up. SPL sets up memory and can be upgraded
in the field reliably.
$ ub-int vbe
Building U-Boot in sourcedir for rk3399-generic
Bootstrapping U-Boot from dir /tmp/b/rk3399-generic
Writing U-Boot using method rockchip
U-Boot TPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
Using 'config-3' configuration
Trying 'image-vpl' firmware subimage
Using 'config-3' configuration
Trying 'fdt-3' fdt subimage
U-Boot VPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
Starting with empty state
VBE: Firmware pick A at 800000
Using 'config-3' configuration
Trying 'spl' firmware subimage
Using 'config-3' configuration
Trying 'fdt-3' fdt subimage
Channel 0: DDR3, 800MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
Channel 1: DDR3, 800MHz
BW=32 Col=10 Bk=8 CS0 Row=15 CS1 Row=15 CS=2 Die BW=16 Size=2048MB
256B stride
U-Boot SPL 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58 -0700)
Trying to boot from vbe_abrec
load: Firefly-RK3399 Board
VBE: Firmware pick A at 900000
load_simple_fit: Skip load 'atf-5': image size is 0!
Relocating bloblist
ff8eff00 to 100000: done
ns16550_serial serial@
ff1a0000: pinctrl_select_state_full: uclass_get_device_by_phandle_id: err=-19
U-Boot 2025.01-rc3-00345-gdfbdbf1eb56c-dirty (Jan 08 2025 - 10:47:58 -0700)
SoC: Rockchip rk3399
Reset cause: POR
Model: Firefly-RK3399 Board
DRAM: 4 GiB (effective 3.9 GiB)
Core: 314 devices, 33 uclasses, devicetree: separate
MMC: mmc@
fe310000: 3, mmc@
fe320000: 1, mmc@
fe330000: 0
Loading Environment from SPIFlash... Invalid bus 0 (err=-19)
*** Warning - spi_flash_probe_bus_cs() failed, using default environment
In: serial,usbkbd
Out: serial,vidconsole
Err: serial,vidconsole
Model: Firefly-RK3399 Board
Net: PMIC: RK808
eth0: ethernet@
fe300000
starting USB...
Bus usb@
fe380000: USB EHCI 1.00
Bus usb@
fe3a0000: USB OHCI 1.0
Bus usb@
fe3c0000: USB EHCI 1.00
Bus usb@
fe3e0000: USB OHCI 1.0
Bus usb@
fe900000: Register 2000140 NbrPorts 2
Starting the controller
USB XHCI 1.10
scanning bus usb@
fe380000 for devices... 1 USB Device(s) found
scanning bus usb@
fe3a0000 for devices... 1 USB Device(s) found
scanning bus usb@
fe3c0000 for devices... 2 USB Device(s) found
scanning bus usb@
fe3e0000 for devices... 1 USB Device(s) found
scanning bus usb@
fe900000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot: 0
Link: https://lore.kernel.org/r/20250116012723.2820301-1-sjg@chromium.org
Chanho Park [Wed, 15 Jan 2025 15:31:48 +0000 (00:31 +0900)]
vexpress64: Fix bootargs when building without NET
When building without DHCP/PXE configurations (NET disabled),
compilation errors may occur due to mismatched bootargs.
Ensure bootargs related to DHCP/PXE are not enabled if the
corresponding commands are disabled.
include/config_distro_bootcmd.h:443:9: error: expected ‘}’ before
‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’
443 | BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Chanho Park <parkch98@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Ronald Wahl [Wed, 11 Dec 2024 20:51:04 +0000 (21:51 +0100)]
spi: cadence-quadspi: fix potential malfunction after ~49 days uptime
The get_timer function returns an unsigned long which may be calculated
from the ARM system counter. This counter is reset only on a cold reset.
U-boot divides this counter down to a 1000 Hz counter that will cross
the 32bit barrier after a bit more than 49 days. Assigning the value to
an unsigned int will truncate it on 64bit systems.
Passing this truncated value back to the get_timer function will return
a very large value that is certainly larger than the timeout and so will
go down the error path and besides stopping U-Boot will lead to messages
like
"SPI: QSPI is still busy after poll for 5000 ms."
Signed-off-by: Ronald Wahl <ronald.wahl@legrand.com>
Cc: Vignesh R <vigneshr@ti.com>
Cc: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Simon Glass [Thu, 16 Jan 2025 01:27:23 +0000 (18:27 -0700)]
vbe: Update simple-fw to support using the SPL loader
For a sandbox implementation, where code size is no object, it makes sense
to use the full bootstd drivers to load images.
For real boards, running from SRAM, this adds quite a bit of overhead.
Add a way to load the next phase using just the underlying storage
driver, to reduce code size. For now, only MMC is supported.
Change the log_debug() to show the load address and size in a more
neutral way, rather than suggesting that the load has already happened.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:22 +0000 (18:27 -0700)]
vbe: Support loading SPL images
VBE needs to load different images from a FIT depending on the xPL phase
in use. The IH_PHASE value is used to select the image to load.
Add the required logic to handle this. For compatibility with the
SPL-loader driver, fill out a struct spl_image_info with the details
needed to boot the next phase.
This is good enough for VBE-simple but ABrec will need the full set of
bootstd features. So add a USE_BOOTMETH define to control this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:21 +0000 (18:27 -0700)]
vbe: Support loading an FDT with the relocating loader
Add FDT support so that this can be copied down in memory after loading
and made available to the new image.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:20 +0000 (18:27 -0700)]
spl: Plumb in the relocating loader
This is fairly easy to use. The SPL loader sets up some fields in the
spl_image_info struct and calls spl_reloc_prepare(). When SPL is ready
to do the jump it must call spl_reloc_jump() instead of jump_to_image().
Add this logic.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:19 +0000 (18:27 -0700)]
spl: Add support for a relocating jump to the next phase
When one xPL phase wants to jump to the next, the next phase must be
loaded into its required address. This means that the TEXT_BASE for the
two phases must be different and there cannot be any memory overlap
between the code used by the two phases. It also can mean that phases
need to be moved around to accommodate any size growth.
Having two xPL phases in SRAM at the same time can be tricky if SRAM
is limited, which it often is. It would be better if the second phase
could be loaded somewhere else, then decompressed into place over the
top of the first phase.
Introduce a relocating jump for xPL to support this. This selects a
suitable place to load the (typically compressed) next phase, copies
some decompression code out of the first phase, then jumps to this code
to decompress and start the next phase.
This feature makes it much easier to support Verified Boot for Embedded
(VBE) on RK3399 boards, which have 192KB of SRAM.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:18 +0000 (18:27 -0700)]
spl: Add a type for the jumper function
This function will be used by the relocating jumper too, so add a
typedef to the header file to avoid mismatches.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:17 +0000 (18:27 -0700)]
spl: Add fields for VBE
Add some fields to track the VBE state in SPL.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:16 +0000 (18:27 -0700)]
vbe: Support loading an FDT from the FIT
In many cases the FIT includes a devicetree. Add support for loading
this into a suitable place in memory.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:15 +0000 (18:27 -0700)]
vbe: Allow loading loadables if there is no firmware
In some cases only the 'loadable' property is present in the FIT.
Handle this by loading the first such image.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:14 +0000 (18:27 -0700)]
vbe: Handle loading from an unaligned offset
There is no guarantee that an FIT image starts on a block boundary. When
it doesn't, the image starts part-way through the first block.
Add logic to detect this and copy the image down into place.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:13 +0000 (18:27 -0700)]
vbe: Tidy up error checking with blk_read()
This function can read fewer blocks than requested, so update the checks
to handle this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:12 +0000 (18:27 -0700)]
vbe: Allow VBE to load FITs on any architecture
At present the VBE implementation is limited to sandbox only. Adjust the
call to fit_image_load() to remove this limitation.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:11 +0000 (18:27 -0700)]
vbe: Allocate space for the FIT header
It is convenient to use TEXT_BASE as a place to hold the FIT header, but
this does not work in VPL, since SDRAM is not inited yet.
Allocate the memory instead. Ensure the size is aligned to the media
block-size so that it can be read in directly. Improve the
error-checking for blk_read() and add some more debugging.
Keep the existing TEXT_BASE mechanism in sandbox to avoid an
'Exec format error' when trying to run the image.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:10 +0000 (18:27 -0700)]
vbe: Split out reading a FIT into the common file
Loading a FIT is useful for other VBE methods, such as ABrec. Create a
new function to handling reading it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:09 +0000 (18:27 -0700)]
vbe: Move reading the nvdata into the common file
All VBE methods read non-volatile data, so move this function into a
common file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:08 +0000 (18:27 -0700)]
vbe: Move reading the version into the common file
All VBE methods read a version string, so move this function into a
common file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:07 +0000 (18:27 -0700)]
vbe: Create a common function to get the block device
Add a vbe_get_blk() function and use it to obtain the block device used
by VBE.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:06 +0000 (18:27 -0700)]
vbe: Convert some checks to assertions
VBE is currently quite careful with function arguments because it is
used in VPL which cannot be updated after manufacture. Bugs can cause
security holes.
Unfortunately this adds to code size.
In several cases we are reading values from a devicetree which is part
of U-Boot (or at least VPL) and so known to be good. Also, in several
places, getting bad values does not matter.
So change a few checks to assert() to reduce code size.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:05 +0000 (18:27 -0700)]
vbe: Pass simple_priv to internal functions
Pass the private data instead of the device, to help the compiler
optimise better. This saves 16 bytes of code on pinecube (rk3288)
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:04 +0000 (18:27 -0700)]
vbe: Use a block device instead of descriptor
Pass a struct udevice instead of the descriptor structure, since this is
the native argument for blk_read()
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:03 +0000 (18:27 -0700)]
vbe: Start a common header file
Move a few things into a new, common header file so that vbe-simple can
share code with the upcoming abrec.
Put struct simple_nvdata in it and rename it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Thu, 16 Jan 2025 01:27:02 +0000 (18:27 -0700)]
vbe: Use blk_read() to read blocks
We should not be using the old blk_d...() interface, is only there to
aid migration to driver model.
Move to blk_read() instead.
Changes in v2:
- Split patch into several pieces
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Tue, 21 Jan 2025 15:28:47 +0000 (09:28 -0600)]
Merge patch series "MediaTek MT7629 OF_UPSTREAM migration (v2)"
Weijie Gao <weijie.gao@mediatek.com> says:
This patch series migrates MediaTek MT7629 to OF_UPSTREAM
Changes in v2:
* Remove mt7629-rfb.dtb from arch/arm/dts/Makefile
* Add wdt-reboot node to make reset command work
Link: https://lore.kernel.org/r/cover.1736851116.git.weijie.gao@mediatek.com
Tom Rini [Tue, 21 Jan 2025 15:28:10 +0000 (09:28 -0600)]
Merge patch series "Broadcom bcmbca dts updates"
david regan <dregan@broadcom.com> says:
Updates for Broadcom bcmbca devices,
make use of OF_UPSTREAM which uses Linux dts,
update bcmbca dts to current nand node naming convention,
enable basic nand functionality for bcmbca devices.
Link: https://lore.kernel.org/r/20250114045425.148801-1-dregan@broadcom.com
Patrick Rudolph [Tue, 14 Jan 2025 05:31:53 +0000 (11:01 +0530)]
sbp1: Add support for IBM SBP1 board
Add defconfig & devicetree for IBM SBP1 board BMC based on AST2600 SoC.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Sam Shih [Tue, 14 Jan 2025 10:43:00 +0000 (18:43 +0800)]
board: mediatek: mt7629: Migrate to OF_UPSTREAM
Move differences in DT files between upstream Linux DT and U-Boot DT to
mt7629-rfb-u-boot.dtsi.
Remove old copies of mt7629-related clock bindings, .dts, and .dtsi files.
Update defconfig to switch the whole mt7629 SoC to use OF_UPSTREAM.
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Sam Shih [Tue, 14 Jan 2025 10:42:55 +0000 (18:42 +0800)]
clk: mediatek: mt7629: fix gate offset of peri clock tree
The clock definitions in mt7629-clk.h indicate that CLK_PERIBUS_SEL is the
first element in the pericfg clock tree and also serves as a clock mux,
unlike other clocks belonging to the clock gate in pericfg.
This make the clock consumer get a wrong clock gate during request a clock
from <&pericfg>.
Since CLK_PERIBUS_SEL clock is not required in U-Boot, add a clock gate
offset for the pericfg clock tree to resolve this problem.
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
david regan [Tue, 14 Jan 2025 04:54:25 +0000 (20:54 -0800)]
arm: dts: Enable basic nand functionality for bcmbca devices
Enable rudimentary nand read/write capability.
Changes in v2:
- New patch in series added enabling of nand functionality
Signed-off-by: david regan <dregan@broadcom.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Anand Gore <anand.gore@broadcom.com>
david regan [Tue, 14 Jan 2025 04:54:24 +0000 (20:54 -0800)]
arm: dts: Update nand node for bcmbca board dts
Update bcmbca dts to current nand node naming convention.
Changes in v2:
- Removed addition of nand-on-flash-bbt parameter
Signed-off-by: david regan <dregan@broadcom.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Anand Gore <anand.gore@broadcom.com>
david regan [Tue, 14 Jan 2025 04:54:23 +0000 (20:54 -0800)]
arm: dts: Use upstream dts for additional bcmbca devices
Make use of OF_UPSTREAM which uses Linux dts.
Changes in v2:
- Removed enabling of nand functionality
Signed-off-by: david degan <dregan@broadcom.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Anand Gore <anand.gore@broadcom.com>
Jonathan Humphreys [Fri, 20 Dec 2024 21:53:34 +0000 (15:53 -0600)]
configs: am62x_evm_*: Set DFU buffer size to 256k
OSPI flash writing was broken on am62x SKs as the OSPI flash device has a
256k sector size but was set to 20k. This breaks OSPI flash writes because
the current implementation of the SF DFU backend requires that the DFU data
buffer size be the same as the sector erase size, and the USB DFU config
fragment (for both A53 and R5) reduced the size of the DFU data buffer,
presumably so that it can fit into SPL's much smaller heap.
Change the SYS_DFU_DATA_BUF_SIZE to the erase sector size, which still fits
within the post-relocation heap size in SPL.
Fixes:
dfc2dff5a844 ("configs: am62x_evm_*: Enable USB and DFU support")
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Heinrich Schuchardt [Fri, 20 Dec 2024 00:37:59 +0000 (01:37 +0100)]
acpi: don't fill FADT, MADT if CONFIG_QFW_ACPI=y
When using the ACPI tables supplied by QEMU, we don't need to build the
FADT and MADT tables in U-Boot.
This patch avoids a build failure
make qemu-riscv64_smode_defconfig acpi.config
riscv64-linux-gnu-ld.bfd: lib/acpi/acpi_table.o:
in function `acpi_write_fadt':
lib/acpi/acpi_table.c:265:(.text.acpi_write_fadt+0x15c):
undefined reference to `acpi_fill_fadt'
riscv64-linux-gnu-ld.bfd: lib/acpi/acpi_table.o:
in function `acpi_write_madt':
lib/acpi/acpi_table.c:294:(.text.acpi_write_madt+0x52):
undefined reference to `acpi_fill_madt'
Fixes:
f5f7962091e4 ("acpi: x86: Write FADT in common code")
Fixes:
4a3fc0f525da ("acpi: x86: Move MADT to common code")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tom Rini [Tue, 21 Jan 2025 01:18:36 +0000 (19:18 -0600)]
Merge patch series "Rework the BLK symbol usage in Kconfig"
Tom Rini <trini@konsulko.com> says:
One problem we have today is how the BLK symbol is set and used in
Kconfig files. Part of the challenge is that we use it as a gating
symbol for "we have a block device" and also for "enable block device
library code". What this series does is move to always use "select BLK"
by block drivers (a few were and a few others had it the inverse) and
then "depends on BLK" for functionality that needs a block device
present. The end result of this series is that a number of platforms
which had disabled EFI_LOADER now don't ask for it (they have no block
device) and espresso7420 has a regression about MMC support fixed. With
v2 of this I've picked up the review tags from v1 and also reworded the
body of the commit in the first patch.
Link: https://lore.kernel.org/r/20250115012322.215243-1-trini@konsulko.com
Tom Rini [Wed, 15 Jan 2025 01:22:13 +0000 (19:22 -0600)]
block: Remove "select BLK" from non-block drivers
Now that block drivers are all selecting the BLK symbol, there's no need
for other options to be select'ing BLK so that other required
functionality can be enabled. Remove these places.
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 15 Jan 2025 01:22:12 +0000 (19:22 -0600)]
mtd: Correct dependency of BLK
In the case of MTD_BLOCK and UBI_BLOCK they should be select'ing BLK as
they provide block device functionality and not depending on some other
block device already being enabled too (as is the typical case).
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 15 Jan 2025 01:22:11 +0000 (19:22 -0600)]
blk: Make block subsystems select BLK
The BLK symbol has a few meanings, one of which is that it controls the
driver model portion of a "block device". Rather than having this hidden
symbol be "default y if ..." it should be select'd by the various block
subsystems. Symbols such as PVBLOCK which already select'd BLK are
unchanged".
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 15 Jan 2025 01:22:10 +0000 (19:22 -0600)]
efi_loader: Depend on BLK
In reworking the BLK usage in Kconfig, I found there's a few issues with
EFI_LOADER=y and BLK=n. In general, we can easily say that
lib/efi_loader/efi_file.c also should only be built with CONFIG_BLK.
That however leaves the bootmgr code, eficonfig code and then parts of
efi_device_path.c, efi_boottime.c and efi_setup.c which functionally
depend on BLK. While these calls can be if'd out, I'm unsure if the
result is usable. So rather than leave that buildable and imply that it
is, I'm leaving that combination non-buildable and commenting that
EFI_LOADER depends on BLK in the Kconfig currently.
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 15 Jan 2025 01:22:09 +0000 (19:22 -0600)]
drivers/mmc/Kconfig: Make DM_MMC a hidden symbol
At this point in time, DM is always enabled. So if MMC is enabled, it
should select DM_MMC. No drivers need to depend on DM_MMC being enabled
now, so remove that from dependency lists. This now means that a number
of platforms which select'd DM_MMC need to select MMC instead. This also
fixes a migration problem with espresso7420 in that MMC is built again
with the platform.
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 15 Jan 2025 01:22:08 +0000 (19:22 -0600)]
drivers/mmc/Kconfig: Remove extraneous BLK dependencies
At this point in time, we know that with the MMC symbol enabled we will
always also have the BLK symbol enabled, so we do not need to list that
as a dependency for MMC drivers.
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 20 Jan 2025 18:08:16 +0000 (12:08 -0600)]
Merge tag 'u-boot-imx-master-
20250120' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/24263
- Add i.MX95 EMDIO support
- Guard binman nodes with CONFIG_OPTEE on imx8m
- Enable CAAM in phycore-imx8mp SPL.
- Fix Fix NULL dereference in imx_pinctrl_probe().
Udit Kumar [Mon, 13 Jan 2025 04:25:24 +0000 (09:55 +0530)]
arch: arm: mach-k3: Delete tifs node in DT fixup
Delete tifs DT node as part of fixup.
TISCI API reported msmc_size, does not include 64KB reserved size for
tifs aka MSMC comms memory, see documentation[0].
As part of fixup, original code uses TISCI API reported msmc_size as
size for SRAM DT node.
tifs node is similar to l3-cache, which should hold address above
msmc_size, and should be deleted before passing control to OS.
[0] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html?highlight=msmc#tisci-msg-query-msmc
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Beleswar Padhi [Wed, 8 Jan 2025 10:25:16 +0000 (15:55 +0530)]
board: ti: j722s: j722s.env: Set remoteproc firmware names
Include k3_rproc.env to access rproc boot commands and specify rproc
firmware names for adding remoteproc support in J722S SoCs.
Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Jayesh Choudhary [Mon, 6 Jan 2025 10:04:00 +0000 (15:34 +0530)]
arch: arm: mach-k3: j784s4_init: Set CTRL_MMR for AUDIO_REFCLK1 clk_sel
The default value for the mux to select the parent clock,
AUDIO_REFCLK1_CTRL_CLK_SEL is '11111' (31) but the mux input for 31
is marked as 'Reserved' so the ti-sci-clk call for get-parent fails.
Mark it to a valid value, '11100' (28) for MAIN_PLL4_HSDIV2_CLKOUT
to get rid of the linux failures during boot-time like:
"[ 1.573193] ti-sci-clk
44083000.system-controller:clock-controller:
get-parent failed for dev=157, clk=34, ret=-19"
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Heinrich Schuchardt [Sat, 4 Jan 2025 00:34:02 +0000 (01:34 +0100)]
fs: eliminate YAFFS2 implementation
Upstream development stopped 2012.
Linux eliminated YAFFS2 in 2010.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Leonard Anderweit [Fri, 17 Jan 2025 13:20:13 +0000 (14:20 +0100)]
phycore-imx8mp: Enable CAAM in spl
Enable CAAM in spl.
Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Jesse Taube [Fri, 17 Jan 2025 03:00:48 +0000 (22:00 -0500)]
pinctrl: imx: Fix NULL dereference in imx_pinctrl_probe()
When converting to ofnode `ofnode_read_u32` was accedentally used to
replace `fdtdec_get_int` instead of `ofnode_read_u32_default`.
Use `ofnode_read_u32_default` to fix this.
Fixes: 59382d2 ("pinctrl: imx: Convert to use livetree API for fdt access")
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
Fabio Estevam [Fri, 17 Jan 2025 01:56:42 +0000 (22:56 -0300)]
imx8m: Guard binman nodes with CONFIG_OPTEE
Guard binman nodes with CONFIG_OPTEE to fix the following error
when building without optee support:
BINMAN .binman_stamp
Image 'image' has faked external blobs and is non-functional: tee.bin
Image 'image' is missing optional external blobs but is still functional: tee-os
/binman/section/fit/images/tee/tee-os (tee.bin):
See the documentation for your board. You may need to build Open Portable
Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin
Some images are invalid
make: *** [Makefile:1135: .binman_stamp] Error 103
While at it, only pass tee to the loadables lines when CONFIG_OPTEE is
defined.
Reported-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Yannic Moog <y.moog@phytec.de>
Alice Guo [Thu, 16 Jan 2025 04:03:30 +0000 (05:03 +0100)]
net: fsl_enetc: Update enetc driver to support i.MX95
i.MX95 uses enetc version 4.1 controller. Update the enetc for i.MX95.
Add ARM-specific cache handling and i.MX95 specific register layout
handling.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Marek Vasut <marex@denx.de> # Clean up
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Tim Harvey <tharvey@gateworks.com>
Alice Guo [Thu, 16 Jan 2025 04:03:29 +0000 (05:03 +0100)]
net: fsl_enetc: add i.MX95 EMDIO support
The verdor ID and device ID of i.MX95 EMDIO are different from LS1028A
EMDIO, so add new vendor ID and device ID to pci_device_id table to
support i.MX95 EMDIO.
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Marek Vasut <marex@denx.de> # Clean up
Signed-off-by: Ye Li <ye.li@nxp.com>
Marek Vasut [Thu, 16 Jan 2025 04:03:28 +0000 (05:03 +0100)]
net: fsl_enetc: Add initial netc-blk-ctrl driver support
The netc-blk-ctrl driver is used to configure Integrated Endpoint
Register Block (IERB) and Privileged Register Block (PRB) of NETC.
For i.MX platforms, it is also used to configure the NETCMIX block.
The IERB contains registers that are used for pre-boot initialization,
debug, and non-customer configuration. The PRB controls global reset
and global error handling for NETC. The NETCMIX block is mainly used
to set MII protocol and PCS protocol of the links, it also contains
settings for some other functions.
Note the IERB configuration registers can only be written after being
unlocked by PRB, otherwise, all write operations are inhibited. A warm
reset is performed when the IERB is unlocked, and it results in an FLR
to all NETC devices. Therefore, all NETC device drivers must be probed
or initialized after the warm reset is finished.
Ported from Linux 6.13-rc as of commit
fe5ba6bf91b3 ("net: enetc: add initial netc-blk-ctrl driver support")
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:27 +0000 (05:03 +0100)]
net: fsl_enetc: Pass udevice pointer to accessors
Pass struct udevice * into the register accessors, so the accessors can reach
driver data, which contain device specific register offsets.
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:26 +0000 (05:03 +0100)]
net: fsl_enetc: Introduce driver data
Introduce driver data for each PCI device. The driver data carry
offsets of registers which differ between different SoCs.
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:25 +0000 (05:03 +0100)]
net: fsl_enetc: Split register accessors
Split register accessors to the port base/station interface/port/mac
registers as those are at different offsets on different SoCs. This
is a preparatory patch which will allow addition of adjusted offsets
for new SoCs easily.
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:24 +0000 (05:03 +0100)]
net: fsl_enetc: Inline register accessors
Move register accessors from header files and turn them into proper
inline functions, so typechecking can be done on them. Drop no longer
enetc_port_regs() and unused enetc_read() and enetc_bdr_read().
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:23 +0000 (05:03 +0100)]
net: fsl_enetc: Introduce enetc_dev_id()
Introduce mapping function enetc_dev_id(), which converts PCIe BDF of
the ENETC into linear incrementing index usable e.g. as interface index.
This replaces the current ad-hoc calculation used in the code with a
dedicated function. No functional change.
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:22 +0000 (05:03 +0100)]
net: fsl_enetc: Rename the driver and related structures
Rename the current driver structure and matching ops and PCI IDs
and add _ls suffix to indicate this content is LS specific. This
is done in preparation for addition of i.MX95 ENETCv4 which will
require slightly different structure content.
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:21 +0000 (05:03 +0100)]
net: fsl_enetc: Pass udevice pointer into enetc_enable_si_port()
Pass udevice pointer into enetc_enable_si_port() so tests like
enetc_is_ls1028a() an be used in the function. No functional
change.
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:20 +0000 (05:03 +0100)]
net: fsl_enetc: Fold DT MAC address update into enetc_set_ierb_primary_mac()
The entire content of the loop can be folded into enetc_set_ierb_primary_mac(),
do it. This changes the behavior slightly such that the DT is only updated in
case of a LS1028A, which is the only SoC with ethernet MAC path in DT matching
"/soc/pcie@
1f0000000/ethernet@%x,%x" anyway, so this slight change should have
no impact.
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:19 +0000 (05:03 +0100)]
net: fsl_enetc: Remove ifdef around enetc_set_ierb_primary_mac()
Use enetc_is_ls1028() instead of ifdef around enetc_set_ierb_primary_mac()
and clean up the function. No functional change intended.
Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Thu, 16 Jan 2025 04:03:18 +0000 (05:03 +0100)]
net: fsl_enetc: Introduce enetc_is_ls1028a()
Introduce accurate test for LS1028A compatibility based both on
IS_ENABLED(CONFIG_ARCH_LS1028A) and PCI vendor ID. This is done
in preparation for adding ENETCv4 support, which has a different
PCI vendor ID.
Signed-off-by: Marek Vasut <marex@denx.de>
Tom Rini [Sat, 18 Jan 2025 23:13:01 +0000 (17:13 -0600)]
Merge patch series "add the support of sha256_hmac and sha256_hkdf"
Philippe Reynes <philippe.reynes@softathome.com> says:
This serie adds the support of sha256_hmac and sha256_hkdf.
A first version was sent several months ago just before the
integration of mbedtls. This new version is based on mbedtls.
The first patch of this serie add the support of hkdf
using mbedtls.
Link: https://lore.kernel.org/r/20241219130554.49825-1-philippe.reynes@softathome.com
Philippe Reynes [Thu, 19 Dec 2024 13:05:54 +0000 (14:05 +0100)]
configs: sandbox: enable mbedtls
Enable mbedtls to have at least one config with
mbedtls enabled.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Thu, 19 Dec 2024 13:05:53 +0000 (14:05 +0100)]
test: lib: add test for key derivation
Adds a test for the function sha256_hkdf.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Philippe Reynes [Thu, 19 Dec 2024 13:05:52 +0000 (14:05 +0100)]
lib: mbedtls: sha256: add support of key derivation
Adds the support of key derivation using the scheme hkdf.
This scheme is defined in rfc5869.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Philippe Reynes [Thu, 19 Dec 2024 13:05:51 +0000 (14:05 +0100)]
test: lib: add test for sha256_hmac
Adds a test for the function sha256_hmac
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Philippe Reynes [Thu, 19 Dec 2024 13:05:50 +0000 (14:05 +0100)]
lib: sha256: add feature sha256_hmac
Adds the support of the hmac based on sha256.
This implementation is based on rfc2104.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Philippe Reynes [Thu, 19 Dec 2024 13:05:49 +0000 (14:05 +0100)]
lib: sha256: move common function to sha256_common.c
The function sha256_csum_wd is defined in lib/sha256.c
and in lib/mbedtls/sha256.c. To avoid duplicating this
function (and future function), we move this function
to the file lib/sha256_common.c
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Thu, 19 Dec 2024 13:05:48 +0000 (14:05 +0100)]
mbedtls: enable support of hkdf
Adds the support of key derivation using
the scheme hkdf.
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Thu, 19 Dec 2024 13:05:47 +0000 (14:05 +0100)]
tools: renesas_spkgimage.h: use linux/compiler_attributes.h
The attribute __packed was defined in the file
tools/renesas_spkgimage.h but this attribute is
already defined in linux/compiler_attributes.h.
So we include <linux/compiler_attributes.h.h>
and do not define __packed.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Thu, 19 Dec 2024 13:05:46 +0000 (14:05 +0100)]
tools: kwbimage.h: use linux/compiler_attributes.h
The attribute __packed was defined in the file
tools/kwbimage.h but this attribute is already
defined in linux/compiler_attributes.h. So we
include <linux/compiler_attributes.h.h> and
do not define __packed.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Tom Rini [Sat, 18 Jan 2025 16:46:23 +0000 (10:46 -0600)]
Merge tag 'efi-2025-04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-04-rc1
Documentation:
* Correct the defconfig name in the coolpi documentation
UEFI:
* Carve out the biggest part of the RISC-V and ARM linker scripts for EFI
binary into a common include.
* Correct the values of SizeOfCode and SizeOfInitializedData in generated
EFI binaries for RISC-V and ARM.
* Avoid gaps between sections in EFI binaries causing a failure in secure
boot.
* Makefile: let clean remove capsule_in.capsule*.efi-capsule
* Refactor some of the code used for launching EFI binaries.
Tom Rini [Sat, 21 Dec 2024 16:45:52 +0000 (10:45 -0600)]
Gitlab: Add DEFAULT_FAST_ARM64_TAG as well
Upon further consideration, we should have both DEFAULT_FAST_ARM64_TAG
and DEFAULT_ARM64_TAG values available. This will allow us to later run
a matrix of some jobs, such as sandbox, on any arm64 host and still keep
the world build to only fast arm64 hosts.
Signed-off-by: Tom Rini <trini@konsulko.com>
Norbert van Bolhuis [Tue, 24 Dec 2024 00:49:04 +0000 (01:49 +0100)]
squashfs: Fix sqfs_inode_size() for xattr related SQFS_LSYMLINK_TYPE
A squashfs filesystem with extended attributes (xattrs) may have
inodes of type SQFS_LSYMLINK_TYPE. This might cause u-boot to fail to
handle the filesystem since it assumes a SYMLINK_TYPE and LSYMLINK_TYPE
inode are the same size. This is wrong, see:
https://github.com/plougher/squashfs-tools/blob/master/squashfs-tools/read_fs.c#L421
Using the mksquashfs '-no-xattrs' argument is probably best, but the
mksquashfs '-xattrs' argument is the default.
This patch fixes squashfs image handling by making sure parsing the
uncompressed inode_table (with sqfs_find_inode) succeeeds. The only change
needed is correctly determining the size of a SQFS_LSYMLINK_TYPE inode.
Signed-off-by: Norbert van Bolhuis <nvbolhuis@gmail.com>
Tom Rini [Tue, 31 Dec 2024 23:54:12 +0000 (17:54 -0600)]
qconfig.py: Update resync message
When using qconfig.py to resync defconfig files and commit the result,
update it to say:
Resync all defconfig files using qconfig.py
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Sun, 12 Jan 2025 22:32:38 +0000 (23:32 +0100)]
Makefile: Make sure all linker input objects exist
In case the build system builds a directory with empty Makefile,
one which does not contain any obj-y entries, the build fails to
link due to missing built-in.o .
This happens because of this part of scripts/Makefile.build
81 ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),)
82 builtin-target := $(obj)/built-in.o
83 endif
which does not assign builtin-target in case obj-y is empty. The
built-in target is then not built at all, and built-in.o is not
generated by this part of scripts/Makefile.build
325 ifdef builtin-target
326 quiet_cmd_link_o_target = AR $@
327 # If the list of objects to link is empty, just create an empty built-in.o
...
335 targets += $(builtin-target)
336 endif # builtin-target
This is the correct behavior.
The final link however expects the built-in.o to exist in every directory
included in the build, even in those where the aforementioned code skipped
generation of built-in.o . Make sure the built-in.o does exist for every
directory used in final link simply by doing touch on every built-in.o used
for the link, which will create empty built-in.o in case any built-in.o is
missing.
A possible alternative fix is the always define the builtin-target
and always generate built-in.o .
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de>
Tom Rini [Sat, 18 Jan 2025 14:27:15 +0000 (08:27 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-sh
Marek Vasut [Sat, 18 Jan 2025 07:15:52 +0000 (08:15 +0100)]
arm64: dts: renesas: Deduplicate extalr_clk bootph-all
Most R-Car Gen3 and Gen4 systems require extalr_clk very early
in the boot process. Currently the extalr_clk { bootph-all } DT
property to indicate this clock should be available early is set
in each SoC U-Boot DT extras file. Deduplicate this assignment to
new common r8a779x-rcar64-u-boot.dtsi file.
Note that R-Car Gen3 R8A77990 E3 and R8A77995 D3 and RZ R8A774C0
do not require extalr_clk early, therefore these SoCs still include
plain r8a779x-u-boot.dtsi in their U-Boot DT extras .
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 12 Jan 2025 22:47:45 +0000 (23:47 +0100)]
arm64: renesas: Rewrite u-boot-elf.srec base address if PIE for R-Car Gen3
The flash_writer tool and previous recovery tools require the SREC load
address to be 0x5000_0000 . The PIE U-Boot build sets the address to 0x0
instead, so override the address back to make u-boot-elf.srec compatible
with the recovery tools.
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Simon Glass [Thu, 9 Jan 2025 15:02:39 +0000 (08:02 -0700)]
efi_loader: Make efi_run_image() static
This function is not called from outside this file and has no entry in
the header file, so mark it static.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Simon Glass [Thu, 9 Jan 2025 15:02:38 +0000 (08:02 -0700)]
efi_loader: Refactor device and image paths into a function
Move this code into a function so it can be called from elsewhere.
Note that the recently added network code uses the same
'global variable' approach. It could use a separate clean-up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Thu, 16 Jan 2025 14:06:17 +0000 (15:06 +0100)]
Makefile: let clean remove capsule_in.capsule*.efi-capsule
Update the CLEAN_FILES list to remove capsule*.*.efi-capsule.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Thu, 16 Jan 2025 11:39:09 +0000 (12:39 +0100)]
efi_loader: use include in ARM EFI linker script
Use the same include as arm64 for the linker script.
Adjust the 32-bit ARM PE-COFF header accordingly and harmonize it with the
64-bit ARM header.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Thu, 16 Jan 2025 11:39:08 +0000 (12:39 +0100)]
efi_loader: correct SizeOfCode, SizeOfInitializedData
The fields SizeOfCode, SizeOfInitializedData, and SizeOfUninitializedData
are define in the PE-COFF specification [1].
* SizeOfCode must match the size of all .text sections.
* SizeOfInitializedData must match the size of all .data sections.
* SizeOfUninitializedData must match the size of all .bss sections.
We only have one .text and one .data section. SizeOfCode and
SizeOfInitializedData have to be calculated as the difference between
the end and the start of the respective section.
As we don't have any .bss sections in the generated EFI binaries.
SizeOfUninitializedData must remain 0.
[1] https://learn.microsoft.com/en-us/windows/win32/debug/pe-format
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Thu, 16 Jan 2025 11:39:07 +0000 (12:39 +0100)]
efi_loader: use INCLUDE in EFI linker scripts
Except for the architecture specific lines ARM and RISC-V can use the same
linker script. Move the common lines to an include.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Thu, 16 Jan 2025 11:39:06 +0000 (12:39 +0100)]
scripts/Makefile.lib: add -L option to LD command for EFI binaries
The linker uses the path specified with -L to search for linker scripts
and for linker script includes.
For out-of-tree builds specify the build directory with -L instead of
the absolute path of the linker script. This allows using an INCLUDE
statement.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Ilias Apalodimas [Thu, 16 Jan 2025 11:39:05 +0000 (12:39 +0100)]
efi_loader: Fix section alignment on EFI binaries
When creating EFI binaries, the alignment of the text section isn't
correctly factored in. As a result trying to load signed EFI binaries
throws an error with:
efi_image_region_add() efi_image_region_add: new region already part of another
Image not authenticated
Running the binary through sbverify has a similar warning
sbverify ./lib/efi_loader/helloworld.efi
warning: gap in section table:
.text : 0x00001000 - 0x00001c00,
.data : 0x00002000 - 0x00002200,
gaps in the section table may result in different checksums
warning: data remaining[7680 vs 12720]: gaps between PE/COFF sections?
.....
If we include the alignment in the text section, the signed binary boots
fine, and the relevant sbverify warning goes away
sbverify ./lib/efi_loader/helloworld.efi
warning: data remaining[8704 vs 12720]: gaps between PE/COFF sections?
.....
We should look into the remaining warning at some point as well
regarding the gaps between PE/COFF sections.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Andy Yan [Mon, 13 Jan 2025 10:56:13 +0000 (18:56 +0800)]
doc: coolpi: Fix the defconfig name
The defconfig name should be: coolpi-cm5-genbook-rk3588_defconfig
Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tom Rini [Fri, 17 Jan 2025 14:27:40 +0000 (08:27 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/24215
- RISC-V: Add "riscv,isa-extensions" and multi-letter extension parsing
support
- RISC-V: Add default cache line size
- Board: Canaan: Add K230-CanMV support
- Board: VisionFive2: Split out target specific configuration
Tom Rini [Thu, 16 Jan 2025 15:59:54 +0000 (09:59 -0600)]
Merge tag 'u-boot-imx-master-
20250116' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/24221
- Enable watchdog command on Capricorn board.
- Convert imx8m evk boards to BOOTSTD.
- Enable dynamic mmcdev setting on imx8m evk boards.
- Fix i.MX FDT cooling-device property corruption.
- Add OP-TEE support on Phycore i.MX8M boards.
Sébastien Szymanski [Wed, 15 Jan 2025 15:41:13 +0000 (16:41 +0100)]
imx: fdt: fix cooling-device property corruption
The function disable_thermal_cpu_nodes() corrupts the cooling-device
property.
For example, booting an i.MX93 devices with only one A55 core (IMX93x1)
with the cooling-device property set to:
$ dtc -I dtb foo.dtb | grep cooling-device
cooling-device = <0x08 0xffffffff 0xffffffff 0x09 0xffffffff 0xffffffff>;
Linux shows the following error at boot:
[ 1.715189] OF: /thermal-zones/cpu-thermal/cooling-maps/map0: could not find phandle
1083699869
[ 1.723977] thermal_sys: Add a cooling_device property with at least one device
[ 1.731285] thermal thermal_zone0: binding zone cpu-thermal with cdev thermal-devfreq-0 failed:-2
because the cooling-device property in the device tree passed to the
kernel is
$ dtc -I dtb /sys/firmware/fdt | grep cooling-device
cooling-device = <0x4097f29d 0x00 0xb05aef9d>;
The issue is because the wrong variable type is passed to the function
fdt_setprop() called in the function disable_thermal_cpu_nodes(). With
the variable type fixed, the error at boot is gone and the property is
properly set:
$ dtc -I dtb /sys/firmware/fdt | grep cooling-device
cooling-device = <0x08 0xffffffff 0xffffffff>;
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Alexander Sverdlin [Mon, 13 Jan 2025 21:15:15 +0000 (22:15 +0100)]
configs: capricorn_cxg3: Enable CMD_WDT
Capricorn boards have WDT (WDT_SIEMENS_PMIC) and U-Boot is not configured
to trigger the WDT. Enable the "wdt" command to be able to stop the WDT
from the command line.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:38 +0000 (13:35 +0100)]
doc: phytec: imx8mm: add OP-TEE documentation
Add instructions on how to build and package OP-TEE for the
phycore-imx8mm based boards. The build instructions are identical for
phyGATE-Tauri-L and phyBOARD-Polis.
Also fix missig '-' for TF-A build instructions.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:37 +0000 (13:35 +0100)]
doc: phytec: imx8mp: add OP-TEE documentation
Add documentation for the phyBOARD-Pollux i.MX 8M Plus on OP-TEE
integration.
Also add missing '-' to TF-A build instruction while at it.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:36 +0000 (13:35 +0100)]
phycore-imx8mm_defconfig: add optee load address
The phyCORE i.MX 8M Mini expects 0x56000000 address to load optee.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:35 +0000 (13:35 +0100)]
imx8mm-phygate-tauri-l_defconfig: add optee load address
The phyGATE-Tauri-L expects 0x56000000 address to load optee.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:34 +0000 (13:35 +0100)]
phycore-imx8mp_defconfig: add optee load address
The phyBOARD-Pollux expects 0x56000000 address to load optee.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:33 +0000 (13:35 +0100)]
arm: imx8m: add OP-TEE node
Add tee node in SoC u-boot device trees. Use a kconfig entry to specify
load and entry addresses for the op-tee image in the respective
defconfig.
Default IMX8M_OPTEE_LOAD_ADDR is supplied. To keep it simple, the same
addresses are used for each SoC as are defined in upstream tf-a
(BL32_BASE) [1].
[1] https://github.com/ARM-software/arm-trusted-firmware/tree/master/plat/imx/imx8m
Signed-off-by: Yannic Moog <y.moog@phytec.de>