[U-Boot] [PATCH 0/8] Initial integration of AVB2.0

Eugeniu Rosca erosca at de.adit-jv.com
Tue May 15 15:31:16 UTC 2018


On Sun, May 06, 2018 at 01:31:18PM +0200, Eugeniu Rosca wrote:
> Hello Igor, Alex, Kever,
> 
> I wonder if it would be possible to keep the internal libavb headers in
> lib/libavb (similar to how it's done by NXP in [4]), since this would
> allow not rewriting the original include paths for such headers in every
> *.c file and hence minimize the delta between in-tree vs out-of-tree
> code, as well as potentially speed up the update process (and/or
> simplify any update script which will take care of it, as also
> mentioned by Alex).
> 
> [4] http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/commit/?h=60e14a6a07c5

Here is what I mean.
Three lzma headers are exposed to internal users/consumers:

$ git grep '"../../lib/'
---<-snip->---
include/lzma/LzmaDec.h:#include "../../lib/lzma/LzmaDec.h"
include/lzma/LzmaTools.h:#include "../../lib/lzma/LzmaTools.h"
include/lzma/LzmaTypes.h:#include "../../lib/lzma/Types.h"
---<-snip->---

A few places where lzma headers are used:

$ git grep 'include <lzma/Lzma'
cmd/lzmadec.c:#include <lzma/LzmaTools.h>
common/bootm.c:#include <lzma/LzmaTypes.h>
common/bootm.c:#include <lzma/LzmaDec.h>
common/bootm.c:#include <lzma/LzmaTools.h>
lib/lzma/LzmaTools.h:#include <lzma/LzmaTypes.h>
test/compression.c:#include <lzma/LzmaTypes.h>
test/compression.c:#include <lzma/LzmaDec.h>
test/compression.c:#include <lzma/LzmaTools.h>

For libavb this would translate to:

$ cat include/avb/libavb.h
---<-snip->---
#include "../../lib/libavb/avb_chain_partition_descriptor.h"
#include "../../lib/libavb/avb_crypto.h"
#include "../../lib/libavb/avb_descriptor.h"
#include "../../lib/libavb/avb_footer.h"
#include "../../lib/libavb/avb_hash_descriptor.h"
---<-snip->---

And with that, various consumers (mainly libavb_avb?) would do:
#include <avb/libavb.h>

As said, this would make integration of new libavb versions much easier.
Would appreciate your thoughts.

Best regards,
Eugeniu.


More information about the U-Boot mailing list