1# Hardware Vendor Repository Policy 2 3Author: Andrew Geissler @geissonator 4 5Other contributors: 6 7Created: May 13, 2024 8 9## Introduction 10 11This document covers the criteria from the TOF (Technical Oversight Forum) when 12a request for a new repository or a bitbake recipe to be hosted under the 13OpenBMC Github project is made. It starts with the requirements and then some 14information on how those requirements were created. 15 16## Requirements 17 18Note that there is an expectation the reader of this document is familiar with 19OpenBMC architecture (bitbake, d-bus, phosphor-dbus-interfaces, ...). 20 21Writing hard rules for anything is hard without defeating intent, these are 22guidelines to be used by the OpenBMC TOF in their decision to approve or not 23approve new recipes or repos. 24 25Both hardware-specific and vendor-specific repositories should meet the 26following requirements to be eligible for a repository under OpenBMC: 27 281. It is compatible with the Apache 2.0 license 292. If an existing repository, it has an active maintainer 303. It has no external dependencies which would fail the requirements defined 31 within this document 324. The new repository will not break others (i.e. providing new APIs utilized by 33 a common repository that are not protected by compile flags, etc) 345. It is a feature that is believed to be generally useful to the OpenBMC 35 organization 36 - Determination made by the TOF 37 - Reference: "Create a new repository" TOF [process][tof] 386. It has an active OpenBMC community member that is willing to be a maintainer 39 40Note that the first option should always be to look into hosting the repository 41under OpenBMC (vs. a recipe in OpenBMC that points to an external repository). 42 43A repository must be hosted under OpenBMC if: 44 451. The repository depends on other OpenBMC-hosted repositories 46 47If someone wishes to create a recipe within OpenBMC to point to an external 48repository, the following could be a valid reason for this: 49 501. If the repository is utilized by other projects outside of OpenBMC then it 51 may be better suited outside of OpenBMC and utilized via a bitbake recipe 52 53If a recipe is created within OpenBMC (in any meta-X layer) to point to an 54external repository then that repository must fulfill the following 55requirements: 56 571. It should meet all of the quality-based requirements for hosting a repository 58 within OpenBMC 592. The external repository must never have its git history rewritten 603. The maintainer of the repository must commit to quick turnaround on critical 61 fixes for things such as new compiler updates 62 63Note that when a recipe is non-OpenBMC specific, but useful to OpenBMC, it 64should be pushed upstream into meta-openembedded. 65 66### Hardware Specific Feature 67 68A hardware vendor feature is defined as one of the following: 69 701. A function that is specific to the vendor hardware 71 - For example, PECI, FSI, hardware diagnostics (specific to the processor) 722. A device attached to the BMC (MCTP/PLDM/I2C/...) that is specific to the 73 vendor which the BMC must interact with 74 75To add a hardware specific repository to OpenBMC, it should meet the following 76additional criteria: 77 781. If it requires specific kernel APIs, they are available or in progress via 79 the [upstream][upstream] guidelines 80 81Some hardware vendor features which have no real synergy with OpenBMC, for 82example a CPLD code base that's only relevant to a particular vendors system, 83may be better suited to be hosted externally to OpenBMC. 84 85### Vendor Specific Feature 86 87A vendor-specific feature is defined as one of the following: 88 891. A vendor-specific data format or protocol 90 - For example, a dump collection of the host firmware, or a special format of 91 SPD/VPD 922. A function that requires a specific hardware vendor feature 93 94To add a vendor-specific repository to OpenBMC, it should meet the following 95additional criteria: 96 971. It consumes OpenBMC D-Bus APIs 98 - This indicates a synergy between this feature and OpenBMC 99 100## Background and References 101 102As OpenBMC has grown, so has the need for software function that is tied to 103specific hardware families. For example, [OpenPOWER][openpower] was one of the 104first users of OpenBMC and a search for "openpower" in the openbmc github 105organization will show many repositories with that name in it. You will get a 106similar result if you search for "intel". 107 108OpenBMC in general is to be agnostic of the hardware it is managing, but that is 109not always possible due to specific features or functions only provided by 110certain hardware. 111 112For example, OpenPOWER systems have a separate power management device within 113the processor called an OCC. This OCC has its own protocol and functions. This 114is why OpenBMC has a openpower-occ-control repository. 115 116Another example, Intel has a communication interface called PECI, it provides 117useful information (like temperatures) but only on Intel based systems. This is 118why OpenBMC has a peci-pcie repository. 119 120The goal of this document is to clearly state the requirements and expectations 121for hosting a hardware/vendor specific repository within the openbmc github 122organization. This document aims to answer the following questions: 123 1241. Where does the OpenBMC community draw the line between what goes into the 125 OpenBMC organization and what should not? 126 1272. If a repository doesn't belong in the OpenBMC organization, what determines 128 if a bitbake recipe can be added to OpenBMC to point to a vendors repository 129 outside of the OpenBMC org? 130 131This document is based on a TOF meeting on Jan 9th, 2024. 132 133## Philosophy 134 135OpenBMC wants to enable as many machines as possible with as many common paths 136shared between machines as possible, under the hope of keeping stability in its 137implementation between systems. 138 139Within OpenBMC there are two areas of "vendor specific" repositories: 140 141- A Hardware specific feature (implementation for a driver, support for 142 hardware, or other things that only exist on that platform). 143- Support for a vendor-specific feature. (OEM extensions, debug APIs, Redfish, 144 etc). 145 146Yocto differentiates between the above with the "machine" and "distro" concepts. 147We need a policy within OpenBMC on how we handle each of these types of 148features. 149 150The OpenBMC project has a fairly extensive CI process, it has many great code 151reviewers, and it follows the tip of upstream yocto master. All of these things 152ensure a solid code base for others to use, and sets a certain standard for 153repositories that are hosted within OpenBMC. Having the source under the OpenBMC 154umbrella ensure it gets global updates (like upstream poky/bitbake changes) and 155other things like the latest compiler. 156 157There are times where big updates come in from yocto that break multiple 158repositories utilized by OpenBMC. It is always going to be easier to coordinate 159big changes like that on repositories hosted within OpenBMC directly (vs. trying 160to coordinate with externally hosted repositories.) 161 162OpenBMC already hosts 100+ repositories, which can be very daunting to someone 163new joining the project. New repositories should be added in the case where they 164can be maintained over the long term without taking resources away from other 165project efforts. Having a set of guidelines for this process helps to speed up 166new code development within the project. How useful is the feature, how many 167other people could make use of it, how active has the person who will maintain 168the new repository been in the community? These are just a few of the questions 169we need to articulate into a vetting process. 170 171In a perfect world, only hardware-specific features would be in the meta machine 172layers, and vendor specific features should be in distro features. OpenBMC is 173not there yet but is something the community should strive towards. 174 175## Conclusion 176 177This document was written to be a reference for people looking where to put 178vendor specific features and also as a reference for the TOF team to review when 179assessing a request for a vendor specific repository within OpenBMC. 180 181[openpower]: https://openpowerfoundation.org/ 182[upstream]: https://github.com/openbmc/docs/blob/master/kernel-development.md 183[tof]: https://github.com/openbmc/technical-oversight-forum/issues 184