Reputation: 1843
I am trying to build 32-bit linux kernel 2.6.9 on a 64-bit linux host with 2.6.9 (same version). Did some google search and tried the following:
step 1) make ARCH=i386 CFLAGS=-m32 menuconfig
step 2) make ARCH=i386 CFLAGS=-m32
Step 1 was okay. But step 2 got the following errors. What did I do wrong?
make ARCH=i386 CFLAGS=-m32
< snip >
In file included from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory
In file included from include/asm/smp.h:18,
from include/linux/smp.h:17,
from include/linux/sched.h:23,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared here (not in a function)
include/asm/mpspec.h:22: error: `MAX_IRQ_SOURCES' undeclared here (not in a function)
In file included from include/linux/smp.h:17,
from include/linux/sched.h:23,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/smp.h:72:26: mach_apicdef.h: No such file or directory
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [arch/i386/kernel/asm-offsets.s] Error 2
Upvotes: 0
Views: 3414
Reputation: 129374
The make ARCH=i386
should be sufficient assuming you have everything required by the build installed on the machine. I use this almost daily to build i386 on a "ubuntu 12.04".
If you have built a 64-bit kernel previously, you should have everything, and it's possible that you need to "make clean" or even "make mrproper" [save your .config somewhere safe for the latter], because I know for example asm_offsets.s will be different between 32 and 64-bit.
Upvotes: 1