|
|
Subject: Re: chroot method: archs combos allowed - msg#00189
List: linux.lfs.cross
On Sat, 25 Mar 2006, Joe Ciccone wrote:
(gcc -m32 dummy.c -o dummy &&
./dummy | grep "Hi" >/dev/null) || echo "You can not run 32bit programs"
If the program can run it will print Hi. if grep doesn't see Hi you can
take action todo what ever you want.
I don't think that will help on pure64, where no 32-bit libraries are
installed :-(
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
--
http://linuxfromscratch.org/mailman/listinfo/cross-lfs
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: chroot method: archs combos allowed
Any 64bit system with 32bit emulation in the kernel can chroot.
As for checking,
cat > dummy.c << "EOF" &&
#include <stdio.h>
int main() {
printf("Hi!\n");
}
EOF
(gcc -m32 dummy.c -o dummy &&
./dummy | grep "Hi" >/dev/null) || echo "You can not run 32bit programs"
If the program can run it will print Hi. if grep doesn't see Hi you can
take action todo what ever you want.
--
http://linuxfromscratch.org/mailman/listinfo/cross-lfs
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
Next Message by Date:
click to view message preview
Re: chroot method: archs combos allowed
On Sat, 25 Mar 2006, M.Canales.es wrote:
My concern is that we could to test if the 32-bits libraries are presents, but
in a pure-64 system, how could we test if the 32-bit emulation is supported
by the kernel?
That I don't know. In practical terms, you might want to stick with
looking for the 32-bit libraries (or Joe's -m32, although it will only
succeed on multilib)
For ppc, 'G5' macs (970 processors) need a 64-bit kernel anyway, so you
have to go beyond the book to build the headers, C cross-compiler and
binutils (only). Therefore, they can equally chroot while trying to
build ppc64 multilib.
I'm lost when spooking about that archs. I will need "answers for dumbs" to
know what triplets combos are allowed and what not :-?
I suspect ppc64 is not for the dumb, which is why I have so much
trouble with it :-( When mine runs 32-bit userspace, I use linux32 to
invoke gdm (or init, I think) so that userspace is convinced it's really
on just ppc - think of linux32 as another sort of uname hack, which
alters the kernel personality. Certainly, in recent 2.6 it cannot boot
with a 32-bit kernel, but that has not always been true. It's easy
enough for me to -know- I need a 64-bit kernel, but pretty hard to
codify. Something like
cat /proc/cpuinfo | grep PPC970 >/dev/null && echo "chroot is supported"
Ken
--
das eine Mal als Tragödie, das andere Mal als Farce
--
http://linuxfromscratch.org/mailman/listinfo/cross-lfs
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
Previous Message by Thread:
click to view message preview
Re: chroot method: archs combos allowed
Any 64bit system with 32bit emulation in the kernel can chroot.
As for checking,
cat > dummy.c << "EOF" &&
#include <stdio.h>
int main() {
printf("Hi!\n");
}
EOF
(gcc -m32 dummy.c -o dummy &&
./dummy | grep "Hi" >/dev/null) || echo "You can not run 32bit programs"
If the program can run it will print Hi. if grep doesn't see Hi you can
take action todo what ever you want.
--
http://linuxfromscratch.org/mailman/listinfo/cross-lfs
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
Next Message by Thread:
click to view message preview
Re: chroot method: archs combos allowed
Ken Moffat wrote:
> I don't think that will help on pure64, where no 32-bit libraries are
> installed :-(
ok, so use the cross-compiler and a little bit of a different method.
cat > dummy.c << "EOF" &&
int main() {
return 0;
}
EOF
($LFS_TARGET-gcc dummy.c -o dummy && ./dummy) || echo "You can't chroot"
--
http://linuxfromscratch.org/mailman/listinfo/cross-lfs
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
|
|