Skip to contentSkip to conversation

allow make defconfig to work on non-power machines

PATCH New Simon Horman 1 participant 1 message May 15, 2007 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 allow make defconfig to work on non-power machines

I'm wondering if there is any interest in a patch along the lines of this to allow make defconfig to do something sensible when uname isn't sensible - I noticed this when doing cross-compile builds.

---

 arch/powerpc/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/Makefile +1 -1
Index: linux-2.6/arch/powerpc/Makefile
===================================================================
@@ -35,7 +35,7 @@ endif
 
 export CROSS32CC CROSS32AS CROSS32LD CROSS32AR CROSS32OBJCOPY
 
-KBUILD_DEFCONFIG := $(shell uname -m)_defconfig
+KBUILD_DEFCONFIG := $(shell c=`uname -m`_defconfig; if [ ! -f arch/powerpc/configs/$$c ]; then c=ppc64_defconfig; fi; echo -n $$c)
 
 ifeq ($(CONFIG_PPC64),y)
 OLDARCH	:= ppc64