[GSOC|virtLayer] hello sample compiles

Philipp Eppelt philipp.eppelt at mailbox.tu-dresden.de
Wed Jun 19 15:02:26 UTC 2013


Hi,

I got the hello sample to compile.
This means the host library works in RTEMS.

But let's start at the beginning.

I separated libcpu and score and defined native and virtual CPU's in 
libcpu/i386.
The difference between the two are interrupts.h and _CPU_ISR_Set_level, 
_CPU_Fatal_halt, _CPU_Thread_Idle_body. Native is using these functions 
as they are defined for normal hardware, virtual translates these to 
calls to the virtual Layer.

virtLayerCPU.h: Created, defining functions for interrupts, idle, error 
handling.

This is implemented in POK and libpart.a is compiled and copied to 
rtems/libbsp/i386/virtPok.
The virtPok makefile creates a new library file called libpokpart.a.
If libpart.a is not present, virtPok fails at compile time.

I thought 'noinst_LIBRARIES' would define the libraries going into 
librtemsbsp.a but sadly this is not dynamic. I had to modify 
c/src/wrapup/Makefile.am to include libpokpart.a. This is not final, as 
it breaks all other BSPs ...

I still have issues with the GDT and IDT. But with a dummy variable 
_Global_descriptor_table to prevent an unresolved dependency error, I 
could compile the hello sample.

Hacky, but YAY. :)

I brought it back to POK as a partition, but it's failing to start this 
partition. I didn't care for the start-up code yet, so this was expected.


What to take away from this:

The build process is semi automated and works so far.

Code: https://github.com/phipse/rtems/tree/virt-bsp


Cheers,
Philipp



More information about the devel mailing list