Git Product home page Git Product logo

my-camkes's Introduction

my-camkes

Implementation of AUTOSAR based on SEL4 microkernel Camkes .

一、准备工作

此git库建立在熟悉sel4,并且练习完https://docs.sel4.systems/Tutorials/的基础上。

代码下载编译,参考资料:https://docs.sel4.systems/projects/camkes-arm-vm/

repo init -u https://github.com/seL4/camkes-vm-examples-manifest

repo sync

mkdir build

cd build

../init-build.sh -DCAMKES_VM_APP=vm_minimal -DPLATFORM=qemu-arm-virt

ninja

./simulate

运行起来后,会进入虚拟机的linux,说明代码没有问题,在此基础上进行二次开发。

二、下载此git库到代码目录

此git库可以实现linux虚拟机和组件之间通信。

cd projects

git clone https://github.com/thatway1989/my-camkes.git

查看init-build.sh代码,发现会在根目录找CMakeLists.txt文件,找不到就按easy-settings.cmake去执行了。

查看easy-settings.cmake文件链接到了vm-examples。修改链接到projects/my-camkes/easy-settings.cmake。

cd ..

rm easy-settings.cmake

ln -s projects/my-camkes/easy-settings.cmake easy-settings.cmake

ln -s projects/my-camkes/myOS/ myOS

这样myOS在代码根目录,里面是camkes构架的。已有组件可以实现linux虚拟机和组件之间通信。

三、linux命令行触发sel4组件执行

linux已经集成了读写发送程序,参考:projects/my-camkes/myOS/overlay_files/init_scripts/cross_vm_test

dataport_read /dev/uio0 4096 #读共享内存

echo -ne "XXXX\n\0" | dataport_write /dev/uio0 4096 #写入共享内存

emits_event_emit /dev/uio0 #发送激活事件

发送激活事件后,projects/my-camkes/myOS/components/CrossvmInit/src/crossvm_init.c

里面的run函数启动后会一直ready_wait()等待,直到linux终端执行了emits_event_emit命令,就继续往下执行。

linux写入的共享内存可以在(char *)dest这个变量里面读取到。

my-camkes's People

Contributors

thatway1989 avatar

Stargazers

 avatar  avatar xm_Developer avatar

Watchers

 avatar

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.