Re: [PATCH v3 1/1] of: unittest: overlay: ensure proper alignment of copied FDT

From: Guenter Roeck
Date: Thu Apr 08 2021 - 16:22:08 EST


On 4/8/21 1:06 PM, Frank Rowand wrote:

>>> +#define FDT_ALIGN_SIZE 8
>>> +
>>
>> Use existing define ? Or was that local in libfdt ?
>
> I don't see a define in libfdt. If anyone finds one,
> I'll switch to it.
>

Turns out that was hardcoded in scripts/dtc/libfdt/fdt.c

+ /* The device tree must be at an 8-byte aligned address */
+ if ((uintptr_t)fdt & 7)
+ return -FDT_ERR_ALIGNMENT;
+

Guenter