On Mon, 21 Nov 2016, G 3 wrote:
On Nov 21, 2016, at 9:34 AM, Michael wrote:
But is there a "beginners how-to" somewhere? What I would find most usefull:
For forth commands I've found this page useful (not sure if this is linked from somewhere): http://www.firmworks.com/QuickRef.html
(Not everything is implemented in OpenBIOS but mostly should work.)
- Best source-code to use? There is a version-1.1.zip, a svn repo and
a git repo.
The git repo is what we are using now. I would chose that.
- The names are also a bit confusing when you see it first. I know about
the IEEE standard and a few things about the history (from wikipedia), but if you for example visit the website and click on the "openfirmware" link, the you see a page with "OpenBIOS" heading. So even if one knows about history, there is confusion about actual used names.
We use OpenBIOS as the project's name. Open Firmware is a standard OpenBIOS follows.
This is a bit confusing. There are multiple implementations of the IEEE standard (commonly referred to as Open Firmware) and one of these is also called Open Firmware. These are listed under Implementations on the left of the page at www.openfirmware.info. Another implementation used by QEMU for PPC Macintosh models (and thus being active lately and most discussed on this list) is OpenBIOS. It may be useful to make it clear what you mean when talking about Open Firmware: the standard or the implementation with the same name.
Actually running OpenBIOS on real hardware is not something that is well tested (I'm not sure if it was ever tried but I think it wasn't done recently) so if you try to do that be prepared for likely needing some fixing. This is true for any implementation that does not support the hardware you want to run it on, then you likely need to port it.
- How is the device-tree given to OF? And how does OF handle it over
to a linux kernel?
I don't think Linux touches the OpenBIOS device tree. It likes to discover things for itself.
It discovers most things it can but still starts from the device tree but it's enough to have the basics in there. Not sure how much up to date is this but this is discussed in the kernel documentation here: https://www.kernel.org/doc/Documentation/devicetree/booting-without-of.txt
As for giving the device tree to OpenBIOS I think it should just know it or construct it from discovering the hardware as the point of the device tree is to describe the hardware for the operating system so the firmware should know the hardware and provide the device tree. It does not get it from anywhere as this it the first link that should have this knowledge. There are some more info about this here for example: http://www.informit.com/articles/article.aspx?p=1647051&seqNum=5
- Minimal prerequisites on a new hardware, so that OF is able to run?
E.g. which type of RAM does it need? Does it need a stack or .text segment or other things to run (like c-code)? ...
Being a BIOS, I would think about anything could run OpenBIOS. I think any computer made in the last 20 years should work.
I don't know how do you get that idea. Being a BIOS (or more correctly firmware) means that it is the lowest level and first program run on a computer that has to have detailed knowledge on how to initialise and operate hardware components so it very much depends on having low level drivers and code for the parts of a computer which is very much dependent on the specific harware. It can't just run on any computer for which it has no drivers.
In fact OpenBIOS does not have that many drivers but maybe the basics are there, only the platform specific init code might need to be adapted for a new board. For ppc these would be in arch/ppc. Running on QEMU is quite a bit simpler as we can skip a lot of init code (such as memory controller or other hardware) so maybe these are not well implemented or buggy as they were not tested with real hardware for a while.
I don't know anything about implementations other than OpenBIOS though so not sure if they work better or worse but if it's a harware not already supported, porting it would be similar.
Regards, BALATON Zoltan