Author Topic: ld-config  (Read 6182 times)

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
ld-config
« 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??
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
ld-config
« Reply #1 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
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
ld-config
« Reply #2 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...)
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
ld-config
« Reply #3 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
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
ld-config
« Reply #4 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
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
ld-config
« Reply #5 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
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
ld-config
« Reply #6 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
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

ced

  • Full Member
  • ***
  • Posts: 225
    • View Profile
    • http://
ld-config
« Reply #7 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.
SL-5600, kernel 2.6.16 + GPE from .dev
Ethernet Socket LP-E
Viking 256M SD