diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-01-29 15:26:14 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-01-30 09:44:30 +0300 |
commit | 27b55bb4da7321137693de7e6e73609e1271dce3 (patch) | |
tree | 127b931e38a598e37faaf3d1cb3d9ca70962bd95 /docs | |
parent | 130230ff5908202d21dba0f61e7f012343128e76 (diff) | |
download | opensbi-27b55bb4da7321137693de7e6e73609e1271dce3.tar.xz |
docs: Add platform support guide
This patch adds initial platform support guide (i.e.
docs/platform_guide.md).
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/platform_guide.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/platform_guide.md b/docs/platform_guide.md new file mode 100644 index 0000000..51e5b25 --- /dev/null +++ b/docs/platform_guide.md @@ -0,0 +1,32 @@ +OpenSBI Platform Support Guideline +================================== + +The OpenSBI platform support is a set of platform specific hooks provided +in the form of a *struct sbi_platform* instance. It is required by: + +1. *libplatsbi.a* - A platform specific OpenSBI static library, that is, + libsbi.a plus a *struct sbi_platform* instance installed at + *<install_directory>/platform/<platform_subdir>/lib/libplatsbi.a* +2. *firmwares* - Platform specific bootable firmware binaries installed at + *<install_directory>/platform/<platform_subdir>/bin* + +A complete doxygen-style documentation of *struct sbi_platform* and related +APIs is available in sbi/sbi_platform.h. + +Adding a new platform support +----------------------------- + +The support of a new platform named *<xyz>* can be added as follows: + +1. Create a directory named *<xyz>* under *platform/* directory +2. Create a platform configuration file named *config.mk* under + *platform/<xyz>/* directory. This configuration file will provide + compiler flags, select common drivers, and select firmware options +3. Create *platform/<xyz>/objects.mk* file for listing the platform + specific object files to be compiled +4. Create *platform/<xyz>/platform.c* file providing a *struct sbi_platform* + instance + +A template platform support code is available under the *platform/template*. +Copying this directory as new directory named *<xyz>* under *platform/* +directory will create all the files mentioned above. |