1
0
Fork 0
mirror of https://github.com/u-boot/u-boot.git synced 2025-04-26 15:28:50 +00:00
Commit graph

98513 commits

Author SHA1 Message Date
Harsha Vardhan V M
578e7882bf cmd: fuse: Add fuse writebuff sub-system command
Add CMD_FUSE_WRITEBUFF config option to add and enable fuse writebuff
sub-system command. Add fuse_writebuff function to be invoked on
writebuff command.

Signed-off-by: Harsha Vardhan V M <h-vm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-04 12:25:02 -06:00
Harsha Vardhan V M
833c05ea27 doc: cmd: Add documentation for fuse command
Add documentation for the 'fuse' sub-system commands in
doc/usage/cmd/fuse.rst file.
Remove doc/README.fuse file.

Signed-off-by: Harsha Vardhan V M <h-vm@ti.com>
2025-04-04 12:25:02 -06:00
Harsha Vardhan V M
005eeda378 cmd: fuse: Remove custom string functions
Remove custom string functions and replace them with normal string
functions. Remove the custom strtou32 and replace it with
simple_strtoul.

Signed-off-by: Harsha Vardhan V M <h-vm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-04 12:25:02 -06:00
Tom Rini
ee82a5a0ed phycore_imx8mp: Rework some of the RAM related Kconfig symbols
As the code is today, we get a warning about "select" statements on
"choice" options not doing anything. In this case we can easily fix this
by dropping the select line as the following choice statement handles
things correctly. We also drop the "default false" line as false / n is
the default.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
2025-03-19 13:19:50 -03:00
Adam Ford
43f0133271 board: beacon: imx8mp: Let clock system enable UART clock
Now that the UART driver can enable the required clocks, remove
the hard-coded clock enable.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
7947c8be0e configs: imx8mp_beacon: Select SPL_CLK_IMX8MP
In preparation to remove manual references for enabling some clocks,
enable SPL_CLK_IMX8MP which automatically enables SPL_CCF and
SPL_CLK_COMPOSITE_CCF which permit various drivers to activate
their respective clocks automatically.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
225b3a7783 clk: imx: select SPL_CLK_COMPOSITE_CCF when SPL_CLK_IMX8MP
If SPL_CLK_IMX8MP is selected alone, it causes a build error.
The clock composite is required when using the clock framework, so
select it when SPL_CLK_IMX8MP is enabled.  This is already being
done outside of SPL.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
e066636eed board: beacon: imx8mn: Let clock system enable UART clock
Now that the UART driver can enable the required clocks, remove
the hard-coded clock enable.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
0e5c427353 board: beacon: imx8mm: Let clock system enable UART clock
Now that the UART driver can enable the required clocks, remove
the hard-coded clock enable.  This requires a small re-order
of a couple functions.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
dda454e933 serial: mxc: Support bulk enabling clocks
Depending on the platform, there may be multiple clock sources
required to enable a UART.  Use the bulk functions to get and
enable the clocks when the UART probes.  This can facilitate
the removal of functions to manually enable the clock.

This is made dependent on CLK_CCF which is used on imx6q,
imx8m[mnqp], several imxrt, imx9.  If/when the UART clock
registration is done for older boards, this limitation
could be updated.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
8999b76f23 clk: imx8mn: register UART clocks
In order to let the serial driver enable the clocks, the UART clocks
must be registered first.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
6d33ca36e3 clk: imx8mm: register UART clocks
In order to let the serial driver enable the clocks, the UART clocks
must be registered first.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
c60bdd2740 clk: imx6q: Register UART clocks
In order to use the driver model and clock system to enable UART
clocks from the serial driver, it's necessary to register the UART
clocks.  With the helper function to check for imx6qp vs other
variants, the UART can register for both scenarios.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Adam Ford
4e73c627cb clk: imx6q: Properly handle imx6qp ECSPI clk_sels
The ECSPI clock has the ability to select between pll3_60m and
osc on the imx6qp, where it's fixed on other variants.  Fix this
by adding using a helper function to determine SoC variant and
register the clock accordingly.

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2025-03-19 13:17:21 -03:00
Tom Rini
8bc3542384 Merge patch series "pxe: Precursor series for supporting read_all() in extlinux / PXE"
Simon Glass <sjg@chromium.org> says:

This series includes some patches related to allowing read_all() to be
used with the extlinux / PXE bootmeths.

These patches were split out from the stb4 series, since it will need to
have additional patches for LWIP, to avoid breaking PXE booting when
LWIP is used.

Link: https://lore.kernel.org/r/20250306002533.2380866-1-sjg@chromium.org
2025-03-18 13:12:51 -06:00
Simon Glass
0f094b8b14 net: Provide a function to run network operations
Add a new netboot_run() function which can be used for simple network
operations, such as loading a file. Put the implementation in an
internal function, used by the existing code.

Place this function into the net/ code, so that it does not need the
command line to be available.

Document which network operations are supported, i.e. a limited subset,
for now.

For the one board which uses lwip, it is not quite clear how to avoid
using the cmdline interface. This will need some discussion.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:16 -06:00
Simon Glass
f278f0cb49 net: Drop #ifdef in parse_args()
Use IS_ENABLED() to avoid an extra build path.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-03-18 13:12:16 -06:00
Simon Glass
bfffdfaaf6 net: Refactor part of netboot_common() into a function
Move the core code for starting an netboot operation into a separate
function, so that we can (with additional work) move towards calling it
from outside the file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
25d51d3c79 net: Return the size from parse_args()
Rather than setting global variables, return the size, if provided. For
tftput, use the addr argument to store the save address, to avoid adding
yet another parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
f604212048 net: Return the address and size from parse_addr_size()
Rather than updating the global, update the value of some parameters,
so the action of the function is simpler.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
4b6070e056 net: Return the load address from parse_args()
Rather than updating the global, update the value of a parameter, so the
action of the function is simpler.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
f1ece5d86e net: Simplify parse_args()
This function repeats the same code in a few places, namely setting
net_boot_file_name_explicit and copying of the filename to
net_boot_file_name

Move these two operations to the caller, with just the filename (or
NULL) returned by parse_args()

This makes things a little easier to follow.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
3ccbc10cd9 net: Tidy up the comments to parse_args()
This function is a bit vague as to what it does. Expand the comment a
little, to specify which args are provided and which variables are
updated.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-03-18 13:12:15 -06:00
Simon Glass
2c04afbc95 net: Keep the bootstage functions together
Move the bootstage_mark() function just before net_loop(), so that the
IPv6 code is not in the way.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
e2e87b8401 boot: pxe: Refactor label_run_boot() to avoid cmdline
Adjust the remaining call in this function to use the bootm API. This
will allow PXE to work without the command line.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
feb8d7fd74 pxe_utils: Simplify default fdt in label_run_boot()
Tidy up this code a little to avoid two calls to env_get() for both
fdt_addr and fdtcontroladdr

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-03-18 13:12:15 -06:00
Simon Glass
b13408021d boot: pxe: Use bootm_...() functions where possible
Rather than building a command line for each operation, use the
functions provided by the bootm API.

Make sure that the bootm functions are available if pxe_utils is used.

Since SYS_BOOTM_LEN is not present for the tools-only build, adjust the
code to handle that.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-03-18 13:12:15 -06:00
Simon Glass
ecd50bb464 boot: Support compressed booti images in bootm
A compressed booti image relies on the compression-format's header at
the start to indicate which compression algorithm is used.

We don't support this elsewhere in U-Boot, so assume that a compressed
file is always a booti file. Once it is compressed, a check is made to
make sure that it actually is.

Simplify the implementation by adding a new function which returns the
booti image-type if compression is detected.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
d6bb0ea535 boot: Support booti format in bootm
At present the booti format is handled separately, in its own command.
Provide a way to boot uncompressed booti images within the bootm code,
so that eventually we can boot these images without CONFIG_CMDLINE

Update bootm_init() to attach the images for all formats which use them.

Add some debugging while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
098407e673 boot: arm: riscv: sandbox: Add a format for the booti file
Arm invented a new format for arm64 and something similar is also used
with RISC-V. Add this to the list of supported formats and provide a way
for the format to be detected on both architectures.

Update the genimg_get_format() function to support this.

Fix up switch() statements which don't currently mention this format.
Booti does not support a ramdisk, so this can be ignored.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
3c7b13b075 boot: Convert IMAGE_FORMAT into an enum
Use an enum so it is clearer that these options are related. Update
genimg_get_format(), tidy up the function comment and move it to the
header file, since it is exported.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
7f10a7fe12 bootm: Allow building bootm.c without CONFIG_SYS_BOOTM_LEN
This code cannot be compiled by boards which don't have this option. Add
an accessor in the header file to avoid another #ifdef

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-03-18 13:12:15 -06:00
Simon Glass
600bc21da5 boot: Pass just the FDT argument to label_process_fdt()
Since this function only adjusts one element of the bootm command, pass
just that. This will make it easier to refactor things to remove the
bootm command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-03-18 13:12:15 -06:00
Simon Glass
f6aa262f55 boot: Split pxe label_run_boot() into two parts
This function is quite long. Split out the FDT processing into its own
function.

Add a function comment for the new label_process_fdt() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-03-18 13:12:15 -06:00
Simon Glass
ff9fef41fe boot: Split pxe label_boot() into two parts
This function is far too long. Split out the part which builds and runs
the bootm/i/z commands into its own function.

Add a function comment for the new label_run_boot() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-03-18 13:12:15 -06:00
Simon Glass
0fd3ed1cd7 boot: Use strlcpy() in label_boot()
This function is recommended instead of strncpy() since it always
terminates the string.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
c73da92304 x86: Drop the unnecessary base_ptr argument to zboot_dump()
This value is include the bootm_info, so drop the unnecessary parameter.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
1592ff27d5 bootstd: Correct display of kernel version
The address of the bzImage is not recorded in the bootflow, so we cannot
actually locate the version at present. Handle this case, to avoid
showing invalid data.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
4e36b1739b x86: Move the bootm state for zimage into cmd/
Rather than holding the state in the implementation code, move it to the
command code. The state is now passed to the implementation functions
and can there (with future work) be pass in from bootstd, without going
through the commands.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
00cfb598e7 x86: Rename state to bmi
Use the common name for the struct, in preparation for passing it around
between functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
75e85df796 x86: Move x86 zboot state into struct bootm_info
This structure is supposed to handle any type of booting
programmatically, i.e. without needing a command to be executed. Move
the x86-specific members into it and use it instead of
struct zboot_state. Provide a macro so access is possible without adding
lots of #ifdefs to the code.

This will allow the struct to be used for all four types of booting
(bootm, bootz, booti and zboot).

Call bootm_init() to init the state, to match other boot methods.

Note that some rationalisation could be performed on this. But this
is tricky since addresses are stored as strings in several places. Also
some strings combine multiple arguments into one. So to keep this task
somewhat manageable, we content ourselves with just getting everything
into the same struct

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
2de073527b x86: Drop duplicate definition of zimage_dump()
This is now defined in bootm.h so drop the duplicate in the x86 code.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
95641f4bf9 x86: Rename zboot_run() to zboot_run_args()
Rename this function so we can (later) create a zboot_run() function
which looks the same as bootm_run()

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Simon Glass
299d24eddf x86: Make do_zboot_states() static
This function is only called within zboot.c so make the function
private.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-03-18 13:12:15 -06:00
Tom Rini
698edd63ec - initial cleanup and defines sync with Linux v6.12
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmfZiX4ACgkQd9zb2sjI
 SdHVLBAAjJo9XqHSmYtOqU16lvuuv2WrJuWtKu/dDpz2ozQdOXdZz67Ht6KhTRkC
 RqFcRmEwndtbQgHN5eqrO3CbAYvIrbo1dK4bIi1yPzLRi18e1WJQQGad87msHqWX
 qNB933uhtP3yHtKzEGuBIQ6DexUHGf7URiKytOP0oEzFUcmfOu0XGOTSdZ6Mv8CB
 9Q8h0ayFNKPD0aTF8fOM13Sz7YYv9MQdrjk6wxegvteSwHOCMT0233QG6PK4FUrL
 0loGNrKTd6lF+BBoxLNXrVFSVNhxvj9hI3SDV3HUx2x+mITtmak4gKUxVxiUGYEe
 A3ZjB6C02hvinC7ME94A22xVnxLvHHJJXXlcuB+EmeEav9CzKTZAYesuy3flcs9w
 u13WYsgkRk8WRvjpgGQpmbbk/DJ/6W/gHJFK2dEVPyIXClSFx2Rba4RfeHYuSyb9
 jhmADJXMTF/CwwiYS8wuzbiy0130BRfzCPgZTZeEnqpyWH53e/2cXdBtRjnv+uEd
 9mk806sf81kZK94z/FLG124uxxg9sujjY+WVktnc+wGxpDGd0eeyerTr1C/cRAO4
 X4hI89P6nmwojYII6EuWdfLEJSpsNxC71Ii9223++UU+X1CLYBsQA06y/SLYburU
 rUKqcO5woGD2zLgd0sYu+8jpL6DhdUY0EZLdodoG3QodvXnmnyY=
 =ym6n
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-ufs-next-20250318' of https://source.denx.de/u-boot/custodians/u-boot-ufs into next

- initial cleanup and defines sync with Linux v6.12
2025-03-18 11:03:53 -06:00
Tom Rini
d92c29f89d - odroid-n2: Update docs for signing
- support Amlogic chip_id v1 and v2
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmfZgvIACgkQd9zb2sjI
 SdEy3hAAz50M4fI5u/Xa19T9Z8E2QW7TrTAQcjm6ylDqEX2sjFgm4Q3pGxMYXGFN
 TAT+vxm6LOxlDWzFb4ZRxpcAyW7Fmc+5w/13ZJJID519jpDnuPSNP3uOJ1fK1D/O
 ksWfFG9PPqYYlGKhtwsSko1E7cb28B7+eFSWGcqC4XYONDNkZO8zzRXmeNLCnkEB
 5MDvWOWHclHM70tzJYTl82kLeY43ijjuHYW5ITA2g6kNqFy6OHAXfyaYl8p0AdoU
 usBJ5HCQLDdqlYP8/qQkTqZKrLRPOQkC4Tx6ezaz/QkO7G3B543h1XIs4xohN30M
 UYAzvtejksYSXn+DKj4Ti7i7Bp+dekA6DeWu7gTulsV770AeiiJB1v1ggPRWYQnp
 zE2B19mpq3IHdSciu3dj6B0PpgNCrRVOhQjbabWx4bamb48w35hd2X7X0bTe0ty0
 hHjVK9OVMjMy8QRvCs2cUs/HE3Eono7gMeT4/6O8T4JarQ85oVGT9Nsr4MeD3jTW
 o9S/KYVeShoMMpVQ1Sc3T8J02OlpTGAeqyP4pCuVgieOXwY9pLi39fCBJoFhqZfK
 A3rBYVjXej5/LxgjPmh6BCL+yhemB/6DGSWIuKVXHg/WtYlgj64sgYn+aCCUY8KI
 +gCA9YQZQdQO+DREg6gQyV5mtBLAF5O3iB87HD+ojPfr81yYOwc=
 =wUK6
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-20250318' of https://source.denx.de/u-boot/custodians/u-boot-amlogic into next

- odroid-n2: Update docs for signing
- support Amlogic chip_id v1 and v2
2025-03-18 11:03:28 -06:00
Tom Rini
75d1ac298a Merge patch series "vepxpress64: disable CRC32 by default and add FVP with TF-A guide"
Harrison Mutai <harrison.mutai@arm.com> says:

This patch introduces two updates to the vexpress64 project:

- Disable CRC32 by default to prevent aborts in a standard FVP setup.
- Add a guide for running FVP with TF-A, providing a clear starting point for
  users.

Link: https://lore.kernel.org/r/20250304165204.53097-1-harrison.mutai@arm.com
2025-03-18 09:08:19 -06:00
Tom Rini
c342f27711 Merge patch series "*** Various Improvements for phyCORE-AM62/A SoMs ***"
Wadim Egorov <w.egorov@phytec.de> says:

This patch series syncs the phyCORE-AM62Ax feature-wise with our other
K3-based SoMs by adding SoM overlay handling and capsule updates. It
also introduces support for USBDFU boot and includes various minor fixes.

Link: https://lore.kernel.org/r/20250305045838.3614661-1-w.egorov@phytec.de
2025-03-18 09:04:06 -06:00
Udit Kumar
efaae94c02 configs: j784s4-am69: Enable UFS
J784S4 EVM board has UFS flash, So enable UFS configs

Cc: Neha Francis <n-francis@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
2025-03-18 09:03:59 -06:00
Neil Armstrong
d232d7fdbf ufs: core: sync ufshci.h with Linux v6.12
Sync ufshci.h with the version found in the Linux v6.12
version commit adc218676eef ("Linux 6.12").

It adds new defines, and moves defines to the same place
as the Linux header.

No functional changes intended.

Acked-by: Neha Malcom Francis <n-francis@ti.com>
Tested-by: Love Kumar <love.kumar@amd.com>
[narmstrong: do not rename CFG_RESULT_CODE_MASK]
Link: https://lore.kernel.org/r/20241230-topic-ufs-cleanup-v2-6-4c6d7994a45d@linaro.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2025-03-18 15:55:08 +01:00