Re: Yet another question

2016-12-15 Thread Florian Grätz
Thank you, Christian. Adding -no-pie to the compiler flags fixed this issue.

2016-12-13 19:11 GMT+01:00 Florian Grätz :

> Dear Stefan,
> Dear Mohammad,
>
> thank you for your kind support. Stefan pointed me into the right
> direction. I was missing, that I had to uncomment two directories in the
> build.conf and that I needed to make the run/demo target. The result was an
> elf file. I assume that this needs to be loaded by the Raspberry
> bootloader. I will give it a try as soon as I get some spare time on my
> hands, maybe next weekend. However, I don't expect any troubles here.
>
> The other matter appears a little tricker, though.
>
> I am using a 64-bit SDL-1.2 (the build manual didn't specify, whether to
> use SDL-1.2 or SDL-2.0, but I guessed from the sources that it must be 1.2):
> florian@Linde:~/genode/build/linux_x86$ file /usr/lib/x86_64-linux-gnu/
> libSDL-1.2.so.0.11.4
> /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4: ELF 64-bit LSB shared
> object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=
> fb5912d243b188e293346fd4ce1e09d5ed2d1fe2, stripped
>
> My libalsa is also 64 bits:
> florian@Linde:~/genode/build/linux_x86$ file 
> /usr/lib/x86_64-linux-gnu/ao/plugins-4/libalsa.so
>
> /usr/lib/x86_64-linux-gnu/ao/plugins-4/libalsa.so: ELF 64-bit LSB shared
> object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=
> 5f11394919125b4879e2b15cc6d32a2c4b2976b1, stripped
>
> I am running Ubuntu 16.10 64 bits in a Virtual Box on a Windows 10 host:
> florian@Linde:~/genode/build/linux_x86$ uname -a
> Linux Linde 4.8.0-30-generic #32-Ubuntu SMP Fri Dec 2 03:43:27 UTC 2016
> x86_64 x86_64 x86_64 GNU/Linux
>
> However, there is no specs.conf file in my build directory:
> florian@Linde:~/genode/build/linux_x86$ ls -R -a
> .:
> .  ..  etc  Makefile
>
> ./etc:
> .  ..  build.conf
>
> Do I need to create one?
>
> Regards, Florian.
>
> 2016-12-12 23:24 GMT+01:00 Florian Grätz :
>
>> Hello, community,
>>
>> first of all: let me express, how helpful and responsive this mailing
>> list is. I finally succeeded in running make for hw_rpi - still I have no
>> idea how to run it on my real hardware. make surely created many files,
>> most of them object files (.o), or object archives (.a). For running on my
>> hardware, I would need an image file, which I can write on an SD card,
>> though. How would I create one? Browsing through the .txt files didn't
>> yield to anything useful.
>>
>> I also have another concern when making for target linux_x86 according to
>> section 'Quick start to build genode for linux'. make run/demo quits with
>> the following errors:
>> /usr/bin/ld: fb_sdl.o: relocation R_X86_64_32 agains symbol
>> '_ZTIN6Genode11Msgbuf_base13_Too_many_capsE' can not be used when making
>> a shared object; recompile with -fPIC
>> /usr/bin/ld: input.o: relocation R_X86_64_32S agains '.rodata' can not be
>> used when making a shared object recompile with -fPIC
>> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
>> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be used
>> when making shared object; recompile with -fPIC
>> /usr/bin/ld: final link failed: Bad value
>> collect2: error: ld returned 1 exit status
>> /home/florian/genode/repos/base/mk/prg.mk:222: recipe for target
>> 'fb_sdl' failed
>>
>> If I run make without any arguments, the adio_drv doesn't build. The
>> linker quits with the following messages:
>> /usr/bin/ld: alsa.o: relocation R_X86_64_32 agains '.bss' can not be used
>> when making a shared object; recompile with -fPIC
>> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
>> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be used
>> when making shared object; recompile with -fPIC
>> /usr/bin/ld: final link failed: Nonrepresentable section on output
>> collect2: error: ld returned 1 exit status
>> /home/florian/genode/repos/base/mk/prg.mk:222: recipe for target
>> 'audio_drv' failed
>>
>> Any hints would be greatly appreciated.
>>
>> All the best, Florian.
>>
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Re: Yet another question

2016-12-13 Thread Christian Helmuth
Hello Florian,

On Tue, Dec 13, 2016 at 07:11:52PM +0100, Florian Grätz wrote:
> I am running Ubuntu 16.10 64 bits in a Virtual Box on a Windows 10 host:
> florian@Linde:~/genode/build/linux_x86$ uname -a
> Linux Linde 4.8.0-30-generic #32-Ubuntu SMP Fri Dec 2 03:43:27 UTC 2016
> x86_64 x86_64 x86_64 GNU/Linux

The reference to Ubuntu 16.10 rings a bell. I read about an issue of
this particular Ubuntu version enabling "position-independent
executables" by default in the distros GCC tool chain from the following
issue (unrelated to Genode)

  https://github.com/ldc-developers/ldc/issues/1618

Maybe you can help me remotely as I have no access to a recent Ubuntu
installation. Please try to add the following line at the end of
repos/base-linux/lib/import/import-lx_hybrid.mk and try to rerun the
demo scenario.

  CXX_LINK_OPT += -no-pie

Regards
-- 
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Re: Yet another question

2016-12-13 Thread Florian Grätz
Dear Stefan,
Dear Mohammad,

thank you for your kind support. Stefan pointed me into the right
direction. I was missing, that I had to uncomment two directories in the
build.conf and that I needed to make the run/demo target. The result was an
elf file. I assume that this needs to be loaded by the Raspberry
bootloader. I will give it a try as soon as I get some spare time on my
hands, maybe next weekend. However, I don't expect any troubles here.

The other matter appears a little tricker, though.

I am using a 64-bit SDL-1.2 (the build manual didn't specify, whether to
use SDL-1.2 or SDL-2.0, but I guessed from the sources that it must be 1.2):
florian@Linde:~/genode/build/linux_x86$ file
/usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4
/usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4: ELF 64-bit LSB shared
object, x86-64, version 1 (SYSV), dynamically linked,
BuildID[sha1]=fb5912d243b188e293346fd4ce1e09d5ed2d1fe2, stripped

My libalsa is also 64 bits:
florian@Linde:~/genode/build/linux_x86$ file
/usr/lib/x86_64-linux-gnu/ao/plugins-4/libalsa.so
/usr/lib/x86_64-linux-gnu/ao/plugins-4/libalsa.so: ELF 64-bit LSB shared
object, x86-64, version 1 (SYSV), dynamically linked,
BuildID[sha1]=5f11394919125b4879e2b15cc6d32a2c4b2976b1, stripped

I am running Ubuntu 16.10 64 bits in a Virtual Box on a Windows 10 host:
florian@Linde:~/genode/build/linux_x86$ uname -a
Linux Linde 4.8.0-30-generic #32-Ubuntu SMP Fri Dec 2 03:43:27 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux

However, there is no specs.conf file in my build directory:
florian@Linde:~/genode/build/linux_x86$ ls -R -a
.:
.  ..  etc  Makefile

./etc:
.  ..  build.conf

Do I need to create one?

Regards, Florian.

2016-12-12 23:24 GMT+01:00 Florian Grätz :

> Hello, community,
>
> first of all: let me express, how helpful and responsive this mailing list
> is. I finally succeeded in running make for hw_rpi - still I have no idea
> how to run it on my real hardware. make surely created many files, most of
> them object files (.o), or object archives (.a). For running on my
> hardware, I would need an image file, which I can write on an SD card,
> though. How would I create one? Browsing through the .txt files didn't
> yield to anything useful.
>
> I also have another concern when making for target linux_x86 according to
> section 'Quick start to build genode for linux'. make run/demo quits with
> the following errors:
> /usr/bin/ld: fb_sdl.o: relocation R_X86_64_32 agains symbol
> '_ZTIN6Genode11Msgbuf_base13_Too_many_capsE' can not be used when making
> a shared object; recompile with -fPIC
> /usr/bin/ld: input.o: relocation R_X86_64_32S agains '.rodata' can not be
> used when making a shared object recompile with -fPIC
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be used
> when making shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: error: ld returned 1 exit status
> /home/florian/genode/repos/base/mk/prg.mk:222: recipe for target 'fb_sdl'
> failed
>
> If I run make without any arguments, the adio_drv doesn't build. The
> linker quits with the following messages:
> /usr/bin/ld: alsa.o: relocation R_X86_64_32 agains '.bss' can not be used
> when making a shared object; recompile with -fPIC
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be used
> when making shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: error: ld returned 1 exit status
> /home/florian/genode/repos/base/mk/prg.mk:222: recipe for target
> 'audio_drv' failed
>
> Any hints would be greatly appreciated.
>
> All the best, Florian.
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Re: Yet another question

2016-12-13 Thread Stefan Kalkowski
Hi Florian,

On 12/12/2016 11:24 PM, Florian Grätz wrote:
> I also have another concern when making for target linux_x86 according
> to section 'Quick start to build genode for linux'. make run/demo quits
> with the following errors:
> /usr/bin/ld: fb_sdl.o: relocation R_X86_64_32 agains symbol
> '_ZTIN6Genode11Msgbuf_base13_Too_many_capsE' can not be used when making
> a shared object; recompile with -fPIC
> /usr/bin/ld: input.o: relocation R_X86_64_32S agains '.rodata' can not
> be used when making a shared object recompile with -fPIC
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be used
> when making shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: error: ld returned 1 exit status
> /home/florian/genode/repos/base/mk/prg.mk:222 :
> recipe for target 'fb_sdl' failed
> 
> If I run make without any arguments, the adio_drv doesn't build. The
> linker quits with the following messages:
> /usr/bin/ld: alsa.o: relocation R_X86_64_32 agains '.bss' can not be
> used when making a shared object; recompile with -fPIC
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be used
> when making shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: error: ld returned 1 exit status
> /home/florian/genode/repos/base/mk/prg.mk:222 :
> recipe for target 'audio_drv' failed
> 
> Any hints would be greatly appreciated.

That is strange. To me it looks like a 32-bit / 64-bit issue. I assume
you are running on a 64-bit Linux distribution? Are your alsa libraries
and SDL libraries 32-bit version? Or do you somehow try to build 32-bit
Linux binaries for Genode?

Can you please post the content of the specs.conf file in your
Genode/Linux build-directory?

Regards
Stefan

-- 
Stefan Kalkowski
Genode Labs

https://github.com/skalk · http://genode.org/

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Re: Yet another question

2016-12-13 Thread Stefan Kalkowski
Hi,

On 12/13/2016 09:41 AM, Mohammad Hamad wrote:
> hi Florian, 
> 
> have a look at: https://genode.org/documentation/release-notes/13.11 
> it could help you to run genode on RPI. 
> 
> best, 
> 

The description from those release notes is pretty much outdated.
Please, follow the following steps:

# create a build directory, e.g.:

  tool/create_builddir hw_rpi

# prepare the dde_linux and libc 3rd-party code:

  tool/ports/prepare_port dde_linux libc

# change to the build-directory:

  cd build/hw_rpi

# uncomment the dde_linux and libports repositories in the
# build-directory's 'etc' directory:

  sed -i 's/#\(.*\/libports\)/\1/'  etc/build.conf
  sed -i 's/#\(.*\/dde_linux\)/\1/' etc/build.conf

# start the demo run script:

  make run/demo

After the successful build the resulting ELF image file resides in:

  var/run/demo/image.elf

To create an u-boot image, you can additionally add a RUN_OPT variable
to your build.conf file:

  echo "RUN_OPT += --include image/uboot" >> etc/build.conf

Of course, you then need to re-build the demo scenario. The resulting
image will reside in:

  var/run/demo/uImage

Regards
Stefan
> 
> 
> 
> 
> 
> On 12 December 2016 at 23:24, Florian Grätz  > wrote:
> 
> Hello, community,
> 
> first of all: let me express, how helpful and responsive this
> mailing list is. I finally succeeded in running make for hw_rpi -
> still I have no idea how to run it on my real hardware. make surely
> created many files, most of them object files (.o), or object
> archives (.a). For running on my hardware, I would need an image
> file, which I can write on an SD card, though. How would I create
> one? Browsing through the .txt files didn't yield to anything useful.
> 
> I also have another concern when making for target linux_x86
> according to section 'Quick start to build genode for linux'. make
> run/demo quits with the following errors:
> /usr/bin/ld: fb_sdl.o: relocation R_X86_64_32 agains symbol
> '_ZTIN6Genode11Msgbuf_base13_Too_many_capsE' can not be used when
> making a shared object; recompile with -fPIC
> /usr/bin/ld: input.o: relocation R_X86_64_32S agains '.rodata' can
> not be used when making a shared object recompile with -fPIC
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be
> used when making shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: error: ld returned 1 exit status
> /home/florian/genode/repos/base/mk/prg.mk:222 :
> recipe for target 'fb_sdl' failed
> 
> If I run make without any arguments, the adio_drv doesn't build. The
> linker quits with the following messages:
> /usr/bin/ld: alsa.o: relocation R_X86_64_32 agains '.bss' can not be
> used when making a shared object; recompile with -fPIC
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be
> used when making shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: error: ld returned 1 exit status
> /home/florian/genode/repos/base/mk/prg.mk:222 :
> recipe for target 'audio_drv' failed
> 
> Any hints would be greatly appreciated.
> 
> All the best, Florian.
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> genode-main mailing list
> genode-main@lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/genode-main
> 
> 
> 
> 
> 
> --
> Check out the vibrant tech community on one of the world's most 
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> 
> 
> 
> ___
> genode-main mailing list
> genode-main@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
> 

-- 
Stefan Kalkowski
Genode Labs

https://github.com/skalk · http://genode.org/

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Re: Yet another question

2016-12-13 Thread Mohammad Hamad
hi Florian,

have a look at: https://genode.org/documentation/release-notes/13.11
it could help you to run genode on RPI.

best,






On 12 December 2016 at 23:24, Florian Grätz 
wrote:

> Hello, community,
>
> first of all: let me express, how helpful and responsive this mailing list
> is. I finally succeeded in running make for hw_rpi - still I have no idea
> how to run it on my real hardware. make surely created many files, most of
> them object files (.o), or object archives (.a). For running on my
> hardware, I would need an image file, which I can write on an SD card,
> though. How would I create one? Browsing through the .txt files didn't
> yield to anything useful.
>
> I also have another concern when making for target linux_x86 according to
> section 'Quick start to build genode for linux'. make run/demo quits with
> the following errors:
> /usr/bin/ld: fb_sdl.o: relocation R_X86_64_32 agains symbol
> '_ZTIN6Genode11Msgbuf_base13_Too_many_capsE' can not be used when making
> a shared object; recompile with -fPIC
> /usr/bin/ld: input.o: relocation R_X86_64_32S agains '.rodata' can not be
> used when making a shared object recompile with -fPIC
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be used
> when making shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value
> collect2: error: ld returned 1 exit status
> /home/florian/genode/repos/base/mk/prg.mk:222: recipe for target 'fb_sdl'
> failed
>
> If I run make without any arguments, the adio_drv doesn't build. The
> linker quits with the following messages:
> /usr/bin/ld: alsa.o: relocation R_X86_64_32 agains '.bss' can not be used
> when making a shared object; recompile with -fPIC
> /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o:
> relocation R_X86_64_32S against symbol '__libc_csu_fini' can not be used
> when making shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Nonrepresentable section on output
> collect2: error: ld returned 1 exit status
> /home/florian/genode/repos/base/mk/prg.mk:222: recipe for target
> 'audio_drv' failed
>
> Any hints would be greatly appreciated.
>
> All the best, Florian.
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> genode-main mailing list
> genode-main@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main


Yet another question

2016-12-13 Thread Florian Grätz
Hello, community,

first of all: let me express, how helpful and responsive this mailing list
is. I finally succeeded in running make for hw_rpi - still I have no idea
how to run it on my real hardware. make surely created many files, most of
them object files (.o), or object archives (.a). For running on my
hardware, I would need an image file, which I can write on an SD card,
though. How would I create one? Browsing through the .txt files didn't
yield to anything useful.

I also have another concern when making for target linux_x86 according to
section 'Quick start to build genode for linux'. make run/demo quits with
the following errors:
/usr/bin/ld: fb_sdl.o: relocation R_X86_64_32 agains symbol
'_ZTIN6Genode11Msgbuf_base13_Too_many_capsE' can not be used when making a
shared object; recompile with -fPIC
/usr/bin/ld: input.o: relocation R_X86_64_32S agains '.rodata' can not be
used when making a shared object recompile with -fPIC
/usr/bin/ld:
/usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o: relocation
R_X86_64_32S against symbol '__libc_csu_fini' can not be used when making
shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
/home/florian/genode/repos/base/mk/prg.mk:222: recipe for target 'fb_sdl'
failed

If I run make without any arguments, the adio_drv doesn't build. The linker
quits with the following messages:
/usr/bin/ld: alsa.o: relocation R_X86_64_32 agains '.bss' can not be used
when making a shared object; recompile with -fPIC
/usr/bin/ld:
/usr/lib/gcc/x86_64-linux-gnu/6../../../x86_64-linux-gnu/crt1.o: relocation
R_X86_64_32S against symbol '__libc_csu_fini' can not be used when making
shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
/home/florian/genode/repos/base/mk/prg.mk:222: recipe for target
'audio_drv' failed

Any hints would be greatly appreciated.

All the best, Florian.
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
genode-main mailing list
genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main