Discussion:
Cannot find the processor family for my powerpc in kernel
(too old to reply)
Shi Jin
2004-10-27 17:17:30 UTC
Permalink
Hi, there,

I know this may sound stupid. I am trying to compile a linux kernel for my
IBM RS6000 44P-170 machine. I downloaded the 2.6.9 kernel from kernel.org
but couldn't figure out where to start. When I do make xconfig or make
menuconfig, I cannot find the PowerPC or CHRP in the processor family, all I
have are something like pentium, Atholon, etc. I wonder where can I set my
CPU type?
By the way, is this kernel the right one to download? I can see the arch/ppc
and arch/ppc64 lying there. Maybe I should apply some patch?
Couldn't find much useful information on this topic by google searching.
Thanks in advance.

Shi
Stephen Harker
2004-10-27 22:16:21 UTC
Permalink
Post by Shi Jin
I know this may sound stupid. I am trying to compile a linux kernel for my
IBM RS6000 44P-170 machine. I downloaded the 2.6.9 kernel from kernel.org
but couldn't figure out where to start. When I do make xconfig or make
menuconfig, I cannot find the PowerPC or CHRP in the processor family, all I
have are something like pentium, Atholon, etc. I wonder where can I set my
CPU type?
In the directories such as arch/ppc/configs and arch/ppc64/configs
there are files such as `ibmchrp_defconfig' (I don't know if this is
the correct config for your machine, but assume it is). Then, from
the kernel source directory type:

make ibmchrp_defconfig

which will give a lot of text output as it sets the basic options for
the kernel. Then you can try `make xconfig' to modify the result to
your taste.
Post by Shi Jin
By the way, is this kernel the right one to download? I can see the arch/ppc
and arch/ppc64 lying there. Maybe I should apply some patch?
Couldn't find much useful information on this topic by google searching.
Yes, the kernel is generic. It is easiest to do the basic setup using
the default scripts as described above, then do your own
configuration. One thing to watch for is that when you make the
kernel the kernel will be called vmlinux, not the compressed image
used in x86 linux.
--
Stephen Harker ***@spme.monash.edu.au
School of Physics & Materials Engineering
Monash University
Shi Jin
2004-10-28 03:07:34 UTC
Permalink
Thank you very much.
But I think I missed one very important point: I am trying to cross
compiling it on an X86 linux machine. Sorry about missing that. I took the
x86 archetecture for too much granted.

Is there any howto on that?

I tried to use "make ibmchrp_defconfig" but it gives an error saying that
arch/i386/configs/ibmchrp_defconfig is not there. Then I made a symbolic
link from arch/i386/configs to arch/ppc/configs and it can make. But in
the make xconfig menus I still cannot find powerpc. But this could be
simply due to I am cross compiling it.

Can you still help me?
By the way, I noticed from the machine's mannual, it is a 64-bit machine.
So shall I compile the ppc64 kernel instead of the ppc one? Thank you
very much.

Shi

On Thu, 28 Oct 2004 08:16:21 +1000,
Post by Stephen Harker
Post by Shi Jin
I know this may sound stupid. I am trying to compile a linux kernel for my
IBM RS6000 44P-170 machine. I downloaded the 2.6.9 kernel from kernel.org
but couldn't figure out where to start. When I do make xconfig or make
menuconfig, I cannot find the PowerPC or CHRP in the processor family, all I
have are something like pentium, Atholon, etc. I wonder where can I set my
CPU type?
In the directories such as arch/ppc/configs and arch/ppc64/configs
there are files such as `ibmchrp_defconfig' (I don't know if this is
the correct config for your machine, but assume it is). Then, from
make ibmchrp_defconfig
which will give a lot of text output as it sets the basic options for
the kernel. Then you can try `make xconfig' to modify the result to
your taste.
Post by Shi Jin
By the way, is this kernel the right one to download? I can see the arch/ppc
and arch/ppc64 lying there. Maybe I should apply some patch?
Couldn't find much useful information on this topic by google searching.
Yes, the kernel is generic. It is easiest to do the basic setup using
the default scripts as described above, then do your own
configuration. One thing to watch for is that when you make the
kernel the kernel will be called vmlinux, not the compressed image
used in x86 linux.
Stephen Harker
2004-10-28 03:42:38 UTC
Permalink
Post by Shi Jin
Thank you very much.
But I think I missed one very important point: I am trying to cross
compiling it on an X86 linux machine. Sorry about missing that. I took the
x86 archetecture for too much granted.
Okay, that adds another command you need. If you read the Makefile it
has the following about cross-compilation:

# When performing cross compilation for other architectures ARCH shall be set
# to the target architecture. (See arch/* for the possibilities).
# ARCH can be set during invocation of make:
# make ARCH=ia64
# Another way is to have ARCH set in the environment.
# The default ARCH is the host where make is executed.
Post by Shi Jin
Is there any howto on that?
So you would need something like:

make ARCH=ppc ibmchrp_defconfig
Post by Shi Jin
Can you still help me?
By the way, I noticed from the machine's mannual, it is a 64-bit machine.
So shall I compile the ppc64 kernel instead of the ppc one? Thank you
very much.
I don't know much about the architecture, but according to
<http://lists.debian.org/debian-powerpc/2002/07/msg00858.html>
(found by a google search on "linux kernel IBM RS6000 44P-170") the
author used the standard power3 configuration, which would be obtained
by the command:

make ARCH=ppc power3_defconfig

I assume that this gives 32bit support for the power3 architecture.
In arch/ppc64/configs/ there are configs: g5_defconfig,
iSeries_defconfig and pSeries_defconfig. How appropriate any of these
are I don't know (well the g5 one is definitely not appropriate). You
could try looking further with google, adding ppc64 to my search gave
<http://lists.debian.org/debian-powerpc/2003/03/msg00682.html>
which has a further link to <http://www.penguinppc64.org>.
--
Stephen Harker ***@spme.monash.edu.au
School of Physics & Materials Engineering
Monash University
Shi Jin
2004-10-28 04:27:00 UTC
Permalink
Thank you very much.
make ARCH=ppc ibmchrp_defconfig
went fine. But after that in "make xconfig" I still cannot find the CPU
type. Ignoring this, I tried to "make", but got this shortly:
CHK include/linux/version.h
SPLIT include/linux/autoconf.h -> include/config/*
CC arch/i386/kernel/asm-offsets.s
In file included from include/asm/thread_info.h:16,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/processor.h:68: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
include/asm/processor.h:68: error: requested alignment is not a constant
In file included from include/linux/list.h:7,
from include/linux/wait.h:23,
from include/asm/semaphore.h:41,
from include/linux/sched.h:18,
from arch/i386/kernel/asm-offsets.c:7:
include/linux/prefetch.h: In function `prefetch_range':
include/linux/prefetch.h:64: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared (first use in this function)
include/linux/prefetch.h:64: error: (Each undeclared identifier is reported only once
include/linux/prefetch.h:64: error: for each function it appears in.)
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [arch/i386/kernel/asm-offsets.s] Error 2

Is there anything else I should do to cross compile, such as installing
some packages?

Thanks again for your kind help.
Shi
Stephen Harker
2004-10-28 05:25:18 UTC
Permalink
Post by Shi Jin
Thank you very much.
make ARCH=ppc ibmchrp_defconfig
went fine. But after that in "make xconfig" I still cannot find the CPU
type.
I think you need:

make ARCH=ppc xconfig
I think you need:

make ARCH=ppc
Post by Shi Jin
Is there anything else I should do to cross compile, such as installing
some packages?
The main thing is that make assumes you want to use the same
architecture as the machine you are on unless you tell it otherwise.
So, you either add the ARCH=ppc to all uses of make, or set the
environment variable ARCH=ppc (i.e., something like `ARCH=ppc' then
`export ARCH' in bash).
--
Stephen Harker ***@spme.monash.edu.au
School of Physics & Materials Engineering
Monash University
Shi Jin
2004-10-28 16:32:53 UTC
Permalink
Thanks a lot.
This time I am able to see the power3 CPU now. That's a big progress for me.
Thanks.
But still, when I "make ARCH=ppc", I got errors immediately.
I wonder if I should install something like cross-compiler and
cross-libraries.
There are several articles about installing glibc for cross compilation but
I am not sure whether that suits my purpose here:
I want the kernel not the glibc.
Could you please give some advice?
Thank you so much.
Shi
Post by Stephen Harker
Post by Shi Jin
Thank you very much.
make ARCH=ppc ibmchrp_defconfig
went fine. But after that in "make xconfig" I still cannot find the CPU
type.
make ARCH=ppc xconfig
make ARCH=ppc
Post by Shi Jin
Is there anything else I should do to cross compile, such as installing
some packages?
The main thing is that make assumes you want to use the same
architecture as the machine you are on unless you tell it otherwise.
So, you either add the ARCH=ppc to all uses of make, or set the
environment variable ARCH=ppc (i.e., something like `ARCH=ppc' then
`export ARCH' in bash).
--
School of Physics & Materials Engineering
Monash University
Stephen Harker
2004-10-28 22:20:33 UTC
Permalink
Post by Shi Jin
Thanks a lot.
This time I am able to see the power3 CPU now. That's a big progress for me.
Thanks.
But still, when I "make ARCH=ppc", I got errors immediately.
I wonder if I should install something like cross-compiler and
cross-libraries.
I have never tried cross-compilation. I can't really advise you on
this point. A quick Google search on "linux cross-compilation kernel ppc"
gave some possible resources:

<http://www-jcsu.jesus.cam.ac.uk/jcn/documentation/html-only/cross_compilation.html>
<http://homepage.mac.com/nopea1/benchmark/>
<http://www.sable.mcgill.ca/~dbelan2/crossdev/crossdev-powerpc-i686.html>

One thing that seems to be common is the use of make commands with an
extra argument beyond ARCH:

make ARCH=ppc CROSS_COMPILE=powerpc-unknown-linux-gnu
Post by Shi Jin
There are several articles about installing glibc for cross compilation but
I want the kernel not the glibc.
Could you please give some advice?
I am afraid it is beyond my experience, I can only suggest looking at
some of the above resources and doing some more searches on the
net. Good luck.
--
Stephen Harker ***@spme.monash.edu.au
School of Physics & Materials Engineering
Monash University
Continue reading on narkive:
Loading...