Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Gentoo ARM port on PC with Qemu
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
stampho
n00b
n00b


Joined: 14 Feb 2010
Posts: 3

PostPosted: Sun Feb 14, 2010 11:49 am    Post subject: [SOLVED] Gentoo ARM port on PC with Qemu Reply with quote

Hi!
I try to install a Gentoo ARM port to my PC in a chroot enviroment. I installed Qemu and I set up the binfmt support in my kernel. Everything works fine, ARM ELF binaries can be executed on my PC. In the next step I downloaded a stage3 tarball and I unpacked it. Then I mounted the proc and dev directories. Finally I try to chroot to the directory where the tarball was unpacked, but I get the following message:
Code:
chroot: failed to run command `/bin/bash': No such file or directory


Of course the /bin/bash file exists.
Any suggestion what is the problem in this case?


Last edited by stampho on Fri Feb 26, 2010 1:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
patrikas
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2009
Posts: 106

PostPosted: Sun Feb 14, 2010 2:34 pm    Post subject: Reply with quote

Is it valid ARM ELF binary ? (file /chrootdir/bin/bash) Can you run it before chrooting ?
Back to top
View user's profile Send private message
stampho
n00b
n00b


Joined: 14 Feb 2010
Posts: 3

PostPosted: Sun Feb 14, 2010 3:09 pm    Post subject: Reply with quote

I think it's valid:
Code:
mihaly armv7a-unknown-linux-gnueabi # file bin/bash
bin/bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped


I can run it before chrooting, a qemu window appear by the /chrootdir/bin/bash command.
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 522

PostPosted: Sun Feb 14, 2010 3:20 pm    Post subject: Re: Gentoo ARM port on PC with Qemu Reply with quote

stampho wrote:
Code:
chroot: failed to run command `/bin/bash': No such file or directory


not exactly !
bash is dynamically linked, so "No such file or directory" means that one or more dynamics libraries are missing or wrong (in the chroot-ed tree)

dunno why/what .. just to point you out
Back to top
View user's profile Send private message
armin76
Retired Dev
Retired Dev


Joined: 24 Apr 2006
Posts: 174

PostPosted: Thu Feb 18, 2010 7:54 pm    Post subject: Reply with quote

Read http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1&chap=5
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Fri Feb 19, 2010 11:35 am    Post subject: Reply with quote

armin76 wrote:
Read http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1&chap=5


thanks for the pointer ! :-) i remember having the same issue some time ago and now at least i know how it could be solved.

thanks !
_________________
Error: Failing not supported by current locale
Back to top
View user's profile Send private message
stampho
n00b
n00b


Joined: 14 Feb 2010
Posts: 3

PostPosted: Fri Feb 26, 2010 1:04 pm    Post subject: Reply with quote

Thanks it helps! This is what I looking for.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum