Hi all,
Thanks Norman,
On Fri, Jan 2, 2015 at 5:13 PM, Norman Feske <norman.feske@...1...> wrote:
Hi Franc,
thank you for trying out Genode!
I was trying to run simple run script printf and following is the output
:
kernel initialized Genode 14.11 int main(): --- create local services --- int main(): --- start init --- int main(): transferred 509 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open file "ld.lib.so http://ld.lib.so" [init -> test-printf] -1 = -1 = -1 [init] virtual void Genode::Child_policy::exit(int): child exited with exit value 0
As i read "Could not open file ld.lib.so http://ld.lib.so" is not a error. But i want to demonstrate some example which will not give me this error message.
Could you help me to understand this ld.lib.so http://ld.lib.so
scenario?
when started, init tries to obtain the binary of the dynamic linker as a ROM session. In the simple printf scenario, however, no dynamically linked binaries are used. So the dynamic linker is not present in the boot image. The easiest way to silence the message would be to add the dynamic linker (ld.lib.so) to the boot image by adding the file name to the 'build_boot_image' step in the run script.
so I need to add the following in the run script
build_boot_image "core init ld.lib.so test-printf",Is it right ?
However, because your scenario does not rely on it, the dynamic linker is not built automatically. So you'd need to build at least one target that depends on a shared library. For example, 'test/ldso'.
As I am new to Genode, I am not able to locate and run "make test/ldso".
Actually, I am working base-hw kernel. Can some one help me in that ?
Btw, for questions like your's, let me recommend you to post on our
mailing list. This way, you may get assistance from more people than just me. Also the discussion might be helpful for other people who might stumble over the same problem in the future.
Oh yeah, Actually Previously my mails was not delivered in the Genode
mailing list, that's why i send you personally. I think, Now this problem has been resolved.
Cheers Norman
-- Dr.-Ing. Norman Feske Genode Labs
http://www.genode-labs.com · http://genode.org
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
Regards Franc
Hi Franc,
so I need to add the following in the run script build_boot_image "core init ld.lib.so http://ld.lib.so test-printf",Is it right ?
Well, when omitting the URL, you are fine. ;-)
As I am new to Genode, I am not able to locate and run "make test/ldso". Actually, I am working base-hw kernel. Can some one help me in that ?
The ldso test is located in the libports repository. In order to use it, you will need to uncomment the corresponding line in your '<build-dir>/etc/build.conf' file. Note that the test depends on the libc. To build it, you will need to download the libc. This can be done via
cd <genode-dir> ./tool/ports/prepare_port libc
That said, when I think about it again, doing all these steps just for silencing the diagnostic message seems a bit too much. Maybe, you would be better off by creating a new pseudo target that solely depends on the dynamic linker. Just create a new file at 'repos/base/src/test/dummy/target.mk' with the following content:
TARGET = test-dummy LIBS = ld
Thereby, you define a new build target what happens to depend on the dynamic linker because 'ld' is specified for the LIBS declaration. When building the target via 'make test/dummy', the dynamic linker will be built. It might be appropriate to append 'test/dummy' to the build step (the very first line) in the 'printf.run' script.
Cheers Norman