Hey everyone,

so this is my first report after beeing one week into the coding phase of
the GSoC.
In the last weeks I have been reading documentation and source code of
HelenOS, trying to understand the build process and structure of the source
tree while acquiring deeper knowledge about Makefiles, Linker Scripts, the
ELF binary format, etc.
Afterwards I have been playing around with the user land, writing a simple
program loaded as module from grub which is printing "Hello Word!" onto the
kernel console. First I tried linking in all the needed object files for
getting the printf directive to work. When I realized that this would not
be that easy because it would require almost the complete kernel to link
into it, I simply used the libc from the HelenOS userspace for linking. The
code can be found in my repository (https://github.com/kurbel/genode) in
the base-spartan branch in ./base-spartan/src/tests/userspace_printf.
But despite all efforts I was not able to successfully achieve the first
step of my schedule, which was creating a simple roottask replacement which
should be run directly on the kernel. The idea behind this was to replace
all via grub loaded modules with just one module which should print
something to the serial port. For compiling the genode linker script should
be used. The problem is that all attempts of printing something to the
serial port (using qemu with the "-serial mon:stdio" option which should
redirect all output from the serial port to the console where qemu is
started from) failed (the code can be found in
.base-spartan/src/simple_serial_print). So the question is what went wrong.
Is the linking that something that can't be processed by the kernel (in
my opinion unlikely because there where no complaints that the module could
not be loaded)? Or am I not able to access the serial port the way I am
trying to (e.g. because of enabled port protection)? Furthermore there is
the question if there are different serial ports for different
architectures? Because I found different serial port implementations for
sparc (./kernel/genarch/drivers/ns16550) and ARM
(./kernel/genarch/drivers/s3c24xx_uart) but none for x86, with whom I am
working currently.
So in short terms the current questions are:
 1) Are there any serial port implementations in the kernel I can use? (in
general and specific for the x86 architecture)
     - if no: do you have any suggestions how I can access the serial port
in general?
 2) Do I have to pay attention to any special things while linking when
using the genode linker script? (like special required sections, special
placement of segments/sections, etc.)

I would appreciative all thoughts and opinions.

Regards,
Tobias
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to