Creating your first Genode application - Build succesful, but execution fails

Wolfgang Schmidt wolfgang.schmidt at ...243...
Sat Apr 5 14:29:30 CEST 2014


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.

---------------------------------------------------------------------------------------

I also tried the following:

- created a new Ubuntu 12.04 VM.
- Installed prerequisites
        sudo -s
        make -v ->GNU Make 3.81
        apt-get install libSDL-dev
        apt-get install tk8.5 tcl8.5
        apt-get install expect
        apt-get install byacc
        apt-get install qemu
        apt-get install genisoimage
- Toolchain 
        tar xPfj genode-toolchain-12.11-x86_64.tar.bz2
- either extracted 14.02 or used git (tried both)
        tar -xfc genode-14.02.tar.bz2
- Build essentials
        apt-get install build-essential

Prepared NOVA
- In base-nova : make prepare
- In libports : make prepare PKG=x86emu

-created a new build directory: ./tool/create_builddir nova_x86_32 
BUILD_DIR=build.hellonova
- in build.hellonova: make kernel

- from : http://genode.org/documentation/developer-resources/build_system 
(Please note that the hello.run script does not contain 
kernel-specific information. Therefore it can be executed from the build 
directory of any base platform by using:) : make run/hello - 
Error: No run script

- Added in build.conf REPOSITORIES += $(GENODE_DIR)/hello_tutorial 
- make run/hello ->
        [init -> hello_server] 
Hello::Root_component::Root_component(Genode::Rpc_entrypoint*, 
Genode::Allocator*): Creating root component.
        [init -> hello_server] virtual Hello::Session_component* 
Hello::Root_component::_create_session(const char*): creating hello session.
        [init] hello_client: no route to service "Timer"
        [init -> hello_client] C++ runtime: Genode::Parent::Service_denied
- In hello_tutorial/config/config added the following to config:: 
(http://genode.org/documentation/developer-resources/client_server_tutorial)
    <parent-provides>
     <service name="CAP"/>
     <service name="LOG"/>
     <service name="RM"/>
   </parent-provides>
   <default-route>
     <any-service> <parent/> <any-child/> </any-service>
   </default-route>

  Changed also the  quantumto 1M in the directory( 
https://www.mail-archive.com/genode-main@lists.sourceforge.net/msg01343.html 
)

- make cleanall , make run/hello –> same problem

- tried also to change route directly ( http://genode.org/documentation/developer-resources/init )
    <route>
          <any-service> <parent/> <any-child/> </any-service>
    </route>

- make cleanall , make run/hello –> same problem

- Copied config file to build.hellonova/bin/config 

- make cleanall , make run/hello –> same problem

- changed /hello_tutorial/run/hello.run
Added:
<start name="timer">
               <resource name="RAM" quantum="1M"/>
               <provides><service name="Timer"/></provides>
       </start>
(in this file there was only client/server)

- make cleanall , make run/hello –> same problem

I tried to update the repository with a git pull.

Now something changed...
->  [init] timer: no route to service "IO_PORT"
I now see that in the helo.run there is also a line <service name="SIGNAL"/>

What else could be needed to be changed?
And for what is the config file in hello_tutorial_config?

Best regards
Wolfgang Schmidt


-------------------

Output of: make run/hello

using run script /home/wolfgang/genode/base-nova/run/env
using run script /home/wolfgang/genode/hello_tutorial/run/hello.run
building targets:  core init hello drivers/timer 
spawn make core init hello drivers/timer
make[1]: Betrete Verzeichnis '/home/wolfgang/genode/build.hellonova'
checking library dependencies...
  Library platform
    MERGE    platform.lib.a
  Library cxx
    COMPILE  exception.o
    COMPILE  guard.o
    COMPILE  malloc_free.o
    COMPILE  misc.o
    COMPILE  new_delete.o
    COMPILE  unwind.o
    MERGE    supc++.o
    CONVERT  supc++.o
    MERGE    cxx.lib.a
  Library syscall
    MERGE    syscall.lib.a
  Library startup
    COMPILE  _main.o
    ASSEMBLE crt0.o
    COMPILE  init_main_thread.o
    MERGE    startup.lib.a
  Library base-common
    COMPILE  allocator/allocator_avl.o
    COMPILE  allocator/slab.o
    COMPILE  avl_tree/avl_tree.o
    COMPILE  child/child.o
    COMPILE  console/console.o
    COMPILE  elf/elf_binary.o
    COMPILE  env/cap_map.o
    COMPILE  heap/heap.o
    COMPILE  heap/sliced_heap.o
    COMPILE  ipc/ipc.o
    COMPILE  ipc/pager.o
    COMPILE  lock/lock.o
    COMPILE  pager/x86_32/pager.o
    COMPILE  process/process.o
    COMPILE  server/server.o
    COMPILE  signal/common.o
    COMPILE  signal/signal.o
    COMPILE  thread/context_allocator.o
    COMPILE  thread/thread.o
    COMPILE  thread/thread_context.o
    COMPILE  thread/trace.o
    MERGE    base-common.lib.a
  Library base
    COMPILE  console/log_console.o
    COMPILE  env/context_area.o
    COMPILE  env/env.o
    COMPILE  env/reinitialize.o
    COMPILE  thread/thread_nova.o
    MERGE    base.lib.a
  Library alarm
    COMPILE  alarm.o
    MERGE    alarm.lib.a
  Library timer
    COMPILE  main.o
    MERGE    timer.lib.a
  Program drivers/timer/timer
    COMPILE  empty.o
    LINK     timer
  Program hello/client/hello_client
    COMPILE  main.o
    LINK     hello_client
  Program hello/server/hello_server
    COMPILE  main.o
    LINK     hello_server
  Library init_pd_args
    COMPILE  pd_args.o
    MERGE    init_pd_args.lib.a
  Library config
    COMPILE  config.o
    MERGE    config.lib.a
  Program init/init
    COMPILE  main.o
    LINK     init
  Program core/core
    COMPILE  context_area.o
    COMPILE  core_mem_alloc.o
    COMPILE  core_printf.o
    COMPILE  core_rm_session.o
    COMPILE  cpu_session_component.o
    COMPILE  cpu_session_extension.o
    COMPILE  cpu_session_support.o
    COMPILE  dataspace_component.o
    COMPILE  dump_alloc.o
    COMPILE  echo.o
    COMPILE  io_mem_session_component.o
    COMPILE  io_mem_session_support.o
    COMPILE  io_port_session_component.o
    COMPILE  irq_session_component.o
    COMPILE  main.o
    COMPILE  pager.o
    COMPILE  pd_session_component.o
    COMPILE  pd_session_extension.o
    COMPILE  platform.o
    COMPILE  platform_pd.o
    COMPILE  platform_services.o
    COMPILE  platform_thread.o
    COMPILE  ram_session_component.o
    COMPILE  ram_session_support.o
    COMPILE  rm_session_component.o
    COMPILE  rm_session_support.o
    COMPILE  rom_session_component.o
    COMPILE  signal_session_component.o
    COMPILE  signal_source_component.o
    COMPILE  thread_start.o
    COMPILE  trace_session_component.o
    LINK     core
make[1]: Verlasse Verzeichnis '/home/wolfgang/genode/build.hellonova'
genode build completed
building targets:  kernel 
spawn make kernel
make[1]: Betrete Verzeichnis '/home/wolfgang/genode/build.hellonova'
checking library dependencies...
  Program kernel/hypervisor
    COMPILE  acpi.o
    COMPILE  acpi_dmar.o
    COMPILE  acpi_fadt.o
    COMPILE  acpi_hpet.o
    COMPILE  acpi_madt.o
    COMPILE  acpi_mcfg.o
    COMPILE  acpi_rsdp.o
    COMPILE  acpi_rsdt.o
    COMPILE  acpi_table.o
    COMPILE  avl.o
    COMPILE  bootstrap.o
    COMPILE  buddy.o
    COMPILE  cmdline.o
    COMPILE  console.o
    COMPILE  console_serial.o
    COMPILE  console_vga.o
    COMPILE  counter.o
    COMPILE  cpu.o
    COMPILE  dmar.o
    COMPILE  ec.o
    COMPILE  ec_exc.o
    COMPILE  ec_svm.o
    COMPILE  ec_vmx.o
    COMPILE  entry.o
    COMPILE  fpu.o
    COMPILE  gdt.o
    COMPILE  gsi.o
    COMPILE  hip.o
    COMPILE  hpet.o
    COMPILE  hpt.o
    COMPILE  idt.o
    COMPILE  init.o
    COMPILE  ioapic.o
    COMPILE  keyb.o
    COMPILE  lapic.o
    COMPILE  mca.o
    COMPILE  mdb.o
    COMPILE  memory.o
    COMPILE  mtrr.o
    COMPILE  pci.o
/home/wolfgang/genode/base-nova/contrib/src/pci.cpp: In constructor ‘Pci::Pci(unsigned int, unsigned int)’:
/home/wolfgang/genode/base-nova/contrib/src/pci.cpp:41:51: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
    COMPILE  pd.o
    COMPILE  pt.o
    COMPILE  pte.o
    COMPILE  rcu.o
    COMPILE  regs.o
    COMPILE  sc.o
    COMPILE  slab.o
    COMPILE  sm.o
    COMPILE  space_mem.o
    COMPILE  space_obj.o
    COMPILE  space_pio.o
    COMPILE  start.o
    COMPILE  string.o
    COMPILE  svm.o
    COMPILE  syscall.o
    COMPILE  tss.o
    COMPILE  utcb.o
    COMPILE  vmx.o
    COMPILE  vtlb.o
    LINK     hypervisor
make[1]: Verlasse Verzeichnis '/home/wolfgang/genode/build.hellonova'
genode build completed
using NOVA kernel at /home/wolfgang/genode/build.hellonova/kernel/hypervisor
creating ISO image...
Warning: -follow-links does not always work correctly; be careful.
Size of boot image is 4 sectors -> No emulation
Total translation table size: 2048
Total rockridge attributes bytes: 2228
Total directory bytes: 8192
Path table size(bytes): 64
Max brk space used 1c000
1885 extents written (3 MB)
spawn qemu-system-x86_64 -no-kvm -cpu core2duo -nographic -cdrom var/run/hello.iso

NOVA Microhypervisor v6-ccc670a (x86_32): Apr  5 2014 14:24:53 [gcc 4.7.2]

[ 0] CORE:0:0:0 6:f:b:0 [0] Intel(R) Core(TM)2 Duo CPU     T7700  @ 2.40GHz
Hypervisor does not feature VMX
Hypervisor does not feature SVM
Hypervisor reports 1x1 CPU  - boot CPU is 0
Hypervisor info page contains 13 memory descriptors:
detected physical memory: 0x0000000000000000 - size: 0x9f400
use      physical memory: 0x0000000000000000 - size: 0x9f000
detected physical memory: 0x0000000000100000 - size: 0x17efd000
use      physical memory: 0x0000000000100000 - size: 0x17efd000
map multi-boot module: physical 0x17db9000 -> [0x001c5000-0x0028ad44) - core
map multi-boot module: physical 0x17e7f000 -> [0x00002000-0x00002235) - config
map multi-boot module: physical 0x17e80000 -> [0x00006000-0x00071450) - init
map multi-boot module: physical 0x17eec000 -> [0x00075000-0x000cba54) - hello_client
map multi-boot module: physical 0x17f43000 -> [0xb0000000-0xb005a278) - hello_server
map multi-boot module: physical 0x17f9e000 -> [0x0028e000-0x002eccdc) - timer
:virt_alloc: Allocator 186814 dump:
Block: [00002000,00004000) size=00002000 avail=00000000 max_avail=00000000
Block: [00004000,00005000) size=00001000 avail=00000000 max_avail=00000000
Block: [00005000,00006000) size=00001000 avail=00000000 max_avail=00000000
Block: [00006000,00073000) size=0006d000 avail=00000000 max_avail=00000000
Block: [00073000,00074000) size=00001000 avail=00000000 max_avail=00000000
Block: [00074000,00075000) size=00001000 avail=00000000 max_avail=00000000
Block: [00075000,000cd000) size=00058000 avail=00000000 max_avail=00000000
Block: [000cd000,000ce000) size=00001000 avail=00000000 max_avail=00000000
Block: [000ce000,000cf000) size=00001000 avail=00000000 max_avail=9fd12000
Block: [000cf000,000d0000) size=00001000 avail=00000000 max_avail=00000000
Block: [000d0000,000d1000) size=00001000 avail=00000000 max_avail=00000000
Block: [000d1000,000d2000) size=00001000 avail=00000000 max_avail=0002c000
Block: [000d2000,000d3000) size=00001000 avail=00000000 max_avail=00000000
Block: [000d3000,000d4000) size=00001000 avail=00000000 max_avail=00000000
Block: [000d4000,00100000) size=0002c000 avail=0002c000 max_avail=0002c000
Block: [001c5000,0028c000) size=000c7000 avail=00000000 max_avail=00000000
Block: [0028c000,0028d000) size=00001000 avail=00000000 max_avail=9fd12000
Block: [0028d000,0028e000) size=00001000 avail=00000000 max_avail=00000000
Block: [0028e000,002ee000) size=00060000 avail=00000000 max_avail=9fd12000
Block: [002ee000,a0000000) size=9fd12000 avail=9fd12000 max_avail=9fd12000
Block: [b0000000,b005c000) size=0005c000 avail=00000000 max_avail=9fd12000
Block: [b005c000,bfeff000) size=0fea3000 avail=0fea3000 max_avail=0fea3000
Block: [bff04000,bfffd000) size=000f9000 avail=000f9000 max_avail=000f9000
=> mem_size=2951942144 (2815 MB) / mem_avail=2949488640 (2812 MB)
:phys_alloc: Allocator 1857b8 dump:
Block: [00001000,00002000) size=00001000 avail=00000000 max_avail=00000000
Block: [00002000,00003000) size=00001000 avail=00000000 max_avail=00000000
Block: [00003000,00004000) size=00001000 avail=00000000 max_avail=00000000
Block: [00004000,00005000) size=00001000 avail=00000000 max_avail=00000000
Block: [00005000,00006000) size=00001000 avail=00000000 max_avail=00000000
Block: [00006000,00007000) size=00001000 avail=00000000 max_avail=155b9000
Block: [00007000,00008000) size=00001000 avail=00000000 max_avail=00000000
Block: [00008000,00009000) size=00001000 avail=00000000 max_avail=00000000
Block: [00009000,0000a000) size=00001000 avail=00000000 max_avail=00000000
Block: [0000a000,0000b000) size=00001000 avail=00000000 max_avail=00093000
Block: [0000b000,0000c000) size=00001000 avail=00000000 max_avail=00000000
Block: [0000c000,0009f000) size=00093000 avail=00093000 max_avail=00093000
Block: [00100000,00101000) size=00001000 avail=00000000 max_avail=155b9000
Block: [00101000,00102000) size=00001000 avail=00000000 max_avail=00000000
Block: [00102000,00400000) size=002fe000 avail=002fe000 max_avail=155b9000
Block: [02800000,17db9000) size=155b9000 avail=155b9000 max_avail=155b9000
=> mem_size=362115072 (345 MB) / mem_avail=362061824 (345 MB)
:io_mem_alloc: Allocator 187870 dump:
Block: [00000000,00001000) size=00001000 avail=00001000 max_avail=00001000
Block: [0009f000,00100000) size=00061000 avail=00061000 max_avail=00061000
Block: [00400000,02800000) size=02400000 avail=02400000 max_avail=e8246000
Block: [17db9000,fffff000) size=e8246000 avail=e8246000 max_avail=e8246000
=> mem_size=3932848128 (3750 MB) / mem_avail=3932848128 (3750 MB)
int main(): --- create local services ---
int main(): --- start init ---
int main(): transferred 344 MB to init
int main(): --- init created, waiting for exit condition ---
[init] Could not open file "ld.lib.so"
[init] timer: no route to service "IO_PORT"
[init -> hello_server] Hello::Root_component::Root_component(Genode::Rpc_entrypoint*, Genode::Allocator*): Creating root component.
[init -> hello_server] virtual Hello::Session_component* Hello::Root_component::_create_session(const char*): creating hello session.
[init -> timer] C++ runtime: Genode::Parent::Service_denied
[init -> timer] void* abort(): abort called
Expect: 'interact' received 'strg+c' and was cancelled
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20140405/e694e6c7/attachment.html>


More information about the users mailing list