From 27b55bb4da7321137693de7e6e73609e1271dce3 Mon Sep 17 00:00:00 2001 From: Anup Patel Date: Tue, 29 Jan 2019 17:56:14 +0530 Subject: [PATCH] docs: Add platform support guide This patch adds initial platform support guide (i.e. docs/platform_guide.md). Signed-off-by: Anup Patel --- docs/platform_guide.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/platform_guide.md 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 + */platform//lib/libplatsbi.a* +2. *firmwares* - Platform specific bootable firmware binaries installed at + */platform//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 ** can be added as follows: + +1. Create a directory named ** under *platform/* directory +2. Create a platform configuration file named *config.mk* under + *platform//* directory. This configuration file will provide + compiler flags, select common drivers, and select firmware options +3. Create *platform//objects.mk* file for listing the platform + specific object files to be compiled +4. Create *platform//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 ** under *platform/* +directory will create all the files mentioned above.