[PATCH v4 3/3] tools: binman: Add tests for FIT with data encrypted by mkimage

Tom Rini trini at konsulko.com
Thu Dec 19 14:57:04 CET 2024


On Thu, Dec 19, 2024 at 09:51:16AM +0000, Paul HENRYS (EXT) wrote:

> Hello Tom,
> 
> The issue comes from the key that is reported missing (or zero size):
> 
> ValueError: Error 1 running 'mkimage -t -k /tmp/binmant.nvd038o5/keys -F /tmp/binman.is3n51x5/fit.fit': File /tmp/binmant.nvd038o5/keys/aes256.bin don't have the expected size (size=0, expected=32)
> 
> The issue is that the "binary" file fails to be provided in patchwork. I send the following mail about this on 05/08/24:
> 

I will try again. But please note that "lore.kernel.org" also is missing
things, seemingly, because I started this out with b4 grabbing the
patches there, and then tried patchwork which did give me
tools/binman/test/aes256.bin but not the key file (and was a bit tricky
because of .gitignore). Thanks for explaining.

> > Hi Simon,
> > 
> > Sorry for the late reply as I missed your message blocked in quarantine.
> > It looks like when I push a patch with binary data, patchworks does not seem to get it right. Nonetheless, using git send-email, a copy is also sent to me and I do get the patch right.
> > I put you in CC this time so you should also have received a copy of the patches. Could you take a look you get the patch "[v2,3/3] tools: binman: Add tests for FIT with data encrypted by mkimage" with the binary data?
> > 
> > The end of the patch with the binary data should be as such:
> > 
> > diff --git a/tools/binman/test/aes256.bin b/tools/binman/test/aes256.bin                                                                                                  
> > new file mode 100644                                                                                                                                                      
> > index 0000000000000000000000000000000000000000..09b8bf6254ada5c084039f32916bc7d30233bb2c                                                                                  
> > GIT binary patch                                                                                                                                                          
> > literal 32                                                                                                                                                                
> > ncmXpsGBz<aGq<obNK8sjNli=7$jr*l$<50zC at d;2DJ=s4pC}7U                                                                                                                       
> >                                                                                                                                                                           
> > literal 0                                                                                                                                                                 
> > HcmV?d00001
> > 
> > 
> > FYI, I also added the requested changes.
> > 
> > Best regards,
> > Paul
> 
> Best regards,
> Paul
> 
> ________________________________________
> From: Tom Rini
> Sent: Thursday, December 19, 2024 01:51
> To: Paul HENRYS (EXT)
> Cc: u-boot at lists.denx.de; paul.henrysd+nodisclaimer at gmail.com; sjg at chromium.org; al.kochet at gmail.com
> Subject: Re: [PATCH v4 3/3] tools: binman: Add tests for FIT with data encrypted by mkimage
> 
> 
> On Mon, Nov 25, 2024 at 06:47:17PM +0100, Paul HENRYS wrote:
> 
> 
> 
> > Test the property 'fit,encrypt' to encrypt FIT data.
> 
> >
> 
> > Signed-off-by: Paul HENRYS <paul.henrys_ext at softathome.com>
> 
> > Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> > ---
> 
> > Changes for v4:
> 
> > - Update the tests to use 'fit,encrypt'
> 
> >
> 
> >  tools/binman/ftest.py                         |  45 +++++++++++++++
> 
> >  tools/binman/test/343_fit_encrypt_data.dts    |  53 ++++++++++++++++++
> 
> >  .../test/344_fit_encrypt_data_no_key.dts      |  53 ++++++++++++++++++
> 
> >  tools/binman/test/aes256.bin                  | Bin 0 -> 32 bytes
> 
> >  4 files changed, 151 insertions(+)
> 
> >  create mode 100644 tools/binman/test/343_fit_encrypt_data.dts
> 
> >  create mode 100644 tools/binman/test/344_fit_encrypt_data_no_key.dts
> 
> >  create mode 100644 tools/binman/test/aes256.bin
> 
> 
> 
> This fails in CI:
> 
> https://source.denx.de/u-boot/u-boot/-/jobs/980030
> 
> or
> 
> https://dev.azure.com/u-boot/u-boot/_build/results?buildId=10169&view=logs&j=c59aff74-743b-5f08-f408-4a608a489153&t=f2ea3536-b291-5a39-ad92-0220c9b8101a&l=300
> 
> Please see https://docs.u-boot.org/en/latest/develop/ci_testing.html for
> 
> how to trigger Azure yourself to resolve these, thanks!
> 
> 
> 
> --
> 
> Tom
> 

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241219/e82ba331/attachment.sig>


More information about the U-Boot mailing list