Re: [RESEND PATCH V2] CI: add Qualcomm requirements.txt for world build

Quentin Schulz <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <24092fe1-9f23-4f85-99f7-46cb322f2e88__31998.8298042276$1786370642$gmane$org@cherry.de>
Hi Casey,

On 8/10/26 2:47 PM, Casey Connolly wrote:
> The mkmbn Python tool used for some Qualcomm platforms needs the
> cryptography module, make sure it's installed so the world build can
> succeed by adding a new requirements.txt.
> 
> Signed-off-by: Casey Connolly <[email protected]>
> ---
> Resend to correct list
> 
> Changes since v1:
>   - Use a new requirements.txt instead of adding the dependency directly
>   - Document requirement in doc/board/qualcomm/signing.rst
>   - v1: https://lore.kernel.org/u-boot/[email protected]/
> ---
>   .azure-pipelines.yml            | 1 +
>   .gitlab-ci.yml                  | 1 +
>   board/qualcomm/requirements.txt | 1 +
>   doc/board/qualcomm/signing.rst  | 3 +++
>   4 files changed, 6 insertions(+)
>   create mode 100644 board/qualcomm/requirements.txt
> 
> diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
> index 352269b08354..31962db1a40b 100644
> --- a/.azure-pipelines.yml
> +++ b/.azure-pipelines.yml
> @@ -704,8 +704,9 @@ stages:
>             python3 -m venv /tmp/venv
>             . /tmp/venv/bin/activate
>             pip install -r tools/binman/requirements.txt \
>               -r tools/buildman/requirements.txt \
> +            -r board/qualcomm/requirements.txt
>               setuptools
>             if [[ "${BUILDMAN}" != "" ]]; then
>                 ret=0;
>                 tools/buildman/buildman -o /tmp -PEWM ${BUILDMAN} ${OVERRIDE} || ret=$?;
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index f53c9286c0c5..9831dd61bc18 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -153,8 +153,9 @@ build all platforms in a single job:
>       - python3 -m venv /tmp/venv;
>         . /tmp/venv/bin/activate;
>         pip install -r tools/binman/requirements.txt
>           -r tools/buildman/requirements.txt
> +        -r board/qualcomm/requirements.txt
>           setuptools
>       - ret=0;
>         git config --global --add safe.directory "${CI_PROJECT_DIR}";
>         ./tools/buildman/buildman -o /tmp -PEWM -x xtensa || ret=$?;
> diff --git a/board/qualcomm/requirements.txt b/board/qualcomm/requirements.txt
> new file mode 100644
> index 000000000000..2033083a01a7
> --- /dev/null
> +++ b/board/qualcomm/requirements.txt
> @@ -0,0 +1 @@
> +cryptography==50.0.0

Maybe we could add a

# mkmbn

comment in that file or after the cryptography==50.0.0 line:

cryptography==50.0.0 # mkmbn

c.f. 
https://pip.pypa.io/en/latest/reference/requirements-file-format/#comments

As it isn't clear from the path of this requirements.txt what this 
applies to except it's for Qualcomm :)

You could also decide to rename this file to mkmbn_requirements.txt and 
that would provide the same info implicitly.

> diff --git a/doc/board/qualcomm/signing.rst b/doc/board/qualcomm/signing.rst
> index 317cd57cefee..ad1d0faa58e9 100644
> --- a/doc/board/qualcomm/signing.rst
> +++ b/doc/board/qualcomm/signing.rst
> @@ -26,4 +26,7 @@ For example:
>   
>   When you run make to build the ``u-boot.mbn`` target, ``mkmbn`` will inspect the DTB in your
>   U-Boot image and try to match the compatible to the table, then it will build an ELF image and
>   hash/sign it per the MBN spec.
> +
> +The mkmbn tool requires the python ``cryptography`` module, this can be installed in a virtualenv

``mkmbn``
to be consistent with the highlight we have in the paragraph above.

Reviewed-by: Quentin Schulz <[email protected]>

Thanks!
Quentin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.