Platform Project Interface

From DDCIDeos
Jump to navigationJump to search

OpenArbor 5 introduced a new interface for bsp developers to instruct OpenArbor on how to create new platform projects. If you're creating a new bsp and want to add OpenArbor support, read on.

The Current Interface

The following files are expected to be in /desk/platform/${platformName}/etc:

  • basecon.hyp which becomes bootimage.hyp after platform project creation:
    • all lines starting with "-kernelFile=" are stripped, and a section is added to the end of the file to hook in OpenArbor's loadlist management.
    • OpenArbor looks for the hitmap configuration in either the -testRAMStart/-numTestRAMPages format or the -memoryRegion="Test RAM" format.
  • openarbor.options which becomes .options after platform project creation. The specification for this file is the same as for the OpenArbor .options file for a platform project.
  • lwip-platform-specific.cd.xml is required by /desk/etc/lwip.cd.xml.

The .itconf files are ignored. Some platforms have a cffs-mal.cd.xml, but this file is not required.

In order to create the files needed for a new platform, copypaste the above files as needed from an already working platform, and use OpenArbor to create a new platform project with them. Several things will be wrong, so be sure to edit the .options file:

  • make sure the targetArch is correct, one of "x86", "ppc", "mips", etc.
  • make sure platformName matches the directory name in /desk/platform.
  • add/remove debugComponent elements to indicate which components' files should be found in dbg paths. This set can also be managed by opening the project's Complete Integration/Components editor and right-clicking on components.

The file lwip-platform-specific.cd.xml will stay in the desk tree, but you probably need to edit it to point at the right .pd.xml for lwip. This file also contains a dependency on the network driver for this platform. The network driver needs to have a component descriptor file, which, for network drivers, is commonly located at /desk/${targetArch}/etc/${componentName}.cd.xml.

Once everything works, save the .options file you've crafted as the openarbor.options for the platform.

How do I add load list items and registry xml files?

The load list is determined by the kernelFile elements of all the component descriptors in an integration. Similarly, the pi.exe invocation is determined by all the itFile elements of all the component descriptors in an integration. If there's a load list item or registry xml file missing, it should be added to a .cd.xml file that's involved in the integration.

The kernelFile and itFile elements contain only simple names, no paths. The files are found in a search path that includes /desk/platform/${platformName}/etc, /desk/${targetArch}/appbin, /desk/etc, and many other locations. If a component is configured to be in the dbg variant, then the files it references are searched in dbg paths as well as the normal paths.

How do I load the normal vs dbg version of a file?

Open the platform project's Complete Integration/Kernel Files editor, right click the file of interest, choose Show Including Components, double click one of them, right click the component and choose the variant you want. The change will be written to the .options file, so be sure to capture this decision in the platform's openarbor.options file if you want to deliver the selection in the bsp.