One barebox image for multiple boards

Matthias Fend matthias.fend at emfend.at
Fri May 13 05:10:32 PDT 2022


Hi Sascha,

Am 13.05.2022 um 13:00 schrieb Sascha Hauer:
> 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. So
>> basically Barebox should boot with a minimal core device tree, detect the
>> board type and then use the corresponding device tree of the detected board.
>> Something similar to arch/arm/boards/stm32mp15xx-dkx/lowlevel.c but not at
>> low level.
> 
> Do you even need the full device tree in barebox? The minimal core
> device tree might be enough for barebox and only the kernel is then
> booted with the full device tree.

If there is no trick to changing the used device tree at boardlevel 
init, then this might be a possibility.
The core device tree might not be as minimal then and in exceptional 
cases minor fixups in the board code will be needed, but I think it 
could work.

In such a case, how should one ensure that the appropriate blspec entry 
is booted? Maybe by simply replacing/updating the compatible string in 
the live device tree after the board was detected?

Thanks
  ~Matthias

> 
> Sascha
> 



More information about the barebox mailing list