* Cross compilation for MPC860
@ 1999-09-16 12:52 sébastien tadéoni
1999-09-16 18:21 ` Scott Wood
1999-09-17 0:23 ` Graham Stoney
0 siblings, 2 replies; 6+ messages in thread
From: sébastien tadéoni @ 1999-09-16 12:52 UTC (permalink / raw)
To: linux ppc embedded
Dear PPC People
I'm student working on a project with linux.
I want to import the linux OS on a MPC860PowerQuick MBX custom card.
I'm working on a PII 400 computer with the linux Mandrake 6.0 release .
I follow the instructions given on the
www.member.home.com/mmporter/cross.html site.
I encount some problems with this procedure for building my own
environment.
I have no problem for installing binutils-2.2.1.0.19a.
But during the make of egcs-core-1.1.2, some command like
'powerpc-linux-ar' were unknown.
I found it in /usr/local/bin, so I assume I must modified the $PATH .
With this manipulation I didn't encount error any more (just some
warning).
Concerning the kernel sources, I took an embedded-2.2.5.tar.gz file on
the linuxppc site.
I don't know where I must put the linux sources directory to, so I make
it in /home (like the two precedent files).
I make menuconfig, dep and then clean with no problems.
During the make zImage I get the following errors:
ppc_ksyms.c:71:'isa_io_base' undeclared here (not in a fonction)
ppc_ksyms.c:71:'initializer element for '--ksymtab_isa_io_base.value'
is not constant,
And the same thing with the variable pci_dram_offset.
Perhaps is there a configuration problem or I didn't install correctly
the powerpc-linux environment for cross development?
On top of that the /usr/local/powerpc_linux/include directory is empty
so that I can't make the ln -s with the include/linux and include/asm
directories(in my linux sources directory) before I want to build the
LibC.
I will appreciate any suggestions and help from you on this subject.
Thanks in advance.
Have a good day.
Sébastien.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cross compilation for MPC860
1999-09-16 12:52 Cross compilation for MPC860 sébastien tadéoni
@ 1999-09-16 18:21 ` Scott Wood
1999-09-16 23:44 ` Brendan Simon
1999-09-17 0:23 ` Graham Stoney
1 sibling, 1 reply; 6+ messages in thread
From: Scott Wood @ 1999-09-16 18:21 UTC (permalink / raw)
To: sébastien tadéoni; +Cc: linuxppc-embedded@lists.linuxppc.org
sébastien tadéoni wrote:
...
>
> During the make zImage I get the following errors:
>
> ppc_ksyms.c:71:'isa_io_base' undeclared here (not in a fonction)
>
> ppc_ksyms.c:71:'initializer element for '--ksymtab_isa_io_base.value'
> is not constant,
>
> And the same thing with the variable pci_dram_offset.
>
> Perhaps is there a configuration problem or I didn't install correctly
> the powerpc-linux environment for cross development?
>
Your cross-compile environment is good for building kernels. This is a kernel
configuration issue. I got the same isa_io_base error building on a PowerMac
(which doesn't have ISA) until I enabled SCSI support (?!?!?). For my MPC850 build
I commented out EXPORT_SYMBOL(isa_io_base); and also isa_mem_base and pci_dram_offset
in arch/ppc/kernel/ppc_ksyms.c and I was able to successfully build a kernel without SCSI.
Note that the 2.2.5-embedded kernel compiles in ADB support whether you configured for
it or not (correct me if I'm wrong, but that has been my experience so far), so I
commented out L_OBJS and LX_OBJS in drivers/macintosh/Makefile and it builds without ADB.
> On top of that the /usr/local/powerpc_linux/include directory is empty
> so that I can't make the ln -s with the include/linux and include/asm
> directories(in my linux sources directory) before I want to build the
> LibC.
>
Mine is empty too, and I can build kernels fine, but I get lots of errors trying
to build anything else. Instead of fussing with it (I don't know _why_ the builds
fail anyway) I got a PowerMac, loaded YellowDog Linux, and all is well :-)
> I will appreciate any suggestions and help from you on this subject.
>
> Thanks in advance.
> Have a good day.
>
> Sébastien.
--
+---------------------+----------------------+
| Scott Wood | Systems Engineer |
|=====================+======================|
| BroadLink Communications |
+--------------------------------------------+
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cross compilation for MPC860
1999-09-16 18:21 ` Scott Wood
@ 1999-09-16 23:44 ` Brendan Simon
0 siblings, 0 replies; 6+ messages in thread
From: Brendan Simon @ 1999-09-16 23:44 UTC (permalink / raw)
Cc: linuxppc-embedded@lists.linuxppc.org
Scott Wood wrote:
> > During the make zImage I get the following errors:
> >
> > ppc_ksyms.c:71:'isa_io_base' undeclared here (not in a fonction)
> >
> > ppc_ksyms.c:71:'initializer element for '--ksymtab_isa_io_base.value'
> > is not constant,
> >
> > And the same thing with the variable pci_dram_offset.
> >
> > Perhaps is there a configuration problem or I didn't install correctly
> > the powerpc-linux environment for cross development?
>
> Your cross-compile environment is good for building kernels. This is a kernel
> configuration issue. I got the same isa_io_base error building on a PowerMac
> (which doesn't have ISA) until I enabled SCSI support (?!?!?). For my MPC850 build
> I commented out EXPORT_SYMBOL(isa_io_base); and also isa_mem_base and pci_dram_offset
> in arch/ppc/kernel/ppc_ksyms.c and I was able to successfully build a kernel without SCSI.
> Note that the 2.2.5-embedded kernel compiles in ADB support whether you configured for
> it or not (correct me if I'm wrong, but that has been my experience so far), so I
> commented out L_OBJS and LX_OBJS in drivers/macintosh/Makefile and it builds without ADB.
I added #include "pci.h" after all the system includes. This was an early hack but I am sure
it is a configuration problem. The best way is to choose the minimum configuration items.
You will find if you include serial and serial-console support, then you will get the isa
variable problems. Do not choose any serial settings. The embedded stuff enables serial
console (genearally on SMC1) by default.
> > On top of that the /usr/local/powerpc_linux/include directory is empty
> > so that I can't make the ln -s with the include/linux and include/asm
> > directories(in my linux sources directory) before I want to build the
> > LibC.
>
> Mine is empty too, and I can build kernels fine, but I get lots of errors trying
> to build anything else. Instead of fussing with it (I don't know _why_ the builds
> fail anyway) I got a PowerMac, loaded YellowDog Linux, and all is well :-)
I cross-compile from an x86-linux host to a powerpc-linux target. In this environment I have
installed the compiler to /usr/local/gcc and the powerpc-linux specific stuff goes in
/usr/local/gcc/powerpc-linux. I made symbolic links from
/usr/local/gcc/powerpc-linux/include/linux to <linux-src-path>/include/linux. This worked
for me.
I have not used a Mac for development (yet). If your compiler is /usr/bin, then you will
probably need to make a symbolic link from /usr/powerpc-linux/include/linux to
<linux-src-path>/include/linux. Alternatively, you can use -I<linux-src-path>/include when
building your applications.
I assume that you have also built glibc for powrepc-linux if you are cross-compiling, and
installed them in $prefix/$target (eg. /usr/local/gcc/powerpc-linux/).
Brendan Simon.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cross compilation for MPC860
1999-09-16 12:52 Cross compilation for MPC860 sébastien tadéoni
1999-09-16 18:21 ` Scott Wood
@ 1999-09-17 0:23 ` Graham Stoney
1999-09-17 1:12 ` Dan Malek
1 sibling, 1 reply; 6+ messages in thread
From: Graham Stoney @ 1999-09-17 0:23 UTC (permalink / raw)
To: sibastien tadioni; +Cc: linuxppc-embedded
=?iso-8859-1?q?s=E9bastien=20tad=E9oni?= writes:
> I have no problem for installing binutils-2.2.1.0.19a.
> But during the make of egcs-core-1.1.2, some command like
> 'powerpc-linux-ar' were unknown.
Any particular reason for using old versions of binutils & egcs?
My suggestion is that if you're just starting out, now is the best time to
make sure you're using the latest gcc (2.95.1) and binutils. You have to make
a tiny mod to the gcc specs file if you use binutils 2.9.1, because the name of
the linker emulation has changed since the last binutils release. I'm currently
using the binutils-990809 snapshot. Haven't actually run any code it produces
yet though.
Anyway, here's the complete list of problems I had building the 2.2.5 snapshot
for an 860T board. All these are fixed in the 2.3.18 snapshot, but you may not
want to be on the bleeding edge yet:
The FEC driver fell through the cracks changing request_irq to request_8xxirq:
*** arch/ppc/8xx_io/fec.c.dist Wed Aug 11 12:56:00 1999
--- arch/ppc/8xx_io/fec.c Wed Aug 11 12:56:27 1999
***************
*** 981,989 ****
/* Install our interrupt handlers. The 860T FADS board uses
* IRQ2 for the MII interrupt.
*/
! if (request_irq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0)
panic("Could not allocate FEC IRQ!");
! if (request_irq(SIU_IRQ2, mii_link_interrupt, 0, "mii", dev) != 0)
panic("Could not allocate MII IRQ!");
dev->base_addr = (unsigned long)fecp;
--- 981,989 ----
/* Install our interrupt handlers. The 860T FADS board uses
* IRQ2 for the MII interrupt.
*/
! if (request_8xxirq(FEC_INTERRUPT, fec_enet_interrupt, 0, "fec", dev) != 0)
panic("Could not allocate FEC IRQ!");
! if (request_8xxirq(SIU_IRQ2, mii_link_interrupt, 0, "mii", dev) != 0)
panic("Could not allocate MII IRQ!");
dev->base_addr = (unsigned long)fecp;
On similar lines, kernel/ksyms.c includes an EXPORT_SYMBOL of request_irq
(which no longer exists).
The Makefile in arch/ppc/kernel includes openpic.o, i8259.o and pmac_pic.o
whenever CONFIG_APUS isn't set; even though most other platforms don't want
them either.
drivers/char/Makefile includes pc_keyb.o and defkeymap.o whenever the ARCH is
not m68k, which means they get included in all embedded 8xx builds.
drivers/macintosh/Makefile includes via-cuda.o et al whenever CONFIG_MBX is
not defined. I changed it like this:
*** drivers/macintosh/Makefile.dist Tue Aug 10 16:07:44 1999
--- drivers/macintosh/Makefile Tue Aug 10 16:25:03 1999
***************
*** 15,21 ****
L_TARGET := macintosh.a
M_OBJS :=
! ifndef CONFIG_MBX
L_OBJS := via-cuda.o macio-adb.o via-pmu.o mediabay.o
LX_OBJS := adb.o
endif
--- 15,21 ----
L_TARGET := macintosh.a
M_OBJS :=
! ifdef CONFIG_PMAC
L_OBJS := via-cuda.o macio-adb.o via-pmu.o mediabay.o
LX_OBJS := adb.o
endif
There seems to be a typo in net/core/dev.c:
*** /tmp/linux/net/core/dev.c Fri Apr 9 08:40:36 1999
--- embedded-2.2.5/net/core/dev.c Tue Aug 10 18:14:35 1999
***************
*** 1949,1955 ****
arcnet_init();
#endif
#if defined(CONFIG_8xx)
! #ifdef CONFIG_860T
fec_enet_init();
#else
cpm_enet_init();
--- 1949,1955 ----
arcnet_init();
#endif
#if defined(CONFIG_8xx)
! #ifdef CONFIG_MPC860T
fec_enet_init();
#else
cpm_enet_init();
Lots of the EXPORT_SYMBOLs in arch/ppc/kernel/ppc_ksyms.c caused me grief;
I had to wrap isa_io_base, isa_mem_base and pci_dram_offset in
#ifdef CONFIG_PCI. I #if 0'd out _prep_type and ucSystemType, and all of:
EXPORT_SYMBOL(adb_request);
EXPORT_SYMBOL(adb_autopoll);
EXPORT_SYMBOL(adb_register);
EXPORT_SYMBOL(pmu_request);
EXPORT_SYMBOL(pmu_send_request);
EXPORT_SYMBOL(pmu_poll);
EXPORT_SYMBOL(find_devices);
EXPORT_SYMBOL(find_type_devices);
EXPORT_SYMBOL(find_compatible_devices);
EXPORT_SYMBOL(feature_set);
EXPORT_SYMBOL(feature_clear);
EXPORT_SYMBOL(feature_test);
EXPORT_SYMBOL(device_is_compatible);
Regards,
Graham
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cross compilation for MPC860
1999-09-17 0:23 ` Graham Stoney
@ 1999-09-17 1:12 ` Dan Malek
0 siblings, 0 replies; 6+ messages in thread
From: Dan Malek @ 1999-09-17 1:12 UTC (permalink / raw)
To: Graham Stoney; +Cc: sebastien_tadeoni, linuxppc-embedded
Graham Stoney wrote:
> Anyway, here's the complete list of problems I had building the 2.2.5 snapshot
> for an 860T board.
The only likely 860T board to build with 2.2.5 is the FADS, and
I have not kept that up to date (which is why fec.c is out of date).
> The FEC driver fell through the cracks changing request_irq to request_8xxirq:
There is more that has to change if you are not building for
a FADS board. You have to assign the appropriate MII interrupts
and write the MMI command/status for the particular PHY you are
using.
The RPCg Classic and CLLF are both 860T boards. I will update all
of the fec.c driver when I get a chance to port to those boards.
> The Makefile in arch/ppc/kernel includes openpic.o, i8259.o and pmac_pic.o
> whenever CONFIG_APUS isn't set; even though most other platforms don't want
> them either.
>
> drivers/char/Makefile includes pc_keyb.o and defkeymap.o whenever the ARCH is
> not m68k, which means they get included in all embedded 8xx builds.
>
> drivers/macintosh/Makefile includes via-cuda.o et al whenever CONFIG_MBX is
> not defined. I changed it like this:
You shouldn't have to change it for anything. If your linker
is working properly, it isn't going to include those objects and
there is no harm in building them.
>
> Lots of the EXPORT_SYMBOLs in arch/ppc/kernel/ppc_ksyms.c caused me grief;
> I had to wrap isa_io_base, isa_mem_base and pci_dram_offset in
> #ifdef CONFIG_PCI. I #if 0'd out _prep_type and ucSystemType, and all of:
Something is wrong with your tools or the configuration you have
selected. None of these changes are necessary.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Cross compilation for MPC860
@ 1999-09-21 12:40 sébastien tadéoni
0 siblings, 0 replies; 6+ messages in thread
From: sébastien tadéoni @ 1999-09-21 12:40 UTC (permalink / raw)
To: linux ppc embedded, Graham Stoney, Scott Wood
Hi Graham, Hi Scott;
Thanks for your help for cross compiling.
> Any particular reason for using old versions
> of binutils & egcs?
> My suggestion is that if you're just starting out,
> now is the best time to make sure you're using the
> latest gcc (2.95.1) and binutils. You have to make
a > tiny mod to the gcc specs file if you use binutils
> 2.9.1, because the name of the linker emulation
has > changed since the last binutils release. I'm
> currently using the binutils-990809 snapshot.
Haven't > actually run any code it produces yet
though.
I have pgcc-2.91.66 (egcs-1.1.2 release) and I founded
a gcc-2.95 tar file but I have problem with the
./configure command (system can't find any sources in
. or ..).
I see you work on a pentium station and I would have
known how you have configured your machine.
Where can I find the last binutils and gcc release and
how install them (is there specifics command other
than --target=powerpc-linux and --with-newlib)?
Which modif must I make in the spec files?
Graham Stoney wrote:
...
> *** drivers/macintosh/Makefile.dist Tue Aug 10 >
16:07:44 1999
> --- drivers/macintosh/Makefile Tue Aug 10 16:25:03
> 1999
> ***************
> *** 15,21 ****
> L_TARGET := macintosh.a
> M_OBJS :=
>
> ! ifndef CONFIG_MBX
> L_OBJS := via-cuda.o macio-adb.o via-pmu.o >
mediabay.o
> LX_OBJS := adb.o
> endif
> --- 15,21 ----
> L_TARGET := macintosh.a
> M_OBJS :=
> ! ifdef CONFIG_PMAC
> L_OBJS := via-cuda.o macio-adb.o via-pmu.o >
mediabay.o
> LX_OBJS := adb.o
> endif
and Scott Wood wrote:
> Note that the 2.2.5-embedded kernel compiles in ADB
> support whether you configured for it or not
(correct > me if I'm wrong, but that has been my
experience so
> far), so I commented out L_OBJS and LX_OBJS in >
drivers/macintosh/Makefile and it builds without ADB.
I don't realy understand which role play this makefile
and what is ADB?
Thanks in advance for your help.
Good Day
Sébastien
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~1999-09-21 12:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-16 12:52 Cross compilation for MPC860 sébastien tadéoni
1999-09-16 18:21 ` Scott Wood
1999-09-16 23:44 ` Brendan Simon
1999-09-17 0:23 ` Graham Stoney
1999-09-17 1:12 ` Dan Malek
-- strict thread matches above, loose matches on Subject: below --
1999-09-21 12:40 sébastien tadéoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).