All of lore.kernel.org
 help / color / mirror / Atom feed
* MBX kernel compile error
@ 2000-10-17 21:02 Yiran Duan
  2000-10-17 23:46 ` Jamie Guinan
  2000-10-18  0:08 ` MBX kernel compile error Wolfgang Denk
  0 siblings, 2 replies; 15+ messages in thread
From: Yiran Duan @ 2000-10-17 21:02 UTC (permalink / raw)
  To: linuxppc-embedded


Hi,

I tried to compile linux kernel for MBX board on
i686-pc-linux. The package I used to built my
cross-compiler is:

    binutils-2.10
    glibc-2.1.3
    gcc-2.95

The kernel package I used is

    linux-2.2.17

I passed make xconfig, make dep, make clean, but got
the following error at make zImage:

powerpc-linux-gcc -D__KERNEL__
-I/home/compiler/sources/linux/include -Wall
-Wstrict-prototypes -O2 -fomit-frame-pointer
-fno-strict-aliasing -D__powerpc__ -fsigned-char
-msoft-float -pipe -fno-builtin -ffixed-r2
-Wno-uninitialized -mmultiple -mstring -mcpu=860
-D__ASSEMBLY__ -c head.S -o head.o
head.S: Assembler messages:
head.S:1829: Error: unsupported relocation type
make[1]: *** [head.o] Error 1
make[1]: Leaving directory
`/home/compiler/sources/linux/arch/ppc/kernel'
make: *** [_dir_arch/ppc/kernel] Error 2

Could anyone give me any idea about where I was wrong?

Thank you.
Yiran.

Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: MBX kernel compile error
  2000-10-17 21:02 MBX kernel compile error Yiran Duan
@ 2000-10-17 23:46 ` Jamie Guinan
  2000-10-18 17:09   ` LIST_HEAD Zhaobin Zhu
  2000-10-18  0:08 ` MBX kernel compile error Wolfgang Denk
  1 sibling, 1 reply; 15+ messages in thread
From: Jamie Guinan @ 2000-10-17 23:46 UTC (permalink / raw)
  To: Yiran Duan; +Cc: linuxppc-embedded


On Tue, 17 Oct 2000, Yiran Duan wrote:

> Hi,
>
> I tried to compile linux kernel for MBX board on
> i686-pc-linux. The package I used to built my
> cross-compiler is:
>
>     binutils-2.10
>     glibc-2.1.3
>     gcc-2.95

I've built for MBX with almost the same, only binutils 2.9.5 instead
of 2.10.

> The kernel package I used is
>
>     linux-2.2.17
>
> I passed make xconfig, make dep, make clean, but got
> the following error at make zImage:
>
> powerpc-linux-gcc -D__KERNEL__
> -I/home/compiler/sources/linux/include -Wall
> -Wstrict-prototypes -O2 -fomit-frame-pointer
> -fno-strict-aliasing -D__powerpc__ -fsigned-char
> -msoft-float -pipe -fno-builtin -ffixed-r2
> -Wno-uninitialized -mmultiple -mstring -mcpu=860
> -D__ASSEMBLY__ -c head.S -o head.o
> head.S: Assembler messages:
> head.S:1829: Error: unsupported relocation type
> make[1]: *** [head.o] Error 1
> make[1]: Leaving directory
> `/home/compiler/sources/linux/arch/ppc/kernel'
> make: *** [_dir_arch/ppc/kernel] Error 2
>
> Could anyone give me any idea about where I was wrong?

Looking at
  http://lxr.linux.no/source/arch/ppc/kernel/head.S
the problem is apparent:

  255 #ifndef CONFIG_8xx
  256         bl      prom_init
  257         .globl  __secondary_start
  258 __secondary_start:
  ...

  1293 #ifndef CONFIG_8xx
  ..
  1822 #else  /* CONFIG_8xx */
  1823         .globl  giveup_fpu
  1824 giveup_fpu:
  1825         blr
  1826 #endif /* CONFIG_8xx */
  1827
  1828 mmu_off:
  1829         addi    r4, r3, __secondary_start - _start
  1830         mfmsr   r3

__secondary_start is not defined for CONFIG_8xx.  It looks like
head.S changed a bit since 2.2.14, and I wouldn't know which way to go
about fixing it, but I might suggest either backing down to 2.2.14 or
jumping to 2.4.0-test2.

The latest Monta Vista CDK (1.2) appears to include both, and last I
tried their stuff worked quite well with little headaches - I'd recommend
giving it a try,

  http://www.mvista.com/
  ftp://ftp.mvista.com/pub/CDK/

-Jamie

>
> Thank you.
> Yiran.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: MBX kernel compile error
  2000-10-17 21:02 MBX kernel compile error Yiran Duan
  2000-10-17 23:46 ` Jamie Guinan
@ 2000-10-18  0:08 ` Wolfgang Denk
  1 sibling, 0 replies; 15+ messages in thread
From: Wolfgang Denk @ 2000-10-18  0:08 UTC (permalink / raw)
  To: Yiran Duan; +Cc: linuxppc-embedded


Dear Yiran,

in message <20001017210229.5208.qmail@web5201.mail.yahoo.com> you wrote:
>
> I tried to compile linux kernel for MBX board on
> i686-pc-linux. The package I used to built my
> cross-compiler is:
>
>     binutils-2.10
>     glibc-2.1.3
>     gcc-2.95
>
> The kernel package I used is
>
>     linux-2.2.17
...
> Could anyone give me any idea about where I was wrong?


You better get some working cross tools that are ready configured for
Embedded  PowerPC  systems;  there  are  some  small,  but  necessary
changes.  Check  out the MV tools, or, if you want to build the tools
from scratch, our patches and build scripts at
ftp://ftp.denx.de/pub/LinuxPPC/usr/src/CDK.tar.gz
(and see also http://www.denx.de/solutions-en.html ).

Also, get a kernel version for the Embedded PPC - 2.2.17  will  *NOT*
work.

Wolfgang Denk

--
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
Little known fact about Middle Earth:   The Hobbits had a very sophi-
sticated computer network!   It was a Tolkien Ring...

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* LIST_HEAD
  2000-10-17 23:46 ` Jamie Guinan
@ 2000-10-18 17:09   ` Zhaobin Zhu
  2000-10-18 17:52     ` LIST_HEAD Tod E. Kurt
  0 siblings, 1 reply; 15+ messages in thread
From: Zhaobin Zhu @ 2000-10-18 17:09 UTC (permalink / raw)
  Cc: linuxppc-embedded


Hi,

What does LIST_HEAD do in drivers/pci/pci.c ?

     LIST_HEAD(pci_root_buses);
     LIST_HEAD(pci_devices);

Thanks,

--
 Zhaobin Zhu

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: LIST_HEAD
  2000-10-18 17:09   ` LIST_HEAD Zhaobin Zhu
@ 2000-10-18 17:52     ` Tod E. Kurt
  2000-10-18 17:56       ` LIST_HEAD Tod E. Kurt
  0 siblings, 1 reply; 15+ messages in thread
From: Tod E. Kurt @ 2000-10-18 17:52 UTC (permalink / raw)
  To: Zhaobin Zhu; +Cc: linuxppc-embedded


Try this:

   demo% grep -C LIST_HEAD /usr/src/linux/*.h

Zhaobin Zhu wrote:
>
> Hi,
>
> What does LIST_HEAD do in drivers/pci/pci.c ?
>
>      LIST_HEAD(pci_root_buses);
>      LIST_HEAD(pci_devices);
>
> Thanks,
>
> --
>  Zhaobin Zhu
>

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: LIST_HEAD
  2000-10-18 17:52     ` LIST_HEAD Tod E. Kurt
@ 2000-10-18 17:56       ` Tod E. Kurt
  2000-10-18 21:11         ` pci_read_config_byte in Hardhat CDK1.2 for powerpc Zhaobin Zhu
  0 siblings, 1 reply; 15+ messages in thread
From: Tod E. Kurt @ 2000-10-18 17:56 UTC (permalink / raw)
  To: Zhaobin Zhu, linuxppc-embedded


Ooops, I meant:

    demo% grep -C LIST_HEAD /usr/include/linux/*.h

which should be the same as:

    demo% grep -C LIST_HEAD /usr/src/linux/include/linux/*.h


"Tod E. Kurt" wrote:
>
> Try this:
>
>    demo% grep -C LIST_HEAD /usr/src/linux/*.h
>
> Zhaobin Zhu wrote:
> >
> > Hi,
> >
> > What does LIST_HEAD do in drivers/pci/pci.c ?
> >
> >      LIST_HEAD(pci_root_buses);
> >      LIST_HEAD(pci_devices);
> >
> > Thanks,
> >
> > --
> >  Zhaobin Zhu
> >

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* pci_read_config_byte in Hardhat CDK1.2 for powerpc
  2000-10-18 17:56       ` LIST_HEAD Tod E. Kurt
@ 2000-10-18 21:11         ` Zhaobin Zhu
  2000-10-18 22:54           ` Cal Erickson
                             ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Zhaobin Zhu @ 2000-10-18 21:11 UTC (permalink / raw)
  Cc: linuxppc-embedded


Hi,

Anybody knows where the function "pci_read_config_byte(..)" is defined ?

Thanks,
--
 Zhaobin Zhu
 zzhu@emc.com


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pci_read_config_byte in Hardhat CDK1.2 for powerpc
  2000-10-18 21:11         ` pci_read_config_byte in Hardhat CDK1.2 for powerpc Zhaobin Zhu
@ 2000-10-18 22:54           ` Cal Erickson
  2000-10-18 22:56           ` Grant Erickson
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Cal Erickson @ 2000-10-18 22:54 UTC (permalink / raw)
  To: Zhaobin Zhu; +Cc: linuxppc-embedded


Try looking in drivers/pci/pci.c This is where the code resides. It
is also where the symbol is exported.
Cal Erickson
Zhaobin Zhu wrote:

> Hi,
>
> Anybody knows where the function "pci_read_config_byte(..)" is defined ?
>
> Thanks,
> --
>  Zhaobin Zhu
>  zzhu@emc.com
>

--
===========================================================================
Cal Erickson                 MontaVista Software Inc.
Customer Support Engineer    490 Potrero Avenue
Phone (408) 328-0304         Sunnyvale CA 94085
Fax   (408) 328-9204         e-mail cal_erickson@mvista.com
Pager 877-566-2012           support 1-800-759-8888 pin 202-7489
web http://www.mvista.com    support e-mail: support@mvista.com
eCode: http://cal@work.com.ecode.com
===========================================================================


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pci_read_config_byte in Hardhat CDK1.2 for powerpc
  2000-10-18 21:11         ` pci_read_config_byte in Hardhat CDK1.2 for powerpc Zhaobin Zhu
  2000-10-18 22:54           ` Cal Erickson
@ 2000-10-18 22:56           ` Grant Erickson
  2000-10-19  0:19           ` Graham Stoney
       [not found]           ` <39EE147B.B79A2837@blastoff.com>
  3 siblings, 0 replies; 15+ messages in thread
From: Grant Erickson @ 2000-10-18 22:56 UTC (permalink / raw)
  To: Zhaobin Zhu; +Cc: linuxppc-embedded


On Wed, 18 Oct 2000, Zhaobin Zhu wrote:
> Anybody knows where the function "pci_read_config_byte(..)" is defined?

Search for 'PCI_OP' in drivers/pci.c. Also, there are machine-specific
routines defined in arch/ppc/*pci*.

Grant


--
 Grant M. Erickson                    University of Minnesota Alumni
  o mail:erick205@tc.umn.edu                              1996 BSEE
  o http://www.tc.umn.edu/~erick205/                      1998 MSEE


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pci_read_config_byte in Hardhat CDK1.2 for powerpc
  2000-10-18 21:11         ` pci_read_config_byte in Hardhat CDK1.2 for powerpc Zhaobin Zhu
  2000-10-18 22:54           ` Cal Erickson
  2000-10-18 22:56           ` Grant Erickson
@ 2000-10-19  0:19           ` Graham Stoney
       [not found]           ` <39EE147B.B79A2837@blastoff.com>
  3 siblings, 0 replies; 15+ messages in thread
From: Graham Stoney @ 2000-10-19  0:19 UTC (permalink / raw)
  To: Zhaobin Zhu; +Cc: linuxppc-embedded


Zhaobin Zhu writes:
> Anybody knows where the function "pci_read_config_byte(..)" is defined ?

Do yourself a favour and grab "cscope" from sourceforge at:
    http://sourceforge.net/projects/cscope/

I find it extremely handy for navigating the Linux kernel source tree.

Regards,
Graham

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pci_read_config_byte in Hardhat CDK1.2 for powerpc
       [not found]           ` <39EE147B.B79A2837@blastoff.com>
@ 2000-10-19 17:15             ` Zhaobin Zhu
  2000-10-19 17:41               ` Mark A. Greer
  2000-10-19 17:48               ` Tod E. Kurt
  0 siblings, 2 replies; 15+ messages in thread
From: Zhaobin Zhu @ 2000-10-19 17:15 UTC (permalink / raw)
  To: Tod E. Kurt, linuxppc-embedded


"Tod E. Kurt" wrote:

> Zhaobin Zhu wrote:
> >
> > Hi,
> >
> > Anybody knows where the function "pci_read_config_byte(..)" is defined ?
>
> Again, use 'grep' in '/usr/include/linux/*.h'.
>
> I did that and found it in '/usr/include/linux/pci.h'.

Yes,  pci_read_config_byte(..) is declared in include/linux/pci.h, but I
can't find
its C source anywhere. I do find it in System.map.

Thanks,

--
 Zhaobin Zhu
 zzhu@emc.com


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pci_read_config_byte in Hardhat CDK1.2 for powerpc
  2000-10-19 17:15             ` Zhaobin Zhu
@ 2000-10-19 17:41               ` Mark A. Greer
  2000-10-19 18:22                 ` Zhaobin Zhu
  2000-10-19 17:48               ` Tod E. Kurt
  1 sibling, 1 reply; 15+ messages in thread
From: Mark A. Greer @ 2000-10-19 17:41 UTC (permalink / raw)
  To: Zhaobin Zhu; +Cc: Tod E. Kurt, linuxppc-embedded


Zhaobin Zhu wrote:

> "Tod E. Kurt" wrote:
>
> > Zhaobin Zhu wrote:
> > >
> > > Hi,
> > >
> > > Anybody knows where the function "pci_read_config_byte(..)" is defined ?
> >
> > Again, use 'grep' in '/usr/include/linux/*.h'.
> >
> > I did that and found it in '/usr/include/linux/pci.h'.
>
> Yes,  pci_read_config_byte(..) is declared in include/linux/pci.h, but I
> can't find
> its C source anywhere. I do find it in System.map.

The definitions of pci_xxx_config_yyy and pcibios_xxx_config_yyy are hard to
find.

pci_xxx_config_yyy are defined by the PCI_OP() macro in drivers/pci/pci.c
pcibios_xxx_config_yyy are defined by the PCI_OP() macro in
drivers/pci/compat.c

At least this is true in 2.4.0-test2.

Mark


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pci_read_config_byte in Hardhat CDK1.2 for powerpc
  2000-10-19 17:15             ` Zhaobin Zhu
  2000-10-19 17:41               ` Mark A. Greer
@ 2000-10-19 17:48               ` Tod E. Kurt
  1 sibling, 0 replies; 15+ messages in thread
From: Tod E. Kurt @ 2000-10-19 17:48 UTC (permalink / raw)
  To: Zhaobin Zhu; +Cc: linuxppc-embedded


Zhaobin Zhu wrote:
>
> "Tod E. Kurt" wrote:
>
> > Zhaobin Zhu wrote:
> > >
> > > Hi,
> > >
> > > Anybody knows where the function "pci_read_config_byte(..)" is defined ?
> >
> > Again, use 'grep' in '/usr/include/linux/*.h'.
> >
> > I did that and found it in '/usr/include/linux/pci.h'.
>
> Yes,  pci_read_config_byte(..) is declared in include/linux/pci.h, but I
> can't find
> its C source anywhere. I do find it in System.map.


As someone else mentioned, it (along with most all the other functions
declared in 'pci.h') is is '/usr/src/linux/drivers/pci/pci.c'.  It wraps
'pcibios_read_config_byte', which is defined in
'/usr/src/linux/arch/i386/kernel/bios32.c' for PCs and in various files
(depending on specific arch) in '/usr/src/linux/arch/ppc/kernel'.

-=tod

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pci_read_config_byte in Hardhat CDK1.2 for powerpc
  2000-10-19 17:41               ` Mark A. Greer
@ 2000-10-19 18:22                 ` Zhaobin Zhu
  2000-10-19 19:55                   ` Mark A. Greer
  0 siblings, 1 reply; 15+ messages in thread
From: Zhaobin Zhu @ 2000-10-19 18:22 UTC (permalink / raw)
  Cc: linuxppc-embedded


"Mark A. Greer" wrote:

> The definitions of pci_xxx_config_yyy and pcibios_xxx_config_yyy are hard to
> find.
>
> pci_xxx_config_yyy are defined by the PCI_OP() macro in drivers/pci/pci.c
> pcibios_xxx_config_yyy are defined by the PCI_OP() macro in
> drivers/pci/compat.c
>

Thanks, Mark.

Here is what I found:

pci_read_config_byte =  generic_pcibios_read_byte =
ppc_md.pcibios_read_config_byte = indirect_pcibios_read_config_byte
in arch/ppc/kernel/indirect_pci.c

--
 Zhaobin Zhu
 zzhu@emc.com

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: pci_read_config_byte in Hardhat CDK1.2 for powerpc
  2000-10-19 18:22                 ` Zhaobin Zhu
@ 2000-10-19 19:55                   ` Mark A. Greer
  0 siblings, 0 replies; 15+ messages in thread
From: Mark A. Greer @ 2000-10-19 19:55 UTC (permalink / raw)
  To: Zhaobin Zhu; +Cc: linuxppc-embedded


Zhaobin Zhu wrote:

> "Mark A. Greer" wrote:
>
> > The definitions of pci_xxx_config_yyy and pcibios_xxx_config_yyy are hard to
> > find.
> >
> > pci_xxx_config_yyy are defined by the PCI_OP() macro in drivers/pci/pci.c
> > pcibios_xxx_config_yyy are defined by the PCI_OP() macro in
> > drivers/pci/compat.c
> >
>
> Thanks, Mark.
>
> Here is what I found:
>
> pci_read_config_byte =  generic_pcibios_read_byte =
> ppc_md.pcibios_read_config_byte = indirect_pcibios_read_config_byte
> in arch/ppc/kernel/indirect_pci.c

Yes, that is true because of the "set_config_access_method(indirect)" call in the
*_setup.c or *_pci.c routine for your platform (if you're looking at the
sandpoint, its in sandpoint_setup.c).  Other access methods are supported too.

Mark

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2000-10-19 19:55 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-10-17 21:02 MBX kernel compile error Yiran Duan
2000-10-17 23:46 ` Jamie Guinan
2000-10-18 17:09   ` LIST_HEAD Zhaobin Zhu
2000-10-18 17:52     ` LIST_HEAD Tod E. Kurt
2000-10-18 17:56       ` LIST_HEAD Tod E. Kurt
2000-10-18 21:11         ` pci_read_config_byte in Hardhat CDK1.2 for powerpc Zhaobin Zhu
2000-10-18 22:54           ` Cal Erickson
2000-10-18 22:56           ` Grant Erickson
2000-10-19  0:19           ` Graham Stoney
     [not found]           ` <39EE147B.B79A2837@blastoff.com>
2000-10-19 17:15             ` Zhaobin Zhu
2000-10-19 17:41               ` Mark A. Greer
2000-10-19 18:22                 ` Zhaobin Zhu
2000-10-19 19:55                   ` Mark A. Greer
2000-10-19 17:48               ` Tod E. Kurt
2000-10-18  0:08 ` MBX kernel compile error Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.