Building a simple RISC-V project
I am trying to build a simple RISC-V seL4 project. I mean "hello world" simple. I using version 12.0.0. I looked at the documentation here https://docs.sel4.systems/projects/buildsystem/incorporating.html to follow what the project layout is. I also followed this project for x86 v10.0.0. https://github.com/manu88/SeL4_101 I was able rebuild this last one for RISC-V after modifying the CMakeLists.txt to include the proper libraries in my hello project. When I try to use the seL4 12.0.0 kernel there are some configuration differences that I haven't figured out yet. Can anyone shed some light on what the parameters are that need to be set for RISC-V? The verified config in ../kernel/configs/RISCV64_verified.cmake are this, is this all that need set? I suppose these could be modified as necessary. 12 set(KernelSel4Arch "riscv64" CACHE STRING "") 13 set(KernelPlatform "hifive" CACHE STRING "") 14 set(KernelPTLevels "3" CACHE STRING "") 15 set(KernelVerificationBuild ON CACHE BOOL "") 16 set(KernelMaxNumNodes "1" CACHE STRING "") 17 set(KernelOptimisation "-O2" CACHE STRING "") 18 set(KernelRetypeFanOutLimit "256" CACHE STRING "") 19 set(KernelBenchmarks "none" CACHE STRING "") 20 set(KernelDangerousCodeInjection OFF CACHE BOOL "") 21 set(KernelFastpath ON CACHE BOOL "") 22 set(KernelPrinting OFF CACHE BOOL "") 23 set(KernelNumDomains 16 CACHE STRING "") 24 set(KernelMaxNumBootinfoUntypedCap 166 CACHE STRING "") 25 set(KernelRootCNodeSizeBits 19 CACHE STRING "") 26 set(KernelMaxNumBootinfoUntypedCaps 50 CACHE STRING "")
On Fri, 2020-11-20 at 20:38 +0000, porter.188@osu.edu wrote:
I am trying to build a simple RISC-V seL4 project. I mean "hello world" simple. I using version 12.0.0. I looked at the documentation here https://docs.sel4.systems/projects/buildsystem/incorporating.html to follow what the project layout is. I also followed this project for x86 v10.0.0. https://github.com/manu88/SeL4_101 I was able rebuild this last one for RISC-V after modifying the CMakeLists.txt to include the proper libraries in my hello project. When I try to use the seL4 12.0.0 kernel there are some configuration differences that I haven't figured out yet. Can anyone shed some light on what the parameters are that need to be set for RISC-V?
The verified config in ../kernel/configs/RISCV64_verified.cmake are this, is this all that need set? I suppose these could be modified as necessary. _______________________________________________ Devel mailing list -- devel@sel4.systems To unsubscribe send an email to devel-leave@sel4.systems
The most important settings that you need to manually specify are the KernelSel4Arch and KernelPlatform, both of these are generally done by setting a PLATFORM variable when invoking CMake for a new build directory; the remaining settings should use sane defaults. You likely also want to specify KernelMaxNumNodes if you want to build for multiple cores. I'd also suggest enabling KernelIsMCS, which represents the scheduling API that will be used in future releases. The next important functions to use are: * correct_platform_strings; which sets the kernel platform configuration based on the PLATFORM variable, * ApplyCommonReleaseVerificationSettings; which takes arguments indicating whether to build for release (i.e. with optimisations and no kernel debugging features) and verification (i.e. only verified kernel features), and * ApplyCommonSimulationSettings (if the build should target QEMU rather than actual hardware) which takes the kernel architecture. At the moment, the easiest way to see how this is done is to look at the 'settings.cmake' for sel4-test. I would be preferrable for us to provide a 'hello world' template project to clarify this process.
participants (2)
-
Millar, Curtis (Data61, Kensington NSW)
-
porter.188@osu.edu