Author Topic: Chroot And Communication With Qtopia Server  (Read 3718 times)

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Chroot And Communication With Qtopia Server
« on: March 11, 2005, 09:08:06 am »
Hi,

I'm playing around with a shared library build of Qtopia using softfloat libraries so that it may be feasible to write dynamic linked apps that use softfloat.

The way that I'm trying to do this at the moment is using chroot on a portion of the file system on my SD card where I have copied the /dev directory, mounted /proc, have all my shared libs in /lib... QTDIR is set to / (chroot environment) and /tmp is linked to /dev/shm/tmp (running on Cacko 1.22).

Whatever I seem to try I always get the message that there is no Qtopia server running and I should start the app with -qws if I want it to run a server (I DONT).

Does anyone know what's missing from my chroot environment that exposes the Qtopia server ? I would have thought it was a socket of some kind.... any ideas ?

- Andy
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

iamasmith

  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Chroot And Communication With Qtopia Server
« Reply #1 on: March 11, 2005, 09:39:23 am »
OK, I think I've found it. /tmp is where Qtopia creates the socket endpoints and my /tmp points to /dev/shm/tmp which is a different /dev/shm/tmp to the one pointed off the real Z fs ...... thinking....

...anyone know how to chroot and retain access to the ORIGINAL /tmp?

If you mount using tmpfs again you get a new file system... not very helpful if you need access to some of the streams that Qtopia publishes into /tmp..

The only thing that I can find so far is to use lofs (loopback file system) but as lofs isn't built into a Z kernel then it's not an option... unless I ported it of course....

...no... apparently Solaris only but there's a thing called a mount bind....

mount --bind /dev/shm /mnt/card/experimental/soft/dev/shm

..should do it... darned busybox doesn't support it though

...but you can...

mount -o bind /dev/shm /mnt/card/experimental/soft/dev/shm

« Last Edit: March 11, 2005, 10:32:41 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card

gfdsa

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Chroot And Communication With Qtopia Server
« Reply #2 on: March 23, 2005, 05:53:37 am »
btw, its the same with Xfbdev, you have to -o bind /tmp to communicate