Re: [PATCH] of: unittest: Statically apply overlays using fdtoverlay

Frank Rowand
2021-01-19T02:26:44Z

On 1/13/21 11:00 PM, Viresh Kumar wrote:
> Frank/Rob.
>
> On 08-01-21, 14:11, Viresh Kumar wrote:
>> diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile
>> index 009f4045c8e4..f17bce85f65f 100644
>> --- a/drivers/of/unittest-data/Makefile
>> +++ b/drivers/of/unittest-data/Makefile
>> @@ -38,3 +38,26 @@ DTC_FLAGS_testcases += -@
>>
>> # suppress warnings about intentional errors
>> DTC_FLAGS_testcases += -Wno-interrupts_property
>> +
>> +# Apply overlays statically with fdtoverlay
>
> I will update this part to mention about the dtbs we are not using in the build
> as they will fail (as per Frank's comment).
>
> Is there anything else you guys want me to change before I send the next version
> ?

I sent some changes in the form of a patch, in reply to your original patch.
If you can fold the changes into your patch, and look into the comments
that I put into the patch, that would be great.

-Frank

>
>> +intermediate-overlay := overlay.dtb
>> +master := overlay_0.dtb overlay_1.dtb overlay_2.dtb \
>> + overlay_3.dtb overlay_4.dtb overlay_5.dtb \
>> + overlay_6.dtb overlay_7.dtb overlay_8.dtb \
>> + overlay_9.dtb overlay_10.dtb overlay_11.dtb \
>> + overlay_12.dtb overlay_13.dtb overlay_15.dtb \
>> + overlay_gpio_01.dtb overlay_gpio_02a.dtb \
>> + overlay_gpio_02b.dtb overlay_gpio_03.dtb \
>> + overlay_gpio_04a.dtb overlay_gpio_04b.dtb \
>> + intermediate-overlay.dtb
>> +
>> +quiet_cmd_fdtoverlay = fdtoverlay $@
>> + cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $^
>> +
>> +$(obj)/intermediate-overlay.dtb: $(obj)/overlay_base.dtb $(addprefix $(obj)/,$(intermediate-overlay))
>> + $(call if_changed,fdtoverlay)
>> +
>> +$(obj)/master.dtb: $(obj)/testcases.dtb $(addprefix $(obj)/,$(master))
>> + $(call if_changed,fdtoverlay)
>> +
>> +always-$(CONFIG_OF_OVERLAY) += intermediate-overlay.dtb master.dtb
>