Author: wmb Date: Wed Aug 11 07:39:50 2010 New Revision: 1931 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/1931
Log: ARM - still more tweaking for smooth cross-building.
Added: forth/lib/hostcpu.sh (contents, props changed) Modified: cpu/arm/mmp2/build/Makefile forth/lib/build.sh
Modified: cpu/arm/mmp2/build/Makefile ============================================================================== --- cpu/arm/mmp2/build/Makefile Wed Aug 11 07:17:39 2010 (r1930) +++ cpu/arm/mmp2/build/Makefile Wed Aug 11 07:39:50 2010 (r1931) @@ -1,16 +1,13 @@ OS := $(shell uname) -CPU := $(shell uname -m) - -# We only need to build the native wrapper if we are compiling on an ARM host -ifeq ($(findstring arm,${CPU}),arm) - NATIVEWRAPPER=../../${OS}/forth -endif
BASEDIR= `(cd ../../../..; pwd;)` + +HOSTCPU= $(shell ${BASEDIR}/forth/lib/hostcpu.sh) +BUILDSH= ${BASEDIR}/forth/lib/build.sh + TAGFILES= ../../build/*.tag *.tag CLIENTDIR=../../../../clients CLIENTPROGS= -BUILDSH= ${BASEDIR}/forth/lib/build.sh
all: mmp2.rom tags
@@ -19,11 +16,11 @@ tags: mmp2.tag @${BASEDIR}/forth/lib/toctags ${BASEDIR} ${TAGFILES}
-mmp2.rom: FORCE build ${CLIENTPROGS} ${NATIVEWRAPPER} +mmp2.rom: FORCE build ${CLIENTPROGS} ../../../${HOSTCPU}/${OS}/forth ./build $@
-../../${OS}/forth: - @make -C ../../${OS} forth +../../../${HOSTCPU}/${OS}/forth: + @make -C ../../../${HOSTCPU}/${OS} forth
../../build/inflate.bin: @make -C ../../build inflate.bin
Modified: forth/lib/build.sh ============================================================================== --- forth/lib/build.sh Wed Aug 11 07:17:39 2010 (r1930) +++ forth/lib/build.sh Wed Aug 11 07:39:50 2010 (r1931) @@ -36,19 +36,7 @@ # Set HOSTDIR according to the value of BP and the host system test -n "$HOSTDIR" || { OSNAME=`uname` - MACHNAME=`uname -m` - case ${MACHNAME} in - sun4c) CPUNAME=sparc ;; - sun4u) CPUNAME=sparc ;; - ppc) CPUNAME=powerpc ;; - i386) CPUNAME=x86 ;; - i586) CPUNAME=x86 ;; - i686) CPUNAME=x86 ;; - mips) CPUNAME=mips ;; - arm*) CPUNAME=arm ;; - sun3) CPUNAME=m68k ;; - *) CPUNAME=${MACHNAME} ;; - esac + CPUNAME=`${BP}/forth/lib/hostcpu.sh` } export HOSTDIR=${BP}/cpu/${CPUNAME}/${OSNAME}
Added: forth/lib/hostcpu.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ forth/lib/hostcpu.sh Wed Aug 11 07:39:50 2010 (r1931) @@ -0,0 +1,12 @@ +#!/bin/sh +MACHNAME=`uname -m` +case ${MACHNAME} in + sun4*) CPUNAME=sparc ;; + ppc) CPUNAME=powerpc ;; + i*86) CPUNAME=x86 ;; + mips) CPUNAME=mips ;; + arm*) CPUNAME=arm ;; + sun3) CPUNAME=m68k ;; + *) CPUNAME=${MACHNAME} ;; +esac +echo ${CPUNAME}