[PATCH v2 3/4] of: add generic of_fixup_machine_compatible()

Ahmad Fatoum a.fatoum at pengutronix.de
Wed Apr 27 03:00:31 PDT 2022


On 27.04.22 11:51, Oleksij Rempel wrote:
> On Wed, Apr 27, 2022 at 11:46:20AM +0200, Ahmad Fatoum wrote:
>> Hi,
>>
>> On 27.04.22 11:37, Oleksij Rempel wrote:
>>>  
>>> +	if (IS_ENABLED(CONFIG_MACHINE_FIXUP)) {
>>> +		const char *compat;
>>> +
>>> +		compat = getenv("global.of_machine_compatible");
>>> +		if (compat)
>>> +			of_fixup_machine_compatible(root, compat);
>>
>> That's not what I had in mind. I meant for the variable to affect bootspec
>> use, i.e. fixup barebox device tree. This here just adds an extra compatible
>> to the kernel device tree.
> 
> This is what is needed for my use case/customer. As soon as other use
> case will be needed, we can extend it.

Neither the name $global.of_machine_compatible nor the description
"Extra OF board compatible" suggest that this will fixup kernel DTs instead
of rewriting barebox' own machine compatible, which is what springs to
my mind when seeing this variable. I am fine if you only implement
what you need, but that name is unsuitable for your use case IMO.

> 
> Regards,
> Oleksij


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list