94489 Commits

Author SHA1 Message Date
Simon Glass
d720be4766 binman: Write the compressed output to a file
When an entry is compressed, write the compressed contents to a file so
that it is possible to see what was produced. This aids debugging with
new images.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29 08:42:18 -06:00
Simon Glass
9b37db6b77 binman: elf: Add more debugging to LookupAndWriteSymbols()
When symbol-writing does not appear to work, it can sometimes be hard to
figure out what is going on. Add some more debugging to help.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29 08:42:18 -06:00
Simon Glass
bcc8f0853b binman: Move problem-checking code into a function
This has become quite long, so move it into a separate function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29 08:42:18 -06:00
Simon Glass
82873aab47 binman: Tidy up comment for Bintoolfdt_add_pubkey.run()
This function returns a value, so add documentation for it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29 08:42:18 -06:00
Simon Glass
018646cddd binman: Tidy up bintool docs
The docs have somehow got out of sync. Regenerate the file to fix the
problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29 08:42:18 -06:00
Simon Glass
68516827c8 binman: Correct an error in the FIT-template example
The example contains references to an non-existent node. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29 08:42:18 -06:00
Simon Glass
12ddbc1564 fixdep: Support VPL
Add VPL support in this tool.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: f86ca5ad8f7 ("Introduce Verifying Program Loader (VPL)")
2024-07-29 08:42:18 -06:00
Simon Glass
00b0855aef qconfig: Support a 'list' format
Add a flag to output the found list in a more user-friendly format, with
one board per line. Omit the board count.

This can be useful with grep, for example.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29 08:42:18 -06:00
Simon Glass
6bf44b48f9 qconfig: Sort the boards by name when finding
There is no particular ordering of the board list at present, since it
is generated by a multi-threaded process. Sort them by name to make it
easier to see if a particular board is present.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-29 08:42:18 -06:00
Simon Glass
7ff80ece21 qconfig: Allow searching for CONFIG values
Add basic support for searching for matching of non-matching values.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/20
2024-07-29 08:42:18 -06:00
Tom Rini
9366640449 buildman minor fix
qconfig refactoring
 patman fix for Python 3.12
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmajrIQRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreaRzQgAy6FwI7s41myN4UFXIrdkMppSEjiM1AnD
 tsOqD4KRRDVAJaEXaWw3kpXcr426jNoZPbbeaywXQzzs+T19Cm5gmWxyvfc2I8Ji
 j2CeB5DggOAxqEJZ2CFK8FBKO2SJV4BMCA1BRizj+LeMhdHzCgua0145X8itR1SG
 Oo39qrVegoGiLoHgMoxjS/Tfcnt8AKIL0Nw7B50hFWd48MJ3auYmvCln3DCGygYi
 01EUu7EUjICnizdYRv38lBOGaMwexLntVlWjfRlriZwt74WCe7J2iLtJXSKpy4F5
 I7RmqJlq3KK5V22tnNvnEC612cWbBjMxbmCAqYy8stBbvYRbvFpO4Q==
 =7GF7
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-26jul24' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm

buildman minor fix
qconfig refactoring
patman fix for Python 3.12
2024-07-26 10:35:44 -06:00
Simon Glass
e8effc3854 buildman: Show board list with -x
When -x is used, buildman does not show the list of boards that will be
built, since there are no terms which cause boards to be added, only
terms which cause them to be removed.

Add a special case to fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
2024-07-26 08:01:06 -06:00
Andrew Goodbody
bbef829f9d sandbox: Fix LTO to work with STACKPROTECTOR
Add the STACKPROTECTOR symbols to the script that generates the
symbols that should not be removed by the use of LTO when linking
a shared object. This prevents a fail to build due to link errors.

https://source.denx.de/u-boot/u-boot/-/issues/35

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
eb45f1ce17 binman: Update cbfstool
Update to a newer version of this tool, 4.22.01. This runs OK with the
current binman tests and matches the one in CI.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2024-07-26 08:01:06 -06:00
Brandon Maier
f0a166e096 tools: patman: fix pip install with Python 3.12
Installing patman with `cd ./tools/patman && pip install -e .` fails
with the error below.

As described in the error output below, the license line is not allowed
to be only defined in the setup.py. We remove the 'license' field
entirely, as the Python Packaging User Guide recommends using projects
classifiers instead[1] and we already set the GPL-2.0+ classifier.

> $ cd ./tools/patman && pip install -e .
> Obtaining file:///.../u-boot/tools/patman
>   Installing build dependencies ... done
>   Checking if build backend supports build_editable ... done
>   Getting requirements to build editable ... error
>   error: subprocess-exited-with-error
>
>   × Getting requirements to build editable did not run successfully.
>   │ exit code: 1
>   ╰─> [61 lines of output]
>       /tmp/pip-build-env-mqjvnmz8/overlay/lib/python3.12/site-packages/setuptools/config/_apply_pyprojecttoml.py:76:
>           _MissingDynamic: `license` defined outside of `pyproject.toml` is ignored.
>       !!
>
>       ********************************************************************************
>       The following seems to be defined outside of `pyproject.toml`:
>
>       `license = 'GPL-2.0+'`
>
>       According to the spec (see the link below), however, setuptools CANNOT
>       consider this value unless `license` is listed as `dynamic`.
>
>       https://packaging.python.org/en/latest/specifications/pyproject-toml/#declaring-project-metadata-the-project-table
>
>       To prevent this problem, you can list `license` under `dynamic` or alternatively
>       remove the `[project]` table from your file and rely entirely on other means of
>       configuration.
>       ********************************************************************************
>
>       !!

[1] https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
c57d406134 qconfig: Move operation check into parse_args()
Put the check for an operation being provided into the parse_args()
function, to reduce the size of main().

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
e23a583940 qconfig: Drop col argument from Slots()
This is not needed since the progress indicator has the object. Use that
instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
948d0b45f5 qconfig: Use the Color object in Progress
Since the Progress class has the required object, use it from there
instead of passing it around.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
ab1bfd4b8f qconfig: Move the last two operations into their own functions
Put the summary and database-writing code into separate functions to
reduce the size of main().

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
0229eeef7b qconfig: Move progress output into the class
Rather than create these outputs separately, put them in the class so
that the main program doesn't need to deal with them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
6c2a4385ff qconfig: Move commit code into a separate function
Reduce the size of main() by putting this code into its own function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
eb1df3fde3 qconfig: Move all move_config code into move_config()
Move the setup and completion code into the move_config() function so
it is all in one place.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
630a9c9a47 qconfig: Add a return value to do_find_config()
Return an exit code so we can use this function like do_tests().
Refactor the caller to handle this.

Reduce the size of main() by putting this code into its own function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
cc628f582a qconfig: Move imply into a separate function
Reduce the size of main() by putting this code into its own function,
with the usage message staying in main().

Tidy up the comments for do_imply_config() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
d63357eefc qconfig: Add a return value to do_scan_source()
Return an exit code so we can use this function like do_tests().
Refactor the caller to handle this.

Reduce the size of main() by putting this code into its own function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
7e68804fa3 qconfig: Move testing into a separate function
Reduce the size of main() by putting this code into its own function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
fd35fbe222 qconfig: Move converting config args to the top
Move this check to the top, so it happens always. There is no harm to
doing this earlier and it separates the setup from actual program logic.

Update the arg rather than adding a new variable, with the new variable
only created when moving or building, since it is used more heavily.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
c50b6f18f3 qconfig: Move checking directory to the top
Move this check to the top, so it happens always. The tool should be
run from the U-Boot source directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
035ecb44ec qconfig: Move getting the colour to where it is needed
Move this assignment down to just above where it is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
382c662c82 qconfig: Move arg checking to the top of main()
Check for 'test' as one of the possible operations for this tool,
moving the check above the implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
fd385b3b01 qconfig: Move arg checking a little higher
Check for scan_source as one of the possible operations for this tool,
moving the check above the scan_source implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
a056c4272c qconfig: Move arg parsing into a separate function
Reduce the size of main() by putting this code into its own function.
For now the parser object needs to be returned too.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
495e58c920 qconfig: Rename the doc link
This was missed during the renaming of the tool. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: ea4d6dead37 ("moveconfig: Rename the tool to qconfig")
2024-07-26 08:01:06 -06:00
Simon Glass
0e03fb1848 qconfig: Correct format string in do_imply_config()
One of the strings was converted incorrectly. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 1bd43060b3e ("moveconfig: Use f strings where possible")
2024-07-26 08:01:06 -06:00
Simon Glass
f876e96f4c qconfig: Tidy up some pylint warnings
Reduce the number of warnings in this file a little bit.

Add my own name to the copyright message.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
0a0c124008 qconfig: Make KconfigScanner a function
This doesn't have any methods so is not good as a class. Make it a
function instead, to keep pylint happy.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
deedf65306 qconfig: Drop the try_expand() function
This is not used anymore, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:06 -06:00
Simon Glass
61d555d8a7 qconfig: Fix pylint error in read_database()
Fix this error by initing the variable before the loop:

tools/qconfig.py:880:22: E0606: Possibly using variable 'defconfig'
   before assignment (possibly-used-before-assignment)

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-07-26 08:01:05 -06:00
Tom Rini
f4e163ece4 Merge branch 'qcom-main' of https://gitlab.denx.de/u-boot/custodians/u-boot-snapdragon
* Qualcomm platforms >~2016 gain support for the RPMh (Resource Power Manager)
  peripheral which is used to control most regulators. The RB5 is now able to
  power up its USB VBUS regulator via the rpmh regulator driver. Git history
  from the original Linux driver is preserved for ease of maintenance.
* IPQ40xx SoCs gain ethernet networking support via the new ESS EDMA driver.
2024-07-26 07:49:36 -06:00
Robert Marko
927739c0b7
arm: dts: add IPQ4019 ESS EDMA U-Boot additions
IPQ4019 ESS EDMA support is not yet in upstream Linux, so for now lets use
the latest pending Linux DTS node for wired networking.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2024-07-26 01:53:13 +02:00
Robert Marko
c4360954ef
net: add Qualcomm ESS EDMA adapter
This adds the driver for the ESS EDMA ethernet adapter
found inside of Qualcomm IPQ40xx SoC series.

This driver also integrates the built in modified QCA8337N
switch support as they are tightly integrated.

Co-Developed-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2024-07-26 01:53:12 +02:00
Robert Marko
13cb918769
clock: qcom: ipq4019: add missing networking resets
IPQ4019 has more networking related resets that will be required for future
wired networking support, so lets add them.

This syncs the driver with Linux.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-26 01:53:12 +02:00
Robert Marko
19ea72e489
dt-bindings: clock: qcom: ipq4019: drop downstream file
IPQ4019 clock dt-bindings are available in Linux upstream, and we can just
use those instead of carrying a downstream file that matches the upstream one
anyway.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2024-07-26 01:53:12 +02:00
Robert Marko
6af8dae852
clock: qcom: ipq4019: add ESS clock
ESS clock is the Ethernet Subsystem clock, so lets add it as its
already configured by SBL1.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2024-07-26 01:53:11 +02:00
Caleb Connolly
d1b01d8502
qcom_defconfig: enable rpmh regulators
Enable RPMh, cmd-db, and RPMh regulators. Additionally enable
CMD_REGULATOR for debugging.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-26 01:28:41 +02:00
Caleb Connolly
426d35d24f
power: regulator: qcom-rpmh-regulator: add build infra
Add Kconfig and Makefile entries for this driver now that it can build
for U-Boot.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-26 01:28:13 +02:00
Caleb Connolly
b501a65cd8
power: regulator: qcom-rpmh-regulator: adjust probe for U-Boot
Refactor initialization to use U-Boot's driver model and API.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-26 01:28:12 +02:00
Caleb Connolly
a330dec3af
power: regulator: qcom-rpmh-regulator: port ops to U-Boot
Port over the regulator ops to U-Boot's regulator API. Add back the
pmic5 mode map using U-Boot dm_regulator_mode API and adjust the
pmic5_pldo and pmic5_pldo_lv definitions. No functional changes.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-26 01:28:12 +02:00
Caleb Connolly
be1f1b7b28
power: regulator: qcom-rpmh-regulator: remove unused regulators
Initially just include the few regulators needed for the RB5 board.
Others can be added back as-needed.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-26 01:28:12 +02:00
Caleb Connolly
e651b4f1f6
power: regulator: qcom-rpmh-regulator: adjust structs for U-Boot
Switch to our linear_range helpers and remove unused/unsupported
linux-isms.

Acked-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
2024-07-26 01:28:12 +02:00