* compile quirk linux-2.6.24 (with workaround)
@ 2008-02-03 16:29 Bernhard Reiter
2008-02-04 9:51 ` Sven Luther
2008-02-04 21:01 ` Josh Boyer
0 siblings, 2 replies; 16+ messages in thread
From: Bernhard Reiter @ 2008-02-03 16:29 UTC (permalink / raw)
To: debian-powerpc; +Cc: paulus, linuxppc-dev
[-- Attachment #1.1: Type: text/plain, Size: 2481 bytes --]
Dear linux powerpc Maintainers and Users,
recently I have tried to compile a new kernel on a Debian sarge ppc
system (PowerBook5,6 MacRISC3 Power Macintosh).
The build system bailed out with
BOOTCC arch/powerpc/boot/4xx.o
cc1: error: bad value (440) for -mcpu= switch
make[1]: *** [arch/powerpc/boot/4xx.o] Fehler 1
I have tracked this a few steps and the attached patch made the compile for me
as my compiler gcc-Version 3.3.5 (Debian 1:3.3.5-13)
cannot produce code for 4xx it seems.
The "ARCH=ppc64" I have came about also looked wrong, but I do not know
if this part of the patch is really necessary.
It is just a workaround, as I have no insight of what is really going wrong.
I hope my report is useful,
Bernhard
Details:
I have used "make oldconfig" with a 2.6.17 kernel and answered some questions.
Here is the first section of the .config I've ended up with:
# CONFIG_PPC64 is not set
#
# Processor support
#
CONFIG_6xx=y
# CONFIG_PPC_85xx is not set
# CONFIG_PPC_8xx is not set
# CONFIG_40x is not set
# CONFIG_44x is not set
# CONFIG_E200 is not set
CONFIG_PPC_FPU=y
CONFIG_ALTIVEC=y
CONFIG_PPC_STD_MMU=y
CONFIG_PPC_STD_MMU_32=y
# CONFIG_PPC_MM_SLICES is not set
# CONFIG_SMP is not set
CONFIG_PPC32=y
CONFIG_WORD_SIZE=32
CONFIG_PPC_MERGE=y
CONFIG_MMU=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_GENERIC_TIME=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
CONFIG_IRQ_PER_CPU=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
CONFIG_PPC=y
CONFIG_EARLY_PRINTK=y
CONFIG_GENERIC_NVRAM=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_PPC_OF=y
CONFIG_OF=y
CONFIG_PPC_UDBG_16550=y
# CONFIG_GENERIC_TBSYNC is not set
CONFIG_AUDIT_ARCH=y
CONFIG_GENERIC_BUG=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
# CONFIG_DEFAULT_UIMAGE is not set
# CONFIG_PPC_DCR_NATIVE is not set
# CONFIG_PPC_DCR_MMIO is not set
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
[-- Attachment #1.2: linux-2.6.24-rc7.fix.diff --]
[-- Type: text/x-diff, Size: 1960 bytes --]
diff -ur linux-2.6.24-rc7/arch/powerpc/boot/Makefile linux-2.6.24-rc7.new/arch/powerpc/boot/Makefile
--- linux-2.6.24-rc7/arch/powerpc/boot/Makefile 2008-01-20 21:31:13.544357150 +0100
+++ linux-2.6.24-rc7.new/arch/powerpc/boot/Makefile 2008-01-15 00:05:14.935750138 +0100
@@ -49,13 +49,13 @@
src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
ns16550.c serial.c simple_alloc.c div64.S util.S \
gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
- 4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.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
src-plat := of.c cuboot-52xx.c cuboot-83xx.c cuboot-85xx.c holly.c \
cuboot-ebony.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-pq2.c cuboot-sequoia.c cuboot-bamboo.c \
fixed-head.S ep88xc.c cuboot-hpc2.c
src-boot := $(src-wlib) $(src-plat) empty.c
Nur in linux-2.6.24-rc7.new/arch/powerpc/boot: zImage.coff.
Nur in linux-2.6.24-rc7.new/arch/powerpc/boot: zImage.miboot.
Nur in linux-2.6.24-rc7.new/arch/powerpc/kernel: vmlinux.lds.
diff -ur linux-2.6.24-rc7/arch/powerpc/Makefile linux-2.6.24-rc7.new/arch/powerpc/Makefile
--- linux-2.6.24-rc7/arch/powerpc/Makefile 2008-01-20 21:31:13.524359050 +0100
+++ linux-2.6.24-rc7.new/arch/powerpc/Makefile 2008-01-14 23:48:30.583750138 +0100
@@ -165,7 +165,8 @@
boot := arch/$(ARCH)/boot
$(BOOT_TARGETS): vmlinux
- $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
+ $(Q)$(MAKE) ARCH=powerpc $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
+# $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
define archhelp
@echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage.*)'
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-03 16:29 compile quirk linux-2.6.24 (with workaround) Bernhard Reiter
@ 2008-02-04 9:51 ` Sven Luther
2008-02-04 10:26 ` Bernhard Reiter
2008-02-05 13:08 ` Josh Boyer
2008-02-04 21:01 ` Josh Boyer
1 sibling, 2 replies; 16+ messages in thread
From: Sven Luther @ 2008-02-04 9:51 UTC (permalink / raw)
To: Bernhard Reiter; +Cc: debian-powerpc, paulus, linuxppc-dev
On Sun, Feb 03, 2008 at 05:29:05PM +0100, Bernhard Reiter wrote:
> Dear linux powerpc Maintainers and Users,
>
> recently I have tried to compile a new kernel on a Debian sarge ppc
> system (PowerBook5,6 MacRISC3 Power Macintosh).
This is a G4 based system.
> The build system bailed out with
> BOOTCC arch/powerpc/boot/4xx.o
> cc1: error: bad value (440) for -mcpu= switch
> make[1]: *** [arch/powerpc/boot/4xx.o] Fehler 1
>
> I have tracked this a few steps and the attached patch made the compile for me
> as my compiler gcc-Version 3.3.5 (Debian 1:3.3.5-13)
> cannot produce code for 4xx it seems.
You should normally not need to build the 4xx bootloader part. Make sure
that, i don't know why this happens. Can you look into
arch/powerpc/boot/Makefile, to see what option enables the 4xx build,
and make sure it is disabled in the main config ?
Please bounce this message to debian-powerpc, as debian believes in
censorship instead of trying to solve inimity by discussion.
Friendly,
Sven Luther
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-04 9:51 ` Sven Luther
@ 2008-02-04 10:26 ` Bernhard Reiter
2008-02-04 17:34 ` Grant Likely
2008-02-05 13:08 ` Josh Boyer
1 sibling, 1 reply; 16+ messages in thread
From: Bernhard Reiter @ 2008-02-04 10:26 UTC (permalink / raw)
To: Sven Luther; +Cc: debian-powerpc, paulus, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]
On Monday 04 February 2008 10:51, Sven Luther wrote:
> On Sun, Feb 03, 2008 at 05:29:05PM +0100, Bernhard Reiter wrote:
> > Dear linux powerpc Maintainers and Users,
> >
> > recently I have tried to compile a new kernel on a Debian sarge ppc
> > system (PowerBook5,6 MacRISC3 Power Macintosh).
>
> This is a G4 based system.
Yes.
> > The build system bailed out with
> > BOOTCC arch/powerpc/boot/4xx.o
> > cc1: error: bad value (440) for -mcpu= switch
> > make[1]: *** [arch/powerpc/boot/4xx.o] Fehler 1
> >
> > I have tracked this a few steps and the attached patch made the compile
> > for me as my compiler gcc-Version 3.3.5 (Debian 1:3.3.5-13)
> > cannot produce code for 4xx it seems.
>
> You should normally not need to build the 4xx bootloader part. Make sure
> that, i don't know why this happens. Can you look into
> arch/powerpc/boot/Makefile, to see what option enables the 4xx build,
> and make sure it is disabled in the main config ?
I have tried to do this, but it looks like it is just hardcoded into the
Makefile as you can see from the patch. There is probably more that I do not
understand - thus my report with on the workaround.
Bernhard
--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-04 10:26 ` Bernhard Reiter
@ 2008-02-04 17:34 ` Grant Likely
0 siblings, 0 replies; 16+ messages in thread
From: Grant Likely @ 2008-02-04 17:34 UTC (permalink / raw)
To: Bernhard Reiter, David Gibson; +Cc: linuxppc-dev, debian-powerpc, paulus
On 2/4/08, Bernhard Reiter <bernhard@intevation.de> wrote:
> On Monday 04 February 2008 10:51, Sven Luther wrote:
> > You should normally not need to build the 4xx bootloader part. Make sure
> > that, i don't know why this happens. Can you look into
> > arch/powerpc/boot/Makefile, to see what option enables the 4xx build,
> > and make sure it is disabled in the main config ?
>
> I have tried to do this, but it looks like it is just hardcoded into the
> Makefile as you can see from the patch. There is probably more that I do not
> understand - thus my report with on the workaround.
The policy decision was made early on to build all of the bootwrapper
bits regardless of whether they are needed by the configured platform
or not. AFAIK the reason for this is to increase the variety of
platforms and compilers for with the bootwrapper bits are tested on.
Unfortunately, there are bits of 4xx bootwrappers which require
processor specific instructions for manipulating the cache and DCR.
If we're supporting compilers which don't have 440 support, then we'll
need to disable the build of those bits when they aren't needed, but I
don't know the best way to go about this. David, thoughts?
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-03 16:29 compile quirk linux-2.6.24 (with workaround) Bernhard Reiter
2008-02-04 9:51 ` Sven Luther
@ 2008-02-04 21:01 ` Josh Boyer
1 sibling, 0 replies; 16+ messages in thread
From: Josh Boyer @ 2008-02-04 21:01 UTC (permalink / raw)
To: Bernhard Reiter; +Cc: linuxppc-dev, debian-powerpc, paulus
On Sun, 3 Feb 2008 17:29:05 +0100
Bernhard Reiter <bernhard@intevation.de> wrote:
> Dear linux powerpc Maintainers and Users,
>
> recently I have tried to compile a new kernel on a Debian sarge ppc
> system (PowerBook5,6 MacRISC3 Power Macintosh).
>
> The build system bailed out with
> BOOTCC arch/powerpc/boot/4xx.o
> cc1: error: bad value (440) for -mcpu= switch
> make[1]: *** [arch/powerpc/boot/4xx.o] Fehler 1
>
> I have tracked this a few steps and the attached patch made the compile for me
> as my compiler gcc-Version 3.3.5 (Debian 1:3.3.5-13)
> cannot produce code for 4xx it seems.
>
> The "ARCH=ppc64" I have came about also looked wrong, but I do not know
> if this part of the patch is really necessary.
> It is just a workaround, as I have no insight of what is really going wrong.
That patch really won't fly. I'll try go come up with something a bit
more robust when I can.
josh
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-04 9:51 ` Sven Luther
2008-02-04 10:26 ` Bernhard Reiter
@ 2008-02-05 13:08 ` Josh Boyer
2008-02-05 14:39 ` Sven Luther
1 sibling, 1 reply; 16+ messages in thread
From: Josh Boyer @ 2008-02-05 13:08 UTC (permalink / raw)
To: Sven Luther; +Cc: linuxppc-dev, Bernhard Reiter, debian-powerpc, paulus
On Mon, 4 Feb 2008 10:51:21 +0100
Sven Luther <sven@powerlinux.fr> wrote:
> On Sun, Feb 03, 2008 at 05:29:05PM +0100, Bernhard Reiter wrote:
> > Dear linux powerpc Maintainers and Users,
> >
> > recently I have tried to compile a new kernel on a Debian sarge ppc
> > system (PowerBook5,6 MacRISC3 Power Macintosh).
>
> This is a G4 based system.
>
> > The build system bailed out with
> > BOOTCC arch/powerpc/boot/4xx.o
> > cc1: error: bad value (440) for -mcpu= switch
> > make[1]: *** [arch/powerpc/boot/4xx.o] Fehler 1
> >
> > I have tracked this a few steps and the attached patch made the compile for me
> > as my compiler gcc-Version 3.3.5 (Debian 1:3.3.5-13)
> > cannot produce code for 4xx it seems.
>
> You should normally not need to build the 4xx bootloader part. Make sure
> that, i don't know why this happens. Can you look into
> arch/powerpc/boot/Makefile, to see what option enables the 4xx build,
> and make sure it is disabled in the main config ?
That's not true. All the wrapper bits are built for every board always.
josh
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-05 13:08 ` Josh Boyer
@ 2008-02-05 14:39 ` Sven Luther
2008-02-05 15:15 ` Josh Boyer
0 siblings, 1 reply; 16+ messages in thread
From: Sven Luther @ 2008-02-05 14:39 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Bernhard Reiter, debian-powerpc, paulus
On Tue, Feb 05, 2008 at 07:08:33AM -0600, Josh Boyer wrote:
> On Mon, 4 Feb 2008 10:51:21 +0100
> Sven Luther <sven@powerlinux.fr> wrote:
>
> > On Sun, Feb 03, 2008 at 05:29:05PM +0100, Bernhard Reiter wrote:
> > > Dear linux powerpc Maintainers and Users,
> > >
> > > recently I have tried to compile a new kernel on a Debian sarge ppc
> > > system (PowerBook5,6 MacRISC3 Power Macintosh).
> >
> > This is a G4 based system.
> >
> > > The build system bailed out with
> > > BOOTCC arch/powerpc/boot/4xx.o
> > > cc1: error: bad value (440) for -mcpu= switch
> > > make[1]: *** [arch/powerpc/boot/4xx.o] Fehler 1
> > >
> > > I have tracked this a few steps and the attached patch made the compile for me
> > > as my compiler gcc-Version 3.3.5 (Debian 1:3.3.5-13)
> > > cannot produce code for 4xx it seems.
> >
> > You should normally not need to build the 4xx bootloader part. Make sure
> > that, i don't know why this happens. Can you look into
> > arch/powerpc/boot/Makefile, to see what option enables the 4xx build,
> > and make sure it is disabled in the main config ?
>
> That's not true. All the wrapper bits are built for every board always.
Yes, which is why it fails. But Should they not be conditionally built
upon including support or not for the actual board ?
I mean, if you have not included 4xx support in the kernel, as is the
case here, it does not make sense to add the 4xx bootwrapper code, no ?
Friendly,
Sven Luther
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-05 14:39 ` Sven Luther
@ 2008-02-05 15:15 ` Josh Boyer
2008-02-05 15:24 ` Grant Likely
0 siblings, 1 reply; 16+ messages in thread
From: Josh Boyer @ 2008-02-05 15:15 UTC (permalink / raw)
To: Sven Luther; +Cc: linuxppc-dev, Bernhard Reiter, debian-powerpc, paulus
On Tue, 5 Feb 2008 15:39:26 +0100
Sven Luther <sven@powerlinux.fr> wrote:
> On Tue, Feb 05, 2008 at 07:08:33AM -0600, Josh Boyer wrote:
> > On Mon, 4 Feb 2008 10:51:21 +0100
> > Sven Luther <sven@powerlinux.fr> wrote:
> >
> > > On Sun, Feb 03, 2008 at 05:29:05PM +0100, Bernhard Reiter wrote:
> > > > Dear linux powerpc Maintainers and Users,
> > > >
> > > > recently I have tried to compile a new kernel on a Debian sarge ppc
> > > > system (PowerBook5,6 MacRISC3 Power Macintosh).
> > >
> > > This is a G4 based system.
> > >
> > > > The build system bailed out with
> > > > BOOTCC arch/powerpc/boot/4xx.o
> > > > cc1: error: bad value (440) for -mcpu= switch
> > > > make[1]: *** [arch/powerpc/boot/4xx.o] Fehler 1
> > > >
> > > > I have tracked this a few steps and the attached patch made the compile for me
> > > > as my compiler gcc-Version 3.3.5 (Debian 1:3.3.5-13)
> > > > cannot produce code for 4xx it seems.
> > >
> > > You should normally not need to build the 4xx bootloader part. Make sure
> > > that, i don't know why this happens. Can you look into
> > > arch/powerpc/boot/Makefile, to see what option enables the 4xx build,
> > > and make sure it is disabled in the main config ?
> >
> > That's not true. All the wrapper bits are built for every board always.
>
> Yes, which is why it fails. But Should they not be conditionally built
> upon including support or not for the actual board ?
One would think so.
> I mean, if you have not included 4xx support in the kernel, as is the
> case here, it does not make sense to add the 4xx bootwrapper code, no ?
It does, in a manner. There are both generic and platform specific
pieces to the bootwrapper. Having everything always built helps keep
the generic bits from breaking, which is important as they're often
tightly coupled. That's at least the reason I can think of.
The powerpc maintainers have been over this quite a bit and I don't see
it changing anytime soon.
josh
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-05 15:15 ` Josh Boyer
@ 2008-02-05 15:24 ` Grant Likely
2008-02-05 15:38 ` Josh Boyer
0 siblings, 1 reply; 16+ messages in thread
From: Grant Likely @ 2008-02-05 15:24 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Bernhard Reiter, debian-powerpc, paulus
On 2/5/08, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> > I mean, if you have not included 4xx support in the kernel, as is the
> > case here, it does not make sense to add the 4xx bootwrapper code, no ?
>
> It does, in a manner. There are both generic and platform specific
> pieces to the bootwrapper. Having everything always built helps keep
> the generic bits from breaking, which is important as they're often
> tightly coupled. That's at least the reason I can think of.
>
> The powerpc maintainers have been over this quite a bit and I don't see
> it changing anytime soon.
That would mean we're dropping support for compilers which can't build
405/440 specific wrapper bits (or other core specific quirks that need
to go in the wrapper) That doesn't sound appropriate to me.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-05 15:24 ` Grant Likely
@ 2008-02-05 15:38 ` Josh Boyer
2008-02-05 16:10 ` Olof Johansson
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Josh Boyer @ 2008-02-05 15:38 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev, Bernhard Reiter, debian-powerpc, paulus
On Tue, 5 Feb 2008 08:24:38 -0700
"Grant Likely" <grant.likely@secretlab.ca> wrote:
> On 2/5/08, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> > > I mean, if you have not included 4xx support in the kernel, as is the
> > > case here, it does not make sense to add the 4xx bootwrapper code, no ?
> >
> > It does, in a manner. There are both generic and platform specific
> > pieces to the bootwrapper. Having everything always built helps keep
> > the generic bits from breaking, which is important as they're often
> > tightly coupled. That's at least the reason I can think of.
> >
> > The powerpc maintainers have been over this quite a bit and I don't see
> > it changing anytime soon.
>
> That would mean we're dropping support for compilers which can't build
> 405/440 specific wrapper bits (or other core specific quirks that need
> to go in the wrapper) That doesn't sound appropriate to me.
No it doesn't. At least not yet. I said I'd try to come up with a
patch soon-ish. We haven't failed!(yet) Also, this isn't a
core-specific quirk. It's an architected instruction of Book III-E in
the PowerPC ISA. I can't help it if other chips don't implement this
wonderful control mechanism ;)
Taking a step back though, there will always be odd cases like this as
we move forward. Toolchain XXX will eventually not support instruction
YYYY which will eventually be used, etc. I'll try to make this
specific case work because it's scope is quite limited. But this
problem as a whole will still remain.
josh
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-05 15:38 ` Josh Boyer
@ 2008-02-05 16:10 ` Olof Johansson
2008-02-06 10:07 ` Bernhard Reiter
2008-02-19 2:52 ` Josh Boyer
2 siblings, 0 replies; 16+ messages in thread
From: Olof Johansson @ 2008-02-05 16:10 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, Bernhard Reiter, debian-powerpc, paulus
On Tue, Feb 05, 2008 at 09:38:20AM -0600, Josh Boyer wrote:
> Taking a step back though, there will always be odd cases like this as
> we move forward. Toolchain XXX will eventually not support instruction
> YYYY which will eventually be used, etc. I'll try to make this
> specific case work because it's scope is quite limited. But this
> problem as a whole will still remain.
Worst case, if it's only a couple of instructions, they could be covered
the way we usually handle new instructions in the ISA: make a macro for
them and hand-encode them.
See real_205_{read,write}b() in arch/powerpc/kernel/misc_64.S for
example.
-Olof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-05 15:38 ` Josh Boyer
2008-02-05 16:10 ` Olof Johansson
@ 2008-02-06 10:07 ` Bernhard Reiter
2008-02-19 2:52 ` Josh Boyer
2 siblings, 0 replies; 16+ messages in thread
From: Bernhard Reiter @ 2008-02-06 10:07 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, debian-powerpc, paulus
[-- Attachment #1: Type: text/plain, Size: 983 bytes --]
On Tuesday 05 February 2008 16:38, Josh Boyer wrote:
> > That would mean we're dropping support for compilers which can't build
> > 405/440 specific wrapper bits (or other core specific quirks that need
> > to go in the wrapper) That doesn't sound appropriate to me.
I agree.
Note that dropping support for these compilers will raise the hurdle to
compile kernels, which might lead to less testing of the whole kernel. This
effect would probably eat up the advantages of better testing by always
building the whole source. So I do not recommend it. :)
> No it doesn't. At least not yet. I said I'd try to come up with a
> patch soon-ish.
Thanks in advance!
--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-05 15:38 ` Josh Boyer
2008-02-05 16:10 ` Olof Johansson
2008-02-06 10:07 ` Bernhard Reiter
@ 2008-02-19 2:52 ` Josh Boyer
2008-02-22 14:50 ` Bernhard Reiter
2 siblings, 1 reply; 16+ messages in thread
From: Josh Boyer @ 2008-02-19 2:52 UTC (permalink / raw)
To: Josh Boyer; +Cc: linuxppc-dev, debian-powerpc, paulus, Bernhard Reiter
On Tue, 5 Feb 2008 09:38:20 -0600
Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> On Tue, 5 Feb 2008 08:24:38 -0700
> "Grant Likely" <grant.likely@secretlab.ca> wrote:
>
> > On 2/5/08, Josh Boyer <jwboyer@linux.vnet.ibm.com> wrote:
> > > > I mean, if you have not included 4xx support in the kernel, as is the
> > > > case here, it does not make sense to add the 4xx bootwrapper code, no ?
> > >
> > > It does, in a manner. There are both generic and platform specific
> > > pieces to the bootwrapper. Having everything always built helps keep
> > > the generic bits from breaking, which is important as they're often
> > > tightly coupled. That's at least the reason I can think of.
> > >
> > > The powerpc maintainers have been over this quite a bit and I don't see
> > > it changing anytime soon.
> >
> > That would mean we're dropping support for compilers which can't build
> > 405/440 specific wrapper bits (or other core specific quirks that need
> > to go in the wrapper) That doesn't sound appropriate to me.
>
> No it doesn't. At least not yet. I said I'd try to come up with a
> patch soon-ish. We haven't failed!(yet) Also, this isn't a
> core-specific quirk. It's an architected instruction of Book III-E in
> the PowerPC ISA. I can't help it if other chips don't implement this
> wonderful control mechanism ;)
>
> Taking a step back though, there will always be odd cases like this as
> we move forward. Toolchain XXX will eventually not support instruction
> YYYY which will eventually be used, etc. I'll try to make this
> specific case work because it's scope is quite limited. But this
> problem as a whole will still remain.
My apologies for taking so long on this. Digging through gcc history
isn't exactly fun :)
Ok, so it seems -mcpu=440 was added in gcc 3.4. The -mcpu=405 option
has been around since 2001. Seeing as how there really isn't anything
440 specific in the files effected, we should be able to pass -mcpu=405
for everything and have it still work.
Bernhard, can you try the patch below? I've compile test it, and
booted it on an Ebony board (PowerPC 440GP). If anyone else cares to
test that would also be welcome.
josh
[POWERPC] Fix bootwrapper builds with older gcc versions
GCC versions before 3.4 did not support the -mcpu=440 option. Use
-mcpu=405 for the 4xx specific bootwrapper files, as that has been
around for much longer.
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 63d07cc..e3993a6 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -35,10 +35,10 @@ endif
BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj) -I$(srctree)/$(src)/libfdt
-$(obj)/4xx.o: BOOTCFLAGS += -mcpu=440
-$(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
-$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
-$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
+$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
+$(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
+$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
+$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-19 2:52 ` Josh Boyer
@ 2008-02-22 14:50 ` Bernhard Reiter
2008-02-25 11:56 ` Bernhard Reiter
0 siblings, 1 reply; 16+ messages in thread
From: Bernhard Reiter @ 2008-02-22 14:50 UTC (permalink / raw)
To: debian-powerpc; +Cc: linuxppc-dev, paulus
[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]
On Tuesday 19 February 2008 03:52, Josh Boyer wrote:
> My apologies for taking so long on this. Digging through gcc history
> isn't exactly fun :)
No problem. Thanks for tackling the issue.
> Ok, so it seems -mcpu=440 was added in gcc 3.4. The -mcpu=405 option
> has been around since 2001. Seeing as how there really isn't anything
> 440 specific in the files effected, we should be able to pass -mcpu=405
> for everything and have it still work.
>
> Bernhard, can you try the patch below?
I will test it in the next days.
The short test for my sarge compiler makes me optimistic:
dpkg -l gcc | grep gcc
ii gcc 3.3.5-3 The GNU C compiler
bernhard@burn:~/tmp$ gcc -mcpu=440 x.c
cc1: error: bad value (440) for -mcpu= switch
bernhard@burn:~/tmp$ gcc -mcpu=405 x.c
bernhard@burn:~/tmp$
> -$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
> +$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-22 14:50 ` Bernhard Reiter
@ 2008-02-25 11:56 ` Bernhard Reiter
2008-03-03 17:26 ` Bernhard Reiter
0 siblings, 1 reply; 16+ messages in thread
From: Bernhard Reiter @ 2008-02-25 11:56 UTC (permalink / raw)
To: debian-powerpc; +Cc: linuxppc-dev, paulus
[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]
On Friday 22 February 2008 15:50, Bernhard Reiter wrote:
> > Ok, so it seems -mcpu=440 was added in gcc 3.4. The -mcpu=405 option
> > has been around since 2001. Seeing as how there really isn't anything
> > 440 specific in the files effected, we should be able to pass -mcpu=405
> > for everything and have it still work.
> >
> > Bernhard, can you try the patch below?
>
> I will test it in the next days.
Done. Looks good.
(I did _not_ do a full rebuild and installation, only a build test.
I will do a full blown test with 2.6.24.3.)
> The short test for my sarge compiler makes me optimistic:
>
> dpkg -l gcc | grep gcc
> ii gcc 3.3.5-3 The GNU C compiler
> bernhard@burn:~/tmp$ gcc -mcpu=440 x.c
> cc1: error: bad value (440) for -mcpu= switch
> bernhard@burn:~/tmp$ gcc -mcpu=405 x.c
> bernhard@burn:~/tmp$
>
> > -$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
> > +$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
Note: Your original did not fully apply, I think it had lines like
-$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
-$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
which I did not have in my 2.6.24.
Probably because you've used a git version of linux.
What I did was to change the similiar occurances from 440 to 405.
Bernhard
--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: compile quirk linux-2.6.24 (with workaround)
2008-02-25 11:56 ` Bernhard Reiter
@ 2008-03-03 17:26 ` Bernhard Reiter
0 siblings, 0 replies; 16+ messages in thread
From: Bernhard Reiter @ 2008-03-03 17:26 UTC (permalink / raw)
To: debian-powerpc; +Cc: linuxppc-dev, paulus
[-- Attachment #1.1: Type: text/plain, Size: 1338 bytes --]
On Monday 25 February 2008 12:56, Bernhard Reiter wrote:
> On Friday 22 February 2008 15:50, Bernhard Reiter wrote:
> > > Ok, so it seems -mcpu=440 was added in gcc 3.4. The -mcpu=405 option
> > > has been around since 2001. Seeing as how there really isn't anything
> > > 440 specific in the files effected, we should be able to pass -mcpu=405
> > > for everything and have it still work.
> > >
> > > Bernhard, can you try the patch below?
> >
> > I will test it in the next days.
>
> Done. Looks good.
> (I did _not_ do a full rebuild and installation, only a build test.
> I will do a full blown test with 2.6.24.3.)
Worked fine for me with the attached patch.
Thanks again.
> Note: Your original did not fully apply, I think it had lines like
> -$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=440
> -$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
> which I did not have in my 2.6.24.
> Probably because you've used a git version of linux.
> What I did was to change the similiar occurances from 440 to 405.
--
Managing Director - Owner: www.intevation.net (Free Software Company)
Germany Coordinator: fsfeurope.org. Coordinator: www.Kolab-Konsortium.com.
Intevation GmbH, Osnabrück, DE; Amtsgericht Osnabrück, HRB 18998
Geschäftsführer Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
[-- Attachment #1.2: linux-2.4.24-fix-ppcbuild-josh-boyer2.diff --]
[-- Type: text/x-diff, Size: 506 bytes --]
--- linux-2.6.24.3/arch/powerpc/boot/Makefile.org 2008-02-26 22:48:00.709872603 +0100
+++ linux-2.6.24.3/arch/powerpc/boot/Makefile 2008-02-26 22:48:17.509876780 +0100
@@ -35,8 +35,8 @@
BOOTCFLAGS += -I$(obj) -I$(srctree)/$(obj)
-$(obj)/4xx.o: BOOTCFLAGS += -mcpu=440
-$(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
+$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
+$(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
zlib := inffast.c inflate.c inftrees.c
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-03-03 17:27 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-03 16:29 compile quirk linux-2.6.24 (with workaround) Bernhard Reiter
2008-02-04 9:51 ` Sven Luther
2008-02-04 10:26 ` Bernhard Reiter
2008-02-04 17:34 ` Grant Likely
2008-02-05 13:08 ` Josh Boyer
2008-02-05 14:39 ` Sven Luther
2008-02-05 15:15 ` Josh Boyer
2008-02-05 15:24 ` Grant Likely
2008-02-05 15:38 ` Josh Boyer
2008-02-05 16:10 ` Olof Johansson
2008-02-06 10:07 ` Bernhard Reiter
2008-02-19 2:52 ` Josh Boyer
2008-02-22 14:50 ` Bernhard Reiter
2008-02-25 11:56 ` Bernhard Reiter
2008-03-03 17:26 ` Bernhard Reiter
2008-02-04 21:01 ` Josh Boyer
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).