Skip to contentSkip to conversation

powerpc: proper defconfig for crosscompiles

PATCH In review Adrian Bunk 3 participants 3 messages Sep 9, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc: proper defconfig for crosscompiles

The trick for finding the right defconfig is neat, but you forgot to provide an i686_defconfig. ;-)

More seriously, cross compiling the defconfig is often useful, e.g. for testing the compilation of patches that touch multiple architectures, and this patch therefore chooses g5_defconfig if $(CROSS_COMPILE) is non-empty.

---
0b0e6e0e3a16f48348cb9c40ef1bb55ef42f92eb

arch/powerpc/Makefile +4 -0
index 2065138..a39bac4 100644
@@ -35,7 +35,11 @@ endif
 
 export CROSS32CC CROSS32AS CROSS32LD CROSS32AR CROSS32OBJCOPY
 
+ifeq ($(CROSS_COMPILE),)
 KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
+else
+KBUILD_DEFCONFIG := g5_defconfig
+endif
 
 ifeq ($(CONFIG_PPC64),y)
 OLDARCH	:= ppc64
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Adrian Bunk

The trick for finding the right defconfig is neat, but you forgot to provide an i686_defconfig. ;-)

More seriously, cross compiling the defconfig is often useful, e.g. for testing the compilation of patches that touch multiple architectures, and this patch therefore chooses g5_defconfig if $(CROSS_COMPILE) is non-empty.

Thanks - much appreciated.

Sam

#2 lore raw
In reply to Adrian Bunk
Quoted 7 lines · Adrian Bunk

The trick for finding the right defconfig is neat, but you forgot to provide an i686_defconfig. ;-)

More seriously, cross compiling the defconfig is often useful, e.g. for testing the compilation of patches that touch multiple architectures, and this patch therefore chooses g5_defconfig if $(CROSS_COMPILE) is non-empty.

You should probably use ppc64_defconfig instead, since it's the "superset" config that will compile a multiplatform kernel.

-Olof