Download presentation
Presentation is loading. Please wait.
1
Practical Exercise: Bastei
Stefan Kalkowski Dresden,
2
Prepare the build environment
Get the sources: tgz Unpack the tarball: tar -xvzf bastei tgz Create build directory and link to Makefile template: cd bastei mkdir build ln -s `pwd`/tool/builddir/build.mk build/Makefile Compile: cd build make TU Dresden, Practical Exercise: Bastei
3
Practical Exercise: Bastei
Try it out ... Change to the binary directory and start core: cd bin ./core Look at the process abstraction: Start a new terminal and type: ps axU <username> What do you see? Create an example config file resp. copy one: cp ../../generic/src/init/config.linux config Try it out again! Several binaries are still missing TU Dresden, Practical Exercise: Bastei
4
Include other repositories
Create a configuration directory for your actual build directory: mkdir ../etc cd ../etc Create build.conf file: REPOSITORIES= ../generic \ ../demo Build new targets: cd .. make Try it out: cd bin ./core TU Dresden, Practical Exercise: Bastei
5
Practical Exercise: Bastei
Play with it ... Start the virtual framebuffer device running on top of nitpicker (liquid_fb) Now try to execute a launchpad within the virtual framebuffer What has to be done beforehand? Explain why (analyzing the console output might help) TU Dresden, Practical Exercise: Bastei
6
Practical Exercise: Bastei
Hello World! Include the exercise directory as an additional repository in your build.conf file Build the hello server and client targets in your build directory: make hello Try it out by starting server and client by using the launchpad Have a look at the console messages (use nitlog) Doesn't work because hello() on client side isn't implemented yet! TU Dresden, Practical Exercise: Bastei
7
Practical Exercise: Bastei
IPC with C++ streams By now you have handcoded IPC messages to do that job Bastei uses conventionally C++ streams for doing IPC: class Test_client { Bastei::Ipc_client ipc_client; ... void function(...) { ipc_client << OPCODE << ARG1... << IPC_CALL >> RETURN_ARG1 ... ; } TU Dresden, Practical Exercise: Bastei
8
IPC unmarshalling on server side
class Test_server : public Server_object { ... int dispatch(int op, Ipc_istream &is, Ipc_ostream &os) { switch(op) { case OPCODE1: Type args1; is >> args1 >> ... ; ret = function(...); os << RET_ARG1 << ... ; return ret; } TU Dresden, Practical Exercise: Bastei
9
Complete 'Hello World' example
Fix the hello() method of the client by transmitting the actual opcode via IPC to the server Use the compiler warning when compiling the hello_client target to find the right location You can have a look at e.g.: generic/include/rm_session.h to complete the code Add-on: add an additional method to the hello server and client, that takes an integer i and a string. The server should print that string as often as defined by i. TU Dresden, Practical Exercise: Bastei
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.