Reply
Thread Tools
smoku's Avatar
Posts: 1,716 | Thanked: 3,007 times | Joined on Dec 2009 @ Warsaw, Poland
#61
You're picking your nose in great style, bro. Kudos!
__________________
smoku @xiaoka.com (SMTP/XMPP) ...:.:....:... pebbled . Poky Fish : sixaxis . psx4m . uae4all
Jolla Phone post-mortem . . . . . . . . . . -> 1+1 VGN-UX390N

Last edited by smoku; 2010-06-15 at 08:25.
 
Posts: 1 | Thanked: 0 times | Joined on Jun 2010
#62
Great discussion ! I stumbled several times over this post and now I just wanted to know some more about it.

I'm trying to do exactly the same on a seagate dockstar. Unfortunately it has a different Marvell Feroceon ARM cpu. Your qemu binary however does run and display the help message but running any other i386 binary gives me an illegal instruction.

I compiled several qemu 0.11 and 0.12 myself but can not seem to get a stable qemu-i386. The qemu-i386 that comes with debian-arm squeeze does not want to chroot as well.

How did you configure ? which gcc did you use any CFLAGS ?
 
Posts: 2 | Thanked: 0 times | Joined on Aug 2010
#63
hi, I had been reading this wonderful post. I even tried out the steps to run x86 binary on ARM Linux.

I successfully using the provided qemu-i386 run some easy statically and dinamically build binary, such as a helloworld program.

However, when I tried to use this with chroot and bash shell, the bash shell can run but it can not execute any shell command such as ls because it keep on giving me <b>fork: invalid argument</b>. However, if I run ls command directly from qemu without using bash shell, the ls command can work. I really wondering why this fork error come out?

I tried with the mentioned x86 slackware and x86 Ubuntu 10.04 LTS chroot enviroment. Though the slackware don't give syscall error 240 but Ubuntu 10.04 does.

The only main different is that, I am not using maemo or N900, but angstrom on beagleboard. I know I shouldn't post here, but I believe experts from here could give me some hint to overcome this problem.

Last edited by sanylcs; 2010-09-08 at 13:20.
 
clasificado's Avatar
Posts: 466 | Thanked: 180 times | Joined on Feb 2010
#64
maybe you should double check your chroot box. if your PATH in bash is mixing arm binaries inside your chroot-qemu-shell x86 environment, that will give you some headcaches
 

The Following User Says Thank You to clasificado For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Aug 2010
#65
Originally Posted by clasificado View Post
maybe you should double check your chroot box. if your PATH in bash is mixing arm binaries inside your chroot-qemu-shell x86 environment, that will give you some headcaches
May I know more detail? Because I never touch on my $PATH. Before chroot, my $PATH is /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

after chroot my $PATH still the same value (Somehow after chroot echo command still executable but printenv will give fork error still).

I created a directory named 'newroot' which I stored all the x86 Linux files and also the qemu provided by damion. Then I chrooted into this newroot with argument /bin/bash. Most of the shell command can't work on this /bin/bash but change direction command (cd) and echo still work.
 
Posts: 173 | Thanked: 160 times | Joined on Jan 2010 @ London, UK
#66
the bin_fmt stuff is needed as outside of the chroot you can run ./qemu ./stuff but within then /bin/sh and everything it touches is the wrong arch so the kernel needs to know via the right magic echoed in to proc. Sorry tapping away in to my phone so can't c+p references but this should help. if it's any consolation it took me ages to get my head around the chroot complexities and architecture mixmatch. There is a reason qemu is static here!
 
Posts: 346 | Thanked: 271 times | Joined on Jan 2010
#67
Sorry for bumping this thread but I have a problem:
When I enter "mount -t devpts dev/pts", it return error "mount: can't find dev/pts in /etc/fstab", I am a noob with chroot environments, what can I do for getting it working ?
 
Posts: 346 | Thanked: 271 times | Joined on Jan 2010
#68
Any idea ?
 
Posts: 1,746 | Thanked: 2,100 times | Joined on Sep 2009
#69
Originally Posted by Megaltariak View Post
Sorry for bumping this thread but I have a problem:
When I enter "mount -t devpts dev/pts", it return error "mount: can't find dev/pts in /etc/fstab", I am a noob with chroot environments, what can I do for getting it working ?
Try this:

# mount -t devpts devpts /dev/pts

Looks like you had a syntax error.
 

The Following 2 Users Say Thank You to wmarone For This Useful Post:
Posts: 346 | Thanked: 271 times | Joined on Jan 2010
#70
Not the same error but still not working:
mount -t devpts devpts /dev/pts
mount: mounting devpts on /dev/pts failed: Device or resource busy

Edit: mount -t devpts devpts dev/pts
works when $PWD is the root of the chroot environment

Edit: another problem:

chroot ./
chroot: cannot execute /bin/bash: Exec format error

file bin/bash
bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), stripped

mount|tail -n -4
none on /home/user/chroot/proc type proc (0)
devpts on /home/user/chroot/dev/pts type devpts (0)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (0)
/tmp/.X11-unix on /home/user/chroot/tmp/.X11-unix type bind (bind)

Last edited by Megaltariak; 2010-11-23 at 20:02.
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:40.