* kilauea compilation breaks with v3.3 kernel and ELDK 4.2 @ 2012-03-21 12:10 Robert Berger 2012-03-21 13:29 ` Josh Boyer 2012-03-21 22:14 ` Tony Breeds 0 siblings, 2 replies; 21+ messages in thread From: Robert Berger @ 2012-03-21 12:10 UTC (permalink / raw) To: linuxppc-dev Hi, Up to 3.2.x I was able to compile a mainline kernel for the kilauea board, but... http://git.denx.de/?p=linux-denx.git;a=commitdiff;h=075bcf5879225d0c2a119c23d8046b890e051e81 shows, that mfdcrx was introduced in the v3.3 kernel. The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes with the ELDK 4.2) this assembly instruction is not known and the build breaks. There are some obvious workarounds, like using a more recent toolchain (e.g ELDK 5.x) or use make -k to keep on compiling even when there is an error as much as possible;) What puzzles me is that also stuff for boards is being compiled which is not really needed like treeboot-currituck.c even when I configure the kernel for a kilauea board. Is this on purpose and if so why? Please advise. Regards, Robert ..."But I have a slowly coagulating theory that the size of a project is directly proportional to the possibility that significant bugs will crop up. Exponentiate for each additional programmer involved." - Steven K. Halliburton My public pgp key is available at: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-21 12:10 kilauea compilation breaks with v3.3 kernel and ELDK 4.2 Robert Berger @ 2012-03-21 13:29 ` Josh Boyer 2012-03-21 16:25 ` Wolfgang Denk 2012-03-21 22:14 ` Tony Breeds 1 sibling, 1 reply; 21+ messages in thread From: Josh Boyer @ 2012-03-21 13:29 UTC (permalink / raw) To: robert.karl.berger; +Cc: linuxppc-dev On Wed, Mar 21, 2012 at 8:10 AM, Robert Berger <robert.karl.berger@gmail.com> wrote: > Hi, > > Up to 3.2.x I was able to compile a mainline kernel for the kilauea > board, but... > > http://git.denx.de/?p=linux-denx.git;a=commitdiff;h=075bcf5879225d0c2a119c23d8046b890e051e81 > > shows, that mfdcrx was introduced in the v3.3 kernel. > > The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes with the > ELDK 4.2) this assembly instruction is not known and the build breaks. Sigh. GCC 4.2 is pretty old at this point. > There are some obvious workarounds, like using a more recent toolchain > (e.g ELDK 5.x) or use make -k to keep on compiling even when there is an > error as much as possible;) That would be the most expedient option, yes. > What puzzles me is that also stuff for boards is being compiled which is > not really needed like treeboot-currituck.c even when I configure the > kernel for a kilauea board. > > Is this on purpose and if so why? All of the stuff in arch/powerpc/boot/ is built regardless of the configured board and stuffed into a wrapper.a archive. Then the individual board targets are built and the necessary pieces are pulled from the wrapper.a file. > Please advise. If upgrading ELDK is an option for you, it will get you the quickest solution. Otherwise we'll need to figure out how to stub out the instruction in boot/dcr.h and use the asm long trick. Ew. I can look at that next week. josh ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-21 13:29 ` Josh Boyer @ 2012-03-21 16:25 ` Wolfgang Denk 2012-03-24 23:53 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 21+ messages in thread From: Wolfgang Denk @ 2012-03-21 16:25 UTC (permalink / raw) To: Josh Boyer; +Cc: linuxppc-dev, robert.karl.berger Dear Josh, In message <CA+5PVA7+vPZmLBzkXOFwTM+kLMYHPDgVW4Jcm91XSxW=Ng-Y6g@mail.gmail.com> you wrote: > > > The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes with the > > ELDK 4.2) this assembly instruction is not known and the build breaks. > > Sigh. GCC 4.2 is pretty old at this point. But still rock-solid ... We use it a lot, especially as reference for more recent (and sometimes more broken) versions of GCC. > All of the stuff in arch/powerpc/boot/ is built regardless of the > configured board and stuffed into a wrapper.a archive. Then the > individual board targets are built and the necessary pieces are pulled > from the wrapper.a file. This appears to be a pretty inefficient approach. Why don't we build only the files we actually need? That would save a bit of build time. > > Please advise. > > If upgrading ELDK is an option for you, it will get you the quickest > solution. Otherwise we'll need to figure out how to stub out the > instruction in boot/dcr.h and use the asm long trick. Ew. I can look > at that next week. Thanks a lot in advance! 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 It is wrong always, everywhere and for everyone to believe anything upon insufficient evidence. - W. K. Clifford, British philosopher, circa 1876 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-21 16:25 ` Wolfgang Denk @ 2012-03-24 23:53 ` Benjamin Herrenschmidt 2012-03-26 13:36 ` Josh Boyer 0 siblings, 1 reply; 21+ messages in thread From: Benjamin Herrenschmidt @ 2012-03-24 23:53 UTC (permalink / raw) To: Wolfgang Denk; +Cc: linuxppc-dev, robert.karl.berger On Wed, 2012-03-21 at 17:25 +0100, Wolfgang Denk wrote: > > > The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes > with the > > > ELDK 4.2) this assembly instruction is not known and the build > breaks. > > > > Sigh. GCC 4.2 is pretty old at this point. > > But still rock-solid ... We use it a lot, especially as reference for > more recent (and sometimes more broken) versions of GCC. Isn't this a binutils rather than gcc issue ? Cheers, Ben. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-24 23:53 ` Benjamin Herrenschmidt @ 2012-03-26 13:36 ` Josh Boyer 2012-03-30 22:53 ` Frank Svendsbøe 0 siblings, 1 reply; 21+ messages in thread From: Josh Boyer @ 2012-03-26 13:36 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Wolfgang Denk, robert.karl.berger On Sat, Mar 24, 2012 at 7:53 PM, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote: > On Wed, 2012-03-21 at 17:25 +0100, Wolfgang Denk wrote: >> > > The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes >> with the >> > > ELDK 4.2) this assembly instruction is not known and the build >> breaks. >> > >> > Sigh. =A0GCC 4.2 is pretty old at this point. >> >> But still rock-solid ... =A0We use it a lot, especially as reference for >> more recent (and sometimes more broken) versions of GCC. > > Isn't this a binutils rather than gcc issue ? Pretty much. josh ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-26 13:36 ` Josh Boyer @ 2012-03-30 22:53 ` Frank Svendsbøe 2012-03-31 0:03 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 21+ messages in thread From: Frank Svendsbøe @ 2012-03-30 22:53 UTC (permalink / raw) To: Josh Boyer; +Cc: Wolfgang Denk, robert.karl.berger, linuxppc-dev On Mon, Mar 26, 2012 at 3:36 PM, Josh Boyer <jwboyer@gmail.com> wrote: > On Sat, Mar 24, 2012 at 7:53 PM, Benjamin Herrenschmidt > <benh@kernel.crashing.org> wrote: >> On Wed, 2012-03-21 at 17:25 +0100, Wolfgang Denk wrote: >>> > > The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes >>> with the >>> > > ELDK 4.2) this assembly instruction is not known and the build >>> breaks. >>> > >>> > Sigh. =A0GCC 4.2 is pretty old at this point. >>> >>> But still rock-solid ... =A0We use it a lot, especially as reference fo= r >>> more recent (and sometimes more broken) versions of GCC. >> >> Isn't this a binutils rather than gcc issue ? > > Pretty much. > Hi Josh Boyer, just wanted to add that I'm experiencing the same problem that Robert reported, but on 8xx instead of 4xx. The mpc8xx does not support the mfdcrx instruction, so maybe it's more to it than just a binutils bug? Best regards, Frank ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-30 22:53 ` Frank Svendsbøe @ 2012-03-31 0:03 ` Benjamin Herrenschmidt 2012-04-01 22:14 ` Frank E. Svendsbøe 2012-04-02 12:10 ` Josh Boyer 0 siblings, 2 replies; 21+ messages in thread From: Benjamin Herrenschmidt @ 2012-03-31 0:03 UTC (permalink / raw) To: Frank Svendsbøe; +Cc: linuxppc-dev, Wolfgang Denk, robert.karl.berger On Sat, 2012-03-31 at 00:53 +0200, Frank Svendsbøe wrote: > Hi Josh Boyer, > > just wanted to add that I'm experiencing the same problem that Robert > reported, but on 8xx instead of 4xx. The mpc8xx does not support the > mfdcrx instruction, so maybe it's more to it than just a binutils bug? The kernel shouldn't have tried to build that instruction on 8xx, though I suppose if it's in arch/powerpc/boot, we are a bit too eager at building everything including what's not relevant, we might to be a bit more careful at excluding 4xx stuff on a 8xx kernel. Can you give us the exact error ? Cheers, Ben. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-31 0:03 ` Benjamin Herrenschmidt @ 2012-04-01 22:14 ` Frank E. Svendsbøe 2012-04-02 2:01 ` Benjamin Herrenschmidt 2012-04-02 12:10 ` Josh Boyer 1 sibling, 1 reply; 21+ messages in thread From: Frank E. Svendsbøe @ 2012-04-01 22:14 UTC (permalink / raw) To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Wolfgang Denk, robert.karl.berger On Sat, Mar 31, 2012 at 11:03:04AM +1100, Benjamin Herrenschmidt wrote: > On Sat, 2012-03-31 at 00:53 +0200, Frank Svendsbøe wrote: > > > Hi Josh Boyer, > > > > just wanted to add that I'm experiencing the same problem that Robert > > reported, but on 8xx instead of 4xx. The mpc8xx does not support the > > mfdcrx instruction, so maybe it's more to it than just a binutils bug? > > The kernel shouldn't have tried to build that instruction on 8xx, though > I suppose if it's in arch/powerpc/boot, we are a bit too eager at > building everything including what's not relevant, we might to be a bit > more careful at excluding 4xx stuff on a 8xx kernel. > Yes. I agree on Wolfgangs statement regarding not building code we don't want/need. Please explain to me why src-wlib/src-plat in arch/powerpc/boot/Makefile includes every ppc target... > Can you give us the exact error ? > Yes. The problem is caused by commit 228d550 by Tony Breeds arch/powerpc/boot/treeboot-currituck.c:50 reg = mfdcrx(DDR3_MR0CF + i); -- Best regards, Frank ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-01 22:14 ` Frank E. Svendsbøe @ 2012-04-02 2:01 ` Benjamin Herrenschmidt 2012-04-02 6:28 ` Tony Breeds 0 siblings, 1 reply; 21+ messages in thread From: Benjamin Herrenschmidt @ 2012-04-02 2:01 UTC (permalink / raw) To: Frank E. Svendsbøe; +Cc: linuxppc-dev, Wolfgang Denk, robert.karl.berger On Mon, 2012-04-02 at 00:14 +0200, Frank E. Svendsbøe wrote: > On Sat, Mar 31, 2012 at 11:03:04AM +1100, Benjamin Herrenschmidt wrote: > > On Sat, 2012-03-31 at 00:53 +0200, Frank Svendsbøe wrote: > > > > > Hi Josh Boyer, > > > > > > just wanted to add that I'm experiencing the same problem that Robert > > > reported, but on 8xx instead of 4xx. The mpc8xx does not support the > > > mfdcrx instruction, so maybe it's more to it than just a binutils bug? > > > > The kernel shouldn't have tried to build that instruction on 8xx, though > > I suppose if it's in arch/powerpc/boot, we are a bit too eager at > > building everything including what's not relevant, we might to be a bit > > more careful at excluding 4xx stuff on a 8xx kernel. > > > > Yes. I agree on Wolfgangs statement regarding not building code we > don't want/need. Please explain to me why src-wlib/src-plat in > arch/powerpc/boot/Makefile includes every ppc target... Ok, I've asked Tony to have a look at splitting the build decision in arch/powerpc/boot along the same lines as the CPU families... ie only wrappers for platforms potentially supported by the built kernel. That should fix it. Cheers, Ben. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-02 2:01 ` Benjamin Herrenschmidt @ 2012-04-02 6:28 ` Tony Breeds 2012-04-02 8:37 ` Frank E. Svendsbøe 2012-05-06 14:37 ` Robert Berger 0 siblings, 2 replies; 21+ messages in thread From: Tony Breeds @ 2012-04-02 6:28 UTC (permalink / raw) To: Benjamin Herrenschmidt Cc: Frank E. Svendsbøe, Wolfgang Denk, robert.karl.berger, linuxppc-dev [-- Attachment #1: Type: text/plain, Size: 3877 bytes --] On Mon, Apr 02, 2012 at 12:01:55PM +1000, Benjamin Herrenschmidt wrote: > Ok, I've asked Tony to have a look at splitting the build decision > in arch/powerpc/boot along the same lines as the CPU families... ie only > wrappers for platforms potentially supported by the built kernel. That > should fix it. Please try this patch. Only lightly tested here. I haven't "split up" src-wlib yet as I wanted to verify I'm on the right track. From e0b1ac84bfd539482bc88b943724e577e6b8dfb3 Mon Sep 17 00:00:00 2001 From: Tony Breeds <tony@bakeyournoodle.com> Date: Mon, 2 Apr 2012 16:20:35 +1000 Subject: [PATCH] powerpc/boot: Only build board support files when required. Currently we build all board files regardless of the final zImage target. This is sub-optimal (in terms on compilation) and leads to problems in one platform needlessly causing failures for other platforms. Use the Kconfig variables to selectively construct this board files to build. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> --- arch/powerpc/boot/Makefile | 56 +++++++++++++++++++++++++++++++++---------- 1 files changed, 43 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index e8461cb..a3c4ae0 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile @@ -69,19 +69,49 @@ src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \ 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c \ cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \ fsl-soc.c mpc8xx.c pq2.c ugecon.c -src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \ - cuboot-ebony.c cuboot-hotfoot.c epapr.c treeboot-ebony.c \ - prpmc2800.c \ - ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \ - cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \ - cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \ - fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \ - cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \ - cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \ - virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \ - cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c \ - gamecube-head.S gamecube.c wii-head.S wii.c treeboot-iss4xx.c \ - treeboot-currituck.c +src-plat := of.c +ifeq ($(CONFIG_40x),y) +src-plat += fixed-head.S ep405.c cuboot-hotfoot.c treeboot-walnut.c \ + cuboot-acadia.c cuboot-kilauea.c \ + simpleboot.c virtex405-head.S virtex.c +endif +ifeq ($(CONFIG_44x),y) +src-plat += treeboot-ebony cuboot-ebony treeboot-bamboo cuboot-bamboo \ + cuboot-sam440ep.c cuboot-sequoia.c cuboot-rainier.c \ + cuboot-taishan.c cuboot-katmai.c cuboot-warp.c \ + cuboot-yosemite.c treeboot-iss4xx.c treeboot-currituck.c \ + simpleboot.c fixed-head.S virtex.c +endif +ifeq ($(CONFIG_8xx),y) +src-plat += cuboot-8xx.c fixed-head.S ep88xc.c redboot-8xx.c +endif +ifeq ($(CONFIG_PPC_MPC52xx),y) +src-plat += cuboot-52xx.c +endif +ifeq ($(CONFIG_PPC_82xx),y) +src-plat += cuboot-pq2.c fixed-head.S ep8248e.c cuboot-824x.c +endif +ifeq ($(CONFIG_PPC_82xx),y) +src-plat += cuboot-83xx.c fixed-head.S redboot-83xx.c +endif +ifeq ($(CONFIG_FSL_SOC_BOOKE),y) +src-plat += cuboot-85xx.c cuboot-85xx-cpm2.c +endif +ifeq ($(CONFIG_EMBEDDED6xx),y) +src-plat += cuboot-pq2.c cuboot-mpc7448hpc2.c cuboot-c2k.c \ + gamecube-head.S gamecube.c wii-head.S wii.c holly.c \ + prpmc2800.c +endif +ifeq ($(CONFIG_AMIGAONE),y) +src-plat += cuboot-amigaone.c +endif +ifeq ($(CONFIG_PPC_PS3),y) +src-plat += ps3-head.S ps3-hvcall.S ps3.c +endif +ifeq ($(CONFIG_EPAPR_BOOT),y) +src-plat += epapr.c +endif +src-plat := $(sort $(src-plat)) src-boot := $(src-wlib) $(src-plat) empty.c src-boot := $(addprefix $(obj)/, $(src-boot)) -- 1.7.7.6 Yours Tony [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-02 6:28 ` Tony Breeds @ 2012-04-02 8:37 ` Frank E. Svendsbøe 2012-05-06 14:37 ` Robert Berger 1 sibling, 0 replies; 21+ messages in thread From: Frank E. Svendsbøe @ 2012-04-02 8:37 UTC (permalink / raw) To: Tony Breeds; +Cc: Wolfgang Denk, robert.karl.berger, linuxppc-dev On Mon, Apr 02, 2012 at 04:28:29PM +1000, Tony Breeds wrote: > On Mon, Apr 02, 2012 at 12:01:55PM +1000, Benjamin Herrenschmidt wrote: > > > Ok, I've asked Tony to have a look at splitting the build decision > > in arch/powerpc/boot along the same lines as the CPU families... ie only > > wrappers for platforms potentially supported by the built kernel. That > > should fix it. > > Please try this patch. Only lightly tested here. I haven't "split up" > src-wlib yet as I wanted to verify I'm on the right track. > Thanks. It compiles now (for 8xx), but I still need to resolve a vmalloc failure during boot that occurred sometime after 3.2, so I haven't been able to test it yet. You're on the right track. Now continue splitting up src-wlib :) -- Best regards, Frank ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-02 6:28 ` Tony Breeds 2012-04-02 8:37 ` Frank E. Svendsbøe @ 2012-05-06 14:37 ` Robert Berger 2012-05-17 14:37 ` Frank Svendsbøe 1 sibling, 1 reply; 21+ messages in thread From: Robert Berger @ 2012-05-06 14:37 UTC (permalink / raw) To: Tony Breeds Cc: linuxppc-dev, Wolfgang Denk, "Frank E. Svendsbøe" On 04/02/2012 09:28 AM, Tony Breeds wrote: > On Mon, Apr 02, 2012 at 12:01:55PM +1000, Benjamin Herrenschmidt wrote: > >> Ok, I've asked Tony to have a look at splitting the build decision >> in arch/powerpc/boot along the same lines as the CPU families... ie only >> wrappers for platforms potentially supported by the built kernel. That >> should fix it. > > Please try this patch. Only lightly tested here. I haven't "split up" > src-wlib yet as I wanted to verify I'm on the right track. I can confirm that it fixes the kilauea problem. Builds and runs so far. Are you going to push this upstream? Regards, Robert ..."Software is like sex, it's better when it's free" My public pgp key is available at: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x90320BF1 ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-05-06 14:37 ` Robert Berger @ 2012-05-17 14:37 ` Frank Svendsbøe 0 siblings, 0 replies; 21+ messages in thread From: Frank Svendsbøe @ 2012-05-17 14:37 UTC (permalink / raw) To: robert.karl.berger, Tony Breeds; +Cc: Wolfgang Denk, linuxppc-dev On Sun, May 6, 2012 at 4:37 PM, Robert Berger <robert.karl.berger@gmail.com> wrote: > On 04/02/2012 09:28 AM, Tony Breeds wrote: >> On Mon, Apr 02, 2012 at 12:01:55PM +1000, Benjamin Herrenschmidt wrote: >> >>> Ok, I've asked Tony to have a look at splitting the build decision >>> in arch/powerpc/boot along the same lines as the CPU families... ie onl= y >>> wrappers for platforms potentially supported by the built kernel. That >>> should fix it. >> >> Please try this patch. =A0Only lightly tested here. =A0I haven't "split = up" >> src-wlib yet as I wanted to verify I'm on the right track. > > I can confirm that it fixes the kilauea problem. Builds and runs so far. > Are you going to push this upstream? > I can confirm this too (applied to 3.4-rc7). Tony? Best regards, Frank ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-31 0:03 ` Benjamin Herrenschmidt 2012-04-01 22:14 ` Frank E. Svendsbøe @ 2012-04-02 12:10 ` Josh Boyer 2012-04-02 21:08 ` Benjamin Herrenschmidt 2012-04-04 19:21 ` Wolfgang Denk 1 sibling, 2 replies; 21+ messages in thread From: Josh Boyer @ 2012-04-02 12:10 UTC (permalink / raw) To: Benjamin Herrenschmidt Cc: Frank Svendsbøe, Wolfgang Denk, robert.karl.berger, linuxppc-dev On Fri, Mar 30, 2012 at 8:03 PM, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote: > On Sat, 2012-03-31 at 00:53 +0200, Frank Svendsb=F8e wrote: > >> Hi Josh Boyer, >> >> just wanted to add that I'm experiencing the same problem that Robert >> reported, but on 8xx instead of 4xx. The mpc8xx does not support the >> mfdcrx instruction, so maybe it's more to it than just a binutils bug? > > The kernel shouldn't have tried to build that instruction on 8xx, though > I suppose if it's in arch/powerpc/boot, we are a bit too eager at > building everything including what's not relevant, we might to be a bit > more careful at excluding 4xx stuff on a 8xx kernel. It's still a binutils issue. Sounds like the toolchain being used to build the 8xx kernel is specifically built for 8xx. A generally built binutils should have worked fine (assuming it was new enough), since we pass -mcpu=3D405. josh ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-02 12:10 ` Josh Boyer @ 2012-04-02 21:08 ` Benjamin Herrenschmidt 2012-04-02 21:26 ` Josh Boyer 2012-04-04 19:21 ` Wolfgang Denk 1 sibling, 1 reply; 21+ messages in thread From: Benjamin Herrenschmidt @ 2012-04-02 21:08 UTC (permalink / raw) To: Josh Boyer Cc: Frank Svendsbøe, Wolfgang Denk, robert.karl.berger, linuxppc-dev On Mon, 2012-04-02 at 08:10 -0400, Josh Boyer wrote: > On Fri, Mar 30, 2012 at 8:03 PM, Benjamin Herrenschmidt > <benh@kernel.crashing.org> wrote: > > On Sat, 2012-03-31 at 00:53 +0200, Frank Svendsbøe wrote: > > > >> Hi Josh Boyer, > >> > >> just wanted to add that I'm experiencing the same problem that Robert > >> reported, but on 8xx instead of 4xx. The mpc8xx does not support the > >> mfdcrx instruction, so maybe it's more to it than just a binutils bug? > > > > The kernel shouldn't have tried to build that instruction on 8xx, though > > I suppose if it's in arch/powerpc/boot, we are a bit too eager at > > building everything including what's not relevant, we might to be a bit > > more careful at excluding 4xx stuff on a 8xx kernel. > > It's still a binutils issue. Sounds like the toolchain being used to > build the 8xx kernel is specifically built for 8xx. A generally built > binutils should have worked fine (assuming it was new enough), since > we pass -mcpu=405. Still, it makes sense to limit the building of the wrappers to the CPU family of the kernel... Cheers, Ben. ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-02 21:08 ` Benjamin Herrenschmidt @ 2012-04-02 21:26 ` Josh Boyer 0 siblings, 0 replies; 21+ messages in thread From: Josh Boyer @ 2012-04-02 21:26 UTC (permalink / raw) To: Benjamin Herrenschmidt Cc: Frank Svendsbøe, Wolfgang Denk, robert.karl.berger, linuxppc-dev On Mon, Apr 2, 2012 at 5:08 PM, Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote: > On Mon, 2012-04-02 at 08:10 -0400, Josh Boyer wrote: >> On Fri, Mar 30, 2012 at 8:03 PM, Benjamin Herrenschmidt >> <benh@kernel.crashing.org> wrote: >> > On Sat, 2012-03-31 at 00:53 +0200, Frank Svendsb=F8e wrote: >> > >> >> Hi Josh Boyer, >> >> >> >> just wanted to add that I'm experiencing the same problem that Robert >> >> reported, but on 8xx instead of 4xx. The mpc8xx does not support the >> >> mfdcrx instruction, so maybe it's more to it than just a binutils bug= ? >> > >> > The kernel shouldn't have tried to build that instruction on 8xx, thou= gh >> > I suppose if it's in arch/powerpc/boot, we are a bit too eager at >> > building everything including what's not relevant, we might to be a bi= t >> > more careful at excluding 4xx stuff on a 8xx kernel. >> >> It's still a binutils issue. =A0Sounds like the toolchain being used to >> build the 8xx kernel is specifically built for 8xx. =A0A generally built >> binutils should have worked fine (assuming it was new enough), since >> we pass -mcpu=3D405. > > Still, it makes sense to limit the building of the wrappers to the CPU > family of the kernel... Oh, I'm not really disagreeing with that. I think I said as much about 4 years ago, but at the time the prevailing opinion was what we currently have. I never really understood why. Out with the old, in with the sane. josh ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-02 12:10 ` Josh Boyer 2012-04-02 21:08 ` Benjamin Herrenschmidt @ 2012-04-04 19:21 ` Wolfgang Denk 2012-04-05 0:02 ` Stephen Rothwell 1 sibling, 1 reply; 21+ messages in thread From: Wolfgang Denk @ 2012-04-04 19:21 UTC (permalink / raw) To: Josh Boyer; +Cc: linuxppc-dev, robert.karl.berger, Frank Svendsbøe Dear Josh, In message <CA+5PVA6jQgme0sS=i8yYX6b_R5179+BtWPh7QXCGNfoLTCt46A@mail.gmail.com> you wrote: > > > The kernel shouldn't have tried to build that instruction on 8xx, though > > I suppose if it's in arch/powerpc/boot, we are a bit too eager at > > building everything including what's not relevant, we might to be a bit > > more careful at excluding 4xx stuff on a 8xx kernel. > > It's still a binutils issue. Sounds like the toolchain being used to > build the 8xx kernel is specifically built for 8xx. A generally built > binutils should have worked fine (assuming it was new enough), since > we pass -mcpu=405. The problem is the "assuming it was new enough" part. The kernel README says nothing about binutils requirements, the only tool related statement is "Make sure you have at least gcc 3.2 available." Actually I doubt if gcc 3.2 wouldbuild a working kernel image. ELDK 4.2 is based on gcc version 4.2.2 / binutils version 2.17.50.0.12 20070128. This is obviously to old for this code. I do not see an actual problem with that - nobody can expect that we support old tol chain versions forever. But then, I think if we make assumptions about tool versions, we should add appropriate tests and issue helpful error messages. Here, we should issue an error "binutils versions x.y.z or later needed" or similar. 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 I have made mistakes, but have never made the mistake of claiming I never made one. - James G. Bennet ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-04 19:21 ` Wolfgang Denk @ 2012-04-05 0:02 ` Stephen Rothwell 2012-04-05 17:44 ` Wolfgang Denk 0 siblings, 1 reply; 21+ messages in thread From: Stephen Rothwell @ 2012-04-05 0:02 UTC (permalink / raw) To: Wolfgang Denk; +Cc: linuxppc-dev, robert.karl.berger, Frank Svendsbøe [-- Attachment #1: Type: text/plain, Size: 781 bytes --] On Wed, 04 Apr 2012 21:21:01 +0200 Wolfgang Denk <wd@denx.de> wrote: > > The kernel README says nothing about binutils requirements, the only > tool related statement is "Make sure you have at least gcc 3.2 > available." Actually I doubt if gcc 3.2 wouldbuild a working kernel > image. > > ELDK 4.2 is based on gcc version 4.2.2 / binutils version 2.17.50.0.12 > 20070128. This is obviously to old for this code. I do not see an > actual problem with that - nobody can expect that we support old tol > chain versions forever. The requirements are documented in Documentation/Changes where we say we need gcc 3.2 and binutils 2.12. Not that that is very relevant to this discussion. ;-) -- Cheers, Stephen Rothwell sfr@canb.auug.org.au [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-04-05 0:02 ` Stephen Rothwell @ 2012-04-05 17:44 ` Wolfgang Denk 0 siblings, 0 replies; 21+ messages in thread From: Wolfgang Denk @ 2012-04-05 17:44 UTC (permalink / raw) To: Stephen Rothwell; +Cc: linuxppc-dev, robert.karl.berger, Frank Svendsbøe Dear Stephen Rothwell, In message <20120405100228.9ca940aa4739e81540bb2a6f@canb.auug.org.au> you wrote: > > > ELDK 4.2 is based on gcc version 4.2.2 / binutils version 2.17.50.0.12 > > 20070128. This is obviously to old for this code. I do not see an > > actual problem with that - nobody can expect that we support old tol > > chain versions forever. > > The requirements are documented in Documentation/Changes where we say we > need gcc 3.2 and binutils 2.12. Not that that is very relevant to this > discussion. ;-) Indeed. I doubt you can build any working PPC kernel with these old tools. 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 "Consistency requires you to be as ignorant today as you were a year ago." - Bernard Berenson ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-21 12:10 kilauea compilation breaks with v3.3 kernel and ELDK 4.2 Robert Berger 2012-03-21 13:29 ` Josh Boyer @ 2012-03-21 22:14 ` Tony Breeds 2012-03-21 22:34 ` Wolfgang Denk 1 sibling, 1 reply; 21+ messages in thread From: Tony Breeds @ 2012-03-21 22:14 UTC (permalink / raw) To: Robert Berger; +Cc: linuxppc-dev [-- Attachment #1: Type: text/plain, Size: 1018 bytes --] On Wed, Mar 21, 2012 at 02:10:59PM +0200, Robert Berger wrote: > Hi, > > Up to 3.2.x I was able to compile a mainline kernel for the kilauea > board, but... > > http://git.denx.de/?p=linux-denx.git;a=commitdiff;h=075bcf5879225d0c2a119c23d8046b890e051e81 > > shows, that mfdcrx was introduced in the v3.3 kernel. > > The problem is that for ppc-linux-gcc (GCC) 4.2.2 (which comes with the > ELDK 4.2) this assembly instruction is not known and the build breaks. If the instruction is available on your platform but not in your toolchain we can do something ugly (as we hav in the past) and replace "mfdrcx" with ".long xxxx". That will bypass the compiler breakage. > What puzzles me is that also stuff for boards is being compiled which is > not really needed like treeboot-currituck.c even when I configure the > kernel for a kilauea board. Can you either propvide the config file or the name of the config target so I look into why it's enabling the currituck platform. Yours Tony [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: kilauea compilation breaks with v3.3 kernel and ELDK 4.2 2012-03-21 22:14 ` Tony Breeds @ 2012-03-21 22:34 ` Wolfgang Denk 0 siblings, 0 replies; 21+ messages in thread From: Wolfgang Denk @ 2012-03-21 22:34 UTC (permalink / raw) To: Tony Breeds; +Cc: linuxppc-dev, Robert Berger Dear Tony, In message <20120321221402.GA18735@thor.bakeyournoodle.com> you wrote: > > > What puzzles me is that also stuff for boards is being compiled which is > > not really needed like treeboot-currituck.c even when I configure the > > kernel for a kilauea board. > > Can you either propvide the config file or the name of the config target > so I look into why it's enabling the currituck platform. Robert mentioned it in the Subjct: he was building for the Kilauea board, i. e. 40x/kilauea_defconfig 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 I must follow the people. Am I not their leader? - Benjamin Disraeli ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2012-05-17 14:37 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-21 12:10 kilauea compilation breaks with v3.3 kernel and ELDK 4.2 Robert Berger 2012-03-21 13:29 ` Josh Boyer 2012-03-21 16:25 ` Wolfgang Denk 2012-03-24 23:53 ` Benjamin Herrenschmidt 2012-03-26 13:36 ` Josh Boyer 2012-03-30 22:53 ` Frank Svendsbøe 2012-03-31 0:03 ` Benjamin Herrenschmidt 2012-04-01 22:14 ` Frank E. Svendsbøe 2012-04-02 2:01 ` Benjamin Herrenschmidt 2012-04-02 6:28 ` Tony Breeds 2012-04-02 8:37 ` Frank E. Svendsbøe 2012-05-06 14:37 ` Robert Berger 2012-05-17 14:37 ` Frank Svendsbøe 2012-04-02 12:10 ` Josh Boyer 2012-04-02 21:08 ` Benjamin Herrenschmidt 2012-04-02 21:26 ` Josh Boyer 2012-04-04 19:21 ` Wolfgang Denk 2012-04-05 0:02 ` Stephen Rothwell 2012-04-05 17:44 ` Wolfgang Denk 2012-03-21 22:14 ` Tony Breeds 2012-03-21 22:34 ` Wolfgang Denk
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).