
 Lucent/Agere_Systems(AS) DSP chip modems (but Not the AMR of soft PCI chipsets)
 are supported by the the resources of this kit.
 AS maintainer S. Sarkar develops the code on a Red Hat Linux test bed. 
 The lt_serial.o Serial Interface module comes under GPL and is Open Source.
 The lt_modem.o code is entirely proprietary, though partially Open Source.
 Adaptation to ongoing changes in Linux source code is enabled by the Open Source components.
 Critical AS proprietary information is pre-complied in   ltmdmobj.o,
 whose constituents are functionally not affected by minor Linux source code  changes.

 Volunteer maintainers periodically receive code updates from AS. 
 Through the contributions of Many described in CREDITS, there are
 enhancements in utility, ease of installation and documentation.
 Mark Spieth initiated this ltmodem compiler kit series.
 Chris Hebeisen introduced the Configure implementation, bringing Newbie friendliness.
 Marv Stodolsky is culpable for the verbose messaging.
 Within DOCs/, Ltmodem.html has URLs to many particular usage cases.
 Volunteers assemble the ltmodem-version.deb and
 ltmodem-version.rpm Installers for the User Community as Linux source code evolves 
 utiliizing the resources of this compiler kit series.

 If new to compiling, please first run:    utils/ksp.sh
 to set up your kernel-sources properly. The kernel-source package as installed
 does NOT in general match an installed kernel, but one of several alternative kernels.
 Thus with a niave usage, all could be completed well technically.
 BUT the installed drivers might not be compatible with your kernel,
 of even reside in the needed /lib/modules/Kernel_Version/ tree.


 This compilation process is likely Not necessary to work through,
 if the only need is modem drivers matching the standard kernel of the
 following Linux distributions: Debian, Red Hat, Mandrake, SuSE and Connectiva

 Volunteers have already compiled most standard drivers.
 Those available as of this 8.31a3 release are embedded in utils/scanmodem,
 and any compatible with your System requirements will be later listed.
 They are available for download as ltmodem-version.rpm and
 ltmodem-version.deb Installers from a repository, http://ltmodem.heby.de
 If your System can use one of these Installers, you will be informed below.

 The compiling process is a learning experience for Newbies.
 We strongly recommend that you DO learn it sometime.
 But getting on the Internet under Linux should have first priority.
 This kit provides several diagnostics aids and good documentation.
 Continuing will do no harm.  Useful diagnostic information
 on your system will be written to BLDrecord.txt,
 with direction to documentation if a failure occurs.

 At a minimum, Do keep the DOCs/ and utils/ folders and become familiar
 with the resources therein.

=================================================================

 This is the version 8.31a3 of the compiler + installer kit
 	8.31	corresponds to the version of the core Agere Systems DSP code.
 	    a3  designation that follows reflects NO improvement in DSP code.
 Rather peripheral driver, added diagnostics and installer improvements
 are reflected.  They are progressively implemented as Users report problems
 or the Linux kernel evolves.

 The modem drivers will serve with Linux kernels beginning with 2.2.2, the current
 2.4.nn series, and the 2.5.nn development kernels.
 However support was broken in the early 2.4.n-test series.
 When there is a Red Hat 2.6.nn release, AS will then update the code

 If your PC is being well served with this 8.31a3,
 there is NO Benefit in using a more recent version
 until there is an update in the Agere driver code, say 8.26 to 9.00.

 But if the driver installation for a new kernel should in some way fail,
 please do download the most recent ltmodem-VER.tar.gz
 before sending a query to discuss@linmodems.org,
 because the problem may already be solved.

 This build_module script only compiles drivers,
 with their installation managed by subsequent commands.
 Thus ./build_module can be rerun for education or amusement,
 without as yet committing changes to your System.

 =================================================================
 All should work automatically for most Linux installations/distributions,
 	IF a complete kernel-headers/ folder is available:
 through a symbolic link:	/lib/modules/KernelVersion/build --> PATH_to/kernel-headers/
 at the classical /usr/src/ position.
 Otherwise a symbolic link will be necessary:
 ln -s PATH_to/kernel-headers/ /usr/src/linux
 Read DOCs/Compile-properly.txt and 1ST-READ if an explanation is needed about kernel-headers.

 To compile modules for a kernel other version than 2.6.6, such as version 2.2.17-3test, use syntax:
 	./build_module 2.2.17-3test
 where the version.h in the kernel-headers/ folder has 2.2.17-3test

If desirable to make a record for trouble shooting purposes,
Abort with Ctrl-C. Then the process can be recorded to ltrecord.txt :

	 ./build_module     | tee ltrecord.txt


====================================================================
Diagnostic information is progressively being written to BLDrecord.txt .
Often, contents of BLDrecord.txt will aid in solving a problem.

The Linux distribution is:   debian, testing/unstable  
	End of distribution check.



UPDATE=2004 April 19

Providing detail for device at PCI_bus 0000:00:09.1
  with vendor-ID:device-ID
	    ----:----
Class 0700: 11c1:0445   Serial controller: Lucent Microelectronics LT WinModem (prog-if 00 [8250])
  SubSystem 8086:2203   Intel Corp. PRO/100+ MiniPCI (probably an Ambit U98.003.C.00 combo card)
	Flags: medium devsel, IRQ 11
	I/O ports at 2040
	Memory at 41200000 (32-bit, non-prefetchable) [size=4K]

 The modem has a supported Lucent/Agere DSP (digital signal processing) chipset
  with primary PCI_ID:  11c1:0445
 DSP=1





==================================================

Checking for any preliminary complications.
Bad links to /usr/include not evident.
The kernel supports only single processor motherboards.

==================================================

OK thus far.

Removing old makings and expanding a clean source.tar.gz 
Setting BLDrecord.txt link within source/ folder.
lrwxr-xr-x    1 root     root           16 Jun 13 15:25 BLDrecord.txt -> ../BLDrecord.txt
Setting ./tmpfile link within source/ folder.
lrwxr-xr-x    1 root     root           12 Jun 13 15:25 ./tmpfile -> .././tmpfile
Following a successful check for matching kernel-headers,
the modem drivers will be compiled for the current kernel version: 2.6.6

Performing a configure trial and capturing the report to ../conf-report.txt.
Parsing the report:
	No evident problems.

creating cache ./config.cache
Checking OS
Checking machine type
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
Checking gcc major version 3
Checking for rpm build... rpmbuild
checking for a BSD compatible install... /usr/bin/install -c
checking for make... yes
checking for ld... yes
Checking for kernel headers
  ... in /usr/src/linux: Kernel headers found in /usr/src/linux
  ... in /usr/src/kernel-headers-2.6.6: nope
  ... in /usr/src/linux-2.6.6: nope
  ... in /lib/modules/2.6.6/build: Kernel headers found in /lib/modules/2.6.6/build
  using /lib/modules/2.6.6/build
Checking kernel header version
  kernel headers are version 2.6.6
  has irq_spinlock in async_struct 0
checking for fakeroot... fakeroot
updating cache ./config.cache
creating ./config.status
creating Makefile
creating autoload
creating cleanup
creating ltmodem.spec

The check for compilation tools and general resources was successful.
Within DOCs/ there is an annotated conf-report.txt
The Makefile and down steam installation scripts have been created.


Next checking utilty versions,
           Version_min 
 Utility    or range for kernels   
   name     2.2.16       2.4.18          Actual_version   
-------------------------------------------------------------------
Gnu C      2.7.2.3      2.95.3-2.9.99   3.3.3
Gnu make   3.77         3.79.1          3.80
binutils   2.8.1.0.23   2.9.1.0.25      2.14.90.0.7

-------------------------------------------------------------------

  The gcc compiler resources available are:
 ----------------------------
 lrwxr-xr-x    1 root     root            7 May 30 09:15 /usr/bin/gcc -> gcc-3.3
-rwxr-xr-x    1 root     root        69960 Mar 10 01:47 /usr/bin/gcc-2.95
-rwxr-xr-x    1 root     root        80716 Dec 23 06:35 /usr/bin/gcc-3.2
-rwxr-xr-x    1 root     root        85740 Apr  1 19:43 /usr/bin/gcc-3.3
lrwxr-xr-x    1 root     root           10 May 30 09:15 /usr/bin/gccbug -> gccbug-3.3
-rwxr-xr-x    1 root     root        15886 Dec 23 05:20 /usr/bin/gccbug-3.2
-rwxr-xr-x    1 root     root        15995 Apr  1 19:38 /usr/bin/gccbug-3.3
 ----------------------------
 with your System currently using version 3.3.3
 Do NOT mix the major versions of compilers for the kernel and modem drivers
 or your System will crash! The following releases are using gcc version 3.2.x :
    Mandrake 9, Redhat 8 and SuSE 8.1 in November 2002.

To continue:


 To avoid faulting Systems with an Enviromental setting:	make -e
	make
 is the compiling command used with build_module.
 To modify "make" invocation on your System, if desirable,
 edit the  build_module line below:  MAKEE

Using KCFLAGS for gcc version 3.x
gcc -D__KERNEL__ -I/lib/modules/2.6.6/build/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DLT_VERSION=8.31a3 -DLINUX -DNO_EEPROM -DLT_SERIAL_MODULE=lt_serial -I/lib/modules/2.6.6/build/include/asm/mach-default -DLTTTYNAME=\"LTM\" -mpreferred-stack-boundary=2 -fno-common -iwithprefix /lib/modules/2.6.6/build/include -march=pentium3 -DOMIT_EXPORTSYMTAB -DASMLINKAGE=asmlinkage -DKBUILD_BASENAME=ltmodem -DKBUILD_MODNAME=lt_modem -c -o ltmodem.a ltmodem.c
objcopy -W x_input --redefine-sym memset=ltmodem_memset ltmdmobj.o ./xxx.o
ld -r -defsym x_input_orig=x_input -o ./xxx1.o ./xxx.o
ld -r -d -o lt_modem.o ltmodem.a ./xxx1.o
rm -f ./xxx.o
rm -f ./xxx1.o
#ld -r -o lt_modem.o ltmodem.a ltmdmobj.o
Using KCFLAGS for gcc version 3.x
gcc -D__KERNEL__ -I/lib/modules/2.6.6/build/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DLT_VERSION=8.31a3 -DLINUX -DNO_EEPROM -DLT_SERIAL_MODULE=lt_serial -I/lib/modules/2.6.6/build/include/asm/mach-default -DLTTTYNAME=\"LTM\" -mpreferred-stack-boundary=2 -fno-common -iwithprefix /lib/modules/2.6.6/build/include -march=pentium3 -DOMIT_EXPORTSYMTAB -DASMLINKAGE=asmlinkage -DKBUILD_BASENAME=serial-lt-2.6 -DKBUILD_MODNAME=lt_serial -c -o serial-lt-2.6.a serial-lt-2.6.c
ld -r -d -o lt_serial.o serial-lt-2.6.a
gcc -I/lib/modules/2.6.6/build/include -o modpost modpost.c file2alias.c sumversion.c
./modpost ./lt_modem.o ./lt_serial.o
gcc -D__KERNEL__ -I/lib/modules/2.6.6/build/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DLT_VERSION=8.31a3 -DLINUX -DNO_EEPROM -DLT_SERIAL_MODULE=lt_serial -I/lib/modules/2.6.6/build/include/asm/mach-default -DLTTTYNAME=\"LTM\" -mpreferred-stack-boundary=2 -fno-common -iwithprefix /lib/modules/2.6.6/build/include -march=pentium3 -DOMIT_EXPORTSYMTAB -DASMLINKAGE=asmlinkage -DKBUILD_BASENAME=lt_modem -DKBUILD_MODNAME=lt_modem -c -o lt_modem.mod.o lt_modem.mod.c
ld -r -o lt_modem.ko lt_modem.o lt_modem.mod.o
gcc -D__KERNEL__ -I/lib/modules/2.6.6/build/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -DMODULE -DLT_VERSION=8.31a3 -DLINUX -DNO_EEPROM -DLT_SERIAL_MODULE=lt_serial -I/lib/modules/2.6.6/build/include/asm/mach-default -DLTTTYNAME=\"LTM\" -mpreferred-stack-boundary=2 -fno-common -iwithprefix /lib/modules/2.6.6/build/include -march=pentium3 -DOMIT_EXPORTSYMTAB -DASMLINKAGE=asmlinkage -DKBUILD_BASENAME=lt_serial -DKBUILD_MODNAME=lt_serial -c -o lt_serial.mod.o lt_serial.mod.c
ld -r -o lt_serial.ko lt_serial.o lt_serial.mod.o
rm lt_modem.mod.o lt_serial.mod.o lt_modem.mod.c lt_serial.mod.c

Checking for driver products:
-rw-r--r--    1 root     root       560054 Jun 13 15:26 lt_modem.ko
-rw-r--r--    1 root     root        19545 Jun 13 15:26 lt_serial.ko

=================================================
Using /sbin/depmod


Running: /sbin/depmod -e lt_modem.ko
 The test succeeded. 
Running: /sbin/depmod -e lt_modem.ko lt_serial.ko
 The test succeeded. 

There are occassionally failures in the more global test:
	depmod -a
executed after the drivers are installed, reflecting a lack
of exact Flavor matching of the kernel-headers and kernel-2.6.6
Thus far this problem has only been encountered for Red Hat Linux


===========================================================================


Copying newly compiled drivers to folder ../drivers-2.6.6 as a backup,
  as the source/ folder will be deleted during next run of:  build_module
total 572
-rw-r--r--    1 marv     marv       560054 Jun 13 15:26 lt_modem.ko
-rw-r--r--    1 marv     marv        19545 Jun 13 15:26 lt_serial.ko


Making symbolic links: lt_modem.ko lt_serial.o autoload ltinst2 ltuninst2

A diagnostic record has been saved to BLDrecord.txt and BLDrecord.txt.2
To install the modem drivers in the Search Path for modules,  run:
     ./ltinst2
This command does require Root permission.
For advanced User alternatives to this installation route,
involving assembly of RPM or Debian installers, read DOCs/Options.txt


