From: Erik M. <er...@us...> - 2001-09-23 15:05:06
|
Update of /cvsroot/blob/blob In directory usw-pr-cvs1:/tmp/cvs-serv15061 Modified Files: acconfig.h configure.in Log Message: - add sanity checks for --with-linux-prefix flag to get the number of questions on the mailing list down - remove dead compiler warning check code - remove USE_EDORAM and USE_SDRAM definitions - make clock scaling support optional with the --enable-clock-scaling flag - select proper memory setup object file for SA1100 or SA1110 CPU Index: acconfig.h =================================================================== RCS file: /cvsroot/blob/blob/acconfig.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- acconfig.h 2001/08/06 22:44:51 1.2 +++ acconfig.h 2001/09/23 15:05:03 1.3 @@ -80,12 +80,6 @@ /* Define if your system uses an SA-1110 CPU */ #undef USE_SA1110 -/* Define if your system uses SDRAM */ -#undef USE_SDRAM - -/* Define if your system uses EDO DRAM */ -#undef USE_EDODRAM - /* Define if your sytem uses serial port 1 */ #undef USE_SERIAL1 Index: configure.in =================================================================== RCS file: /cvsroot/blob/blob/configure.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- configure.in 2001/09/18 19:55:29 1.8 +++ configure.in 2001/09/23 15:05:03 1.9 @@ -71,77 +71,116 @@ assabet) AC_MSG_RESULT(Assabet) AC_DEFINE(ASSABET) - AC_DEFINE(USE_SA1110) - AC_DEFINE(USE_SDRAM) AC_DEFINE(USE_SERIAL1) + use_cpu="sa1110" ;; brutus) AC_MSG_RESULT(Brutus) AC_DEFINE(BRUTUS) - AC_DEFINE(USE_SA1100) - AC_DEFINE(USE_EDODRAM) AC_DEFINE(USE_SERIAL3) - CLOCK="clock.o" + use_cpu="sa1100" ;; creditlart) AC_MSG_RESULT(CreditLART) AC_DEFINE(CLART) - AC_DEFINE(USE_SA1110) - AC_DEFINE(USE_SDRAM) AC_DEFINE(USE_SERIAL3) + use_cpu="sa1110" ;; lart) AC_MSG_RESULT(LART) AC_DEFINE(LART) - AC_DEFINE(USE_SA1100) - AC_DEFINE(USE_EDODRAM) AC_DEFINE(USE_SERIAL3) - CLOCK="clock.o" + use_cpu="sa1100" ;; nesa) AC_MSG_RESULT(NESA) AC_DEFINE(NESA) - AC_DEFINE(USE_SA1100) - AC_DEFINE(USE_EDODRAM) AC_DEFINE(USE_SERIAL3) - CLOCK="clock.o" + use_cpu="sa1100" ;; pleb) AC_MSG_RESULT(PLEB) AC_DEFINE(PLEB) - AC_DEFINE(USE_SA1100) - AC_DEFINE(USE_EDODRAM) AC_DEFINE(USE_SERIAL3) - CLOCK="clock.o" + use_cpu="sa1100" ;; shannon) AC_MSG_RESULT(SHANNON) AC_DEFINE(SHANNON) - AC_DEFINE(USE_SA1100) - AC_DEFINE(USE_EDODRAM) AC_DEFINE(USE_SERIAL3) - CLOCK="clock.o" + use_cpu="sa1100" ;; *) AC_MSG_RESULT(unknown) - AC_MSG_WARN([Unknown board name, assuming SA1100 with EDO DRAM and serial 3]) - AC_DEFINE(USE_SA1100) - AC_DEFINE(USE_EDODRAM) + AC_MSG_WARN([Unknown board name, assuming SA1100 with serial 3]) AC_DEFINE(USE_SERIAL3) - CLOCK="clock.o" + use_cpu="sa1100" ;; esac -AC_SUBST(CLOCK) +if test "x$use_cpu" = "xsa1100" ; then + dnl SA1100 CPU: EDORAM memory setup code + MEMSETUP="memsetup-sa1100.o" +elif test "x$use_cpu" = "xsa1110" ; then + dnl SA1110 CPU: SDRAM memory setup code + MEMSETUP="memsetup-sa1110.o" +else + AC_MSG_WARN([No CPU defined!]); + MEMSETUP="" +fi + +AC_SUBST(MEMSETUP) + + + + dnl Find out where the Linux headers are -AC_ARG_WITH(linux-prefix,[ --with-linux-prefix=PFX Prefix where the ArmLinux sources live], +AC_ARG_WITH(linux-prefix,[ --with-linux-prefix=PFX Prefix where the ARM Linux sources live], linux_prefix="$withval", linux_prefix="/usr/src/linux") + +dnl Do some sanity checks +AC_MSG_CHECKING([if the Linux source tree in $linux_prefix is sane]) +if test ! -d "$linux_prefix/include" ; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([$linux_prefix doesn't look like a configured Linux source tree.]) + AC_MSG_ERROR([Please supply a proper prefix with the --with-linux-prefix flag]) + exit -1 +fi +if test ! -f "$linux_prefix/include/asm/setup.h" ; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([The Linux source tree in $linux_prefix is not configured.]) + AC_MSG_ERROR([Please run "make lart_config ; yes no | make old_config" in the]) + AC_MSG_ERROR([Linux source tree and retry.]) + exit -1 +fi +AC_MSG_RESULT([yes]) CFLAGS=`echo $CFLAGS -I${linux_prefix}/include` +dnl Check wether or not clock scaling code is wanted +AC_ARG_ENABLE(clock-scaling, +[ --enable-clock-scaling Enable support for clock scaling (SA1100 only)], +[clock_scaling_flag=$enable_clock_scaling], +[clock_scaling_flag=no]) + +if test "x$clock_scaling_flag" = "xyes" ; then + if test "x$use_cpu" = "xsa1100"; then + CLOCK="clock.o" + else + AC_MSG_WARN([No clock scaling support for SA1110 CPUs, disabling]) + clock_scaling_flag=no + CLOCK="" + fi +fi + +AC_SUBST(CLOCK) + + + + dnl Check for extra debug info AC_ARG_ENABLE(blob-debug, [ --enable-blob-debug Enable run-time debug information], @@ -172,32 +211,6 @@ if test "x$ac_cv_prog_gcc" = "xyes" ; then dnl gcc is the easiest C compiler warning_CFLAGS="-Wall" -else - dnl Vendor supplied C compilers are a bit tricky - case "$host_os" in - dnl SGI IRIX with the MipsPRO C compiler - irix*) - AC_LANG_C - CFLAGS="$CFLAGS -fullwarn" - AC_TRY_COMPILE([#include <stdio.h>],[printf("test");], - warning_CFLAGS="-fullwarn",) - ;; - - dnl SunOS 4.x with the SparcWorks(?) acc compiler - sunos*) - if "$CC" = "acc" ; then - AC_LANG_C - CFLAGS="$CFLAGS -vc" - AC_TRY_COMPILE([#include <stdio.h>],[printf("test");], - warning_CFLAGS="-vc",) - fi - ;; - - dnl Unknown, do nothing - *) - warning_CFLAGS="none" - ;; - esac fi AC_LANG_RESTORE CFLAGS="$ac_save_CFLAGS" @@ -238,5 +251,6 @@ echo "Linker flags ${LDFLAGS}" echo "Objcopy tool ${OBJCOPY}" echo "Objcopy flags ${OCFLAGS}" +echo "Clock scaling support ${clock_scaling_flag}" echo "Run-time debug information ${blob_debug_flag}" echo "" |