Commit graph

3664 commits

Author SHA1 Message Date
Simon Glass
37edf5fc03 buildman: Convert camel case in builder.py
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
42d42cf1d9 buildman: Convert camel case in bsettings.py
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
529957c315 buildman: Convert to argparse
Use argparse to parse the arguments, since OptionParser is deprecated now.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
6a0c7b4a5e buildman: Add a test for --boards
Add a simple functional test for the --boards option. Fix the example in
the docs while we are here. Also improve the docs for Builder.count so it
is clearer what it contains.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
988b91687d buildman: Correct most pylint warnings in cmdline
Tidu up warnings in this file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
ae042fd801 buildman: Convert camel case in cmdline.py
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
1d0c55d83a buildman: Create a function to get number of built commits
Move this code into a function. This removes the last pylint error in
the control module.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
f6df5edc8d buildman: Use get_alow_missing() directly to avoid var
Avoid an unnecessary local variable by moving this code to a function.
This fixes the pylint warning about too many local variables.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
75584e1fa7 buildman: Move getting the adjust_cfg into run_builder()
Move this into its own function to reduce the size of do_buildman().

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
a659b8dcd4 buildman: Move checking for make into run_builder()
This is not needed until the builder is run. Move it there to reduce the
size of the do_buildman() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
ea78233d87 buildman: Adjust show_toolchain_prefix() to not return
This function does not need to return. Simplify the code by exiting
immediately.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
985d7ae4de buildman: Drop some unnecessary variables
Drop some variables at the end of the do_bulidman() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
68f917c0b1 buildman: Moving running of the builder into a function
Move this code into a new function. This removes the pylint warning about
too many branches.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
4ec7682274 buildman: Tweak commits and show_bloat
Move setting of show_bloat to adjust_options() and adjust how the commits
variable is set. Together these remove the pylint warning about too many
statements.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
ffd06d3d8d buildman: Move remaining builder properties to constructor
Do these all in the constructor, so it is consistent.

Move the stray builder comment into the correct place.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
573b30377d buildman: Avoid too many returns in do_buildman()
Fix the pylint warning by using a variable instead of lots of 'return'
statements.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
6378bad385 buildman: Move commit numbering into determine_series()
Commits are numbered for use in tests. Do this in determine_series() since
it is already dealing with the series.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
e48b946b93 buildman: Move setting up the output dir into a function
Move this code into a separate function to reduce the size of the main
do_buildman() directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
aeb2381b27 buildman: Move counting of commits into a function
Move this code into a separate function to avoid a pylint warning in
determine_series().

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
168d792ffa buildman: Build option-adjusting into a function
Create a separate function to adjust options. Also move show_actions() up
as far as we can in the function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
1b820ee1c4 buildman: Pass option values to show_actions()
Pass in the individual values rather than the whole options object, so we
can see what is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
1d3a5a5229 buildman: Pass option values to get_action_summary()
Pass in the individual values rather than the whole options object, so we
can see what is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
081c34ccdc buildman: Move output-file setup into one place
Collect the two parts of the output-file handling into single place.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
372b44589f bulldman: Set up output_dir earlier
Set up output_dir at the start of the main function, instead of updating
the options.output_dir option.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
b868064652 bulidman: Move toolchain handling to a function
Move the code for dealing with toolchains out into its own function, to
reduce the size of the main function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
180c718a04 buildman: Move Boards-object code into a function
Move the code which obtains a Boards object into its own function, to
reduce the size of the main function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
9df59e4c19 bulidman: Move more code to determine_series()
Move some more series-related code here, to reduce the size of the main
function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
0d4874fc0d buildman: Move board-selection code into a function
Create a new determine_boards() function to hold the code which selects
which boards to build.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
26d9077c9d buildman: Add tests for excluding things
Add some tests for the -x flag.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
f0207d77b5 buildman: Move dry-run handling higher in do_buildman()
Move this up above where the builder is created, since it no-longer makes
use of the builder.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:11 -06:00
Simon Glass
d233dfb07d buildman: Drop use of builder in show_actions()
This function only needs the output directory from the builder. This is
passed into the builder, so just pass the same value to show_actions().
The avoids needing a builder to call show_actions().

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
d4366b11ad buildman: Add a test for the -A option
This lacks a test at present. Add one.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
f7a36d54ba buildman: Move fetch-arch code into a separate function
Reduce the size of the do_buildman() function a little by moving the code
that handles --fetch-arch into a separate function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
d230c0143f buildman: Move series calculations into a separate function
Reduce the size of the do_buildman() function a little by moving the code
that figures out the series into a separate function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
309f0f15c9 buildman: Move full-help processing to main
This does not need any of the control features. Move it out of main to
reduce the size of the do_buildman() function.

For Python 3.6 the -H feature will not work, but this does not seem to be
a huge problem, as it dates from 2016.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
b8be2bd831 buildman: Fix most pylint warnings in control
Tidy up the easier-to-fix pylint warnings in module 'control'.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
9ef05b950e buildman: Convert camel case in control.py
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
2ce6f9f44c buildman: Tidy up pylint warnings in main
Tidy up the various pylint warnings in module 'main'.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
a1431e6c97 buildman: Provide an argument to the -R option
Allow writing the file to a selected location, since otherwise this is
controlled by the buildman configuration, so cannot be determined by the
caller.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: https://source.denx.de/u-boot/u-boot/-/issues/17
2023-07-24 09:34:10 -06:00
Simon Glass
1b21842eab buildman: Add an option to check maintainers
Rather than using the -R option to get this report as a side effect, add
a dedicated option for it.

Disable CI for now as there are some missing maintainers, unfortunately.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
9a7cc8121f buildman: Correct logic for missing maintainers
An orphaned board should produce a warning, as should a missing name for
the maintainer (when '-' is provided). Add these cases.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
1aaaafadcc buildman: Sort the maintainer warnings
Sort the warnings into alphabetical order, for easier reading. Also make
sure that the buildman test files are ignored.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
4cab9aa65f buildman: Just display a single line for missing maintainers
At present we get multiple lines of output when a board has no MAINTAINERS
entry:

   WARNING: no status info for 'bananapi-m2-pro'
   WARNING: no maintainers for 'bananapi-m2-pro'

Suppress the 'status' one since it is implied by the other.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
c649153b58 buildman: Correct operation of MAINTAINERS N:
This doesn't work as intended. Instead it scans every defconfig file
in the source tree.

Fix it and add a test.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
ad99599ca2 buildman: Detect boards with no CONFIG_TARGET defined
We generally expected exactly one of these. Add a check for it.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
bec06ed892 buildman: Detect boards with multiple CONFIG_TARGETs defined
The TARGET_xxx options are special in that they refer to a single target.
Exactly one should be enabled for each target, corresponding to a
defconfig file.

Detect configs which result in two TARGET_xxx options being set. For
example, at present, TARGET_POLEG and TARET_POLEG_EVB are enabled for the
same board.

Note: This warning is not displayed by default. An option will be added
to enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
f99f34b14b buildman: Refactor target handling in Boards.scan()
Move the assert to the top of the function and provide an explicit
variables for the target name and base name.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
bc12d03493 buildman: Warn about dangling maintainer entries
Other than the top-level MAINTAINERS file, all maintainer entries should
actually reference a target. Add a warning to detect those that do not.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
a114c61536 buildman: Tidy up common code in parse_file()
Use a function to add to the maintainers database, to avoid duplicating
the same code twice.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
5df95cf197 buildman: Add a partial test for ensure_board_list()
Create a new function which has the non-UI parts of ensure_board_list().
Add some tests for everything except the N: tag.

While we are here, fix the confusing usage of fname inside a loops that
also uses fname.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
bd4ed9f72f buildman: Add a test for Boards.output_is_new()
Add a test for this code, adjusting the timestamp on various files to
check each use case.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
3350d34fb5 buildman: Add a test for Boards.scan_defconfigs()
Add a test for this code. It requires some defconfig files and a test
Kconfig to work with, so copy these into the temporary directory at the
start.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
b27e989197 buildman: Avoid globals in leaf functions
Rather than using the global thoughout each function, pass in these
values. This allows tests to use different values when testing the same
functions.

Improve a few comments while we are here.

No functional change is intended.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
6a754c6752 buildman: Drop dead code to handle :CONFIG_ construct
This is not needed anymore, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 252ed872 ("kconfig: remove meaningless prefixes in defconfig files")
2023-07-24 09:34:10 -06:00
Simon Glass
2ef88d634c buildman: Rename the ARM boards
Use names consistent with their target names.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
8dae07aa40 buildman: Exit with the return code consistently
Test should return a suitable exit code when they fail. Fix this and tidy
up the code a little.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
eadbfa6b08 buildman: Allow --debug to enable debugging
The -D option is used, but plumb it through --debug to enable a full
traceback when something goes wrong.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
2ef22f8e68 buildman: Fix verboose typo and add comment
Fix the typo in the RunTests() function, adding comments while we are
here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Lukas Funke
8c1fbd1f60 binman: ftest: Add test for u_boot_spl_pubkey_dtb
Add test for u_boot_spl_pubkey_dtb. The test adds a public key to the
dtb and checks if the required nodes will be added to the images dtb.

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Lukas Funke
6cb6425408 binman: doc: Add documentation for Xilinx Bootgen bintool
Add documentation for the 'bootgen' bintool

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Lukas Funke
5609843b57 binman: etype: Add u-boot-spl-pubkey-dtb etype
This adds a new etype 'u-boot-spl-pubkey-dtb'. The etype adds the public
key from a certificate to the dtb. This creates a '/signature' node which
is turn contains the fields which make up the public key. Usually this
is done by 'mkimage -K'. However, 'binman sign' does not add the public
key to the SPL. This is why the pubkey is added using this etype.

The etype calls the underlying 'fdt_add_pubkey' tool.

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Lukas Funke
671bc43346 binman: btool: Add fdt_add_pubkey as btool
Add btool which calls 'fdt_add_pubkey'

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Lukas Funke
c76831d189 binman: doc: Add documentation for fdt_add_pubkey bintool
Add documentation for btool which calls 'fdt_add_pubkey'

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Lukas Funke
f0989c29f8 binman: blob_dtb: Add fake_size argument to ObtainContents()
The method 'connect_contents_to_file()' calls ObtainsContents() with
'fake_size' argument. Without providing the argument in the blob_dtb
we are not able to call this method without error.

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Lukas Funke
7a52a45e3a binman: Don't decompress data while signing
While signing a fit compressed data (i.e. 'blob-ext') is decompressed,
but never compressed again. When compressed data was wrapped in a
section, decompression leads to an error because the outer section had
the original compressed size but the inner entry has the
uncompressed size now.

While singing there is no reason to decompress data. Thus, decompression
should be disabled.

Furthermore, bintools should be collected before loading the data. This
way bintools are available if processing is required on a node.

Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Christian Taedcke
289e6007cf binman: Add tests for etype encrypted
Add tests to reach 100% code coverage for the added etype encrypted.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Christian Taedcke
dcd3d76b7b binman: Allow cipher node as special section
The new encrypted etype generates a cipher node in the device tree
that should not be evaluated by binman, but still be kept in the
output device tree.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Christian Taedcke
473e5206f0 binman: Add support for externally encrypted blobs
This adds a new etype encrypted.

It creates a new cipher node in the related image similar to the
cipher node used by u-boot, see boot/image-cipher.c.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:34:10 -06:00
Simon Glass
df11aa7d74 binman: Add missing ssl documentation
Rerun 'binman bintool-docs' to regenerate bintools.rst

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:33:55 -06:00
Simon Glass
a6b44acaf5 binman: Renumber 277...289 TI test files
These have ended up with the same numbers as earlier files. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:33:55 -06:00
Simon Glass
176f1f68fa binman: Renumber 277_rockchip and 278_mkimage test files
These have ended up with the same numbers as earlier files. Fix them.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:33:55 -06:00
Simon Glass
efda8ab201 binman: Tidy up tests for pre-load entry type
Drop the use of a numbered key file since numbering is just for the test
devicetree files. Also adjust the tests to avoid putting a hard-coded
path to binman in the file, using the entry arg instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24 09:33:55 -06:00
Tom Rini
e381b12210 buildman: Create a requirements.txt file
At this point, buildman requires a few different modules and so we need
a requirements.txt to track what modules are needed.

Cc: Simon Glass <sjg@chromium.org>
Cc: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-21 19:36:59 -04:00
Andrew Davis
15432ea611 binman: Overwrite symlink if it already exists
Without this re-building will fail with an error when trying to create
the symlink for the second time with an already exists error.

Signed-off-by: Andrew Davis <afd@ti.com>
[n-francis@ti.com: Added support for test output dir and testcase]
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-07-21 19:36:59 -04:00
Neha Malcom Francis
8db194d046 k3: tools: config.mk: Update makefile and remove scripts
Since binman is used to package bootloader images for all K3 devices, we
do not have to rely on the earlier methods to package them.

Scripts that were used to generate x509 certificate for tiboot3.bin and
generate tispl.bin, u-boot.img have been removed.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-07-21 19:36:59 -04:00
Neha Malcom Francis
78144826bb binman: ti-secure: Add support for TI signing
The ti-secure entry contains certificate for binaries that will be
loaded or booted by system firmware whereas the ti-secure-rom entry
contains certificate for binaries that will be booted by ROM. Support
for both these types of certificates is necessary for booting of K3
devices.

Reviewed-by: Simon Glass <sjg@chromium.org>
[vigneshr@ti.com: fixed inconsist cert generation by multiple packing]
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-07-21 19:36:58 -04:00
Neha Malcom Francis
6c66ccf26c binman: ti-board-config: Add support for TI board config binaries
The ti-board-config entry loads and validates a given YAML config file
against a given schema, and generates the board config binary. K3
devices require these binaries to be packed into the final system
firmware images.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2023-07-21 19:36:58 -04:00
Tom Rini
e7f7e2e1e2 Xilinx changes for v2023.10-rc1 v2
axi_emac:
 - Change return value if RX packet is not ready
 
 cadence_qspi:
 - Enable flash reset for Versal NET
 
 dt:
 - Various DT syncups with Linux kernel
 - SOM - reserved pmufw memory location
 
 fpga:
 - Add load event
 
 mtd:
 - Add missing dependency for FLASH_CFI_MTD
 
 spi/nand:
 - Minor cleanup in Xilinx drivers
 
 versal-net:
 - Prioritize boot device in boot_targets
 - Wire mini ospi/qspi/emmc configurations
 
 watchdog:
 - Use new versal-wwdt property
 
 xilinx:
 - fix sparse warnings in various places ps7_init*
 - add missing headers
 - consolidate code around zynqmp_mmio_read/write
 - switch to amd.com email
 
 zynqmp_clk:
 - Add handling for gem rx/tsu clocks
 
 zynq_gem:
 - Configure mdio clock at run time
 
 zynq:
 - Enable fdt overlay support
 
 zynq_sdhci:
 - Call dll reset only for ZynqMP SOCs
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCZLqHzgAKCRDKSWXLKUoM
 IcdEAKCSgy0lMxb1c0adCjpkQR9x63oKbQCdGiioU+W+0moznHdI7+W2UptNt3w=
 =Uzn8
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2023.10-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

Xilinx changes for v2023.10-rc1 v2

axi_emac:
- Change return value if RX packet is not ready

cadence_qspi:
- Enable flash reset for Versal NET

dt:
- Various DT syncups with Linux kernel
- SOM - reserved pmufw memory location

fpga:
- Add load event

mtd:
- Add missing dependency for FLASH_CFI_MTD

spi/nand:
- Minor cleanup in Xilinx drivers

versal-net:
- Prioritize boot device in boot_targets
- Wire mini ospi/qspi/emmc configurations

watchdog:
- Use new versal-wwdt property

xilinx:
- fix sparse warnings in various places ps7_init*
- add missing headers
- consolidate code around zynqmp_mmio_read/write
- switch to amd.com email

zynqmp_clk:
- Add handling for gem rx/tsu clocks

zynq_gem:
- Configure mdio clock at run time

zynq:
- Enable fdt overlay support

zynq_sdhci:
- Call dll reset only for ZynqMP SOCs
2023-07-21 09:57:59 -04:00
Michal Simek
174d728471 arm64: zynqmp: Switch to amd.com emails
Update my and DPs email address to match current setup.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/aba5b19b9c5a95608829e86ad5cc4671c940f1bb.1688992543.git.michal.simek@amd.com
2023-07-21 09:00:38 +02:00
Tom Rini
e896279ac3 binman mkimage and template enhancements
misc fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmS5lQQRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreYiowgAzKVER9eU9rWDCP76GXpxwBmNUDYeS/hQ
 ivzmzcvs7luo78LpSbVHGzTNM4cQ/KUViCl4nxvBlLlKLoOTKFf9R0wv7AnBM16X
 cNARdffqfTdoptBBoJnhuHPpvVQ9M22YcTQSMaD9FvlCmAHdBaiP4T4wN04Ulckb
 u7zeQYiy/nQfFP4KxsPw3looHGNz3LaKgXw3fvbBVOsGcVR5avASLpxoEOwNbWA4
 +NcvpAqdkJ1CRjJRrVPjGqNudef69E4xjPzmoRd9Ni2HXJsSD3FoEelfKbhgovpD
 Ss23tUycbQrJyFnQj1lYiKeZRtEGBKxQUvZqhdaDg6cileRXP803HA==
 =o9IH
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-20jul23' of https://source.denx.de/u-boot/custodians/u-boot-dm

binman mkimage and template enhancements
misc fixes
2023-07-20 21:31:31 -04:00
Simon Glass
24142ead21 binman: Reduce state.SetInt and bintool cmd to debug level
These are not very important message. Change them to use the 'debug' level
instead of 'detail'.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
23b96e920b binman: Support writing symbols inside a mkimage image
Add support for writing symbols and determining the assumed position of
binaries inside a mkimage image. This is useful as an example for other
entry types which might want to do the same thing.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
696f2b73d6 binman: Support templates at any level
Allow templates to be used inside a section, not just in the top-level
/binman node.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
db0e3f13b4 binman: Add a test for templating in a FIT
Add this as a separate test case.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
35f72fb55a binman: Support templating with multiple images
Allow a template to appear in the top level description when using
multiple images.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
f6abd5227a binman: Support simple templates
Collections can used to collect the contents of other entries into a
single entry, but they result in a single entry, with the original entries
'left behind' in their old place.

It is useful to be able to specific a set of entries ones and have it used
in multiple images, or parts of an image.

Implement this mechanism.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
55e1278d5e dtoc: Allow inserting a list of nodes into another
Provide a way to specify a phandle list of nodes which are to be inserted
into an existing node.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
4df457b657 dtoc: Support copying the contents of a node into another
This permits implementation of a simple templating system, where a node
can be reused as a base for others.

For now this adds new subnodes after any existing ones.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
e1ad57e7ef binman: Correct handling of zero bss size
Fix the check for the __bss_size symbol, since it may be 0. Unfortunately
there was no test coverage for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
073fc36c17 binman: Drop __bss_size variable in bss_data.c
This is not needed since the linker script sets it up. Drop the variable
to avoid confusion.

Fix the prototype for main() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
b1e40ee734 binman: Provide a way to specify the fdt-list directly
Sometimes multiple boards are built with binman and it is useful to
specify a different FDT list for each. At present this is not possible
without providing multiple values of the of-list entryarg (which is not
supported in the U-Boot build system).

Allow a fit,fdt-list-val string-list property to be used instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Marek Vasut
fadad3a64a binman: Convert mkimage to Entry_section
This is needed to handle mkimage with inner section located itself in a
section.

Signed-off-by: Marek Vasut <marex@denx.de>
Use BuildSectionData() instead of ObtainContents(), add tests and a few
other minor fixes:
Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
20a317fb75 binman: Add more detail on how ObtainContents() works
This area of binman can be a bit confusing. Add some more comments to
help.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
7a58a0f319 binman: Update elf to return number of written symbols
Update the LookupAndWriteSymbols() function to return the number of
symbols written. Also add some logging for when debugging is not
enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
4649beae3e binman: Allow disabling symbol writing
Some boards don't use symbol writing but do access the symbols in SPL.
Provide an option to work around this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:58 -06:00
Simon Glass
f5ae32d794 binman: Read _multiple_data_files in the correct place
Move this to the ReadEntries() function where it belongs.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:57 -06:00
Simon Glass
ac8d7cf1d0 binman: Use GetEntries() to obtain section contents
Some section types don't have a simple _entries list. Use the GetEntries()
method in GetEntryContents() and other places to handle this.

This makes the behaviour more consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:57 -06:00
Simon Glass
c06c064332 binman: Init align_default in entry_Section
This should be set up in the init function, to avoid a warning about a
property not set up there. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:57 -06:00
Maxim Cournoyer
3563edefe2 tools: Fix package discovery in pyproject.toml of u_boot_pylib.
When building from source, setuptools would complain about not finding
package via its auto-discovery mechanism.  Manually specify how to
locate the files, relative to the package's directory.

* tools/u_boot_pylib/pyproject.toml: New tool.setuptools.packages.find
section.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:57 -06:00
Maxim Cournoyer
8b9c08267f tools: Fix README file in pyproject.toml of u_boot_pylib.
* tools/u_boot_pylib/pyproject.toml (readme): Replace README.md with
README.rst.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-20 14:10:57 -06:00