One barebox image for multiple boards

Trent Piepho trent.piepho at
Fri May 13 11:02:50 PDT 2022

On Fri, May 13, 2022 at 5:21 AM Ahmad Fatoum <a.fatoum at> wrote:

> >>
> >> Not what you asked for but maybe duplicating the minimal set of
> >> infrastructure allows you to determine the board type anyway in lowlevel?
> >
> > Thank you for pointing out this interesting example.
> > Since in this case things like I2C devices are needed for board detection, I think putting them in lowlevel init is not a good idea.
> The i.MX8MN-EVK uses i2c to differentiate between two variants,
> look for power_init_board_pca9450 and power_init_board_bd71837.
> We don't pass different device trees there, but this can easily
> be retrofitted once it's useful (i.e. once we have PMIC drivers
> for one of these chips).

Something I've done is to modify the unflattened device tree
programmatically based on board type.  For instance, set one device to
status = "okay" and another to status = "disabled" based on board

One needs to do this before the driver(s) for those devices are
initialized.  But other drivers can be initialized first.

More information about the barebox mailing list