summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2026-05-09platform: Remove kendryte/k210 platformAnup Patel
The kendryte/k210 platform does not have MMU support in S-mode hence only NOMMU kernel which runs in M-mode can be used on this platform. As of now, there is no clear use-case of supporting OpenSBI for kendryte/k210 platform. Signed-off-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-11-05platform: ariane: Move ariane platform from fpga to genericManuel Hernández Méndez
The Ariane framework has a generic PMU that is not used by OpenSBI. Due to OpenSBI’s build system we cannot directly reuse the generic platform functions, so move the Ariane platform to generic. Also due to the generic platform is where new features are added. Signed-off-by: Manuel Hernández Méndez <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-08-26platform: openpiton: Move openpiton platform from fpga to genericManuel Hernández Méndez
The OpenPiton framework has a generic PMU that is not used by OpenSBI. Due to OpenSBI’s build system we cannot directly reuse the generic platform functions, so move the OpenPiton platform to generic. Also due to the generic platform is where new features are added. Signed-off-by: Manuel Hernández Méndez <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
2025-03-23scripts: Fix firmware binaries compilation in create-binary-archive.shAnup Patel
Currently, the generic libsbi.a is compiled in create-binary-archive.sh before platform specific firmwares so a libsbi.a without any SBI extension gets linked to the platform specific firmwares. To address this, remove the temporary build directory in create-binary-archive.sh before using it. Signed-off-by: Anup Patel <[email protected]>
2024-12-15scripts/carray: change to using single awk invocation to generate .cBen Dooks
The shell script makes multiple call-outs to awk to get information from the configuration file. It would be easier to just write the whole thing in one .awk script and have the makefile altered to call that instead. There should be no functional difference other than the script type and has been tested with PLATFORM=generic build. This should be both quicker and easier to understand. Signed-off-by: Ben Dooks <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-12-15script/carry.sh: send error to stderrBen Dooks
Send the errors to stderr, otherwise they end up being written to the file the script was redirecting to in the Makefile Also, use EOF block to make it easier to redirect Signed-off-by: Ben Dooks <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-11-28scripts/carray.sh: Allow referencing a struct memberSamuel Holland
It can be useful to embed the objects referenced by a carray inside another struct. To avoid type punning, the generated carray code must use the correct type for the enclosing struct and member access to compute the desired object address. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-11-28scripts/carray.sh: Avoid useless use of catSamuel Holland
awk(1) takes input files as positional arguments, so there is no need to read the file with cat(1). Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-11-28treewide: Make carray arrays const and NULL-terminatedSamuel Holland
This allows the compiler to generate significantly better code, because it does not have to maintain either the loop counter or loop limit. Plus there are half as many symbols to relocate. This also simplifies passing carray arrays to helper functions. Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2024-07-04scripts/carray.sh: Add comment to generated filesIvan Orlov
Add a comment about where auto-generated file came from to the carray.sh output. This should help avoiding confusion for the developers looking at the build artifacts and finding .c files there. Signed-off-by: Ivan Orlov <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Signed-off-by: Ben Dooks <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2022-12-10scripts: use env to invoke bashHimanshu Chauhan
Not all systems have bash at a fixed location like /bin/bash. FreeBSD, for example, would typically have it at /usr/local/bin/bash. When building OpenSBI on freebsd system, the build breaks. Its advisable to use: #!/usr/bin/env bash Signed-off-by: Himanshu Chauhan <[email protected]> Reviewed-by: Xiang W <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2022-12-05scripts/create-binary-archive.sh: remove andes/ae350 build directoryYu Chien Peter Lin
The andes-specific files have been moved to generic platform so we can drop this line. Signed-off-by: Yu Chien Peter Lin <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2022-08-08Makefile: Compile lib/utils sources separately for each platformAnup Patel
Currently, if same build directory is used to compile two different platforms then lib/utils objects are shared for these platforms. We will be having platform specific configs to enable/disable drivers in lib/utils and select compile time options for lib/utils sources. This means lib/utils sources will now be compiled in a platform specific way. To tackle above, we update top-level Makefile as follows: 1) Don't create libsbiutils.a anymore because this can't be shared between platforms. 2) Compile lib/utils sources separately for each platform. 3) Add comments showing which make rules are for lib/sbi, lib/utils, firmware, and platform sources. Signed-off-by: Anup Patel <[email protected]> Tested-by: Andrew Jones <[email protected]> Acked-by: Atish Patra <[email protected]> Tested-by: Atish Patra <[email protected]>
2022-08-08scripts: Add Kconfiglib v14.1.0 under scripts directoryAnup Patel
We adopt Kconfiglib v14.1.0 sources under scripts directory so that top-level OpenSBI makefile can directly use Kconfiglib scripts without expecting users to install a particular version of Kconfiglib on their build system. Signed-off-by: Anup Patel <[email protected]> Tested-by: Andrew Jones <[email protected]> Acked-by: Atish Patra <[email protected]> Tested-by: Atish Patra <[email protected]>
2022-05-13Makefile: Add support for generating C array at compile timeAnup Patel
Generating C array at compile time based on details provided by objects.mk is a very useful feature which will help us compile only a subset of drivers or modules. We add a bash script (carray.sh) which takes array details and object/variable list from command-line to generate a C source containing array of object/variable pointers. We also extend top-level makefile to use carray.sh whenever specified through objects.mk. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]>
2021-05-06platform: Remove sifive/fu540 platformBin Meng
Now that SiFive HiFive Unleashed board is using the generic platform support in OpenSBI, let's remove the old non-generic one. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2021-04-28platform: Remove platform/theadGuo Ren
We could use platform/generic instead, and won't use platform/thead/c910 again. Signed-off-by: Guo Ren <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-10-18Makefile: Allow padding zeros when converting DTB to C sourceHeinrich Schuchardt
We extend d2c.sh to allow padding zeros in output C source when converting DTB to C source. Using this feature, platforms can create extra room for in-place FDT fixups on built-in DTBs. Signed-off-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]>
2020-06-05Makefile: Add mechanism for platforms to have multiple builtin DTBsAnup Patel
Currently, we can only include one DTB as builtin for a platform using FDT_PAYLOAD_DTB make variable in platform config.mk. This patch adds new mechanism using which we can convert any DTS file to C source and futher compile-n-link it with libplatsbi.a. The generated C source will have the DTB contents as an array "const char <varprefix>_start[]" where <varprefix> is specified in platform objects.mk makefile. Example1 -------- If we have built-in k210.dts and desired <varprefix> is "dt_k210" then specify following in platform objects.mk: platform-objs-y += k210.o platform-varprefix-k210.o = dt_k210 Example2 -------- If we have built-in abc/k210.dts and desired <varprefix> is "dt_abc_k210" then specify following in platform objects.mk: platform-objs-y += abc/k210.o platform-varprefix-abc-k210.o = dt_abc_k210 Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]>
2020-05-04platform: Remove spike directoryAnup Patel
The OpenSBI generic platform works perfectly fine on the QEMU spike machine and Spike emulator so let's remove dedicated Spike platform from OpenSBI. All Spike platform related documentation in OpenSBI will now suggest using OpenSBI generic platform. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Alistair Francis <[email protected]>
2020-05-04platform: Remove qemu/virt directoryAnup Patel
The OpenSBI generic platform works perfectly fine on the QEMU virt machine so let's remove dedicated QEMU virt machine platform from OpenSBI. All QEMU virt machine related documentation in OpenSBI will now suggest using OpenSBI generic platform. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Alistair Francis <[email protected]>
2020-05-01scripts: Add generic platform to create-binary-archive.shAnup Patel
This patch adds generic platform to create-binary-archive.sh script. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]>
2020-04-30scripts: adapt binary archive script for Nuclei UX600Huaqi Fang
Signed-off-by: Huaqi Fang <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-03-28scripts: Extend create-binary-archive.sh for unified binary tar ballAnup Patel
This patch extends/revamps create-binary-archive.sh to allow creating unified binary tar ball containing both RV32 and RV64 images. Users can also create "RV32 only" or "RV64 only" tar balls as well. Few example commands are as follows: ./scripts/create-binary-archive.sh (Build both RV32 & RV64 images) ./scripts/create-binary-archive.sh -x 32 (Build RV32 only images) ./scripts/create-binary-archive.sh -x 64 (Build RV64 only images) Signed-off-by: Anup Patel <[email protected]>
2020-03-24platform: Add OpenPiton platform supportAtish Patra
OpenPiton is a research platform from Princeton University [1]. "OpenPiton is the world's first open source, general purpose, multithreaded manycore processor. It is a tiled manycore framework scalable from one to 1/2 billion cores." Add OpenSBI support for OpenPiton. As it is based on ariane core, it reuses the platform code from arine project. [1]. https://github.com/PrincetonUniversity/openpiton Signed-off-by: Atish Patra <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-03-24platform: Move ariane standalone fpga project to its own projectAtish Patra
Signed-off-by: Atish Patra <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-03-17scripts: Cover sifive/fu540 in the 32-bit buildBin Meng
We now support building sifive/fu540 as a 32-bit platform. Add it in the 32-bit platform list of binary archive script. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-02-17scripts: Add Spike to platform list of binary archive scriptAnup Patel
The Spike platform support works perfectly fine on QEMU RV64 Spike machine and Spike emulator. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2020-02-07platform: Drop qemu/sifive_u supportBin Meng
With QEMU v4.2 RISC-V changes to improve the emulation fidelity of 'sifive_u' machine, OpenSBI v0.4 / U-Boot v2019.10 / Linux kernel v5.3 images built for the SiFive HiFive Unleashed board can be used out of the box without any special hack. Hence there is no need for us to continue supporting such a special target in OpenSBI. Going forward, sifive/fu540 platform can be used on both real hardware and QEMU 'sifive_u' machine. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2020-01-20scripts: Add C910 to platform list in the binary archive scriptLiu Yibin
This patch adds T-HEAD C910 to RV64 platform list in the binary archive script. Signed-off-by: Liu Yibin <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2019-08-31scripts: Add AE350 to platform list in the binary archive scriptNylon Chen
This patch adds Andes AE350 to RV64 platform list in the binary archive script. Signed-off-by: Nylon Chen <[email protected]> Reviewed-by: Bin Meng <[email protected]> Reviewed-by: Anup Patel <[email protected]>
2019-07-25treewide: Use conventional names for 32-bit and 64-bitBin Meng
There are several places in the source tree that have: 32bit, 32 bit, 64bit, 64 bit Fix by using the conventional names with a hyphen. Signed-off-by: Bin Meng <[email protected]> Reviewed-by: Lukas Auer <[email protected]> Acked-by: Anup Patel <[email protected]>
2019-06-30scripts: Add Ariane FPGA to platform list in binary archive scriptAnup Patel
This patch adds Ariane FPGA to RV64 platform list in the binary archive script. Signed-off-by: Anup Patel <[email protected]>
2019-06-29include: Add version info to struct sbi_platformAbner Chang
Add version control of sbi_platform structure - Add opensbi_version, this gives information of opensbi revision on which the sbi_platform table was created. - Add platform_version field in sbi_platform structure for platform level version control. Signed-off-by: Abner Chang <[email protected]> Acked-by: Anup Patel <[email protected]>
2019-06-19platform: Move platform common to lib/utils.Atish Patra
Currently, platform/common contains platform/non-platform specific common minimal drivers and libraries. This is helpful is all platforms are built within opensbi framework. Move them to lib/utils so that any external platform code also can reuse the minimalistic drivers or other common libraries. This patch doesn't introduce any functional changes. Signed-off-by: Atish Patra <[email protected]> Acked-by: Anup Patel <[email protected]>
2019-02-22scripts: Add script for creating binary archiveAnup Patel
This patch adds scripts/create-binary-archive.sh which helps us create a common tarball containing headers, static library and firmware ELFs for all platforms. This script can be used for release purpose OR for compile testing all platforms. Example usage commands are as follows: 1) Binary release archive for 32bit systems ./scripts/create-binary-archive.sh -s "bin" -x 32 -d 2) Binary release archive for 64bit systems ./scripts/create-binary-archive.sh -s "bin" -d 3) Compile test for 32bit systems ./scripts/create-binary-archive.sh -x 32 -t 4) Compile test for 64bit systems ./scripts/create-binary-archive.sh -t Signed-off-by: Anup Patel <[email protected]>