[PATCH v2 7/7] rockchip: make_fit_atf: add signature handling

Heiko Stübner heiko at sntech.de
Mon May 4 02:33:36 CEST 2020


Hi Kever,

Am Freitag, 1. Mai 2020, 12:32:23 CEST schrieb Kever Yang:
> On 2020/4/21 上午8:23, Heiko Stuebner wrote:
> > From: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>
> >
> > If the newly added fit-generator key-options are found, append needed
> > signature nodes to all generated image blocks, so that they can get
> > signed when mkimage later compiles the .itb from the generated .its.
> >
> > Signed-off-by: Heiko Stuebner <heiko.stuebner at theobroma-systems.com>
> > ---
> >   arch/arm/mach-rockchip/make_fit_atf.py | 51 +++++++++++++++++++++++++-
> >   1 file changed, 50 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/mach-rockchip/make_fit_atf.py b/arch/arm/mach-rockchip/make_fit_atf.py
> > index d15c32b303..5b353f9d0a 100755
> > --- a/arch/arm/mach-rockchip/make_fit_atf.py
> > +++ b/arch/arm/mach-rockchip/make_fit_atf.py
> > @@ -14,6 +14,8 @@ import sys
> >   import getopt
> >   import logging
> >   import struct
> > +import Crypto
> > +from Crypto.PublicKey import RSA
> >   
> 
> +Traceback (most recent call last):
> 1395 
> <https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip/-/jobs/86952#L1395>+ 
> File "arch/arm/mach-rockchip/make_fit_atf.py", line 17, in <module>
> 1396 
> <https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip/-/jobs/86952#L1396>+ 
> import Crypto
> 1397 
> <https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip/-/jobs/86952#L1397>+ModuleNotFoundError: 
> No module named 'Crypto'
> 
> 
> Please help to update .gitlab-ci.yml, or else it will report the error.

The ci stuff probably needs to install pycrypto from pip (or python-crypto
when using a .deb), but I have no clue how this works or how to test any
changes to that locally.

But I guess something like below might do the trick?

Heiko


diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index beaf9b9042..863c3dea51 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -68,6 +68,7 @@ build all 64bit ARM platforms:
     - virtualenv -p /usr/bin/python3 /tmp/venv
     - . /tmp/venv/bin/activate
     - pip install pyelftools
+    - pip install pycrypto
     - ret=0;
       ./tools/buildman/buildman -o /tmp -P -E -W aarch64 || ret=$?;
       if [[ $ret -ne 0 ]]; then





More information about the U-Boot mailing list