I have Aurora Linux build 1.0 (based on Red Hat 7.3) installed on a Sun
Enterprise 220R.
I'm wondering if its possible to compile an i386 kernel on that system?
I downloaded the i386 kernel source rpm for RedHat 9.0 and tried to install
it, but got:
[root@enterprise220-3 RPMS]# rpm -i kernel-source-2.4.20-8.i386.rpm
error: failed dependencies:
libc.so.6(GLIBC_2.3) is needed by kernel-source-2.4.20-8
and couldn't work out what it was complaining about because /lib/libc.so.6
existed.
So, then I went to ftp.kernel.org and downloaded the tarball for 2.4.20. I
ran a 'make menuconfig' and noticed that the menuconfig program had been
customised for sparc. So, I edited the top level Makefile and hard coded
ARCH to sparc64. Went back into menuconfig and now it looked like a
menuconfig for i386. Great.
Configured everything there and ran a 'make dep'. That works. However, after
'make bzImage' I got a stack of errors.
{standard input}: Assembler messages:
{standard input}:68: Error: Illegal operands
{standard input}:72: Error: Illegal operands
{standard input}:158: Error: Illegal operands
{standard input}:159: Error: Unknown opcode: `orl'
{standard input}:160: Error: Illegal operands
{standard input}:178: Error: Illegal operands
{standard input}:179: Error: Unknown opcode: `orl'
{standard input}:180: Error: Illegal operands
{standard input}:188: Error: Unknown opcode: `fninit'
...
etc
So... is what I'm trying to do possible, or am I just wasting my time?
Thanks,
Doug.
> So, then I went to ftp.kernel.org and downloaded the tarball for 2.4.20.
Grab the latest version, it's 2.4.22 or 2.4.23 or something (lost track a
bit)
> after 'make bzImage' I got a stack of errors. {standard input}: Assembler
> messages: {standard input}:68: Error: Illegal operands
This looks like it's trying to use your default assembler. You need the
binutils, gcc and maybe some other packages for crosscompiling to i386.
Try googling for 'crosscompiler gcc' and you'll find much more information.
> So... is what I'm trying to do possible, or am I just wasting my time?
It is possible to compile a regular program on Sparc for i386, so it's not
entirely impossible to cross-compile a kernel. I've never seen it done,
though. If you manage to get it to compile & run, make sure you document
how it's done! If you don't know what to do with the document, mail it to
me and I'll make sure it ends up in the appropriate hands.
Sybren
--
(o_ Q: God, root, what is difference?
//\ A: God can change the byte order on the CPU, root can't.
V_/_
> Configured everything there and ran a 'make dep'. That works. However, after
> 'make bzImage' I got a stack of errors.
> {standard input}: Assembler messages:
> {standard input}:68: Error: Illegal operands
You have to use a toolchain which produces i386 code.
It is called "cross-compiler". Study the idea of a cross-compiling
toolchain, then it should be a 5 minute work to figure how to
cross-build kernels. But until you understand the principle
it's a waste of time to poke around blind.
-- Pete