linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Problem compiling sequoia using DENX kernel. Xenomai-patch required?
@ 2007-12-02 20:41 Niklaus Giger
  2007-12-03 23:08 ` Wolfgang Denk
  0 siblings, 1 reply; 6+ messages in thread
From: Niklaus Giger @ 2007-12-02 20:41 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]

Hi

I tried with (tags DENX-v2.6.23.9, DENX-v.2.6.23, master) to build a kernel 
for the sequoia board.
I am using ELDK 4.1. I did a 
git checkout -b copy-master master
make ARCH=powerpc CROSS_COMPILE=ppc_4xx- CFLAGS=-g sequoia_defconfig 
make ARCH=powerpc CROSS_COMPILE=ppc_4xx- CFLAGS=-g zImage 

First I stumbled about problem compiling arch/powerpc/platforms/44x/ppc4xx*.c
file with errors like
arch/powerpc/platforms/44x/ppc4xx-pci.c: In function 'ppc4xx_setup_pci':
arch/powerpc/platforms/44x/ppc4xx-pci.c:62: sorry, unimplemented: inlining 
failed in call to 'pci_cfg_out': function body not available
arch/powerpc/platforms/44x/ppc4xx-pci.c:98: sorry, unimplemented: called from 
here

After applying the at attached patch I got farther till
  CC      kernel/softirq.o
kernel/softirq.c: In function 'raise_softirq':
kernel/softirq.c:319: sorry, unimplemented: inlining failed in call 
to 'raise_softirq_irqoff': function body not available
kernel/softirq.c:342: sorry, unimplemented: called from here
make[2]: *** [kernel/softirq.o] Fehler 1

I thought that denx compiled images for the sequoia using 2.6.23. 
Do they only work after having applied the Xenomai patch? Because if I apply 
the Xenomai patch, the kernel compiles cleanly. In this case  I think it 
would be nice to get somewhere a hint (or did I missed it somewhere) that 
this is a requirement. I lost quite a few hours as I wanted to first compile 
a "normal" kernel and afterwars apply the xenomai patch.

Any clarifikation would be appreciated.

Best regards

-- 
Niklaus Giger

[-- Attachment #2: powerpc.diff --]
[-- Type: text/x-diff, Size: 1942 bytes --]

diff --git a/arch/powerpc/platforms/44x/ppc4xx-nand.c b/arch/powerpc/platforms/44x/ppc4xx-nand.c
index 2fb553b..0574d2c 100644
--- a/arch/powerpc/platforms/44x/ppc4xx-nand.c
+++ b/arch/powerpc/platforms/44x/ppc4xx-nand.c
@@ -29,8 +29,6 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/ndfc.h>
 
-#include <mm/mmu_decl.h>
-
 #include <asm/system.h>
 #include <asm/atomic.h>
 #include <asm/prom.h>
diff --git a/arch/powerpc/platforms/44x/ppc4xx-pci.c b/arch/powerpc/platforms/44x/ppc4xx-pci.c
index 4666250..137555f 100644
--- a/arch/powerpc/platforms/44x/ppc4xx-pci.c
+++ b/arch/powerpc/platforms/44x/ppc4xx-pci.c
@@ -26,8 +26,6 @@
 #include <linux/module.h>
 #include <linux/io.h>
 
-#include <mm/mmu_decl.h>
-
 #include <asm/system.h>
 #include <asm/atomic.h>
 #include <asm/pci-bridge.h>
@@ -44,6 +42,7 @@
 #endif
 
 #ifdef CONFIG_PCI
+extern unsigned long total_memory;
 
 int ppc4xx_exclude_device(struct pci_controller *hose, u_char bus,
 			   u_char devfn)
@@ -53,21 +52,6 @@ int ppc4xx_exclude_device(struct pci_controller *hose, u_char bus,
 	return PCIBIOS_SUCCESSFUL;
 }
 
-inline void pci_writel(void *pci_reg_base, u32 offset, unsigned int val)
-{
-	writel(val, pci_reg_base + offset);
-}
-
-inline void pci_cfg_out(void *cfg, u32 offset, unsigned int value)
-{
-	out_le32((void *)((u32) cfg + offset), value);
-}
-
-inline u32 pci_cfg_in(void *cfg, u32 offset)
-{
-	return in_le32((void *)((u32) cfg + offset));
-}
-
 static void __init ppc4xx_setup_pci(struct pci_controller *hose,
 				     void *pci_reg_base, void *pci_cfg_base)
 {
diff --git a/arch/powerpc/platforms/44x/ppc4xx-usb.c b/arch/powerpc/platforms/44x/ppc4xx-usb.c
index 1b07689..87e87e6 100644
--- a/arch/powerpc/platforms/44x/ppc4xx-usb.c
+++ b/arch/powerpc/platforms/44x/ppc4xx-usb.c
@@ -25,8 +25,6 @@
 #include <linux/module.h>
 #include <linux/io.h>
 
-#include <mm/mmu_decl.h>
-
 #include <asm/system.h>
 #include <asm/atomic.h>
 #include <asm/prom.h>

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

* Re: Problem compiling sequoia using DENX kernel. Xenomai-patch required?
  2007-12-02 20:41 Problem compiling sequoia using DENX kernel. Xenomai-patch required? Niklaus Giger
@ 2007-12-03 23:08 ` Wolfgang Denk
  2007-12-04 22:14   ` Niklaus Giger
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2007-12-03 23:08 UTC (permalink / raw)
  To: niklaus.giger; +Cc: linuxppc-embedded

In message <200712022141.36467.niklaus.giger@member.fsf.org> you wrote:
> 
> I tried with (tags DENX-v2.6.23.9, DENX-v.2.6.23, master) to build a kernel 
> for the sequoia board.
> I am using ELDK 4.1. I did a 
> git checkout -b copy-master master
> make ARCH=powerpc CROSS_COMPILE=ppc_4xx- CFLAGS=-g sequoia_defconfig 
> make ARCH=powerpc CROSS_COMPILE=ppc_4xx- CFLAGS=-g zImage 

The ARCH=powerpc is the "interesting" part here.

> First I stumbled about problem compiling arch/powerpc/platforms/44x/ppc4xx*.c
> file with errors like
> arch/powerpc/platforms/44x/ppc4xx-pci.c: In function 'ppc4xx_setup_pci':
> arch/powerpc/platforms/44x/ppc4xx-pci.c:62: sorry, unimplemented: inlining 
> failed in call to 'pci_cfg_out': function body not available
> arch/powerpc/platforms/44x/ppc4xx-pci.c:98: sorry, unimplemented: called from 
> here

There are many moving targets in the ARCH=powerpc hemisphere for 4xx
systems...

> I thought that denx compiled images for the sequoia using 2.6.23. 

Yes, we do. But stable support is only available  with  the  arch/ppc
tree yet.

> Do they only work after having applied the Xenomai patch? Because if I apply 

No.

> the Xenomai patch, the kernel compiles cleanly. In this case  I think it 

That's just lucky coincidence...

> would be nice to get somewhere a hint (or did I missed it somewhere) that 
> this is a requirement. I lost quite a few hours as I wanted to first compile 
> a "normal" kernel and afterwars apply the xenomai patch.

I'm afraid "normal" here still means arch/ppc  -  hopefully  for  not
long any more. Note: a matching Xenomai patch for arch/ppc will be in
Xenomai 2.4 when it comes out in a few days.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Good manners are the settled  medium  of  social,  as  specie  is  of
commercial, life; returns are equally expected for both.
           - Lord Chesterfield _Letters to his Son_, 25 December 1753

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

* Re: Problem compiling sequoia using DENX kernel. Xenomai-patch required?
  2007-12-03 23:08 ` Wolfgang Denk
@ 2007-12-04 22:14   ` Niklaus Giger
  2007-12-04 22:29     ` Josh Boyer
  2007-12-06 14:55     ` Wolfgang Denk
  0 siblings, 2 replies; 6+ messages in thread
From: Niklaus Giger @ 2007-12-04 22:14 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-embedded

Am Dienstag, 4. Dezember 2007 schrieb Wolfgang Denk:
<...>
> I'm afraid "normal" here still means arch/ppc  -  hopefully  for  not
> long any more. Note: a matching Xenomai patch for arch/ppc will be in
> Xenomai 2.4 when it comes out in a few days.
Thanks a lot for your explanation. I took 
ksrc/arch/powerpc/patches/adeos-ipipe-2.6.23-ppc-1.6-00.patch 
from the xenomai trunk and was able to compile and boot successfully
the yosemite board (using ARCH=ppc). Will try the sequoaia board tomorrow.

I hope that this is a good starting point to get my custom PPC440EPx board 
into shape. I think once the arch/powerpc will work for PPC440 it should not 
be a lot of work to port it from ppc -> powerpc.

Best regards

-- 
Niklaus Giger

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

* Re: Problem compiling sequoia using DENX kernel. Xenomai-patch required?
  2007-12-04 22:14   ` Niklaus Giger
@ 2007-12-04 22:29     ` Josh Boyer
  2007-12-06 14:55     ` Wolfgang Denk
  1 sibling, 0 replies; 6+ messages in thread
From: Josh Boyer @ 2007-12-04 22:29 UTC (permalink / raw)
  To: niklaus.giger; +Cc: linuxppc-embedded

On Tue, 4 Dec 2007 23:14:38 +0100
Niklaus Giger <niklaus.giger@member.fsf.org> wrote:

> Am Dienstag, 4. Dezember 2007 schrieb Wolfgang Denk:
> <...>
> > I'm afraid "normal" here still means arch/ppc  -  hopefully  for  not
> > long any more. Note: a matching Xenomai patch for arch/ppc will be in
> > Xenomai 2.4 when it comes out in a few days.
> Thanks a lot for your explanation. I took 
> ksrc/arch/powerpc/patches/adeos-ipipe-2.6.23-ppc-1.6-00.patch 
> from the xenomai trunk and was able to compile and boot successfully
> the yosemite board (using ARCH=ppc). Will try the sequoaia board tomorrow.
> 
> I hope that this is a good starting point to get my custom PPC440EPx board 
> into shape. I think once the arch/powerpc will work for PPC440 it should not 
> be a lot of work to port it from ppc -> powerpc.

Sequoia is already in arch/powerpc.  At least most of the base support.

josh

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

* Re: Problem compiling sequoia using DENX kernel. Xenomai-patch required?
  2007-12-04 22:14   ` Niklaus Giger
  2007-12-04 22:29     ` Josh Boyer
@ 2007-12-06 14:55     ` Wolfgang Denk
  2007-12-06 20:04       ` Niklaus Giger
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2007-12-06 14:55 UTC (permalink / raw)
  To: niklaus.giger; +Cc: linuxppc-embedded

In message <200712042314.38498.niklaus.giger@member.fsf.org> you wrote:
> Am Dienstag, 4. Dezember 2007 schrieb Wolfgang Denk:
> <...>
> > I'm afraid "normal" here still means arch/ppc  -  hopefully  for  not
> > long any more. Note: a matching Xenomai patch for arch/ppc will be in
> > Xenomai 2.4 when it comes out in a few days.
> Thanks a lot for your explanation. I took 
> ksrc/arch/powerpc/patches/adeos-ipipe-2.6.23-ppc-1.6-00.patch 
> from the xenomai trunk and was able to compile and boot successfully
> the yosemite board (using ARCH=ppc). Will try the sequoaia board tomorrow.
> 
> I hope that this is a good starting point to get my custom PPC440EPx board 
> into shape. I think once the arch/powerpc will work for PPC440 it should not 
> be a lot of work to port it from ppc -> powerpc.

Actually the arch/powerpc tree is working fine here, too.

You might have been unlucky and cloning / pulling  our  tree  at  the
wrong time; we had a stale DENX-v2.6.23.9 tag in there for some time;
unfortunately  the  fix  doesn't  propagate  as  your  side thinks it
already has a valid tag.

Please either "rm .git/refs/tags/DENX-v2.6.23.9" and pull  again,  or
throw  away  the  whole  tree  and  clone again. Sorry for the incon-
venience. And please let me know if this helps (it should).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
One of the advantages of being a captain is being able to ask for ad-
vice without necessarily having to take it.
	-- Kirk, "Dagger of the Mind", stardate 2715.2

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

* Re: Problem compiling sequoia using DENX kernel. Xenomai-patch required?
  2007-12-06 14:55     ` Wolfgang Denk
@ 2007-12-06 20:04       ` Niklaus Giger
  0 siblings, 0 replies; 6+ messages in thread
From: Niklaus Giger @ 2007-12-06 20:04 UTC (permalink / raw)
  To: Wolfgang Denk; +Cc: linuxppc-embedded

Am Donnerstag, 6. Dezember 2007 schrieb Wolfgang Denk:
> In message <200712042314.38498.niklaus.giger@member.fsf.org> you wrote:
> > Am Dienstag, 4. Dezember 2007 schrieb Wolfgang Denk:
> > <...>
> > > I'm afraid "normal" here still means arch/ppc  -  hopefully  for  not
> > > long any more. Note: a matching Xenomai patch for arch/ppc will be in
> > > Xenomai 2.4 when it comes out in a few days.
> > Thanks a lot for your explanation. I took 
> > ksrc/arch/powerpc/patches/adeos-ipipe-2.6.23-ppc-1.6-00.patch 
> > from the xenomai trunk and was able to compile and boot successfully
> > the yosemite board (using ARCH=ppc). Will try the sequoaia board tomorrow.
> > 
> > I hope that this is a good starting point to get my custom PPC440EPx board 
> > into shape. I think once the arch/powerpc will work for PPC440 it should not 
> > be a lot of work to port it from ppc -> powerpc.
> 
> Actually the arch/powerpc tree is working fine here, too.
> 
> You might have been unlucky and cloning / pulling  our  tree  at  the
> wrong time; we had a stale DENX-v2.6.23.9 tag in there for some time;
> unfortunately  the  fix  doesn't  propagate  as  your  side thinks it
> already has a valid tag.
> 
> Please either "rm .git/refs/tags/DENX-v2.6.23.9" and pull  again,  or
> throw  away  the  whole  tree  and  clone again. Sorry for the incon-
> venience. And please let me know if this helps (it should).
After following your receipt I recompiled and booted the sequoia board.
Everything seems to work.

Thank you again for your tip. You are always very helpful.
Best regards,

Niklaus Giger

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

end of thread, other threads:[~2007-12-06 20:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-02 20:41 Problem compiling sequoia using DENX kernel. Xenomai-patch required? Niklaus Giger
2007-12-03 23:08 ` Wolfgang Denk
2007-12-04 22:14   ` Niklaus Giger
2007-12-04 22:29     ` Josh Boyer
2007-12-06 14:55     ` Wolfgang Denk
2007-12-06 20:04       ` Niklaus Giger

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).