OESF Portables Forum

Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Linux Applications => Topic started by: ced on February 06, 2004, 06:04:18 am

Title: ld-config
Post by: ced on February 06, 2004, 06:04:18 am
The sharp rom contains libc 2.2.2 and ld-config 2.2.2.

The blackdown JVM for Xscale is compiled against libc 2.3.x and ld-config 2.3.x.

I\'ve copied the library 2.3.x to /home/zaurus/mylib and I\'ve started the JVM as follow:

Code: [Select]
export LD_LIBRARY_PATH=/home/zaurus/mylib:$LD_LIBRARY_PATH

java -version


the JVM has found my new libc 2.3.x but the new libc is still loaded by the old ld-config.

How can I load the JVM libraries using the new ld-config 2.3.x.

with \"chroot\"?? or LD_PRELOAD??
Title: ld-config
Post by: lardman on February 06, 2004, 07:12:15 am
Quote
but the new libc is still loaded by the old ld-config

I presume that ld-config is always in memory and is shared so it can\'t be unloaded unless you reboot (this is just a guess though). I think your options are - recompile ROM against libc 2.3 or statically link libc 2.3 into your JVM (would this work, I don\'t know?).


Si
Title: ld-config
Post by: ced on February 06, 2004, 07:50:18 am
can I replace the ld-linux library from 2.2.2 to 2.3.2 without re-building a new rom?

just by mounting the file system as read/write? do my changes and re-apply the file system to read only. can I do that?

any issue moving to libc 2.2.2 to 2.3.2? is it down-compatible? (I\'m not sure if I\'ve asked this question before...)
Title: ld-config
Post by: tumnus on February 06, 2004, 08:06:12 am
The 5600 ROM is a readonly JFFS2 partition, so to make the 5600 ROM writable just run this command as root:

mount / -o rw,remount

Then replace the files you need to change and run this command to protect the ROM again:

mount / -o ro,remount

No reboot required
Title: ld-config
Post by: lardman on February 06, 2004, 08:10:38 am
libc 2.3 is backwards compatible (in my experience of running old command line apps on Oz3.3.6pre1 anyway).

I doubt you\'ll be able to replace ld-config while your Z is running as it\'s always loaded (I assume). Make sure you have your CF/SD card setup for flashing if you do try this as it will probably end up with a dead Z which needs a flash.


Si
Title: ld-config
Post by: ced on February 06, 2004, 08:25:11 am
d\'oh!!!!

I\'ve done this...

cd /lib
rm ld-linux.so.2
rm ld.so.2

and going to do -] ln -s ld-2.3.2.so ld-linux.so.2
but the system doesn\'t find anything... :-( ;-)

and if I reboot then the system won\'t work!

do I need to reflash?

should I do this instead next time? -] ln -n -f ld-2.3.2.so ld-linux.so.2
Title: ld-config
Post by: lardman on February 06, 2004, 09:38:41 am
Quote
and if I reboot then the system won\'t work!

Assuming you\'ve tried rebooting and it now doesn\'t work, then yes you need to reflash.

However the method you\'ve used might work, you just have to make sure you get all of the relevant files and symlinks updated. I once tried doing ld-linux.* and libc.so.* but it still failed. My guess then was that I\'d left some other vital file at the old version. I reflashed and have left well alone since then (not least because I\'m using OZ 3.3.6pre1 which uses libc2.3).


Si
Title: ld-config
Post by: ced on February 06, 2004, 10:25:51 am
I\'ve replaced all the libraries in /lib

after a reboot the /sbin/launch prg failed to run...

so I think I\'ll wait the new cacko rom with libc 2.3 and qtopia 1.7.