1 |
On Friday 24 February 2006 06:56, Bo Andresen <bo.andresen@×××××.com> wrote |
2 |
about 'Re: [gentoo-user] chroot: cannot run command `bin/bash': Exec |
3 |
format error [SOLVED]': |
4 |
> Actually I guess I could just download the the amd64 livecd, mount it, |
5 |
> copy its kernel to the harddrive (already did emerge coldplug) and boot |
6 |
> on it. I did, however, find this very interesting so I do wish to |
7 |
> compile a 64-bit kernel and see what it takes. |
8 |
|
9 |
Well, when you are already running a 64-bit kernel and have a native gcc, |
10 |
you won't have to use the ARCH and CROSS_COMPILE magic. It just works. |
11 |
|
12 |
The whole process was also enlightening to me. I've never cross-compiled a |
13 |
kernel, but now I know how to have my dual-Opteron box compile the kernel |
14 |
for my Linksys router or my friend's hppa box. |
15 |
|
16 |
> > make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu- |
17 |
> > (menuconfig, all, modules_install, etc.) |
18 |
> |
19 |
> At first when typing make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu- |
20 |
> it told me it could not find these files: |
21 |
> |
22 |
> arch/x86_64/kernel/asm-offsets.c:12:21: asm/pda.h: No such file or |
23 |
> directory arch/x86_64/kernel/asm-offsets.c:16:22: asm/ia32.h: No such |
24 |
> file or directory [...] |
25 |
> make[1]: *** [arch/x86_64/kernel/asm-offsets.s] Error 1 |
26 |
> make: *** [prepare0] Error 2 |
27 |
> |
28 |
> # ls -ld include/asm |
29 |
> lrwxrwxrwx 1 root root 10 Feb 24 14:27 include/asm -> asm-386 |
30 |
> |
31 |
> I solved this by: |
32 |
> # ln -sfn include/asm-x86_64 include/asm |
33 |
|
34 |
I think this could also be solved with a 'make mrproper'. |
35 |
|
36 |
> make install didn't work either |
37 |
|
38 |
Weird. |
39 |
|
40 |
> This all did solve the problems. The resulting kernel does indeed boot |
41 |
> and it does make it possible to chroot into a 64 bit environment. :D |
42 |
> Thanks a lot. This has been very educating. |
43 |
|
44 |
Very good! I'm glad we solved your problem. |
45 |
|
46 |
-- |
47 |
Boyd Stephen Smith Jr. |
48 |
bss03@××××××××××.com |
49 |
ICQ: 514984 YM/AIM: DaTwinkDaddy |
50 |
-- |
51 |
gentoo-user@g.o mailing list |