Where does PRoot get binding locations from with -B

44 views
Skip to first unread message

Henk

unread,
May 7, 2012, 6:29:09 AM5/7/12
to PRoot
Hi,

When I run PRoot with -B and QEMU for sh4, I see with verbose that
PRoot is creating alternate binding locations to those in the default -
B list (it doesn't remove them afterwards). For example:

proot -v -q "qemu-sh4 -U QEMU_GDB" -B /home/mark/fs ls

gives:

proot info: create the binding location "/ramdisk/tmp"
proot info: create the binding location "/ramdisk/var/run/
resolv.conf"
proot info: create the binding location "/jffs/hosts"
proot info: guest rootfs = /home/mark/fs
proot info: command = ls
proot info: qemu = /usr/bin/qemu-sh4 -U QEMU_GDB
proot info: verbose level = 1
proot info: binding = /:/host-rootfs
proot info: binding = /etc/host.conf
proot info: binding = /etc/hosts:/jffs/hosts
...

Where does PRoot get these locations from?

Mark.

Cédric VINCENT

unread,
May 7, 2012, 10:36:06 AM5/7/12
to proo...@googlegroups.com
Some fixes related to bindings were integrated in the latest version of PRoot (v1.8.4 as of this writing).  To be sure, could you specify the version you are using.

Cédric.



Henk

unread,
May 7, 2012, 11:02:41 AM5/7/12
to PRoot
>
> Some fixes related to bindings were integrated in the latest version of
> PRoot (v1.8.4 as of this writing).  To be sure, could you specify the
> version you are using.
>
> Cédric.

I'm running 1.8.4

Cédric VINCENT

unread,
May 7, 2012, 11:30:03 AM5/7/12
to proo...@googlegroups.com
Hum. Please could you check that "/home/mark/fs/etc/hosts" is a
symbolic link to "/jffs/hosts"? For example I'm able to reproduce the
behavior you reported that way ("-Q" is an alias to "-B -q"):

$ ls -l /path/to/guest-rootfs/etc/hosts
lrwxrwxrwx 1 cedric users 11 May 7 17:04
/path/to/guest-rootfs/etc/hosts -> /jffs/hosts

$ proot -v -Q qemu-arm /path/to/guest-rootfs
proot info: create the binding location "/jffs/hosts"
...
proot info: binding = /etc/hosts:/jffs/hosts
...

In that case, this is an expected behavior: the content of
"/etc/hosts" in the host-rootfs is bound to "/etc/hosts" in the
guest-rootfs, however this latter is a symbolic link to "/jffs/hosts"
and PRoot follows it for the sake of consistency, i.e. the file type
isn't changed. That way, guest programs can still access "/etc/hosts"
as a symbolic link:

host_shell$ proot -Q qemu-arm /path/to/guest-rootfs

guest_shell$ ls -l /etc/hosts
lrwxrwxrwx 1 cedric users 11 May 7 17:04 /etc/hosts -> /jffs/hosts


Now to reply to the question "Where does PRoot get binding locations
from with -B?", this list of recommended bindings is hard-coded.


> (it doesn't remove them afterwards)

Exact, no clean-up is performed yet.


Cédric.

Henk

unread,
May 7, 2012, 12:03:53 PM5/7/12
to PRoot

> Hum.  Please could you check that "/home/mark/fs/etc/hosts" is a
> symbolic link to "/jffs/hosts"?

It is indeed. The other binding locations are links too.

> In that case, this is an expected behavior: the content of
> "/etc/hosts" in the host-rootfs is bound to "/etc/hosts" in the
> guest-rootfs, however this latter is a symbolic link to "/jffs/hosts"
> and PRoot follows it for the sake of consistency, i.e. the file type
> isn't changed.  That way, guest programs can still access "/etc/hosts"
> as a symbolic link:

Excellent, thanks, I now understand what is happening.

Mark.
Reply all
Reply to author
Forward
0 new messages