Reply
Thread Tools
Posts: 173 | Thanked: 160 times | Joined on Jan 2010 @ London, UK
#81
I can confirm that this qemu-i386 binary works on the n950.
 

The Following User Says Thank You to damion For This Useful Post:
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#82
Sorry to revive this thread but im having the same problem as sanylcs, Megaltariak and Applesaws: Bash cannot fork.

Firstly I am using a chroot environment with sshfs from an ubuntu 10.04 box (mounting the directories mentioned by damion except the /usr/X11, as it is no longer placed there in modern debians).

I tried chrooting into the environment and i got the "cannot execute /bin/sh: No such file..." error.
I then tried manually invoking ld-linux.so.2 and i got a "syntax error: "(" unexpected..." error
I then tried loading bash from qemu directly (..qemu-i386 -L lib bin/bash), but i once again failed atrociously as it did not show any output (just the same happened when I ran ls)
After loading ../qemu lib/ld-linux.so.2 --library-path lib bin/bash bash runs but however cannot fork.
xterm cannot open because it cannot fork bash.
Basically I can run x86 executables as long as they do not fork.

I once did this a while back on the ps3 to run wine and had bash forking problems, however i cannot recall the fix i used. I believe because the kernel doesn't know it needs to run ld-linux.so.2 with qemu (even though i did the binfmt magic) every time it is called on a fork it fails, or maybe it is the executable and my n900 has different revision of hardware to damion's ?? I don't know, I am no big expert, just a linux lover . I would like to know if you devs and whatnot can guide me to getting the kernel to run ld-linux automatically with qemu to see if that is the problem. How do i add this ELF header to the binfmt?? Or any other suggestions??

Thank you for the time and keep the awesome work up

Pablo

Edit: By the way my old qemu thread for wine I cannot find however I found the one for PCSX2 on PS3 linux, no important data but just any possible reference/old idea I forgot/spark of though might appear here: http://forums.pcsx2.net/archive/inde...d-16970-1.html

Edit2: Actually I will also try a pre-nptl linux (i.e. slackware 10.2 I believe I think it was still in the 2.4 realm), just in case that could be the problem, I will update with news

Last edited by pablocrossa; 2011-07-18 at 02:46.
 
Posts: 856 | Thanked: 1,681 times | Joined on Apr 2010 @ Aleppo ,Syria
#83
wow didn't know that this is actually possible on N900
great job guys

and @pablocrossa
i don't think that the hardware revision is the problem
maybe it is from chroot
try reinstalling it
apt-get install easy-chroot

or from bash it self

try to install bash3

apt-get install bash3

and make it your
default shell
by

bash-setup

NOTE : HAVEN'T TRY TO REVERSE TO THE DEFAULT N900 SHELL
hope it helps

Last edited by karam; 2011-07-18 at 03:34.
 
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#84
Ok now tried bash3 and bash4 (because 10.04 is bash4) and still the same error, checked I have the right folders mounted, I guess it is the chroot, preparing a new one from good ol' slack 10.2
 
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#85
ok my slackware 10.2 chroot gives me the same problem, I took all the spaces off the binfmt in the tutorial, corrected the dev/pts command and the rest I believe is pretty much the same, but I cannot fork. Can it be that I'm using power kernel?? I don't know what to think...

EDIT: I think I should blame the binfmt magic, I am pretty new to it, it does not load ld-linux.so.2 without calling qemu first, I need to find the elf header of it... hmm...

Last edited by pablocrossa; 2011-07-18 at 09:23.
 
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#86
Ok I believe I have found the problem but I cannot test it right now (I do not have a linux distro available for the next 2 days). I believe it is one of the two following. Either:

1. Binfmt is configured incorrectly so when the binary is going to fork the kernel cannot run the i386 binary and therefor fails, or

2. qemu-i386 binary should be placed within the chroot too, possibly the kernel tries running the x86 binary with /home/user/qemi-i386 from within the chroot, failing.

Could someone test this?? I do not currently have access to a linux box, I might be able to prepare a VM with virtualbox later, but I'm not sure.

Cheers
 
Posts: 298 | Thanked: 197 times | Joined on Dec 2009 @ Norway
#87
Tell me: how do you run this?
You do copy the qemu binary to the path in the chroot, I assume?
That's how I've done it on my desktop, and I've run both BASH and apt-get from a Maemo chroot.
Basically, this is all I do: mount it, copy the appropriate qemu to it's /usr/bin/, chroot into it. It has worked flawlessly unless it's been working with assemblies from some apps.
 
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#88
@Nokia 5700
I copy the binary into the chroot, yes. I still fail, I think binfmt is the problem as I cannot run ./ld-linux.so.2 as it says 'syntax error, ")" unexpected" or something along those lines. I am stuck at this part, bash doesnt fork. I do not know how to proceed, some help with binfmt, I used it a while back on the PS3 but im stuck now. Help?!

EDIT: Maybe the statically compiled /usr/bin/qemu-i386-static could help??
 
Applesaws's Avatar
Posts: 21 | Thanked: 15 times | Joined on Jan 2011
#89
@Damion,
Could you upload a tarball of your chroot? I don't think anyone else has managed to successfully chroot into theirs...
 

The Following User Says Thank You to Applesaws For This Useful Post:
Posts: 189 | Thanked: 171 times | Joined on Jul 2011
#90
Originally Posted by Applesaws View Post
@Damion,
Could you upload a tarball of your chroot? I don't think anyone else has managed to successfully chroot into theirs...
and also check the binfmt is correct, sorry for my persistence
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 15:14.