On Mon, May 11, 2009 at 2:59 PM, j.chitte <> wrote:
> I have a working 2.6.29.1 based on Matthieu's patchset but the board gets
> stuck in init.
>
> I'm loading the kernel via http and booting nfsroot.
>
>
> I compiled a simple hello world that I put in as /sbin/init.
>
> Built -static it worked fine: I got a clean boot and my init threw out the
> greeting msg.
>
> Dynamically linking it gets me a kernel panic , not syncing.
>
> I've installed the native toolchain libs to my nfsroot using
> arm-unknown-linux-gnueabi-populate from crosstool-ng, I don't have any
> busybox tools in the image since I'm not attempting a true init yet.
>
> Am I mistaken in thinking the kernel and basic toolchain is sufficient to run
> the dynamic hello world "init"?
>
> TIA
>
Do you have /lib/ld-linux.so in your nfsroot?
If any library that your app needs dynamically is missing, then you
will get an error. I've seen this same problem before and it required
installing more shared libs into the rootfs than I thought were
needed. You can get list of libs needed by using /lib/ld-linux.so.
Here's an example from my app on a ts7390:
:~# /lib/ld-linux.so.3 --list /usr/bin/thermostat
libQtGuiE.so.4 => /usr/lib/libQtGuiE.so.4 (0x40001000)
libts-1.0.so.0 => /usr/lib/libts-1.0.so.0 (0x40a48000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x40a52000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40a75000)
libQtNetworkE.so.4 => /usr/lib/libQtNetworkE.so.4 (0x40ad3000)
libQtCoreE.so.4 => /usr/lib/libQtCoreE.so.4 (0x40c2b000)
libz.so.1 => /usr/lib/libz.so.1 (0x40f28000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x40f3e000)
librt.so.1 => /lib/librt.so.1 (0x40f49000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x40f58000)
libdl.so.2 => /lib/libdl.so.2 (0x40ff7000)
libpthread.so.0 => /lib/libpthread.so.0 (0x41002000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x41021000)
libm.so.6 => /lib/libm.so.6 (0x410e0000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4118b000)
libc.so.6 => /lib/libc.so.6 (0x4119d000)
/lib/ld-linux.so.3 (0x2a000000)
:~# /lib/ld-linux.so.3 --list /usr/bin/ts-fbtest
libc.so.6 => /lib/libc.so.6 (0x40001000)
/lib/ld-linux.so.3 (0x2a000000)
:~# /lib/ld-linux.so.3 --list /bin/sh
libm.so.6 => /lib/libm.so.6 (0x40001000)
libc.so.6 => /lib/libc.so.6 (0x400ac000)
/lib/ld-linux.so.3 (0x2a000000)
Of course, you will need to boot into a shell on your target system to
be able to run this.
This has some useful info related to shared libs:
http://linux.die.net/man/8/ld-linux
Ted Roth
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|