Code Monkey home page Code Monkey logo

refos-manifest's Introduction

RefOS - Reference Design For A Microkernel Based Operating System

RefOS is a sample implementation of a simple multi-server operating system built on seL4.

The aim of RefOS is to:

  • Provide a reference design of a simple multi-server operating system built on seL4
  • Provide a sample implementation of how seL4 protocols can be used
  • Simplify development and porting of userland programs built on seL4
  • Serve as an example codebase to start new component-based seL4 projects

Features

  • Simple and light-weight operating system
  • Multi-server component based design
  • Process and thread abstraction
  • Dataspace abstraction
  • Shared memory support
  • Dynamic mmap and sbrk support
  • Userland serial and timer drivers
  • Sample user programs include:
    • Terminal - a simple terminal program
    • Tetris - a port of Micro Tetris
    • Snake - a snake game

NOTE: Please note that RefOS is intended to be only an example system, a work in progress, and is not to be deployed as a real operating system solution. RefOS is not verified, is not high assurance, is not optimised for speed and efficiency and may be missing most of the features one would expect in a deployable operating system environment.

Quick Start

Building RefOS

In order to build RefOS's codebase:

  1. Read: https://docs.sel4.systems/projects/buildsystem/host-dependencies.html Set up the environment (repo tool, cross compilers and build dependencies) as per the instructions on the page.

  2. repo init -u ssh://[email protected]/seL4/refos-manifest -b master

  3. repo sync

  4. Install the following packages (package named based on Ubuntu 14.04):

    sudo apt-get install python-tempita

  5. make help (to list the default configurations)

  6. make <config>, where <config> is one of the configurations listed with the <make help> command: eg. `make kzm_debug_test_defconfig``

  7. make silentoldconfig

  8. make

    You should now have a bootable system image (refos/images/refos-image).

  9. make simulate-kzm (or a different command depending on the configuration you chose, run <make help> to list the different configurations and how to run them)

Building The Design Document

Note that the design document has not been finished yet and is still a work in progress. Therefore, some details may differ slightly between the design document and RefOS's implementation.

In order to build the PDF design document:

  1. Clone the repository (see above).

  2. Install the following packages (package named based on Ubuntu 14.04):

sudo apt-get install texlive-latex-base mscgen texlive-latex-extra texlive-fonts-recommended

  1. make design

    This command builds the PDF documentation and provides a path to the document.

Building Doxygen Code Documentation

  1. Clone the repository (see above).

  2. Install the following packages (package named based on Ubuntu 14.04):

sudo apt-get install doxygen

  1. make docs

  2. In a web browser, open "docs/html/index.html"

No Warranty

Please note that RefOS is intended to be sample code and is not high assurance software. We are not responsible for any consequences if you choose to deploy this software in production.

refos-manifest's People

Contributors

hypernewbie avatar jm-- avatar lsf37 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

refos-manifest's Issues

Ubuntu 16.04 build failure

I'm running into a number of issues trying to get refos building from ubuntu 16.04.

Here is one example:

/src/refos/apps/timer_server/src/device_timer.h:50:5: error: unknown type name 'pstimer_t'
pstimer_t tickDev; / No ownership. Weak ref to static. */

No version of seL4 kernel seems to let sync.c compile?

The version included by default is a0cb6bd65bc083151262aec32d46735b4c80eab0, which seems to produce this error:

/home/skeggsc/osrc/refos2/libs/librefos/src/sync.c: In function ‘sync_acquire’:
/home/skeggsc/osrc/refos2/libs/librefos/src/sync.c:65:34: error: invalid initializer
     seL4_MessageInfo_t msginfo = seL4_Wait(mutex->mapping, &badge);
                                  ^

This seems to be because Wait got replaced with Recv for this usage.

Now, I tried to rewind until I found a kernel version that worked - but then I go from a99a10408d529289898edaad6cf044e62963306e, where the same error shows up, to ab4fa442364caf58f52a5f75fdc1ad1f0988bf1b, that error stops showing up and is replaced with another:

/home/skeggsc/osrc/refos2/libs/librefos/src/sync.c: In function ‘sync_try_acquire’:
/home/skeggsc/osrc/refos2/libs/librefos/src/sync.c:81:31: warning: implicit declaration of function ‘seL4_Poll’ [-Wimplicit-function-declaration]
     seL4_MessageInfo_t info = seL4_Poll(mutex->mapping, &badge);
                               ^
/home/skeggsc/osrc/refos2/libs/librefos/src/sync.c:81:31: error: invalid initializer

This seems to be because Poll was not yet introduced with this version. So, I'm not entirely sure how this worked - I've also checked versions of the other referenced components, and nothing seems to have been updated to a later version than necessary.

The specific commands that I'm using to build:

make ia32_debug_defconfig
make silentoldconfig
make

I'm running on Arch Linux on x86_64. I had to replace the invocations of python with python2 (python3 is the default on Arch Linux). I also had to add includes for stdint.h to sel4/types.h.

What version of the seL4 kernel will work with the latest version of refos?

seL4_CapData_Badge_new(badge) is deprecated

In file included from libs/librefos/src/sync.c:22:0:
seL4_AllRights, seL4_CapData_Badge_new(badge)
this function is deprecated
and because of it I wont be able to build refos.
Any workaround for it?
Please Help

undefined reference to `seL4_CapData_Badge_get_Badge'

Hello All,
Greetings,

I have just started studying seL4 and i was building the RefOS but while building i got this error in linking of seL4_CapData_Badge_get_Badge function.

undefined reference to seL4_CapData_Badge_get_Badge' /stage/arm/imx31/lib/librefos.a(rpc.o): In function rpc_sv_pop_cptr':
libs/librefos/src/refos-rpc/rpc.c:328: undefined reference to `seL4_CapData_Badge_get_Badge'
collect2: error: ld returned 1 exit status
/stage/arm/imx31/common/common.mk:307: recipe for target 'file_server.elf' failed

Please suggest me to resolve this issue .

Thank You in Advance
Aslam

repo init fails

Trying to follow steps in quickstart - but get error when running repo init command:

repo init -u ssh://[email protected]/seL4/refos-manifest -b master

Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
Get ssh://[email protected]/seL4/refos-manifest
Permission denied (publickey).
Permission denied (publickey).
fatal: Could not read from remote repository.

I've built and run the camkeys demo without problems, but am unable to get the refos project.

compile fail, lots of compile error.

  1. repo undownloadable
    I fixed it by using "repo init -u https://[email protected]/seL4/refos-manifest"

  2. so many compile errors
    just list a few.

  • libs/librefos/src/refos-rpc/rpc.c:326: undefined reference to `seL4_CapData_Badge_get_Badge'

  • apps/timer_server/src/device_timer.c:345:21: error: request for member ‘properties’ in something not a structure or union
    if (!s->timerDev->properties.upcounter) {

  • stage/arm/imx31/include/refos-rpc/data_client_helper.h:176:16: error: ‘EINVALIDPARAM’ undeclared (first use in this function)
    stage/arm/imx31/include/refos-rpc/data_client_helper.h:179:16: error: ‘ENOPARAMBUFFER’ undeclared (first use in this function)

....

Author, can u take some time to fix all of them, I am interested this project. Thanks

Runtime Error

Hey!

When I run this project with
" make kzm_debug_test_defconfig & make simulate-kzm "
I got a error which tell me it failed to connect to [/dev_console/serial].
the following are the detailed messages :
"
[00.0] CONSERV | main(): Initialising RefOS Console server.
[00.1] CONSERV | conserv_init(): RefOS Console server initialising...
[00.2] CONSERV | conserv_init(): Initialising conserv device IO manager...
[00.3] CONSERV | conserv_init(): Initialising conserv serial device...
[00.175] PROCSERV | proc_server_handle_message(): Unknown message (badge = 2050 msgInfo = 0 syscall = 0x6).
ERROR proc_server_handle_message(): Process server unknown message. ¯\(º_o)/¯
Failed to connect to [/dev_console/serial]. Error: 5 ESERVERNOTFOUND.
Debug halt syscall from user thread 0xf7ef0500
halting...
"

I tried to trace the code and then I find that when it run to the code Line 77 in "console_server/src/state.c" , it would be blocked.

How can I fix it ? Thank you!

RefOS compile errors

I tried to compile RefOS following the instructions, but it seems there are currently at least two issues.

First, running make (step 7) fails with error:
make: *** No rule to make target 'file_server', needed by `./build/x86/pc99/process_server/archive.o'. Stop.

My current workaround is:

  1. Add lib-dirs:=libs to ./Makefile.

  2. Create a ./Kbuild file with:

-include $(wildcard apps/*/Kbuild)
-include $(wildcard libs/*/Kbuild)

It could be that the problem started when this commit removed the following from ./tools/common/project.mk.

ifeq ($(old-kbuild-hack), 1)
    include $(SEL4_APPS_PATH)/Kbuild
endif

Second, I had to run something like the following because of the changes from ia32 to x86 here, I guess.

mv libs/libmuslc/arch_include/ia32 libs/libmuslc/arch_include/x86
mv ./apps/tetris/crt/arch-ia32 ./apps/tetris/crt/arch-x86
mv ./apps/snake/crt/arch-ia32 ./apps/snake/crt/arch-x86
mv ./apps/process_server/crt/arch-ia32 ./apps/process_server/crt/arch-x86
mv ./apps/console_server/crt/arch-ia32 ./apps/console_server/crt/arch-x86
mv ./apps/timer_server/crt/arch-ia32 ./apps/timer_server/crt/arch-x86
mv ./apps/terminal/crt/arch-ia32 ./apps/terminal/crt/arch-x86
mv ./apps/test_os/crt/arch-ia32 ./apps/test_os/crt/arch-x86
mv ./apps/file_server/crt/arch-ia32 ./apps/file_server/crt/arch-x86
mv ./apps/selfloader/crt/arch-ia32 ./apps/selfloader/crt/arch-x86
mv ./apps/nethack/crt/arch-ia32 ./apps/nethack/crt/arch-x86
mv ./apps/test_user/crt/arch-ia32 ./apps/test_user/crt/arch-x86

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.