Attention is currently required from: Jincheng Li.
Hello Jincheng Li,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/86568?usp=email
to review the following change.
Change subject: util/cbfstool: Handle unaligned component adding by do_cbfs_locate ......................................................................
util/cbfstool: Handle unaligned component adding by do_cbfs_locate
Unaligned component adding was originally handled by cbfs_add_entry. do_cbfs_locate is also able to handle unaligned component adding when alignment is not assigned, where cbfs_locate_entry will find en eligible entry assuming alignment = 1 (unaligned).
Change-Id: Ifbf9017170833d7786eb95922554ddc86d2a5f8b Signed-off-by: Shuo Liu shuo.liu@intel.com Signed-off-by: Jincheng Li jincheng.li@intel.com --- M util/cbfstool/cbfstool.c 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/86568/1
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c index 783c7d9..9acfd26 100644 --- a/util/cbfstool/cbfstool.c +++ b/util/cbfstool/cbfstool.c @@ -879,8 +879,10 @@ * do_cbfs_locate(). In this case, it needs to ensure that the location found can fit * the CBFS file in its final form (after any compression and conversion). * - * 3. If --align was passed and the offset is still undecided at this point, + * 3. If the offset is still undecided at this point, * do_cbfs_locate() is called to find an appropriately aligned location. + * if alignment is not assigned, do_cbfs_locate/cbfs_locate_entry will assume + * alignment = 1 (unaligned). * * 4. If |offset| is still 0 at the end, cbfs_add_entry() will find the first available * location that fits. @@ -968,7 +970,7 @@ }
/* This needs to run after convert() to take compression into account. */ - if (!offset && param.alignment) + if (!offset) if (do_cbfs_locate(&offset, buffer_size(&buffer))) goto error;