Hello,
I tried to run the genode tutorial.
I first installed it on an AMD Athlon x64 with nForce4- Mainboard. run/demo stopped there after init -> nitpicker] create session with args: label="launchpad", ram_quota=12288
I made a second try on a) a virtualBox machine with brand new installation of Unbuntu 12.04 x64 (git) and b) an old Evo N610c Pentium 4 with Ubuntu 12.04 x86 (14.02 from tar.gz of latest releases)
I think a few Steps are missing within the Step-By-Step tutorial http://genode.org/documentation/developer-resources/client_server_tutorial
As a prestep for “Setting up the build environment” i created a new build directory with './tool/create_builddir linux_x86 BUILD_DIR=build.hello'. As i did not have a lot of files in it, I tried a first ‘make’. In build/etc/build.conf I added REPOSITORIES += $(GENODE_DIR)/hello_testIn the bin directory i created a new config directory with config file.
The server section seems to have only one .h file, I put the three listings in one main.cc file (as later in the document it is mentioned that in target.mk SCR_CC = main.cc an obviously no includes to the other files are given).
Afterwards i tried ‘make hello’ which returned no error.
With ‘cd run’, ‘./core’ only the following output appered:
|int main(): --- create local services --- |int main(): --- start init --- |int main(): transferred 17592186044415 MB to init |int main(): --- init created, waiting for exit condition --- |[init] _map_local: lx_mmap failed (addr_in=0,addr_out=ffffffffffffffed/-19) overmap=0 |[init] C++ runtime: Genode::Rm_session::Region_conflict |[init] void* abort(): abort called
If i try to run it again with dmesg the follwoing output appears: [ 4774.659901] core[12189]: segfault at 7f2ed162e068 ip 00000000010310c9 sp 00000000400ffce0 error 4 in core[1000000+5b000] (equal if i try git verison or archive version)
I also tried to point the repository to the already existing hello_tutorial, but get the same result.
What am I doing wrong?
Best regards Wolfgang
Hello Wolfgang,
welcome to the list.
On Sun, Mar 30, 2014 at 04:06:22PM +0200, w_schmidt@...181... wrote:
|int main(): --- create local services --- |int main(): --- start init --- |int main(): transferred 17592186044415 MB to init |int main(): --- init created, waiting for exit condition --- |[init] _map_local: lx_mmap failed (addr_in=0,addr_out=ffffffffffffffed/-19) overmap=0 |[init] C++ runtime: Genode::Rm_session::Region_conflict |[init] void* abort(): abort called
This looks rather strange and if my interpretation is correct your Linux kernel answers an mmap request with ENODEV (-19 in the lof above). From the manpage of mmap:
ERRORS ... ENODEV The underlying file system of the specified file does not support memory mapping. ...
Currently, I have no idea how this may happen. Genode creates files for RAM dataspaces in the directory /tmp/genode-<uid> and uses mmap to attach the RAM dataspaces to process address spaces. Could you please post the output of
grep "/tmp" /etc/mtab
For my system it looks like
tmpfs /tmp tmpfs rw,noatime,mode=1777 0 0
Does Genode create the /tmp/genode-<uid> directory? If yes, please post the contents of the directory.
Greets
Hello Wolfgang,
please try to answer my questions below (I already posted to answer your previous email). Currently, I have no idea what may cause the "lx_mmap failed".
Greets
Sorry Wolfgang,
my last email actually missing my question :-( Please see below
On Mon, Mar 31, 2014 at 08:47:53AM +0200, Christian Helmuth wrote:
Hello Wolfgang,
welcome to the list.
On Sun, Mar 30, 2014 at 04:06:22PM +0200, w_schmidt@...181... wrote:
|int main(): --- create local services --- |int main(): --- start init --- |int main(): transferred 17592186044415 MB to init |int main(): --- init created, waiting for exit condition --- |[init] _map_local: lx_mmap failed (addr_in=0,addr_out=ffffffffffffffed/-19) overmap=0 |[init] C++ runtime: Genode::Rm_session::Region_conflict |[init] void* abort(): abort called
This looks rather strange and if my interpretation is correct your Linux kernel answers an mmap request with ENODEV (-19 in the lof above). From the manpage of mmap:
ERRORS ... ENODEV The underlying file system of the specified file does not support memory mapping. ...
Currently, I have no idea how this may happen. Genode creates files for RAM dataspaces in the directory /tmp/genode-<uid> and uses mmap to attach the RAM dataspaces to process address spaces. Could you please post the output of
grep "/tmp" /etc/mtab
For my system it looks like
tmpfs /tmp tmpfs rw,noatime,mode=1777 0 0
Does Genode create the /tmp/genode-<uid> directory? If yes, please post the contents of the directory.
Hello Helmuth,
Sorry, I have not seen you're answers (some automatism seems to consider every thing from genode mail list as spam).
Because I had some strange graphic problems with Ubuntu 12.04 on the physical computer+-, I also tried a reinstall with another distribution (Mint). With Mint at least run/demo works.
But the self created hello doesn't.
I have found only an empty /tmp/genode-1000 directory (therefore the grep command you provided shows nothing).
The demo which is provided in genode nor works after update (git pull) of genode, but notif i try to run it with the nova kernel (the lower part of my last mail, it still says "no route to service "IO_PORT")
Best regards, Wolfgang
-----Ursprüngliche Nachricht----- From: Christian Helmuth Sent: Monday, April 7, 2014 4:14 PM To: genode-main@lists.sourceforge.net Subject: Re: Creating your first Genode application - Build succesful, butexecution fails
Sorry Wolfgang,
my last email actually missing my question :-( Please see below
On Mon, Mar 31, 2014 at 08:47:53AM +0200, Christian Helmuth wrote:
Hello Wolfgang,
welcome to the list.
On Sun, Mar 30, 2014 at 04:06:22PM +0200, w_schmidt@...181... wrote:
|int main(): --- create local services --- |int main(): --- start init --- |int main(): transferred 17592186044415 MB to init |int main(): --- init created, waiting for exit condition --- |[init] _map_local: lx_mmap failed (addr_in=0,addr_out=ffffffffffffffed/-19) overmap=0 |[init] C++ runtime: Genode::Rm_session::Region_conflict |[init] void* abort(): abort called
This looks rather strange and if my interpretation is correct your Linux kernel answers an mmap request with ENODEV (-19 in the lof above). From the manpage of mmap:
ERRORS ... ENODEV The underlying file system of the specified file does not support memory mapping. ...
Currently, I have no idea how this may happen. Genode creates files for RAM dataspaces in the directory /tmp/genode-<uid> and uses mmap to attach the RAM dataspaces to process address spaces. Could you please post the output of
grep "/tmp" /etc/mtab
For my system it looks like
tmpfs /tmp tmpfs rw,noatime,mode=1777 0 0
Does Genode create the /tmp/genode-<uid> directory? If yes, please post the contents of the directory.
Hello Wolfgang,
On Sat, Apr 12, 2014 at 10:26:29AM +0200, w_schmidt@...181... wrote:
Because I had some strange graphic problems with Ubuntu 12.04 on the physical computer+-, I also tried a reinstall with another distribution (Mint). With Mint at least run/demo works.
That's good news.
But the self created hello doesn't.
I have found only an empty /tmp/genode-1000 directory (therefore the grep command you provided shows nothing).
The demo which is provided in genode nor works after update (git pull) of genode, but notif i try to run it with the nova kernel (the lower part of my last mail, it still says "no route to service "IO_PORT")
Just to get it right: 'make run/demo' now works on Linux and NOVA as expected, right?
I've to admit that it's expected that the hello tutorial works on Linux but not on NOVA. The first-application tutorial on Genode leaves aside several aspects, which are important for other kernel, for simplicity reasons. In this case the service for accessing x86 I/O ports (needed by the timer) is not configured properly. You may add
<service name="IO_PORT"> <parent/> </service>
to the top of your config file. For further information about confiuring the init process please have a look at
http://genode.org/documentation/developer-resources/init
Best regards
Hello,
On 04/12/2014 05:33 PM, Christian Helmuth wrote:
[...] You may add
<service name="IO_PORT"> <parent/> </service>
to the top of your config file. For further information about confiuring the init process please have a look at
I think that should be
<parent-provides> ... <service name="IRQ"/> <service name="IO_PORT"/> ... </parent-provides>
Cheers Norman
Hello Christian,
But the self created hello doesn't.
I have found only an empty /tmp/genode-1000 directory (therefore the grep command you provided shows nothing).
The demo which is provided in genode nor works after update (git pull) of genode, but notif i try to run it with the nova kernel (the lower part of my last mail, it still says "no route to service "IO_PORT")
Just to get it right: 'make run/demo' now works on Linux and NOVA as
expected, right?
I tried now
with Linux: make run/demo works as expected. with Nova: make run/demo does not work., the output is as below
Program app/launchpad/launchpad COMPILE launcher.o COMPILE launchpad_window.o COMPILE main.o LINK launchpad make[1]: Verlasse Verzeichnis '/home/wolfgang/genode/build.1' genode build completed cp: der Aufruf von stat für »bin/fb_drvâ ist nicht möglich: Datei oder Verzeichnis nicht gefunden while executing "exec cp bin/$binary [run_dir]/genode" (procedure "copy_and_strip_genode_binaries_to_run_dir" line 4) invoked from within "copy_and_strip_genode_binaries_to_run_dir $binaries" (procedure "build_boot_image" line 6) invoked from within "build_boot_image $boot_modules" (file "/home/wolfgang/genode/os/run/demo.run" line 182) invoked from within "source $include_name" ("foreach" body line 3) invoked from within "foreach include_name [get_cmd_arg --include ""] { puts "using run script $include_name" source $include_name }"
I've to admit that it's expected that the hello tutorial works on Linux but not on NOVA. The first-application tutorial on Genode leaves aside several aspects, which are important for other kernel, for simplicity reasons. In this case the service for accessing x86 I/O ports (needed by the timer) is not configured properly. You may add <service name="IO_PORT"> <parent/> </service>
With <parent-provides> ... <service name="IRQ"/> <service name="IO_PORT"/> ... </parent-provides>
in the hello.run file the hello demo in nova directory works. (for what is the config/config file used - it seems to be ignored?)
I still have the problem that the make run/demo works, but if i create an own directory according to "make your first application" section - it doesn't. there still the lxmap error appears and the tmp/genode-1000 directory keeps empty.
So make run/demo works, but an own project with the hello files doesn't and only brings lxmap error.
Best regards
On 13.04.2014 11:39, w_schmidt@...181... wrote:
I tried now
with Linux: make run/demo works as expected. with Nova: make run/demo does not work., the output is as below
Program app/launchpad/launchpad COMPILE launcher.o COMPILE launchpad_window.o COMPILE main.o LINK launchpad make[1]: Verlasse Verzeichnis '/home/wolfgang/genode/build.1' genode build completed cp: der Aufruf von stat für »bin/fb_drv“ ist nicht möglich: Datei oder
Please have a look at the instruction of
http://genode.org/documentation/developer-resources/getting_started
You have for non-Linux x86 platforms at least to prepare the x86emu package of libports and to add/uncomment the libports repository in your build.conf file of your build directory to get the framebuffer driver compiled.
Best regards,
Alexander Boettcher.
Hi,
Thanks, uncommenting in build configuration helped a bit. (Still do not see the point in documentation)
But now it stops without any error. It just opens the start screen like with "linux" demo, but then it freezes.
I would even be more interessted in how to really buidl a first application. (not only starting the buildscript make run7hello, but the step-for-step instruction, which still fails).
Best regards, Wolfgang
-----Ursprüngliche Nachricht----- From: Alexander Boettcher Sent: Sunday, April 13, 2014 12:31 PM To: genode-main@lists.sourceforge.net Subject: Re: Creating your first Genode application - Build succesful,butexecution fails
------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________ Genode-main mailing list Genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Wolfgang,
Thanks, uncommenting in build configuration helped a bit. (Still do not see the point in documentation)
please have a look at the following section:
http://genode.org/documentation/developer-resources/getting_started#Using_pl...
But in contrast to this page, the platform-specific documents lack the part about modifying the 'build.conf' file. Thank you for pointing this out. We should fix that.
But now it stops without any error. It just opens the start screen like with "linux" demo, but then it freezes.
What do you mean with "freeze" specifically?
Do you see the GUI in the Qemu window or does it stay black? In the former case, the problem may be related to Qemu. We repeatedly experienced problems with different versions of Qemu. E.g., newer versions shipped with Ubuntu come with a Gtk GUI, which behaves a bit strange (the nitpicker mouse cursor does not move). For me, it helped to specify "-display sdl" as Qemu option. You can do that by modifying the 'QEMU_OPT' declaration in your '<build-dir>/etc/build.conf' file.
I would even be more interessted in how to really buidl a first application. (not only starting the buildscript make run7hello, but the step-for-step instruction, which still fails).
I figured that the hello-tutorial may actually not be the easiest way to start as it contains many details that are not needed for realizing applications on top of Genode.
For creating your very first program, it would probably be better to inspect an even simpler scenario such as 'run/printf'. You can find the corresponding run script at 'base/run/printf.h' and the source code and target.mk file for the program at 'base/src/test/printf/'. Once you got comfortable with modifying and running it, start to explore to other run scripts. Also, do not hesitate to look under the hood of the run tool to learn how it works. (e.g., what happens when a command 'build_boot_image' is invoked?) The run tool is actually a script to be found at 'tool/run'. The platform-specific parts are located at 'base-<platform>/run/env'.
Cheers Norman
Hi Norman,
thanxs, the freeze was exactly that qemu was showing the UI but nothing reacted. Using display sdl option helped.
I figured that the hello-tutorial may actually not be the easiest way to start as it contains many details that are not needed for realizing applications on top of Genode.
For creating your very first program, it would probably be better to inspect an even simpler scenario such as 'run/printf'. You can find the corresponding run script at 'base/run/printf.h' and the source code and target.mk file for the program at 'base/src/test/printf/'. Once you got comfortable with modifying and running it, start to explore to other run scripts. Also, do not hesitate to look under the hood of the run tool to learn how it works. (e.g., what happens when a command 'build_boot_image' is invoked?) The run tool is actually a script to be found at 'tool/run'. The platform-specific parts are located at 'base-<platform>/run/env'.
Will try it out as soon as i have time. Maybe a side question. on http://genode.org/documentation/developer-resources/build_system it is stated that every custom source code repository will need a "lib/mk" folder. But i have not seen if there needs to be something manually inserted in the folder?
Best regards, Wolfgang
Hello Wolfgang,
Will try it out as soon as i have time. Maybe a side question. on http://genode.org/documentation/developer-resources/build_system it is stated that every custom source code repository will need a "lib/mk" folder. But i have not seen if there needs to be something manually inserted in the folder?
this folder is actually not strictly required. It is needed only if your repository hosts libraries, which is not the case if it merely contains an application.
Most repositories contain libraries. But if you take a look at the 'hello_tutorial/' repository, for instance, you won't find a 'lib/' subdirectory there. Maybe, we could relax the wording in the manual a bit. Thank you for pointing out such ambiguities in the documentation.
Cheers and happy hacking! Norman