summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2019-07-24 07:29:58 +0300
committerAnup Patel <anup.patel@wdc.com>2019-07-25 06:41:49 +0300
commitc90009aa2087eb690e6cb6e7d6d73e3c63de87c3 (patch)
treede365262d6fdb4f71423ca660ce4fb412f28b995 /README.md
parentbf2ee7bcdc9b94aa4c62f197adeb71bab20bcfa3 (diff)
downloadopensbi-c90009aa2087eb690e6cb6e7d6d73e3c63de87c3.tar.xz
README: Document 32-bit / 64-bit images build
At present the exact details of building 32-bit or 64-bit OpenSBI images are missing in the docs. This adds the missing part. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Acked-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1f62048..b4746f2 100644
--- a/README.md
+++ b/README.md
@@ -131,6 +131,25 @@ top-level make command line. These options, such as *PLATFORM_<xyz>* or
*docs/platform/<platform_name>.md* files and
*docs/firmware/<firmware_name>.md* files.
+Building 32-bit / 64-bit OpenSBI Images
+---------------------------------------
+By default, building OpenSBI generates 32-bit or 64-bit images based on the
+supplied RISC-V cross-compile toolchain. For example if *CROSS_COMPILE* is set
+to *riscv64-unknown-elf-*, 64-bit OpenSBI images will be generated. If building
+32-bit OpenSBI images, *CROSS_COMPILE* should be set to a toolchain that is
+pre-configured to generate 32-bit RISC-V codes, like *riscv32-unknown-elf-*.
+
+However it's possible to explicitly specify the image bits we want to build with
+a given RISC-V toolchain. This can be done by setting the environment variable
+*PLATFORM_RISCV_XLEN* to the desired width, for example:
+
+```
+export CROSS_COMPILE=riscv64-unknown-elf-
+export PLATFORM_RISCV_XLEN=32
+```
+
+will generate 32-bit OpenSBI images. And vice vesa.
+
License
-------