LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 11-05-2003, 11:08 PM   #16
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15

Linman,

Thanks for a very helpful tutorial for we nubees with BCM v.92 modems!

I had excellent success with it until I got to the last step.

Basically my error messages are incorrect arguments on the mknod
command AND it can't find the ttySMconfig file in /dev.

I can create a ttySMconfig file, perhaps, but I need to know what's in it.
I'm not sure why the mknod command failed, but maybe it's related to the
missing config file..

Getting this close to getting my modem up/running is terrific, but I've got to
give this some thought and figure it out. Lin/Unix is a bit more tedious than
I remember from many years ago.

Do you/anyone have any suggestions, or corrective actions I can take?

Where does the ttySMconfig file come from?

Here are the last few lines showing my errors:

[root@localhost SPECS]# ls -l /usr/src/RPM/RPMS/i686
total 484
-rw-r--r-- 1 root root 488471 Nov 5 21:40 BCMSM-3.4.19-6.i686.rpm
[root@localhost SPECS]# cd /usr/src/RPM/RPMS/i686
[root@localhost i686]# rpm -ivh --replacepkgs BCMSM-3.4.19-6.i686.rpm
Preparing... ########################################### [100%]
1:BCMSM ########################################### [100%]
mknod: wrong number of arguments
Try `mknod --help' for more information.
chmod: failed to get attributes of `/dev/ttySMconfig': No such file or directory[root@localhost i686]# ls -l /dev/modem
lr-xr-xr-x 1 root root 11 Nov 5 21:43 /dev/modem -> /dev/ttySM0


Thanks for any help you, or others, can provide.

I'm so close I can taste success!

Regards,
Al

BTW, I'm doing this with 2.4.22-10mdk kernel, which I installed yesterday.

Last edited by al_chemyst; 11-05-2003 at 11:11 PM.
 
Old 11-09-2003, 07:59 PM   #17
linman
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Just in case

hi al_chemyst

As you used 2.4.22-10mdk could you let me know the output of the command 'mknod --version', just in case.
This is mine:
[root@localhost dev]# mknod --version
mknod (coreutils) 4.5.7

I also found the file /usr/src/RPM/BUILD/BCMSM-3.4.19/BCMSM-init-redhat, there - i think - is were the ttySMconfig is generated and sending you the errors you posted.

here:
line
47 suffix="config"
48 devname=$1"_"$suffix
49 major=`egrep "$devname$" /proc/devices | sed 's/\([0-9]*\) .*/\1/'`
50 minor=0
51 devnode=/dev/ttySM$suffix
52 if [ -e $devnode ]; then
53 rm -f $devnode
54 fi
55 if [ $create = "1" ]; then
56 mknod $devnode c $major $minor
57 chmod 666 $devnode
58 fi

Also please let me know wich of this files you have in your /dev directory

this is what i found:
[root@localhost dev]# ll ttySM*
crw-r----- 1 administrador tty 254, 0 nov 9 17:31 ttySM0
crw-rw---- 1 administrador tty 253, 0 nov 9 16:53 ttySMaudio0
crw-rw---- 1 administrador tty 250, 0 nov 9 16:53 ttySMconfig
crw-rw---- 1 administrador tty 251, 0 nov 9 16:53 ttySMlog0
crw-rw---- 1 administrador tty 252, 0 nov 9 16:53 ttySMstatus0

The driver if you downloaded the one from the link i posted at the begining is suposed to be kernel independent so it should work in your version.

Last edited by linman; 11-09-2003 at 08:44 PM.
 
Old 11-10-2003, 10:57 AM   #18
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
Thanks linman!

I'll get this info and get back to you.

Regards,
Al
 
Old 11-10-2003, 11:54 AM   #19
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
BCMSM info, as requested

linman,

here is the info you requested from my MDK installation:

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

mknod (coreutils) 5.0
Written by David MacKenzie.

Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

============================================================================
suffix="config"
devname=$1"_"$suffix
major=`egrep "$devname$" /proc/devices | sed 's/\([0-9]*\) .*/\1/'`
minor=0
devnode=/dev/ttySM$suffix
if [ -e $devnode ]; then
rm -f $devnode
fi
if [ $create = "1" ]; then
mknod $devnode c $major $minor
chmod 666 $devnode
fi
}
============================================================================
[root@localhost BCMSM-3.4.19]# ls
BCMSM-3.4.19.spec.template BCMSM-init-redhat INF2C* lkvi.h*
BCMSM.inf BCMSM_lib.o INF2C.c lkvi.o
BCMSM_inf.c BCMSM.o LastRPMBuildInfo Makefile
BCMSM_inf.o ChangeLog lkvi.c* README

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

I also noticed that BCMSM shows up in the MCC screen that manages services, at the top of the list.

I think the LastRPMBuildInfo could be have interesting data in it!

Thanks for any help you can provide.

Regards,
Al
 
Old 11-11-2003, 08:29 AM   #20
zebra5
LQ Newbie
 
Registered: Oct 2003
Distribution: mandrake 9.1
Posts: 7

Rep: Reputation: 0
Well, it finally works for me.
The problem was effectively due to kernel-source.
And I think I am not the only one having this sort of pb.
When you are new to linux and you have just installed linux with a recent distribution like Mandrake 9.1, you could think that kernel-source, rpm-build... packages are already installed, but it is not always the case.
So I add some informations to linman procedure.

KERNEL-SOURCE INSTALLATION:
As specified by linman, to be sure to have kernel source installed you must have a symbolic link "/usr/src/linux" pointing to your sources for the apropiate kernel version.
For example, for my version (2.4.21-0.13mdk, result of 'uname -r'), ls -l /usr/src/linux gives me this symbolic link:
linux -> linux-2.4.21-0.13mdk.
If it is not the case, first type 'rpm -aq | grep kernel-source' and you should have something like this:
kernel-source-2.4.21-0.13mdk
If it is not the case, it means that kernel-source package is not installed.
In this case, you have to get it from your CD or from internet (http://rpmfind.net and search for kernel-source)
Then type 'urpmi kernel-source-2.4.21-0.13mdk.rpm'
It is possible you need other packages to install kernel-source package.
For me, glibc-devel, ncurses-devel and gcc were missing.
In this case, you have to install the missing packages.
Sometimes the package is included in other packages.
For example, I installed libncurses5-devel and it provided me ncurses-devel.
Be carrefull, you could have some problems if you download a too recent version for a package.
For example, for me 'urpmi libncurses5-devel-5.3.1.20030215.1mdk.i586.rpm' works but it did not work with libncurses5-devel-5.3.1.20030215.3mdk.i586.rpm because my kernel -13mdk is to old for this package. Another possibilty is to install a recent kernel (-25 mdk the last one), but if you are new to linux, you could have some problems to compile a new kernel.
For me, with 2.4.21-13mdk, I have installed the following packages:
glibc-devel-2.3.1-10mdk.i586.rpm
libncurses5-devel-5.3.1.20030215.1mdk.i586.rpm
gcc-3.2.2-3mdk.i586.rpm

RPM-BUILD INSTALLATION:
When executing linman procedure, if you got this sort of error:
"bash: rpmbuild: command not found".
Is is probably because rpm-build package is missing.
First check it. 'rpm -aq | grep rpm-build' should give something like this:
rpm-build-4.0.4-28mdk
With 2.4.21-13mdk, you have to download and install the following packages:
rpm-build-4.0.4-28mdk.i586.rpm
gcc-c++-3.2.2-3mdk.i586.rpm
libstdc++5-devel-3.2.2-3mdk

Thank you again Linman for your procedure.
 
Old 11-11-2003, 08:33 AM   #21
zebra5
LQ Newbie
 
Registered: Oct 2003
Distribution: mandrake 9.1
Posts: 7

Rep: Reputation: 0
Well, it finally works for me.
The problem was effectively due to kernel-source.
And I think I am not the only one having this sort of pb.
When you are new to linux and you have just installed linux with a recent distribution like Mandrake 9.1, you could think that kernel-source, rpm-build... packages are already installed, but it is not always the case.
So I add some informations to linman procedure.

KERNEL-SOURCE INSTALLATION:
As specified by linman, to be sure to have kernel source installed you must have a symbolic link "/usr/src/linux" pointing to your sources for the apropiate kernel version.
For example, for my version (2.4.21-0.13mdk, result of 'uname -r'), ls -l /usr/src/linux gives me this symbolic link:
linux -> linux-2.4.21-0.13mdk.
If it is not the case, first type 'rpm -aq | grep kernel-source' and you should have something like this:
kernel-source-2.4.21-0.13mdk
If it is not the case, it means that kernel-source package is not installed.
In this case, you have to get it from your CD or from internet (http://rpmfind.net and search for kernel-source)
Then type 'urpmi kernel-source-2.4.21-0.13mdk.rpm'
It is possible you need other packages to install kernel-source package.
For me, glibc-devel, ncurses-devel and gcc were missing.
In this case, you have to install the missing packages.
Sometimes the package is included in other packages.
For example, I installed libncurses5-devel and it provided me ncurses-devel.
Be carrefull, you could have some problems if you download a too recent version for a package.
For example, for me 'urpmi libncurses5-devel-5.3.1.20030215.1mdk.i586.rpm' works but it did not work with libncurses5-devel-5.3.1.20030215.3mdk.i586.rpm because my kernel -13mdk is to old for this package. Another possibilty is to install a recent kernel (-25 mdk the last one), but if you are new to linux, you could have some problems to compile a new kernel.
For me, with 2.4.21-13mdk, I have installed the following packages:
glibc-devel-2.3.1-10mdk.i586.rpm
libncurses5-devel-5.3.1.20030215.1mdk.i586.rpm
gcc-3.2.2-3mdk.i586.rpm

RPM-BUILD INSTALLATION:
When executing linman procedure, if you got this sort of error:
"bash: rpmbuild: command not found".
Is is probably because rpm-build package is missing.
First check it. 'rpm -aq | grep rpm-build' should give something like this:
rpm-build-4.0.4-28mdk
With 2.4.21-13mdk, you have to download and install the following packages:
rpm-build-4.0.4-28mdk.i586.rpm
gcc-c++-3.2.2-3mdk.i586.rpm
libstdc++5-devel-3.2.2-3mdk

Thank you again Linman for your procedure
 
Old 11-11-2003, 10:50 AM   #22
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
Zebra, that's Interesting

Being a newbie, I was under the impression that the RPM utility
was supposed to determine dependencies and make sure
everything that a package needs is already installed, or install
it with the RPM.

In the old days it was called 'Linking'. Libraries, other utilities, and
any 'outside' the program references were resolved during linking.
If a resource wasn't available you got an error message saying,
"lib yyy missing" or "file access to xyz.db denied"... "Link failed".

So I guess it pays to go through these RPM listings with a fine tooth
comb, unless any errors are also written to a specific error log file.
Of course there are directions to 'ignore' the error messages generated
by this step!

Regards,
Al
 
Old 11-18-2003, 03:17 PM   #23
Debasis08
LQ Newbie
 
Registered: Nov 2003
Posts: 1

Rep: Reputation: 0
Hi! al_chemyst and linman,
Your conversation was extremely helpful. I am using Redhat 9.0 (kernel 2.4.20-8) on my I5100. I have BCM V.92 56K modem and I trying to compile the modules as recommended by linman. But like al_chemyst I get the error of /dev/ttySMconfig not found.
I don't have any file/directory in /dev by ttySM* name.
How to proceed from here ?
Regards,
Debasis
 
Old 11-19-2003, 04:19 PM   #24
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
Thanks zebra!

I hope to be able to check some of the items you noted in your last post tonight.

Here is the last bit of info requested by linman:

========================================================
[root@localhost dev]# ll ttySM*
ls: ttySM*: No such file or directory
[root@localhost dev]#
========================================================

When I did a 'ls' of the /dev directory it DID have three files named ttySM2,
ttySM7 and ttySM9 listed in RED, as is the case with 'modem'. I presume
that the RED indicates that they are inaccessible/unusable and were likely
trashed during creation. Or does RED mean that they are 'hidden' or that
I don't have permissions to them(even as root?)?

It is entirely possible that when I installed MDK 9.2 that I didn't install all
of the necessary libraries, especially since I'm using a workstation setup,
not a networked environment.

With the holiday season approaching my time is limited due to extended work
hours. Fortunately I can still get online using my WinXP partition, and do a
few things as time allows.

Hopefully we can get this working for these newer kernels. I'm surely not
the only one with this problem, and I know we're close to a solution.

Regards,
Al
 
Old 11-20-2003, 09:32 AM   #25
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
BCMSM BUILD/ Info

I spent several hours last night going thru the files in the usr/src/RPM/BUILD/
BCMSM-3.4.19 directory containing the programs that create the modem
interface for BCM modems.

1)The modems referenced in the programs are 4211, 4211SP and 4212
models. My model is the 4214, probably a slightly newer chip/firmware.

2)The PCI/VEN codes are also slightly different. These codes are checked in
one of the routines, and determine some of the set up info for modem access.

3)linman's procedure changed the kernel number in one script, but it is also
used in a second file. I'm not sure if these files are C code or just some kind
of script.

4) The latest update to the driver was in April 2003, according to a comment
line in one of the programs.

5)My library contains the gcc and other libraries that zebra says are needed,
BUT mine are not -devel versions of these libs.

6)I copied some of the relevant code into a couple files, which I can post
here, as I get time. However, they will take up quite a bit of space, so I
hesitate to post them in their entirety.

7)Any one of the 'minor' changes above can cause the install process to fail.
There are directions to 'install' AND 'uninstall' the driver in the notes of one
file. I might uninstall what has already been installed, make a backup copy
of all the original files in the BCMSM-3.4.19 directory, then make my best
guess mods to each program file, then try to reinstall.

8)I'm going to keep working on the code I found, either adding or changing
modem model numbers, PCI/VEN codes, kernel version, etc. to match my
modem and system. It might take a while, since I'll be very busy until New Year.

I'll keep this thread updated as I make progress, if any.

Regards,
Al
 
Old 11-20-2003, 03:28 PM   #26
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
Code to Determine BCM Modem SetUp

Note the refs to 4211 and 4211SP modem types and PCI/VEN codes. One is
for fax/data modems only, the other for voice/data/fax modems. It may be
necessary to add another EEPROM code to match your particular modem.
My EEPROM ID code is PCI/VEN_8086&DEV_24c6&SUBSYS_24c68086.
My modem is Broadcom model BCM94214, per Gateway(parts in MY machine)
My Linux kernel is 2.4.22-10mdk.
Consequently, some mods to this routine may be necessary.

There are 6 refs to 3.4.19. Is this the file in which linman changed the kernel
number?

Registry keys are added depending on the type of modem. The setup string
"BCMSMSetup,1,00,04,20,80" appears to be the same for both modem types.
I'll have to look up what the variables in the setup string mean. Probably
stop bits, parity bits, port number(80), etc. Not sure what the 04 and 20
are for.

I hope this helps.

Regards,
Al

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

[root@localhost BCMSM-3.4.19]# cat BCMSM.inf
; Linux Modem Setup File
; Manufacturer: BCM V.92 56K Modem

[Version]
Class=Modem
Provider=%ModemProvider%
DriverVer=07/18/2002,3.4.19

[Manufacturer]
%ModemProvider%=BCM_Modems

[BCM_Modems]
%BCM4211.Modem% = BCM4211.Modem, PCI\VEN_14E4&DEV_4212
%BCM4211.Modem% = BCM4211.Modem, PCI\VEN_14E4&DEV_4212&SUBSYS_00011028
%BCM4211SP.Modem% = BCM4211SP.Modem, PCI\VEN_14E4&DEV_4212&SUBSYS_00021028
%BCM4211.Modem% = BCM4211.Modem, PCI\VEN_14E4&DEV_4411
%BCM4211.Modem% = BCM4211.Modem, PCI\VEN_14E4&DEV_4431

[Strings]
UnKey="Software\BCMSM\Modem\UninstallInfo"
UnFileKey="Software\BCMSM\Modem\UninstallInfo\InstalledFiles"
UnRegKey="Software\BCMSM\Modem\UninstallInfo\RegistryKeys"
UnMSKey="Software\Microsoft\Windows\CurrentVersion\Uninstall\BCM V.92 56K Modem"; Driver Information Entries
; These items will be set by IHV...
DriverMfgr="Broadcom Corporation"
DriverVersionID="3.4.19"
BaseDriverFileName="BCMSM.sys"
BaseDriverFileVersion="3.4.19"
; These items will be set by IHV and updated by OEM
DriverOEM="Broadcom Corporation"
DriverOEMVersion="3.4.19"
DriverFamily="Modem"
ModemProvider="Broadcom Corporation"
FullProductName="BCM V.92 56K Modem"
ShortProductName="Modem"
Version="3.4.19"
SWRegKey="SOFTWARE\BCMSM\Modem"
BCM4211SP.Modem="BCM V.92 56K Voicemodem"
BCM4211.Modem="BCM V.92 56K Modem"

;[PortMod.AddReg]
;HKLM,SOFTWARE\BCMSM\Modem,CodecFlags,1,43,00,00,00
;HKLM,SOFTWARE\BCMSM\Modem,ATI0Response,,"BCM Modem Version 3.4.19"
;HKLM,SOFTWARE\BCMSM\Modem,GMIResponse,,"Broadcom Corporation"
;HKLM,SOFTWARE\BCMSM\Modem,FMIResponse,,"Broadcom Corporation"

[BCM4211SP.Modem]
AddReg=PortMod.AddReg, BCM4211SP.Modem.AddReg, VoiceAddReg

[BCM4211.Modem]
AddReg=PortMod.AddReg, BCM4211.Modem.AddReg

[BCM4211SP.Modem.AddReg]
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",Description,,"porfchin DFV Modem"
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",CurrentVer,,%DriverOEMVersion%
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",Ver_%DriverOEMVersion%,,%DriverVersionID%
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",BaseDriverFileName,,%BaseDriverFileName%
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",BaseDriverFileVersion,,%BaseDriverFileVersion%
HKR,,CodecType,1,15
HKLM,%SWRegKey%,BCMSMSetup,1,00,04,20,80
HKR,,DaisyChainMode,1,01
[BCM4211.Modem.AddReg]
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",Description,,"donjcuer DF Modem"
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",CurrentVer,,%DriverOEMVersion%
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",Ver_%DriverOEMVersion%,,%DriverVersionID%
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",BaseDriverFileName,,%BaseDriverFileName%
HKLM,Software\InstalledOptions\%DriverOEM%\%DriverFamily%\%DriverMfgr%\"Br4212Soft Modem",BaseDriverFileVersion,,%BaseDriverFileVersion%
HKR,,AudioCaps,1,00,00,00,00
HKR,,CodecType,1,15
HKLM,%SWRegKey%,BCMSMSetup,1,00,04,20,80
[root@localhost BCMSM-3.4.19]#
 
Old 11-21-2003, 03:46 PM   #27
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
BCMSM Makefile Program

Here's the contents of the BCMSM Makefile file. It's 7 pages long in Word. I'll
post it today, and try to do some analysis later (tomorrow?).

Regards,
Al

========================================================
[root@localhost BCMSM-3.4.19]# ls

BCMSM-3.4.19.spec.template BCMSM-init-redhat INF2C* lkvi.h*
BCMSM.inf BCMSM_lib.o INF2C.c lkvi.o
BCMSM_inf.c BCMSM.o LastRPMBuildInfo Makefile
BCMSM_inf.o ChangeLog lkvi.c* README

[root@localhost BCMSM-3.4.19]# cat Makefile

#!make CC=gcc LD=ld C_FLAGS= -minline-all-stringops -D__KERNEL__ -DMODULE -I$(KERNEL_DIR)/include # # Linux Kernel Version Independent layer # Installation functions # Copyright (C) 2000 Broadcom Corporation. All rights reserved. #
# Modified Sat Apr 5 2003 Cengiz Gunay <cengiz@ull.edu>
# -Added the spec.template file as part of the source file distribution.

ifndef HOST_GCC
HOST_GCC=gcc
endif
#There are some functions declared inline in the kernel header
#files but not present on the kernel itself. If we dont use -O2
#the compiler will ignore the inline decl. and issue a call to
#a function that wont be present in the kernel. This will cause
#insmod to complain about unresolved symbols when loading the
#module.
LKVI_C_FLAGS = -O2
C_FLAGS += $(LKVI_C_FLAGS)

ifeq "$(KERNEL_DIR)" ""
NO_KERNEL_DIR_ERROR="ERROR: KERNEL_DIR environment variable is not set; Usually /usr/src/linux"
endif

ifeq "$(KERNEL_VERSION)" ""
KERNEL_VERSION = $(shell uname -r)
endif

RPM_NAME = BCMSM-3.4.19-6.i386.rpm
SRC_RPM_NAME = BCMSM-3.4.19-6.src.rpm
SRC_RPM_FILES = lkvi.c \
lkvi.h \
BCMSM_lib.o \
BCMSM-init-redhat \
BCMSM.inf \
INF2C.c \
Makefile \
ChangeLog \
BCMSM-3.4.19.spec.template \
README
RPMS = $(RPM_NAME) $(SRC_RPM_NAME)
RPM_DEPS = $(SRC_RPM_FILES)
RPMBUILD_FLAGS = -ba
RPMBUILD_NO_KERNEL_DIR_ERROR = $(NO_KERNEL_DIR_ERROR)

override RPM_KERNELS := $(subst rh72,2.4.7-10 2.4.7-10smp 2.4.7-10enterprise,$(RPM_KERNELS))
override RPM_KERNELS := $(subst rh73-3,2.4.18-3 2.4.18-3smp 2.4.18-3bigmem,$(RPM_KERNELS))
override RPM_KERNELS := $(subst rh73-4,2.4.18-4 2.4.18-4smp 2.4.18-4bigmem,$(RPM_KERNELS))
ifeq "$(RPM_KERNELS)" ""
RPMBUILD_FLAGS = -bs
RPMS = $(SRC_RPM_NAME)
RPMBUILD_NO_KERNEL_DIR_ERROR:=
endif

#To be able to rebuild the binary rpm if
#kernel versions or kernel header change
RPM_ID = $(sort $(RPM_KERNELS) $(KERNEL_DIR))
-include LastRPMBuildInfo

ifneq "$(LAST_RPM_ID)" "$(RPM_ID)"
#This file is built after rpms are built so including
#it as a dependency will force a rebuild of rpms.
RPM_DEPS += LastRPMBuildInfo
endif

ifeq "$(RPM_BUILD_ROOT)" ""
#Directory where rpm builds should take place.
RPM_BUILD_ROOT = $(shell pwd)/buildRPM
endif


ifndef RPM

define DEPMOD
@echo 'Rebuilding module dependencies..'; \
/sbin/depmod -a
endef

define RENAME_OLD_MODULES
@if [ "`echo $(INSTALL_ROOT)/lib/modules/$(KERNEL_VERSION)/*/BCMSM.o`" != '$(INSTALL_ROOT)/lib/modules/$(KERNEL_VERSION)/*/BCMSM.o' ]; then \
echo -n "Renaming old modem module(s):"; \
for OLDMOD in $(INSTALL_ROOT)/lib/modules/$(KERNEL_VERSION)/*/BCMSM.o; do \
echo -n " $$OLDMOD->"`dirname $$OLDMOD`/_`basename $$OLDMOD`.old; \
mv $$OLDMOD `dirname $$OLDMOD`/_`basename $$OLDMOD`.old; \
done; \
echo ''; \
fi
endef

define RENAME_OLD_INIT_SCRIPTS
@if [ -d $$INITDIR ]; then \
if [ "`echo $$INITDIR/BCMSM*`" != $$INITDIR/'BCMSM*' ]; then \
echo -n "Renaming old initilization script(s):"; \
for OLDINIT in $$INITDIR/BCMSM*; do \
echo -n " $$OLDINIT->"`dirname $$OLDINIT`/_`basename $$OLDINIT`.old; \
mv $$OLDINIT `dirname $$OLDINIT`/_`basename $$OLDINIT`.old; \
done; \
echo ''; \
fi ; \
fi
endef

define CREATE_RUNLEVEL_LINKS
@if [ -d $$INITDIR ]; then \
if [ "`echo $(INSTALL_ROOT)/etc/rc.d/rc[35].d`" != '$(INSTALL_ROOT)/etc/rc.d/rc[35].d' ]; then \
for RCDIR in $(INSTALL_ROOT)/etc/rc.d/rc[35].d; do \
RUNLEVEL=`echo $$RCDIR | sed 's,echo $(INSTALL_ROOT)/etc/rc.d/rc\([35]\).d,\1,'`; \
if [ "`echo $$RCDIR/S*BCMSM`" != $$RCDIR/'S*BCMSM' ]; then \
echo -n "Renaming old runlevel $$RUNLEVEL init script link(s):"; \
for OLDLINK in $$RCDIR/S*BCMSM; do \
echo -n " $$OLDLINK->"`dirname $$OLDLINK`/_`basename $$OLDLINK`.old; \
mv $$OLDLINK `dirname $$OLDLINK`/_`basename $$OLDLINK`.old; \
done; \
echo ''; \
fi; \
echo "Creating runlevel $$RUNLEVEL init script link.."; \
ln -s $(INSTALL_ROOT)/etc/rc.d/init.d/BCMSM $$RCDIR/S99BCMSM; \
done; \
fi ; \
fi ; \
if [ -d $$INITDIR ]; then \
if [ "`echo $(INSTALL_ROOT)/etc/rc.d/rc[06].d`" != '$(INSTALL_ROOT)/etc/rc.d/rc[06].d' ]; then \
for RCDIR in $(INSTALL_ROOT)/etc/rc.d/rc[06].d; do \
RUNLEVEL=`echo $$RCDIR | sed 's,echo $(INSTALL_ROOT)/etc/rc.d/rc\([06]\).d,\1,'`; \
if [ "`echo $$RCDIR/K*BCMSM`" != $$RCDIR/'K*BCMSM' ]; then \
echo -n "Renaming old runlevel $$RUNLEVEL init script link(s):"; \
for OLDLINK in $$RCDIR/K*BCMSM; do \
echo -n " $$OLDLINK->"`dirname $$OLDLINK`/_`basename $$OLDLINK`.old; \
mv $$OLDLINK `dirname $$OLDLINK`/_`basename $$OLDLINK`.old; \
done; \
echo ''; \
fi; \
echo "Creating runlevel $$RUNLEVEL init script link.."; \
ln -s $(INSTALL_ROOT)/etc/rc.d/init.d/BCMSM $$RCDIR/K01BCMSM; \
done; \
fi ; \
fi
endef

endif

copyright :
@echo 'BCM V.92 56K Modem Install'
@echo 'Copyright (C) 2000 Broadcom Corporation. All rights reserved.'
@echo ''

top : copyright BCMSM.o
@echo ''
@echo 'Run "make install" to install the modem on your system.'
@echo 'Run "make uninstall" to remove a previously installed modem.'
@echo ''

BCMSM.o : BCMSM_lib.o lkvi.o BCMSM_inf.o
@echo "Linking BCMSM.o modem module.."
@$(LD) -r -o BCMSM.o lkvi.o BCMSM_lib.o BCMSM_inf.o

lkvi.o : lkvi.c
ifneq "$(NO_KERNEL_DIR_ERROR)" ""
@echo $(NO_KERNEL_DIR_ERROR)
else
@echo "Building Linux Kernel Version Independent layer for this system.."
$(CC) $(C_FLAGS) -o lkvi.o -c lkvi.c
endif

INF2C : INF2C.c
@echo "Building INF to C Converter.."
$(HOST_GCC) -O2 -o $@ $^

BCMSM_inf.o : BCMSM.inf INF2C
@echo "Compiling hardware information.."
@./INF2C BCMSM.inf BCMSM_inf.c
@$(CC) $(C_FLAGS) -o BCMSM_inf.o -c BCMSM_inf.c

install : BCMSM.o
$(RENAME_OLD_MODULES)
@MODULE_DIR=`echo $(INSTALL_ROOT)/lib/modules/$(KERNEL_VERSION)`; \
echo "Installing BCMSM.o to $$MODULE_DIR/misc/BCMSM.o.."; \
mkdir -p $$MODULE_DIR/misc/; \
install --mode 644 BCMSM.o $$MODULE_DIR/misc/BCMSM.o
$(DEPMOD)
@set allow_null_glob_expansion; \
INITDIR=$(INSTALL_ROOT)/etc/rc.d/init.d;
$(RENAME_OLD_INIT_SCRIPTS)
@if [ -d $$INITDIR ]; then \
echo "Installing BCMSM-init-redhat to $(INSTALL_ROOT)/etc/rc.d/init.d/BCMSM"; \
mkdir -p $(INSTALL_ROOT)/etc/rc.d/init.d/ ; \
install --mode 755 BCMSM-init-redhat $(INSTALL_ROOT)/etc/rc.d/init.d/BCMSM; \
fi
$(CREATE_RUNLEVEL_LINKS)
@echo "Install complete!"

uninstall :
@INITDIR=/etc/rc.d/init.d; \
if [ -d $$INITDIR ]; then \
if [ "`echo /etc/rc.d/rc[35].d`" != '/etc/rc.d/rc[35].d' ]; then \
for RCDIR in /etc/rc.d/rc[35].d; do \
if [ "`echo $$RCDIR/S*BCMSM`" != '$$RCDIR/S*BCMSM' ]; then \
RUNLEVEL=`echo $$RCDIR | sed 's,echo /etc/rc.d/rc\([35]\).d,\1,'`; \
echo -n "Removing runlevel $$RUNLEVEL link(s) to init script:"; \
for LINK in $$RCDIR/S*BCMSM; do \
echo -n " $$LINK"; \
rm -f $$LINK; \
done; \
echo ''; \
fi; \
done; \
fi; \
if [ "`echo /etc/rc.d/rc[06].d`" != '/etc/rc.d/rc[06].d' ]; then \
for RCDIR in /etc/rc.d/rc[06].d; do \
if [ "`echo $$RCDIR/K*BCMSM`" != '$$RCDIR/K*BCMSM' ]; then \
RUNLEVEL=`echo $$RCDIR | sed 's,echo /etc/rc.d/rc\([06]\).d,\1,'`; \
echo -n "Removing runlevel $$RUNLEVEL link(s) to init script:"; \
for LINK in $$RCDIR/K*BCMSM; do \
echo -n " $$LINK"; \
rm -f $$LINK; \
done; \
echo ''; \
fi; \
done; \
fi; \
if [ "`echo $$INITDIR/BCMSM*`" != $$INITDIR/'BCMSM*' ]; then \
echo -n "Removing init script(s):"; \
for INIT in $$INITDIR/BCMSM*; do \
echo -n " $$INIT"; \
rm -f $$INIT; \
done; \
echo ''; \
fi; \
fi
@MODULE_DIR=`echo /lib/modules/$(KERNEL_VERSION)`; \
if [ "`echo $$MODULE_DIR/misc/BCMSM.o*`" != $$MODULE_DIR/misc/'BCMSM.o*' ]; then \
echo -n "Removing modem modules:"; \
for MOD in $$MODULE_DIR/misc/BCMSM.o*; do \
echo -n " $$MOD"; \
rm -f $$MOD; \
done; \
echo ''; \
fi
@echo 'Rebuilding module dependencies..'; \
/sbin/depmod -a
@echo "Uninstall complete!"


.PHONY: rpm
rpm : $(RPMS)
ifneq "$(RPMBUILD_NO_KERNEL_DIR_ERROR)" ""
@echo $(RPMBUILD_NO_KERNEL_DIR_ERROR)
endif

LastRPMBuildInfo:
touch LastRPMBuildInfo

$(RPMS) : $(RPM_DEPS)
ifeq "$(RPMBUILD_NO_KERNEL_DIR_ERROR)" ""
#Prepare rpm build root directory
@rm -fr $(RPM_BUILD_ROOT) ; \
mkdir -p $(RPM_BUILD_ROOT)
#Prepare the sources and the spec file
@mkdir -p $(RPM_BUILD_ROOT)/BCMSM-3.4.19 ; \
cp $(SRC_RPM_FILES) $(RPM_BUILD_ROOT)/BCMSM-3.4.19 ; \
tar -C$(RPM_BUILD_ROOT) -czf $(RPM_BUILD_ROOT)/BCMSM-3.4.19.tar.gz BCMSM-3.4.19 ; \
awk '{ \
gsub(/%RPM_KERNELS%/,"$(RPM_KERNELS)"); \
gsub(/%KERNEL_DIR%/,"$(KERNEL_DIR)"); \
if (/%RPM_MODULES%/) \
print "$(foreach RPM_KERNEL_VERSION,$(RPM_KERNELS),/lib/modules/$(RPM_KERNEL_VERSION)/misc/BCMSM.o\n)"; \
else \
print; \
} ' < BCMSM-3.4.19.spec.template > $(RPM_BUILD_ROOT)/BCMSM-3.4.19.spec;
#Build the rpm
@rpmbuild --target=i386 \
--define='_topdir $(RPM_BUILD_ROOT)' \
--define='_sourcedir %{_topdir}' \
--define='_specdir %{_topdir}' \
--define='_rpmdir %{_topdir}' \
--define='_srcrpmdir %{_topdir}' \
--define='_builddir %{_topdir}' \
--buildroot=$(RPM_BUILD_ROOT) \
$(RPMBUILD_FLAGS) $(RPM_BUILD_ROOT)/BCMSM-3.4.19.spec
#Rename the resulting rpms and copy them to bin directory
@if [ -e $(RPM_BUILD_ROOT)/i386/BCMSM-3.4.19-6.i386.rpm ] ; then \
cp $(RPM_BUILD_ROOT)/i386/BCMSM-3.4.19-6.i386.rpm $(RPM_NAME) ; \
sleep 2 ; \
echo "LAST_RPM_ID = $(RPM_ID)" > LastRPMBuildInfo ; \
echo "$(RPM_NAME) successfully built" ; \
fi
@if [ -e $(RPM_BUILD_ROOT)/BCMSM-3.4.19-6.src.rpm ] ; then \
cp $(RPM_BUILD_ROOT)/BCMSM-3.4.19-6.src.rpm $(SRC_RPM_NAME) ; \
echo "$(SRC_RPM_NAME) successfully built" ; \
fi
@echo ""
endif

clean :
rm -f lkvi.o INF2C.o BCMSM.o BCMSM_inf.o BCMSM_inf.c *.rpm

[root@localhost BCMSM-3.4.19]#

======================================================
 
Old 11-22-2003, 02:57 PM   #28
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
BCMSM README file

Here's the README file from the BCMSM directory...

========================================================
[root@localhost usr]# cat src/RPM/BUILD/BCMSM-3.4.19/README
Broadcom Linux SoftModem Driver README
Copyright (C) 2000 Broadcom Corporation. All rights reserved.


How to install the modem on RedHat 7.x systems using RPM:

1) Log in as root.
2) Execute the command:
rpm -i BCMSM-3.4.19-1.i386.rpm
Rpm will first copy the Broadcom modem kernel module to the appropiate
/lib/modules/*/misc directory. Rpm will then create a shell script
called /etc/init.d/BCMSM and symbolic links
/etc/rc.d/rc[35].d/S99BCMSM that point to the /etc/init.d/BCMSM
script. Finally, rpm will load the kernel module, create the
appropiate device nodes(called /dev/ttySM*) and create a symbolic link
called /dev/modem which points to the first tty device.

How to remove the modem on RedHat 7.x systems using RPM:

1) Log in as root.
2) Execute the command:
rpm -e BCMSM-3.4.19-1

How to install the modem on a RedHat 5.x/6.x system:

1) Log in as root.
2) Make the directory '/usr/local/lib/BCMDM' and copy the contents of the
archive to this directory.
3) Change to this directory and run 'make'.
4) Still in this directory, run 'make install KERNEL_DIR=/usr/src/linux'.
This command assumes that the Linux sources for the current kernel are
stored in /usr/src/linux. If not, please specify the appropriate
directory here.
5) Run the command '/etc/rc.d/init.d/BCMDM start'

These commands will create the device entry "/dev/ttySM0" for the modem
device. The modem will automatically load from now on when the system boots.

How to remove the modem on a RedHat 5.x/6.x system:

1) Log in as root
2) Run the command '/etc/rc.d/init.d/BCMDM stop'
3) Change to the '/usr/local/lib/BCMDM' directory and run 'make uninstall'.

How to build RedHat 7.x RPM packages:

TARGET : one of the linux softmodem targets(i.e opt-linux-pentium-mmx)
RPM_KERNELS : list of kernel versions to build(i.e "2.4.7-10 2.4.7-smp").
KERNEL_DIR : base directory for kernel header files. The header files for
kernel version xx.yy.zz are assumed to be located on
$(KERNEL_HEADERS_ROOT)xx.yy.zz/include
RPM_BUILD_ARCH : the build architecture used for rpm.
Normally set to i386 in config/config.oem (Note by CG: Doesn't work, fixed at i386).
DEVICE_NAME : the name of the module(i.e BCMSM)
VERSION_NUMBER : modem version number(i.e 3.4.19)
PACKAGE_VERSION : package version number. Normally set to 1 in config/config.oem. Should be
incremented when modem is repackaged and reset to 1 when building a package with a
different modem version number.

Source rpms are built by default. To build binary rpms from top level softmodem dir
execute the following command:

make <TARGET> RPM_KERNELS=<see above> KERNEL_DIR=<see above> [RPM_NAME=<...>] [RPM_BUILD_ARCH=<see above>]
This builds an rpm called
<DEVICE_NAME>-<VERSION_NUMBER>-<PACKAGE_VERSION>.<RPM_BUILD_ARCH>.rpm by default
or <RPM_NAME> if RPM_NAME is redefined. The source rpm is called <DEVICE NAME>-<VERSION NUMBER>-<PACKAGE VERSION>.src.rpm. The binary rpm includes
the modem kernel modules compiled for the kernel versions specified in
RPM_KERNELS.

To build binary rpms using the Makefile in this directory replace <TARGET> with rpm.

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

Regards,
Al
 
Old 11-26-2003, 11:06 PM   #29
linman
LQ Newbie
 
Registered: Aug 2003
Posts: 15

Original Poster
Rep: Reputation: 0
mandrake 9.2

Hi guys, next i post the steps of the instalation of the driver on mdk 9.2, it worked with the same procedure i posted before, please dont forget to give feedback on your experience installing the BCM modem driver. Kernel version: 2.4.22-10mdk

[root@localhost Desktop]# ll
total 524
-r-------- 1 root root 505746 nov 26 2003 BCMSM-3.4.19-6.src.rpm
-rw-r--r-- 1 admin usuarios 181 nov 25 19:54 Disco duro
-rw-r--r-- 1 admin usuarios 145 nov 25 19:55 Disco duro %2fhome
-rw-r--r-- 1 admin usuarios 152 nov 25 19:56 Disco duro %2fmnt%2fwindows
-rw-r--r-- 1 admin 501 3578 nov 23 02:32 Home.desktop
drwx------ 2 admin 501 4096 nov 23 02:32 Trash/
-rw-r--r-- 1 admin 501 1375 nov 23 02:32 Welcome.desktop

[root@localhost Desktop]# uname -r
2.4.22-10mdk

[root@localhost Desktop]# rpmbuild --rebuild BCMSM-3.4.19-6.src.rpm

Installing BCMSM-3.4.19-6.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.96949
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ rm -rf BCMSM-3.4.19
+ /usr/bin/gzip -dc /usr/src/RPM/SOURCES/BCMSM-3.4.19.tar.gz
+ tar -xvvf -
drwxr-xr-x root/root 0 2003-04-06 17:35:27 BCMSM-3.4.19/
-rwxr-xr-x root/root 100322 2003-04-06 17:35:27 BCMSM-3.4.19/lkvi.c
-rwxr-xr-x root/root 20442 2003-04-06 17:35:27 BCMSM-3.4.19/lkvi.h
-rw-r--r-- root/root 1109440 2003-04-06 17:35:27 BCMSM-3.4.19/BCMSM_lib.o
-rw-r--r-- root/root 2377 2003-04-06 17:35:27 BCMSM-3.4.19/BCMSM-init-redhat
-rw-r--r-- root/root 3252 2003-04-06 17:35:27 BCMSM-3.4.19/BCMSM.inf
-rw-r--r-- root/root 39907 2003-04-06 17:35:27 BCMSM-3.4.19/INF2C.c
-rw-r--r-- root/root 9788 2003-04-06 17:35:27 BCMSM-3.4.19/Makefile
-rw-r--r-- root/root 485 2003-04-06 17:35:27 BCMSM-3.4.19/ChangeLog
-rw-r--r-- root/root 2957 2003-04-06 17:35:27 BCMSM-3.4.19/BCMSM-3.4.19.spec.template
-rw-r--r-- root/root 3150 2003-04-06 17:35:27 BCMSM-3.4.19/README
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd BCMSM-3.4.19
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.96949
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd BCMSM-3.4.19
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.96949
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd BCMSM-3.4.19
+ make clean
touch LastRPMBuildInfo
rm -f lkvi.o INF2C.o BCMSM.o BCMSM_inf.o BCMSM_inf.c *.rpm
+ make install KERNEL_VERSION=2.4.18-27.8.0 KERNEL_DIR=/usr/src/linux-2.4.18-27.8.0 RPM=1 INSTALL_ROOT=
Building Linux Kernel Version Independent layer for this system..
gcc -minline-all-stringops -D__KERNEL__ -DMODULE -I/usr/src/linux-2.4.18-27.8.0/include -O2 -o lkvi.o -c lkvi.c
In file included from lkvi.c:15:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from /usr/include/linux/prefetch.h:13,
from /usr/include/linux/list.h:6,
from /usr/include/linux/module.h:11,
from lkvi.c:25:
/usr/include/asm/processor.h:55: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/processor.h:55: error: requested alignment is not a constant
In file included from /usr/include/linux/module.h:297,
from lkvi.c:25:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from lkvi.c:25:
/usr/include/linux/module.h:299: error: syntax error before "UTS_RELEASE"
lkvi.c:53:2: #error This driver compiles only for Linux versions 2.0.0 and later
In file included from /usr/include/linux/mm.h:12,
from lkvi.c:162:
/usr/include/linux/mmzone.h:44: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/mmzone.h:44: error: requested alignment is not a constant
In file included from lkvi.c:163:
/usr/include/linux/malloc.h:4:2: warning: #warning linux/malloc.h is deprecated, use linux/slab.h instead.
lkvi.c: In function `lkvi_use_lock_init_unused':
lkvi.c:269: error: incompatible types in assignment
lkvi.c:574:26: linux/bios32.h: No such file or directory
lkvi.c: In function `lkvi_wait_queue_sleep':
lkvi.c:675: warning: passing arg 1 of `sleep_on' from incompatible pointer type
lkvi.c: In function `lkvi_wait_queue_sleep_interruptible':
lkvi.c:685: warning: passing arg 1 of `interruptible_sleep_on' from incompatible pointer type
lkvi.c: In function `lkvi_wait_queue_wake':
lkvi.c:695: warning: passing arg 1 of `__wake_up' from incompatible pointer type
lkvi.c: In function `lkvi_wait_queue_wake_interruptible':
lkvi.c:705: warning: passing arg 1 of `__wake_up' from incompatible pointer type
lkvi.c: In function `lkvi_tty_driver__write':
lkvi.c:945: error: `VERIFY_READ' undeclared (first use in this function)
lkvi.c:945: error: (Each undeclared identifier is reported only once
lkvi.c:945: error: for each function it appears in.)
lkvi.c: In function `lkvi_tty_driver__ioctl':
lkvi.c:1158: error: `VERIFY_WRITE' undeclared (first use in this function)
lkvi.c:1181: error: `VERIFY_READ' undeclared (first use in this function)
lkvi.c: In function `lkvi_char_device__read':
lkvi.c:2359: error: `VERIFY_WRITE' undeclared (first use in this function)
lkvi.c: In function `lkvi_char_device__write':
lkvi.c:2395: error: `VERIFY_READ' undeclared (first use in this function)
lkvi.c: At top level:
lkvi.c:2413: error: syntax error before "select_table"
lkvi.c: In function `lkvi_char_device__select':
lkvi.c:2421: error: `filp' undeclared (first use in this function)
lkvi.c:2433: error: `mode' undeclared (first use in this function)
lkvi.c:2439: error: `table' undeclared (first use in this function)
lkvi.c: In function `lkvi_char_device_init':
lkvi.c:2575: warning: assignment from incompatible pointer type
lkvi.c:2576: warning: assignment from incompatible pointer type
lkvi.c:2578: error: structure has no member named `select'
lkvi.c:2582: warning: assignment from incompatible pointer type
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:46,
from lkvi.c:2822:
/usr/include/linux/irq.h: At top level:
/usr/include/linux/irq.h:65: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/irq.h:65: error: requested alignment is not a constant
In file included from /usr/include/linux/interrupt.h:46,
from lkvi.c:2822:
/usr/include/asm/hardirq.h:16: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/hardirq.h:16: error: requested alignment is not a constant
In file included from lkvi.c:2822:
/usr/include/linux/interrupt.h:129: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/interrupt.h:129: error: requested alignment is not a constant
lkvi.c: In function `lkvi_atomic_int_init':
lkvi.c:2938: error: incompatible types in assignment
lkvi.c: In function `lkvi_atomic_int_get':
lkvi.c:2949: error: incompatible types in return
lkvi.c: In function `lkvi_atomic_int_set':
lkvi.c:2959: error: incompatible types in assignment
lkvi.c: In function `lkvi_is_signal_pending':
lkvi.c:3663: error: structure has no member named `signal'
lkvi.c:3663: error: wrong type argument to bit-complement
make: *** [lkvi.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.96949 (%install)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.96949 (%install)
[root@localhost Desktop]# cd /usr/src/RPM/SPECS
[root@localhost SPECS]#
[root@localhost SPECS]# chmod 666 BCMSM-3.4.19.spec
[root@localhost SPECS]# uname -r
2.4.22-10mdk
[root@localhost SPECS]# ll /dev/modem
ls: /dev/modem: No such file or directory
[root@localhost SPECS]# rpmbuild -bb --target i686 BCMSM-3.4.19.spec
Building target platforms: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.91386
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd /usr/src/RPM/BUILD
+ rm -rf BCMSM-3.4.19
+ /usr/bin/gzip -dc /usr/src/RPM/SOURCES/BCMSM-3.4.19.tar.gz
+ tar -xvvf -
drwxr-xr-x root/root 0 2003-04-06 17:35:27 BCMSM-3.4.19/
-rwxr-xr-x root/root 100322 2003-04-06 17:35:27 BCMSM-3.4.19/lkvi.c
-rwxr-xr-x root/root 20442 2003-04-06 17:35:27 BCMSM-3.4.19/lkvi.h
-rw-r--r-- root/root 1109440 2003-04-06 17:35:27 BCMSM-3.4.19/BCMSM_lib.o
-rw-r--r-- root/root 2377 2003-04-06 17:35:27 BCMSM-3.4.19/BCMSM-init-redhat
-rw-r--r-- root/root 3252 2003-04-06 17:35:27 BCMSM-3.4.19/BCMSM.inf
-rw-r--r-- root/root 39907 2003-04-06 17:35:27 BCMSM-3.4.19/INF2C.c
-rw-r--r-- root/root 9788 2003-04-06 17:35:27 BCMSM-3.4.19/Makefile
-rw-r--r-- root/root 485 2003-04-06 17:35:27 BCMSM-3.4.19/ChangeLog
-rw-r--r-- root/root 2957 2003-04-06 17:35:27 BCMSM-3.4.19/BCMSM-3.4.19.spec.template
-rw-r--r-- root/root 3150 2003-04-06 17:35:27 BCMSM-3.4.19/README
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd BCMSM-3.4.19
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.91386
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd BCMSM-3.4.19
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.91386
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd BCMSM-3.4.19
+ make clean
touch LastRPMBuildInfo
rm -f lkvi.o INF2C.o BCMSM.o BCMSM_inf.o BCMSM_inf.c *.rpm
+ make install KERNEL_VERSION=2.4.22-10mdk KERNEL_DIR=/usr/src/linux-2.4.22-10mdk RPM=1 INSTALL_ROOT=
Building Linux Kernel Version Independent layer for this system..
gcc -minline-all-stringops -D__KERNEL__ -DMODULE -I/usr/src/linux-2.4.22-10mdk/include -O2 -o lkvi.o -c lkvi.c
Building INF to C Converter..
gcc -O2 -o INF2C INF2C.c
Compiling hardware information..
Linking BCMSM.o modem module..
Installing BCMSM.o to /lib/modules/2.4.22-10mdk/misc/BCMSM.o..
Installing BCMSM-init-redhat to /etc/rc.d/init.d/BCMSM
Install complete!
+ /usr/lib/rpm/brp-mandrake
no RPM_BUILD_ROOT variable; exiting.
Processing files: BCMSM-3.4.19-6
Finding Provides: /usr/lib/rpm/filter.sh ' ' /usr/lib/rpm/find-provides
Using BuildRoot: i686 to search libs
Finding Requires: /usr/lib/rpm/filter.sh ' ' /usr/lib/rpm/find-requires i686
Provides: BCMSM
Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(pre): /bin/sh
Requires(post): /bin/sh
Requires(preun): /bin/sh
Requires(postun): /bin/sh
Checking for unpackaged file(s): /usr/lib/rpm/check-files %{buildroot}
Wrote: /usr/src/RPM/RPMS/i686/BCMSM-3.4.19-6.i686.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.6181
+ umask 022
+ cd /usr/src/RPM/BUILD
+ cd BCMSM-3.4.19
+ exit 0

[root@localhost SPECS]# cd /usr/src/RPM/RPMS/i686

[root@localhost i686]# ll

total 484
-rw-r--r-- 1 root root 488482 nov 26 20:09 BCMSM-3.4.19-6.i686.rpm
[root@localhost i686]# rpm -ivh --replacepkgs BCMSM-3.4.19-6.i686.rpm
Preparing... ########################################### [100%]
1:BCMSM ########################################### [100%]

[root@localhost i686]# ll /dev/modem

lr-xr-xr-x 1 root root 11 nov 26 20:10 /dev/modem -> /dev/ttySM0
[root@localhost i686]#

Hope this gives some ligth to your install process.
Have fun...
 
Old 11-28-2003, 12:33 AM   #30
al_chemyst
LQ Newbie
 
Registered: Nov 2003
Location: Swamps of Jersey
Distribution: MDK 9.2 nubee
Posts: 24

Rep: Reputation: 15
Thanks linman!

I'll give the MDK 9.2 instructions a try soon.
First, I think I'll 'rpm -e' the previous attempt.

Your work/assistance is greatly appreciated!

Regards,
Al
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need drivers 4 BCM V.90 56K Modem bobFz Linux - Hardware 4 06-27-2005 08:56 AM
BCM V.92 56K modem on RH9 pqb Linux - Laptop and Netbook 5 04-24-2004 01:00 PM
Mandrake 9.2 Broadcom (BCM) modem driver?? Nilihanth Mandriva 2 11-07-2003 11:19 PM
Mandrake 9.1 With BCM V.90 56K HARDWARE Modem Sno Linux - Hardware 21 09-08-2003 08:11 PM
BCM v.90 56k modem in Mandrake 9.1 SMACK Linux - Hardware 2 09-08-2003 07:59 PM


All times are GMT -5. The time now is 04:56 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration