Skip to contentSkip to conversation

compile quirk linux-2.6.24 (with workaround)

PATCH Bernhard Reiter 5 participants 16 messages Feb 3, 2008 – Mar 3, 2008 PowerPC

lore
Share & tools
lore
#0 lore raw

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"

Signature · 4 lines
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
arch/powerpc/boot/Makefile +2 -2
diff -ur linux-2.6.24-rc7/arch/powerpc/boot/Makefile linux-2.6.24-rc7.new/arch/powerpc/boot/Makefile
@@ -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.

arch/powerpc/Makefile +2 -1
diff -ur linux-2.6.24-rc7/arch/powerpc/Makefile linux-2.6.24-rc7.new/arch/powerpc/Makefile
@@ -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.*)'
#1 lore raw
Quoted 4 lines · Bernhard Reiter

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.

Quoted 8 lines

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

#2 lore raw
Quoted 7 lines · Sven Luther
Quoted 4 lines · Bernhard Reiter

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.

Quoted 5 lines
Quoted 5 lines

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

Quoted 8 lines
Quoted 3 lines

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

Signature · 4 lines
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
#3 lore raw
Quoted 9 lines · Bernhard Reiter
Quoted 4 lines · Sven Luther

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.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#4 lore raw
In reply to Sven Luther
Quoted 13 lines · On Mon, 4 Feb 2008 10:51:21 +0100 Sven Luther <[email protected]> wrote:
Quoted 4 lines · Bernhard Reiter

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.

Quoted 5 lines

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

Quoted 8 lines
Quoted 3 lines

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

#5 lore raw
Quoted 20 lines · Josh Boyer
Quoted 17 lines · On Mon, 4 Feb 2008 10:51:21 +0100 Sven Luther <[email protected]> wrote:
Quoted 4 lines · Bernhard Reiter

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.

Quoted 8 lines

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.

Quoted 6 lines
Quoted 4 lines

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

#6 lore raw
Quoted 26 lines · On Tue, 5 Feb 2008 15:39:26 +0100 Sven Luther <[email protected]> wrote:
Quoted 25 lines · Josh Boyer
Quoted 21 lines · On Mon, 4 Feb 2008 10:51:21 +0100 Sven Luther <[email protected]> wrote:
Quoted 4 lines · Bernhard Reiter

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.

Quoted 8 lines

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 ?

Quoted 4 lines
Quoted 1 line

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.

Quoted 2 lines

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

#7 lore raw
Quoted 10 lines · Josh Boyer
Quoted 2 lines

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.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#8 lore raw
Quoted 9 lines · On Tue, 5 Feb 2008 08:24:38 -0700 "Grant Likely" <[email protected]>…
Quoted 8 lines · Josh Boyer
Quoted 2 lines

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.

Quoted 6 lines
Quoted 2 lines

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

#9 lore raw
Quoted 5 lines · Josh Boyer

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

#10 lore raw
In reply to Josh Boyer
Quoted 3 lines · Josh Boyer
Quoted 3 lines

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

Quoted 2 lines

No it doesn't.  At least not yet.  I said I'd try to come up with a patch soon-ish.

Thanks in advance!

Signature · 4 lines
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
#11 lore raw
In reply to Josh Boyer
Quoted 25 lines · On Tue, 5 Feb 2008 09:38:20 -0600 Josh Boyer <[email protected]> wrote:
Quoted 9 lines · On Tue, 5 Feb 2008 08:24:38 -0700 "Grant Likely" <[email protected]>…
Quoted 8 lines · Josh Boyer
Quoted 2 lines

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.

Quoted 6 lines
Quoted 2 lines

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

Quoted 5 lines

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.

arch/powerpc/boot/Makefile +4 -4
index 63d07cc..e3993a6 100644
@@ -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
#12 lore raw
Quoted 2 lines · Josh Boyer

My apologies for taking so long on this. Digging through gcc history isn't exactly fun :)

No problem. Thanks for tackling the issue.

Quoted 6 lines

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$
Quoted 2 lines

-$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=440
+$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405

Signature · 4 lines
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
#13 lore raw
Quoted 8 lines · Bernhard Reiter
Quoted 6 lines

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

Quoted 11 lines

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$
Quoted 2 lines

-$(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

Signature · 4 lines
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
#14 lore raw
Quoted 6 lines · Bernhard Reiter
Quoted 5 lines · Bernhard Reiter
Quoted 5 lines

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.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

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.

Quoted 6 lines

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.

Signature · 4 lines
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
arch/powerpc/boot/Makefile renamed from arch/powerpc/boot/Makefile.org +2 -2
@@ -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
#15 lore raw
In reply to Bernhard Reiter
Quoted 10 lines · On Sun, 3 Feb 2008 17:29:05 +0100 Bernhard Reiter <[email protected]>…

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

Quoted 7 lines

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