Re: Building custom kernel
<snip>
> (Where /usr/src/linux is a symlink to /usr/src/kernel-source-2.4.25)
>
> I don't understand why it hangs at the end. make -d menuconfig didn't seem
> to reveal anything useful either. Ideas?
I've just been here myself. The following works for me :
- Install the kernel source in /usr/src and symlink it
- Verify your gcc can spit out the right stuff :
test.c :
int main(int argc, char **argv)
{
return 0;
}
guru:~# gcc -o test test.c
guru:~# file test
test: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), for GNU/Linux
2.4.18, dynamically linked (uses shared libs), not stripped
guru:~# sparc-linux-gcc -o test test.c
guru:~# file test
test: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), for GNU/Linux
2.2.0, dynamically linked (uses shared libs), not stripped
If the above is the same for you, then :
- vi the Makefile, and change
HOSTCC = gcc
to
HOSTCC = sparc-linux-gcc
- Run make menuconfig, make dep; make vmlinuz, and do the usuall install
stuff.
I end up with :
guru:/usr/src/linux# file vmlinux
vmlinux: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), statically
linked, not stripped
After booting that, I can also run 64 bit binaries, so when you actually
run it, the above hack isn't necessary anymore :
guru:~# gcc -o test test.c
.guru:~# ./test
foo
guru:~# file test
test: ELF 64-bit MSB executable, SPARC V9, version 1 (SYSV), for GNU/Linux
2.4.18, dynamically linked (uses shared libs), not stripped
Regards,
Igmar
Reply to: