[svn-commits] tzafrir: branch tzafrir/kernelmove r2317 - in /team/tzafrir/kernelmove: ./ bu...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Mar 16 19:08:11 MST 2007


Author: tzafrir
Date: Fri Mar 16 21:08:10 2007
New Revision: 2317

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2317
Log:
Detect the architecture of the kernel object at configure time rather than
at build time.
* Removed the unnecessary dependency of the firmware object on the base object.
* The cc command I used in the configure script is probably incorrect. I guess
  I'll find the right one when this will be tested by a cross-compiler.

Modified:
    team/tzafrir/kernelmove/build_tools/   (props changed)
    team/tzafrir/kernelmove/build_tools/make_firmware_object.in
    team/tzafrir/kernelmove/configure
    team/tzafrir/kernelmove/configure.ac
    team/tzafrir/kernelmove/firmware/Makefile

Propchange: team/tzafrir/kernelmove/build_tools/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Mar 16 21:08:10 2007
@@ -1,1 +1,2 @@
 menuselect-deps
+make_firmware_object

Modified: team/tzafrir/kernelmove/build_tools/make_firmware_object.in
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove/build_tools/make_firmware_object.in?view=diff&rev=2317&r1=2316&r2=2317
==============================================================================
--- team/tzafrir/kernelmove/build_tools/make_firmware_object.in (original)
+++ team/tzafrir/kernelmove/build_tools/make_firmware_object.in Fri Mar 16 21:08:10 2007
@@ -6,7 +6,7 @@
 #   2 - output file
 #   3 - template output file (used to learn desired format)
 
-bfdname=`LANG=C objdump -f ${3} | grep -e "${3}:" | sed "s/.*file format \(.*\)/\1/"`
-bfdarch=`LANG=C objdump -f ${3} | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`
+bfdname=@bfdname@
+bfdarch=@bfdarch@
 
 objcopy -I binary ${1} -B ${bfdarch} -O ${bfdname} ${2} --rename-section .data=.rodata,alloc,load,data,contents,readonly

Modified: team/tzafrir/kernelmove/configure
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove/configure?view=diff&rev=2317&r1=2316&r2=2317
==============================================================================
--- team/tzafrir/kernelmove/configure (original)
+++ team/tzafrir/kernelmove/configure Fri Mar 16 21:08:10 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 2108 .
+# From configure.ac Revision: 2162 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -673,6 +673,8 @@
 WGET
 FETCH
 DOWNLOAD
+bfdname
+bfdarch
 EGREP
 CURSES_LIB
 CURSES_INCLUDE
@@ -3253,6 +3255,23 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+_ACEOF
+# FIXME: using cc directly here is probably not the best choice.
+# There must be a predefined configure variable for the detected cc.
+cc -c conftest.c
+bfdname=`LANG=C objdump -f conftest.o | grep -e "conftest.o:" | sed "s/.*file format \(.*\)/\1/"`
+bfdarch=`LANG=C objdump -f conftest.o | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`
+
+
+
+
 
 
 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
@@ -5327,6 +5346,8 @@
 
 ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts"
 
+ac_config_files="$ac_config_files build_tools/make_firmware_object"
+
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
 # tests run on this system so they can be shared between configure
@@ -5897,6 +5918,7 @@
   case $ac_config_target in
     "build_tools/menuselect-deps") CONFIG_FILES="$CONFIG_FILES build_tools/menuselect-deps" ;;
     "makeopts") CONFIG_FILES="$CONFIG_FILES makeopts" ;;
+    "build_tools/make_firmware_object") CONFIG_FILES="$CONFIG_FILES build_tools/make_firmware_object" ;;
 
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -6013,6 +6035,8 @@
 WGET!$WGET$ac_delim
 FETCH!$FETCH$ac_delim
 DOWNLOAD!$DOWNLOAD$ac_delim
+bfdname!$bfdname$ac_delim
+bfdarch!$bfdarch$ac_delim
 EGREP!$EGREP$ac_delim
 CURSES_LIB!$CURSES_LIB$ac_delim
 CURSES_INCLUDE!$CURSES_INCLUDE$ac_delim
@@ -6030,7 +6054,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 71; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: team/tzafrir/kernelmove/configure.ac
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove/configure.ac?view=diff&rev=2317&r1=2316&r2=2317
==============================================================================
--- team/tzafrir/kernelmove/configure.ac (original)
+++ team/tzafrir/kernelmove/configure.ac Fri Mar 16 21:08:10 2007
@@ -55,12 +55,23 @@
 
 AC_LANG(C)
 
+AC_LANG_CONFTEST([AC_LANG_SOURCE(,)])
+# FIXME: using cc directly here is probably not the best choice.
+# There must be a predefined configure variable for the detected cc.
+cc -c conftest.c
+bfdname=`LANG=C objdump -f conftest.o | grep -e "conftest.o:" | sed "s/.*file format \(.*\)/\1/"`
+bfdarch=`LANG=C objdump -f conftest.o | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`
+
+AC_SUBST(bfdname)
+AC_SUBST(bfdarch)
+
 AST_EXT_LIB([curses], [initscr], [curses.h], [CURSES], [curses], [])
 AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], [])
 AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
 AST_EXT_LIB([usb], [usb_init], [usb.h], [USB], [libusb])
 
 AC_CONFIG_FILES([build_tools/menuselect-deps makeopts])
+AC_CONFIG_FILES([build_tools/make_firmware_object])
 AC_OUTPUT
 
 AC_MSG_NOTICE(*** Zaptel build successfully configured ***)

Modified: team/tzafrir/kernelmove/firmware/Makefile
URL: http://svn.digium.com/view/zaptel/team/tzafrir/kernelmove/firmware/Makefile?view=diff&rev=2317&r1=2316&r2=2317
==============================================================================
--- team/tzafrir/kernelmove/firmware/Makefile (original)
+++ team/tzafrir/kernelmove/firmware/Makefile Fri Mar 16 21:08:10 2007
@@ -155,14 +155,14 @@
 	fi
 
 # Build object file of an oct6114 064 firmware image for linking
-zaptel-fw-oct6114-064.o: zaptel-fw-oct6114-064-$(OCT6114_064_VERSION).tar.gz ../wct4xxp/base.o zaptel-fw-oct6114-064.bin
+zaptel-fw-oct6114-064.o: zaptel-fw-oct6114-064-$(OCT6114_064_VERSION).tar.gz zaptel-fw-oct6114-064.bin
 	@echo Making firmware object file for zaptel-fw-oct6114-064.bin
-	../build_tools/make_firmware_object zaptel-fw-oct6114-064.bin $@ ../wct4xxp/base.o
+	../build_tools/make_firmware_object zaptel-fw-oct6114-064.bin $@
 
 # Build object file of an oct6114 128 firmware image for linking
-zaptel-fw-oct6114-128.o: zaptel-fw-oct6114-128-$(OCT6114_128_VERSION).tar.gz ../wct4xxp/base.o zaptel-fw-oct6114-128.bin
+zaptel-fw-oct6114-128.o: zaptel-fw-oct6114-128-$(OCT6114_128_VERSION).tar.gz zaptel-fw-oct6114-128.bin
 	@echo Making firmware object file for zaptel-fw-oct6114-128.bin
-	../build_tools/make_firmware_object zaptel-fw-oct6114-128.bin $@ ../wct4xxp/base.o
+	../build_tools/make_firmware_object zaptel-fw-oct6114-128.bin $@
 
 # Build object file of a TC400M firmware image for linking
 zaptel-fw-tc400m.o:



More information about the svn-commits mailing list