Commit Graph

101707 Commits

Author SHA1 Message Date
Tom Rini
320d1d04eb checkpatch.pl: Ignore mdelay instead of udelay
Whereas in Linux, on ARM there is the notion of delay operations and
mdelay and udelay are not the same, here we just have udelay and mdelay
is a trivial wrapper. Tell checkpatch to not complain here.

Reported-by: Bhimeswararao Matsa <bhimeswararao.matsa@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-09-10 10:39:24 -06:00
Tony Dinh
8c599da506 fs: ext4fs: add CONFIG_EXT4_MAX_JOURNAL_ENTRIES to Kconfig
Add maximum ext4 journal entries to Kconfig. It is necessary since the
number of journal entries is proportional to disk capacity. For example,
an ext4 4TB HDD partition could require approximately 500 entries.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-09-10 10:39:09 -06:00
Tony Dinh
1f8fd9d37d fs: ext4fs: Add initialization failure recovery path in ext4fs_write
Don't invoke ext4fs_deinit() in ext4fs_write() if the failure occurs
during initialization. It would result in a crash since ext4fs_init()
has already done that.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-09-10 10:38:56 -06:00
Jan Kiszka
371a76e845 tools: Do not generate logo when cross-building
This cannot work (unless qemu-user is registered in binfmt_misc) as the
tools will be for a different architecture.

Fixes "make cross_tools" in case CONFIG_VIDEO_LOGO is enabled.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-09-10 10:38:50 -06:00
Tom Rini
7d921410ef Merge patch series "tools: fdtgrep: Mark util_version() as static"
This series from Ilias Apalodimas <ilias.apalodimas@linaro.org> lays
some of the groundwork for being able to enable the -Wmissing-prototypes
compiler flag while building U-Boot by fixing the obvious problems in
the tools directory.

Link: https://lore.kernel.org/r/20250829081628.2327372-1-ilias.apalodimas@linaro.org
2025-09-09 12:44:23 -06:00
Ilias Apalodimas
1e73651a71 tools: imx8image: Mark imx8mimage_check_params() as static
The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-09-09 12:44:07 -06:00
Ilias Apalodimas
f006837ead tools: imx8mimage: Mark build_image() as static
The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-09-09 12:44:07 -06:00
Ilias Apalodimas
39f7af39bb tools: fit_check_sign: Mark usage() as static
The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-09-09 12:44:07 -06:00
Ilias Apalodimas
5ab15814e8 tool: fit_info: Mark usage() as static
The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-09-09 12:44:07 -06:00
Ilias Apalodimas
3ae031135d tools: rkcommon: Mark rkcommon_is_header_v2() as static
The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-09-09 12:44:07 -06:00
Ilias Apalodimas
867d762bc5 tools: mkimage: Mark copy_datafile() as static
The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-09-09 12:44:07 -06:00
Ilias Apalodimas
9fe4e088f3 tools: fdtgrep: Mark util_usage() as static
The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-09-09 12:44:07 -06:00
Ilias Apalodimas
3c34fd46b6 tools: fdtgrep: Mark util_version() as static
The function is only used locally. Enabling -Wmissing-prototypes
triggers a warning. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-09-09 12:44:07 -06:00
Marek Vasut
c9d4e82670 env: Fix up indent
Replace #define<TAB> with #define<space> to be consistent in
the entire file. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-09-09 12:43:34 -06:00
Ilias Apalodimas
5d01a97180 arm64: Properly clear BSS
Brock reports a breakage on an RK3568 SoC. His patch is
correct but he never followed up on the requested changes.

We currently use ldr to calculate the address of __bss_start and
__bss_end. However the absolute addresses of the literal pool are never
relocated and we end up clearing the wrong memory section. Use
PC-relative addressing instead.

Link: https://lore.kernel.org/u-boot/zfknlzcemnnaka5w2er5wjwefwoidrpndc4gjhx6d5xr6nlcjr@pasfayjiutii/

Suggested-by: brock_zheng <yzheng@techyauld.com>
Reported-by: brock_zheng <yzheng@techyauld.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-09-09 12:43:26 -06:00
Mark Kettenis
a5b483a52a pci: apple: Fix use of uninitialized variable
Replace use of uninitialized variable with the PCI device number
in an error message as this is what we use elsewhere to derive
the PCIe port number.  Use ofnode_read_pci_addr() to read the
PCI address of the node and derive the device number from that.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reported-by: Andrew Goodbody <andrew.goodbody@linaro.org>
2025-09-09 11:04:16 -06:00
Jan Kiszka
ae84ef8c62 tools: Drop meaningless comment from Makefile
Introduced by 245b1029e1, probably a debug left-over.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
2025-09-09 11:04:16 -06:00
Rasmus Villemoes
122c25c00a common/spl: use memmove() in load_simple_fit()
I had trouble booting some am335x boards (both
beagleboneblack and a custom board). SPL would start just fine, and
apparently load U-Boot proper, but it would hang when jumping to
U-Boot.

While debugging, I stumbled on this memcpy() which from code
inspection very much looked to have overlapping src and dst, and
indeed a simple printf revealed

  calling memcpy(0x8087bf68, 0x8087bf80, 0xf7f8)

Now, it will always be with src > dst, our memcpy()
implementations "most likely" do forward-copying, and in the end it
turned out that this wasn't the culprit after all [*].

But to avoid me or others barking up the wrong tree in the future, and
because this use of memcpy() is technically undefined, use memmove()
instead.

[*] That was 358d1cc232 ("spl: Align FDT load address"), which has
since been fixed in master but not the v2025.07 I worked of by
52caad0d14 ("ARM: Align image end to 8 bytes to fit DT alignment").

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@gmx.de>
2025-09-09 10:35:59 -06:00
Tom Rini
aff7f1314a boot: Add LEGACY_IMAGE_FORMAT to DISTRO_DEFAULTS
At this time there are still major Linux distributions which by default
boot using LEGACY_IMAGE_FORMAT type scripts. Add this option to
DISTRO_DEFAULTS to ensure these platforms can still boot.

Fixes: d780965927 ("Drop the special am335x_boneblack_vboot target")
Reported-by: Sascha Silbe <sascha-pgp@silbe.org>
Tested-By: Sascha Silbe <sascha-pgp@silbe.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-09-09 10:30:57 -06:00
Alif Zakuan Yuslaimi
a3f0a8e7a1 misc: fs_loader: Initialize actread variable
Initialize the actread variable to prevent undefined behavior
that can occur if the variable is used before being assigned a
value.

This will help to prevent potential issues, especially if
actread is used (e.g., read, incremented, or returned) before
being explicitly set elsewhere in the code.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
2025-09-09 10:30:51 -06:00
Ben Hoelker
e0f9a4fb57 drivers: rtc: max313xx: Add delay after setting date
The MAX31331 was not correctly updating the seconds when
setting the time and would return the seconds previously set.

Like the MAX31343, a delay needs to be added after setting the
time. Wait one second after writing so that the date command shows the
correct time.

Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Bruce Adams <bruce.adams@alliedtelesis.co.nz>
Signed-off-by: Ben Hoelker <ben.hoelker@alliedtelesis.co.nz>
2025-09-09 10:30:41 -06:00
Tom Rini
d4a106f005 Merge tag 'v2025.10-rc4' into next
Prepare v2025.10-rc4
2025-09-08 10:37:22 -06:00
Tom Rini
7a4f3c5652 Prepare v2025.10-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
v2025.10-rc4
2025-09-08 10:17:59 -06:00
Boon Khai Ng
bc52200ebf MAINTAINERS: Add entry for DesignWare XGMAC driver
Add a MAINTAINERS entry for the DesignWare XGMAC network driver to
ensure future patches are properly routed for review and support.

Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-09-08 09:16:18 -06:00
Tom Rini
8c981709e0 configs: Resync with savedefconfig
Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-09-08 08:51:08 -06:00
Tom Rini
a433ac255b Merge patch series "AM57 boot fixes"
Anurag Dutta <a-dutta@ti.com> says:

This patch series migrates from .h to .env format for am57xx/dra7xx.
Also, we do relevant changes so that the fdtfile can be set from C code.

logs : https://gist.github.com/anuragdutta731/82560cc9bc958ca70a25a95a7031eeea

Link: https://lore.kernel.org/r/20250901061659.986164-1-a-dutta@ti.com
2025-09-08 08:44:54 -06:00
Anurag Dutta
878888fd07 board: ti: dra7xx: Set fdtfile from C code instead of findfdt script
We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
2025-09-08 08:44:33 -06:00
Anurag Dutta
649f4a7d3c board: ti: am57xx: Set fdtfile from C code instead of findfdt script
We now can provide a map and have the standard fdtfile variable set from
code itself. This allows for bootstd to "just work".

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
2025-09-08 08:44:33 -06:00
Anurag Dutta
bc020bf53a board: ti: am57xx: Change to using .env
Move to using .env file for setting up environment variables
for am57xx and dra7xx.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
2025-09-08 08:44:33 -06:00
Anurag Dutta
5138d3a561 include: env: ti: Use .env for environment variables
Add omap common environment variables to .env. We retain the old-style C
environment .h files to maintain compatibility with other omap devices that
have not moved to using .env yet.

Signed-off-by: Anurag Dutta <a-dutta@ti.com>
2025-09-08 08:44:33 -06:00
Tom Rini
7d5312e162 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh 2025-09-08 08:33:30 -06:00
Marek Vasut
b5294efd21 arm64: renesas: r8a779g3: Use $loadaddr in bootcmd on Retronix R-Car V4H Sparrow Hawk board
Avoid use of hard-coded address in boot command, instead use $loadaddr
which is the default load address. This improves consistency of the
environment on this board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-09-07 20:29:50 +02:00
Marek Vasut
275978df0d ARM: renesas: Enable CONFIG_ENV_VARS_UBOOT_CONFIG on all boards
The CONFIG_ENV_VARS_UBOOT_CONFIG extends U-Boot environment with
variables arch/board/board_name/soc/vendor, which can be used to
discern different devices from each other based purely on U-Boot
environment variables.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-09-07 20:29:14 +02:00
Tom Rini
1116d91596 Merge tag 'u-boot-imx-next-20250905a' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/27573

- Several improvements for kontron-sl-mx6ul.
- Add Phytec imx8mp-libra-fpsc board
- Add redundant environment support for imx8m evk boards.
- Several improvements for phycore-imx93.
2025-09-05 10:48:05 -06:00
Tom Rini
328747974a Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung
- Fix issues reported by smatch
- exynos4210-origen cleanups
- e850-96 improvements
2025-09-05 08:15:16 -06:00
Benjamin Hahn
28d6f787b0 Add imx8mp-libra-fpsc board
Add new imx8mp-libra-fpsc board.
Bootph tags as well as USB device tree nodes are in u-boot.dtsi for now
and will be removed when upstreamed.
The Libra i.MX 8M Plus FPSC is a single board computer. It uses an i.MX
8M Plus FPSC [1] System on Module which utilizes the FPSC standard [2].

[1] https://www.phytec.eu/en/produkte/system-on-modules/phycore-imx-8m-plus-fpsc
[2] https://www.phytec.eu/en/produkte/system-on-modules/fpsc

Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
Tested-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Yannic Moog <y.moog@phytec.de>
2025-09-05 09:04:59 -03:00
Fabio Estevam
5d75b4f876 imx8m[m,n,p]_evk: Add redundant environment support
For reliable Over The Air update, it is recommended that redundant
environment is used.

Add redundant environment support for the i.MX8M EVK boards.

While at it, increase the environment size and adjust the offset.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2025-09-05 09:04:43 -03:00
Primoz Fiser
b4ab315a0a board: phytec: phycore-imx93: Use CONFIG_PHYTEC_EEPROM_BUS
Switch to use CONFIG_PHYTEC_EEPROM_BUS instead of the hard coded value
of 2 for the EEPROM I2C bus for both SPL and U-Boot proper. Possible
since commit 88a1816a9b ("board: phytec: common: Add PHYTEC_EEPROM_BUS
to Kconfig").

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
2025-09-05 09:04:20 -03:00
Primoz Fiser
d271a01dbe configs: imx93-phycore_defconfig: Disable CONFIG_AHAB_BOOT
By default, lets disable configuration option CONFIG_AHAB_BOOT=y on the
phyCORE-i.MX93 based boards. This option is only used in the secureboot
context which is not provided by default anyway. Lets remove it from the
defconfig to not give false impressions it is supported out of the box
for this board.

On the other hand, in the context of PHYTEC secureboot, this option is
selected by the distro which enables CONFIG_AHAB_BOOT among other secure
boot related options and tweaks needed to properly support it.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Martin Schwan <m.schwan@phytec.de>
2025-09-05 09:04:20 -03:00
Primoz Fiser
8c690095b8 arm: dts: imx93-phyboard-segin-u-boot: Clean-up already upstream nodes
Clean-up "imx93-phyboard-segin-u-boot.dtsi" internal device-tree from
nodes already part of the upstream device-tree since commit 79f3e77133
("Subtree merge tag 'v6.16-dts' of dts repo [1] into dts/upstream"). No
functional change is made with this commit.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
2025-09-05 09:04:01 -03:00
Ilias Apalodimas
d95c4bebf4 tools: imx8image: Make imx8image_check_params() static
We are trying to enable -Wmissing-prototypes and this functiion is only
used locally. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Peng Fan <peng.fan@nxp.com>
2025-09-05 09:03:45 -03:00
Frieder Schrempf
1f87a8ac6b imx: kontron-sl-mx6ul: Switch to OF_UPSTREAM
Use the upstream devicetrees instead of the local ones.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
[fabio: Remove imx6ul-kontron-bl.dtb and imx6ull-kontron-bl.dtb from Makefile]
2025-09-05 09:03:28 -03:00
Eberhard Stoll
6bfd81c339 imx: kontron-sl-mx6ul: Force default environment for serial loader boot
In case of booting from serial loader (USB) we want to always use the
default environment in order to get a defined state that is
independent of any environment stored in persistent memory.

This way we can avoid corruption of the boot process during
development and manufacturing by existing environment settings in
flash.

Signed-off-by: Eberhard Stoll <eberhard.stoll@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-09-05 09:03:28 -03:00
Eberhard Stoll
827e45f28f imx: kontron-sl-mx6ul: Enable CONFIG_ENV_IS_NOWHERE
For some cases it is beneficial to not store the environment in
persistent memory, but instead use the default environment and
keep it in volatile RAM only. Allow this by enabling
CONFIG_ENV_IS_NOWHERE.

Signed-off-by: Eberhard Stoll <eberhard.stoll@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-09-05 09:03:28 -03:00
Frieder Schrempf
9e26426ceb imx: kontron-sl-mx6ul: Enable watchdog and sysreset
Enable the watchdog and sysreset drivers and the wdt command.
This also fixes the non-working 'reset' command.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-09-05 09:03:28 -03:00
Annette Kobou
410d9ccc03 imx: kontron-sl-mx6ul: Autostart fastboot if booted from USB
For booting via USB we want to automatically start the fastboot
command in order to access the board via uuu or other tools.

This allows for easier bringup of new boards during development
and manufacturing.

Signed-off-by: Annette Kobou <annette.kobou@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-09-05 09:03:28 -03:00
Oualid Derouiche
6bd59313e0 imx: kontron-sl-mx6ul: Enable redundant environment
This aligns the MTD partitions on the SPI NOR with the kernel
devicetree and enables the redundant environment.

Signed-off-by: Oualid Derouiche <oualid.derouiche@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-09-05 09:03:28 -03:00
Annette Kobou
f3406a2364 imx: kontron-sl-mx6ul: Enable fastboot support
Enable support for fastboot commands via USB.

Signed-off-by: Annette Kobou <annette.kobou@kontron.de>
Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-09-05 09:03:28 -03:00
Frieder Schrempf
048fdda977 imx: kontron-sl-mx6ul: Enable second ethernet interface
This ensures both interfaces can be used in U-Boot and both MAC addresses
are exported to the Linux kernel devicetree.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-09-05 09:03:28 -03:00
Frieder Schrempf
8addeb94c7 imx: kontron-sl-mx6ul: Set CONFIG_SDP_LOADADDR to fix SDP boot
We need to set CONFIG_SDP_LOADADDR to a valid RAM address to make
SDP boot work. Use the end of the DDR (256 MiB minimum) as other
boards do.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2025-09-05 09:03:28 -03:00