kernel source question

wheresmybacon

Diamond Member
Sep 10, 2004
3,899
0
76
I've got a PCI serial port adapter I'm trying to install in SLES 11, and I'm having some trouble. I've downloaded the driver from here, but when I execute the script(./eqnx-cfg), the build of the RPM fails. I've installed all the required packages, and I've followed the vendor's docs verbatim, although as an admittedly new Linux user, I don't know if my kernel source is built, configured, or neither built or configured.

Possibly stupid question ahead: If I install a fresh copy of SUSE Linux Enterprise Server 11, install the required packages (including the kernel source, "zypper install kernel-source"), is my kernel source "fully configured and built"? The vendor docs keep reiterating that exact verbage, in fact, the script that builds the RPM says just that:

NOTE: For linux 2.6 kernels, it is absolutely essential that the kernel source has been fully configured and build prior to installing the Equinox SST driver.

SLES 11 is a 2.6 kernel, so, yeah...I don't know. I've never built or rebuilt the kernel. Any help or direction you can provide is appreciated.


update - 7/72009 - RESOLUTION
=====================
Rolled back to SLES 10 and it works. :)
 

dinkumthinkum

Senior member
Jul 3, 2008
203
0
0
I don't use SUSE but I would venture that a "kernel-source" package does not come configured and built. I am presuming that you have a pre-built kernel from SUSE. My intuition would say that there should be a package that installs the necessary files to build drivers against that pre-built kernel available in the package system.
 

wheresmybacon

Diamond Member
Sep 10, 2004
3,899
0
76
Originally posted by: Nothinman
What is the error that you're getting from the RPM build>

Here's a paste of the console:

s-wimtest-2:~/Desktop/eqnx-4.12 # ./eqnx-cfg
Equinox SST (eqnx) Installation (from source RPM)

1) validating build environment ...

NOTE: To reduce the possibility of install or operational errors,
please build and install a kernel from the kernel source
(/lib/modules/2.6.27.19-5-pae/source) prior to installing Equinox SST driver.


NOTE: It is recommended that cloneconfig is run on the kernel source.
This will ensure that the kernel source is configured the same
as the running kernel.

Do you want to run cloneconfig on the kernel source (recommended). (Y/n) ? y

NOTE: For linux 2.6 kernels, it is absolutely essential
that the kernel source has been fully configured and built
prior to installing Equinox SST driver.


2) installing source RPM: eqnx-4.12-1 ...

3) building binary RPM: eqnx-4.12-1.i586.rpm (please wait) ...
rpm failed on build of binary RPM: eqnx-4.12-1.i586.rpm
please examine log file at /var/tmp/eqnx-log

If we look @ /var/tmp/eqnx-log it says:

D: ============== ./eqnx-4.12-1.src.rpm
D: Expected size: 300104 = lead(96)+sigs(180)+pad(4)+data(299824)
D: Actual size: 300104
D: ./eqnx-4.12-1.src.rpm: Header SHA1 digest: OK (38f536c367cf6a23835f0aaf7e3377e5295345ee)
D: added source package [0]
D: found 1 source and 0 binary packages
D: Expected size: 300104 = lead(96)+sigs(180)+pad(4)+data(299824)
D: Actual size: 300104
D: InstallSourcePackage: Header SHA1 digest: OK (38f536c367cf6a23835f0aaf7e3377e5295345ee)
eqnx-4.12-1
D: ========== Directories not explicitly included in package:
D: 0 /usr/src/packages/SOURCES/
D: 1 /usr/src/packages/SPECS/
D: ==========
D: fini 100644 1 ( 0, 0) 293843 /usr/src/packages/SOURCES/eqnx-4.12-1.tar.gz;4a400755
D: fini 100644 1 ( 0, 0) 4572 /usr/src/packages/SPECS/eqnx.spec;4a400755
GZDIO: 37 reads, 298792 total bytes in 0.001126 secs
D: May free Score board((nil))
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.26021
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd /usr/src/packages/BUILD
+ rm -rf eqnx-4.12-1
+ /usr/bin/gzip -dc /usr/src/packages/SOURCES/eqnx-4.12-1.tar.gz
+ tar -xvvf -
drwxr-xr-x root/root 0 2007-10-25 13:28 eqnx-4.12-1/
-rw-r--r-- root/root 1949 2007-10-25 13:28 eqnx-4.12-1/makefile
-rw-r--r-- root/root 849 2007-10-25 13:28 eqnx-4.12-1/version.include
drwxr-xr-x root/root 0 2007-10-25 13:28 eqnx-4.12-1/drv/
-rw-r--r-- root/root 1034 2007-10-25 13:28 eqnx-4.12-1/drv/makefile_2.4
-rw-r--r-- root/root 8262 2007-10-25 13:28 eqnx-4.12-1/drv/Makefile
-rw-r--r-- root/root 1252 2007-10-25 13:28 eqnx-4.12-1/drv/makefile_2.6
-rw-r--r-- root/root 1002685 2007-10-25 13:28 eqnx-4.12-1/drv/sst.c
drwxr-xr-x root/root 0 2007-10-25 13:28 eqnx-4.12-1/include/
-rw-r--r-- root/root 11448 2007-10-25 13:28 eqnx-4.12-1/include/eqnx_ioctl.h
-rw-r--r-- root/root 10868 2007-10-25 13:28 eqnx-4.12-1/include/brdtab.c
-rw-r--r-- root/root 30081 2007-10-25 13:28 eqnx-4.12-1/include/eqnx.h
-rw-r--r-- root/root 24431 2007-10-25 13:28 eqnx-4.12-1/include/icp.h
-rw-r--r-- root/root 2432 2007-10-25 13:28 eqnx-4.12-1/include/brdtab.h
-rw-r--r-- root/root 21406 2007-10-25 13:28 eqnx-4.12-1/include/ist.h
-rw-r--r-- root/root 61339 2007-10-25 13:28 eqnx-4.12-1/include/ramp.h
drwxr-xr-x root/root 0 2007-10-25 13:28 eqnx-4.12-1/utils/
drwxr-xr-x root/root 0 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/
drwxr-xr-x root/root 0 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/
-rw-r--r-- root/root 3163 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/devstat.h
-rw-r--r-- root/root 11169 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/devdyn.h
-rw-r--r-- root/root 6778 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/twindow.h
-rw-r--r-- root/root 1061 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/keys.h
-rw-r--r-- root/root 6642 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/misc.h
-rw-r--r-- root/root 1675 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/cstream.h
-rw-r--r-- root/root 2230 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/v24.h
-rw-r--r-- root/root 1418 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/sizes.h
-rw-r--r-- root/root 1193 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/include/xtend.h
-rw-r--r-- root/root 1951 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/makefile
-rw-r--r-- root/root 36140 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/screen.c
-rwxr-xr-x root/root 12736 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/ss.hlp
-rw-r--r-- root/root 171736 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/u4.c
-rw-r--r-- root/root 4293 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/README.ssdiag
-rw-r--r-- root/root 45847 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/ports.c
-rw-r--r-- root/root 10817 2007-10-25 13:28 eqnx-4.12-1/utils/ssdiag/ccode.c
-rw-r--r-- root/root 28413 2007-10-25 13:28 eqnx-4.12-1/utils/sstty.c
-rwxr-xr-x root/root 1949 2007-10-25 13:28 eqnx-4.12-1/utils/ssrm
-rw-r--r-- root/root 2223 2007-10-25 13:28 eqnx-4.12-1/utils/makefile
-rw-r--r-- root/root 25747 2007-10-25 13:28 eqnx-4.12-1/utils/ssmkn.c
-rw-r--r-- root/root 2336 2007-10-25 13:28 eqnx-4.12-1/utils/rc.eqnx
drwxr-xr-x root/root 0 2007-10-25 13:28 eqnx-4.12-1/inst/
-rw-r--r-- root/root 1234 2007-10-25 13:28 eqnx-4.12-1/inst/makefile
-rw-r--r-- root/root 23295 2007-10-25 13:28 eqnx-4.12-1/inst/INSTALL.TXT
-rw-r--r-- root/root 8453 2007-10-25 13:28 eqnx-4.12-1/inst/RELEASE.TXT
-rwxr-xr-x root/root 15384 2007-10-25 13:28 eqnx-4.12-1/inst/eqnx-cfg
-rwxr-xr-x root/root 415 2007-10-25 13:28 eqnx-4.12-1/inst/rpmvar
-rwxr-xr-x root/root 4736 2007-10-25 13:28 eqnx-4.12-1/inst/eqnx-installrc
-rw-r--r-- root/root 4572 2007-10-25 13:28 eqnx-4.12-1/eqnx.spec
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd eqnx-4.12-1
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ rm -rf /var/tmp/eqnx-build/src
+ mkdir -m 755 -p /var/tmp/eqnx-build/src
+ cp -R /usr/src/packages/BUILD/eqnx-4.12-1/drv /usr/src/packages/BUILD/eqnx-4.12-1/eqnx.spec /usr/src/packages/BUILD/eqnx-4.12-1/include /usr/src/packages/BUILD/eqnx-4.12-1/inst /usr/src/packages/BUILD/eqnx-4.12-1/makefile /usr/src/packages/BUILD/eqnx-4.12-1/utils /usr/src/packages/BUILD/eqnx-4.12-1/version.include /var/tmp/eqnx-build/src
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.26021
+ umask 022
+ cd /usr/src/packages/BUILD
+ /bin/rm -rf /var/tmp/eqnx-build
++ dirname /var/tmp/eqnx-build
+ /bin/mkdir -p /var/tmp
+ /bin/mkdir /var/tmp/eqnx-build
+ cd eqnx-4.12-1
+ rm -rf /var/tmp/eqnx-build/src
+ mkdir -m 755 -p /var/tmp/eqnx-build/src
+ cp -R /usr/src/packages/BUILD/eqnx-4.12-1/drv /usr/src/packages/BUILD/eqnx-4.12-1/eqnx.spec /usr/src/packages/BUILD/eqnx-4.12-1/include /usr/src/packages/BUILD/eqnx-4.12-1/inst /usr/src/packages/BUILD/eqnx-4.12-1/makefile /usr/src/packages/BUILD/eqnx-4.12-1/utils /usr/src/packages/BUILD/eqnx-4.12-1/version.include /var/tmp/eqnx-build/src
+ make all OBJROOT=/var/tmp/eqnx-build
cd drv; make build
make[1]: Entering directory `/usr/src/packages/BUILD/eqnx-4.12-1/drv'
make O=/lib/modules/2.6.27.19-5-pae/build -C /lib/modules/2.6.27.19-5-pae/source SUBDIRS=/usr/src/packages/BUILD/eqnx-4.12-1/drv modules
make[2]: Entering directory `/usr/src/linux-2.6.27.19-5'
/usr/src/linux-2.6.27.19-5/scripts/Makefile.build:46: *** CFLAGS was changed in "/usr/src/packages/BUILD/eqnx-4.12-1/drv/Makefile". Fix it to use EXTRA_CFLAGS. Stop.
make[3]: *** [_module_/usr/src/packages/BUILD/eqnx-4.12-1/drv] Error 2
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.27.19-5'
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/packages/BUILD/eqnx-4.12-1/drv'
make: *** [build] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.26021 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.26021 (%build)

I don't know what "Error 2" is there @ the end.
 

wheresmybacon

Diamond Member
Sep 10, 2004
3,899
0
76
Originally posted by: dinkumthinkum
I don't use SUSE but I would venture that a "kernel-source" package does not come configured and built. I am presuming that you have a pre-built kernel from SUSE. My intuition would say that there should be a package that installs the necessary files to build drivers against that pre-built kernel available in the package system.

That's what I'm thinking too, since when I installed the kernel source with zypper it just grabbed it off the SLES DVD.

Agreed on the second part as well but I don't know what that package is. =|
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
/lib/modules/2.6.27.19-5-pae/build

Does that exist? It's probably a symlink to somewhere else, but if there's files in there chances are that it's fine.

CFLAGS was changed in "/usr/src/packages/BUILD/eqnx-4.12-1/drv/Makefile". Fix it to use EXTRA_CFLAGS. Stop.

Looks like the problem is that they're redefining the CFLAGS variable in their Makefile, I don't know if the build erroring on that is a new thing or not but it seems pretty dumb to do anyway. You could try commenting out that variable definition in their Makefile and see if it builds ok.
 

wheresmybacon

Diamond Member
Sep 10, 2004
3,899
0
76
Originally posted by: Nothinman
/lib/modules/2.6.27.19-5-pae/build

Does that exist? It's probably a symlink to somewhere else, but if there's files in there chances are that it's fine.
It's a symlink to /usr/src/linux-2.6.27.19-5-obj/i386/pae, so yeah I think I'm OK there.
CFLAGS was changed in "/usr/src/packages/BUILD/eqnx-4.12-1/drv/Makefile". Fix it to use EXTRA_CFLAGS. Stop.

Looks like the problem is that they're redefining the CFLAGS variable in their Makefile, I don't know if the build erroring on that is a new thing or not but it seems pretty dumb to do anyway. You could try commenting out that variable definition in their Makefile and see if it builds ok.

I'll give that a shot. Thanks!
 

wheresmybacon

Diamond Member
Sep 10, 2004
3,899
0
76
I looked through the vendor's Makefile and couldn't see anywhere where they'd redefined CFLAGS. But even if I were to comment that out, it's overwritten when I invoke their script ./eqnx-cfg. That script creates the entirety of that path including their Makefile.

The other option here is to use their RPM. Yes they included an RPM in the zip download along with the script, and although they recommend using their script to install the driver, there is a way to just install it manually with the RPM. I'm going to give that a go today.

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
So is CFLAGS redefiend by eqns-cfg then?

Unless the RPM installs a module for the exact kernel version that you're using it probably won't work.
 

wheresmybacon

Diamond Member
Sep 10, 2004
3,899
0
76
Well I managed to catch the attention of the Big Linux Guru in our org and he's in via SSH right now looking at this. I'll post an update when he fixes it for me ><.

Thanks for everyone's input.
 

wheresmybacon

Diamond Member
Sep 10, 2004
3,899
0
76
Well our other 2 Linux guys (I barley considering myself a Linux guy) couldn't figure it out either and I've opened a ticket with the vendor, Avocent. In the meantime I've downloaded and installed Fedora 11. Maybe it's just SUSE or maybe this driver just sucks.

I'll know soon enough.