[PATCH 0/1] of_property: resolve phandles against the booted device tree
Sascha Hauer
s.hauer at pengutronix.de
Tue Nov 17 00:44:30 PST 2026
Hi Primoz,
On 2026-11-13 12:55, Primoz Fiser wrote:
> Hi,
>
> I ran into this on a phyBOARD-Mira (i.MX6) secure boot setup. Two board
> expansions configure a UART pin group via a fixup along these lines:
>
> of_property -s -f -e $global.bootm.oftree /soc/.../serial at 21ec000 \
> pinctrl-0 </soc/.../pinctrl at 20e0000/uart3grp>
So you are using -e to pass the same device tree that you are booting
with later to make the phandles fit together. Took me a while to figure
that out ;)
I think -f and -e should be mutually exclusive as a combination of both
doesn't make sense, but now as you are apparently using exactly this
combination to work around a bug I think it's fine to just ignore -e
when -f is given.
BTW while looking at the patch I stumbled upon:
/*
* standard console buffer size. The result won't be bigger than the
* string input.
*/
data = malloc(1024);
This is actually wrong. A property given as <1 2 3 4> will expand to
4*32bit which is already longer than the input string, so putting more
than 256 numbers like this into a property will overflow the buffer.
Sascha
--
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