[OpenBIOS] Beginners How-To for DTS and OpenFirmware?

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Wed Nov 23 22:43:08 CET 2016


On 22/11/16 07:58, Thomas Huth wrote:

> But if you want the full-blown Open Firmware interface, you either have
> got to construct the device tree in Forth (AFAIK), or you've got to use
> some other magic to translate a FDT to an Open Firmware device tree, for
> example. Not sure about OpenBIOS, but at least SLOF has some code
> already to transform an FDT into an Open Firmware DT, so you might want
> to peek there:
> https://github.com/aik/SLOF/blob/master/board-qemu/slof/fdt.fs

Funnily enough one of the conversations I had with Ben a while back was
as to whether it was worth switching OpenBIOS to libfdt.

While it works well for the tree properties, I'm not exactly clear how
it would work in the case of binding Forth words into the device tree
nodes (e.g. as in
https://github.com/openbios/openbios/blob/ef8a14e8afb47635c9c5f7524a52c3251827e296/arch/ppc/qemu/tree.fs)
and other arbitrary C functions without getting messy.

How does SLOF cope with this?


ATB,

Mark.




More information about the OpenBIOS mailing list