[PATCH v2] mkimage: fit_image: Make fit header and data align to 512

Punit Agrawal punit1.agrawal at toshiba.co.jp
Mon Mar 16 11:11:54 CET 2020

Kever Yang <kever.yang at rock-chips.com> writes:

> On 2020/3/16 下午3:28, Punit Agrawal wrote:
>> Kever Yang <kever.yang at rock-chips.com> writes:


>> Instead of adding another copy of this code (versions of it already
>> exist in imx8mimage.c, ifwitool.c, aisiamge.c), it would be better to
>> move the below snippet to imagetool.h.
>> #define __ALIGN_MASK(x, mask)	(((x) + (mask)) & ~(mask))
>> #define ALIGN(x, a)		__ALIGN_MASK((x), (typeof(x))(a) - 1)
>> With this, you can drop the version in imx8mimage.c which seems to
>> introduce an unnecessary multiplication / division.
> The definition of ALIGN is already at include/linux/kernel.h, is it
> better to use that directly?

If there are no restrictions to include that header, please use
it. It'll be better than making another copy. :)



More information about the U-Boot mailing list