One barebox image for multiple boards

Ahmad Fatoum a.fatoum at pengutronix.de
Fri May 13 05:20:29 PDT 2022


Hello Matthias,

On 13.05.22 14:08, Matthias Fend wrote:
> Hello Sam,
> 
> Am 13.05.2022 um 12:30 schrieb Sam Ravnborg:
>> Hi Matthias
>>
>> On Fri, May 13, 2022 at 10:55:02AM +0200, Matthias Fend wrote:
>>> Hi,
>>>
>>> I'm looking for a solution to support multiple boards with just one barebox
>>> image. The few core components that are relevant for barebox are the same on
>>> all boards, so that the same barebox image runs on all boards. It is
>>> possible to dynamically detect the board type inside barebox, but as this
>>> requires some infrastructure it is not possible during lowlevel init.
>>
>> The skov-imx6 boards was in a similar situation - here the solution was
>> to add enough infrastructure to lowlevel to be able to determine the
>> board variant.
>>
>> 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).

Cheers,
Ahmad

> 
> Thanks
>  ~Matthias
> 
>>
>>     Sam
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 


-- 
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