Jump to content

A definite and final "Conexant Hell" Solution


Latem
 Share

Recommended Posts

I'm tring to install the hsflinmodem-5.03.27lnxtbeta03042700.tar.gz (the conexant beta drivers) file and when it comes to running 'hsfconfig' I get an error after it asks me to type the directory in which my kernel source is located in. It asks me to check the contents of a file called 'hsf-buildlog.txt'. Here is the contents of 'buildlog.txt':

rm -f *.o *.a

make[1]: Entering directory `/usr/lib/hsf/modules/osspec'

rm -f *.o *.a

make[1]: Leaving directory `/usr/lib/hsf/modules/osspec'

* compiling (gcc) mod_osspec.c

In file included from ../modules/osspec/include/oscompat.h:20,

                from mod_osspec.c:10:

/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/cpumask.h:8,

                from /usr/include/linux/sched.h:14,

                from ../modules/osspec/include/oscompat.h:22,

                from mod_osspec.c:10:

/usr/include/linux/bitmap.h: In function `bitmap_shift_right':

/usr/include/linux/bitmap.h:85: error: `__shr_tmp' undeclared (first use in this function)

/usr/include/linux/bitmap.h:85: error: (Each undeclared identifier is reported only once

/usr/include/linux/bitmap.h:85: error: for each function it appears in.)

/usr/include/linux/bitmap.h: In function `bitmap_shift_left':

/usr/include/linux/bitmap.h:98: error: `__shl_tmp' undeclared (first use in this function)

In file included from /usr/include/linux/sched.h:14,

                from ../modules/osspec/include/oscompat.h:22,

                from mod_osspec.c:10:

/usr/include/linux/cpumask.h:10:5: missing binary operator before token "("

/usr/include/linux/cpumask.h:34:5: missing binary operator before token "("

In file included from /usr/include/asm/siginfo.h:4,

                from /usr/include/linux/signal.h:7,

                from /usr/include/linux/sched.h:24,

                from ../modules/osspec/include/oscompat.h:22,

                from mod_osspec.c:10:

/usr/include/asm-generic/siginfo.h: At top level:

/usr/include/asm-generic/siginfo.h:53: error: size of array `_pad' is too large

In file included from /usr/include/linux/gfp.h:4,

                from /usr/include/linux/slab.h:15,

                from /usr/include/linux/percpu.h:4,

                from /usr/include/linux/sched.h:30,

                from ../modules/osspec/include/oscompat.h:22,

                from mod_osspec.c:10:

/usr/include/linux/mmzone.h:333: error: parse error before '(' token

/usr/include/linux/mmzone.h:334: error: parse error before numeric constant

In file included from mod_osspec.c:10:

../modules/osspec/include/oscompat.h:23:26: linux/tqueue.h: No such file or directory

In file included from /usr/include/linux/mm.h:206,

                from ../modules/osspec/include/oscompat.h:24,

                from mod_osspec.c:10:

/usr/include/linux/page-flags.h:119: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)

/usr/include/linux/page-flags.h:119: error: requested alignment is not a constant

In file included from /usr/include/linux/irq.h:20,

                from /usr/include/asm/hardirq.h:6,

                from /usr/include/linux/interrupt.h:11,

                from ../modules/osspec/include/oscompat.h:25,

                from mod_osspec.c:10:

/usr/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory

In file included from /usr/include/asm/hardirq.h:6,

                from /usr/include/linux/interrupt.h:11,

                from ../modules/osspec/include/oscompat.h:25,

                from mod_osspec.c:10:

/usr/include/linux/irq.h:68: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)

/usr/include/linux/irq.h:68: error: requested alignment is not a constant

/usr/include/linux/irq.h:70: error: `NR_IRQS' undeclared here (not in a function)

In file included from /usr/include/linux/irq.h:72,

                from /usr/include/asm/hardirq.h:6,

                from /usr/include/linux/interrupt.h:11,

                from ../modules/osspec/include/oscompat.h:25,

                from mod_osspec.c:10:

/usr/include/asm/hw_irq.h:28: error: `NR_IRQ_VECTORS' undeclared here (not in a function)

/usr/include/asm/hw_irq.h:31: error: `NR_IRQS' undeclared here (not in a function)

In file included from /usr/include/linux/interrupt.h:11,

                from ../modules/osspec/include/oscompat.h:25,

                from mod_osspec.c:10:

/usr/include/asm/hardirq.h:13: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)

/usr/include/asm/hardirq.h:13: error: requested alignment is not a constant

In file included from /usr/include/linux/module.h:20,

                from ../modules/osspec/include/oscompat.h:27,

                from mod_osspec.c:10:

/usr/include/asm/module.h:54:2: #error unknown processor family

In file included from mod_osspec.c:10:

../modules/osspec/include/oscompat.h:33:41: missing binary operator before token "("

../modules/osspec/include/oscompat.h:39:41: missing binary operator before token "("

../modules/osspec/include/oscompat.h:128:40: missing binary operator before token "("

../modules/osspec/include/oscompat.h:148:41: missing binary operator before token "("

../modules/osspec/include/oscompat.h:192:41: missing binary operator before token "("

In file included from mod_osspec.c:10:

../modules/osspec/include/oscompat.h: In function `cnxthsf_OsModuleUseCountInc':

../modules/osspec/include/oscompat.h:205: warning: `MOD_INC_USE_COUNT' is deprecated (declared at /usr/include/linux/module.h:495)

In file included from mod_osspec.c:10:

../modules/osspec/include/oscompat.h: In function `cnxthsf_OsModuleUseCountDec':

../modules/osspec/include/oscompat.h:210: warning: `MOD_DEC_USE_COUNT' is deprecated (declared at /usr/include/linux/module.h:507)

../modules/osspec/include/oscompat.h:293:40: missing binary operator before token "("

make: *** [mod_osspec.o] Error 1

 

Can anyone tell me what I'm doing wrong here and how I can fix it?

Thanks folks!

 

I am using kernel 2.6.3-7 on Mandrake 10 OE.

Link to comment
Share on other sites

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

I've tried with the most recent Linuxant drivers too and come across the same problem at the same point (hsfconfig, identifying the source destination).

I've tried uninstalling but it makes no difference.

 

Is anyone else experiencing the same difficulty?

Link to comment
Share on other sites

  • 2 weeks later...

The readme inside hsflinmodem5.03.27.tar.gz doesn't include PCI ID 16EC:2F00 (U.S. Robotics USR5660A (265660A) 56K PCI Faxmodem) under supported HSF. My modem is pretty new so this older driver doesn't support it. It looks like the only way I'm going to be able to get it to work is buy the license or pay $80 for the only USR modem that supports Linux.

Link to comment
Share on other sites

I'm trying to run hsfconfig after the "hsflinmodem5.03.27.tar.gz" file has been installed.

 

I'm getting a problem when I'm at the kernel source part. The error I get is:

rm -f *.o *.a

make[1]: Entering directory `/usr/lib/hsf/modules/osspec'

rm -f *.o *.a

make[1]: Leaving directory `/usr/lib/hsf/modules/osspec'

* compiling (gcc) mod_osspec.c

In file included from mod_osspec.c:51:

../modules/osspec/include/oscompat.h:274:5: missing terminating " character

../modules/osspec/include/oscompat.h:320:1: missing terminating " character

make: *** [mod_osspec.o] Error 1

 

Does anyone know what this means and how to fix it?

I'm using kernel 2.4.25-2 and I have the source installed.

 

Alternatively, where can I get the 'hsfcompat_24-1.0d.tar.gz' file from? (note: The http://www.mbsi.ca/hsfcompat/hsfcompat_24-1.0d.tar.gz link doesn't work)

Link to comment
Share on other sites

I've also got a copy of the contents of the oscompat.h

 

/*

* Copyright © 2001-2002 Conexant Systems, Inc.

*

* 1.  Permitted use. Redistribution and use in source and binary forms,

* with or without modification, are permitted under the terms set forth

* herein.

*

* 2.  Disclaimer of Warranties. CONEXANT AND OTHER CONTRIBUTORS MAKE NO

* REPRESENTATION ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.

* IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTIES OF ANY KIND.

* CONEXANT AND OTHER CONTRIBUTORS DISCLAIMS ALL WARRANTIES WITH REGARD TO

* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS

* FOR A PARTICULAR PURPOSE, GOOD TITLE AND AGAINST INFRINGEMENT.

*

* This software has not been formally tested, and there is no guarantee that

* it is free of errors including, but not limited to, bugs, defects,

* interrupted operation, or unexpected results. Any use of this software is

* at user's own risk.

*

* 3.  No Liability.

*

* (a) Conexant or contributors shall not be responsible for any loss or

* damage to Company, its customers, or any third parties for any reason

* whatsoever, and CONEXANT OR CONTRIBUTORS SHALL NOT BE LIABLE FOR ANY

* ACTUAL, DIRECT, INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL, OR CONSEQUENTIAL

* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)

* HOWEVER CAUSED, WHETHER IN CONTRACT, STRICT OR OTHER LEGAL THEORY OF

* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY

* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY

* OF SUCH DAMAGE.

*

* (B) User agrees to hold Conexant and contributors harmless from any

* liability, loss, cost, damage or expense, including attorney's fees,

* as a result of any claims which may be made by any person, including

* but not limited to User, its agents and employees, its customers, or

* any third parties that arise out of or result from the manufacture,

* delivery, actual or alleged ownership, performance, use, operation

* or possession of the software furnished hereunder, whether such claims

* are based on negligence, breach of contract, absolute liability or any

* other legal theory.

*

* 4.  Notices. User hereby agrees not to remove, alter or destroy any

* copyright, trademark, credits, other proprietary notices or confidential

* legends placed upon, contained within or associated with the Software,

* and shall include all such unaltered copyright, trademark, credits,

* other proprietary notices or confidential legends on or in every copy of

* the Software.

*

*/

#ifndef __OSCOMPAT_H

#define __OSCOMPAT_H

 

#ifdef __cplusplus

extern "C"

{

#endif

 

#include "osuniqredef.h"

 

#include <linux/version.h>

#include <linux/config.h>

#include <linux/sched.h>

#include <linux/tqueue.h>

#include <linux/mm.h>

#include <linux/interrupt.h>

#include <linux/wait.h>

#include <linux/module.h>

#include <linux/init.h>

#include <linux/kernel.h>

#include <linux/string.h>

#include <linux/kdev_t.h>

 

#if LINUX_VERSION_CODE == KERNEL_VERSION(2,4,9)

/* get rid of non-standard min/max macros */

#undef min

#undef max

#endif

 

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,2)

#include <linux/circ_buf.h>

#else

 

struct circ_buf {

char *buf;

int head;

int tail;

};

 

/* Return count in buffer.  */

#define CIRC_CNT(head,tail,size) (((head) - (tail)) & ((size)-1))

 

/* Return space available, 0..size-1.  We always leave one free char

  as a completely full buffer has head == tail, which is the same as

  empty.  */

#define CIRC_SPACE(head,tail,size) CIRC_CNT((tail),((head)+1),(size))

 

/* Return count up to the end of the buffer.  Carefully avoid

  accessing head and tail more than once, so they can change

  underneath us without returning inconsistent results.  */

#define CIRC_CNT_TO_END(head,tail,size) \

({int end = (size) - (tail); \

  int n = ((head) + end) & ((size)-1); \

  n < end ? n : end;})

 

/* Return space available up to the end of the buffer.  */

#define CIRC_SPACE_TO_END(head,tail,size) \

({int end = (size) - 1 - (head); \

  int n = (end + (tail)) & ((size)-1); \

  n <= end ? n : end+1;})

 

#endif

 

#ifdef CONFIG_KDB

#define KDB_ENTER() asm("\tint $129\n")

#else

#define KDB_ENTER()

#endif

 

#if defined(CONFIG_PREEMPT) && defined(PROJECT) && (PROJECT == PRJ_HSF)

#error Preemptible kernel option (CONFIG_PREEMPT) not yet supported. Reconfigure your kernel without it.

#endif

 

#ifndef minor

#define minor(d) MINOR(d)

#endif

 

#ifdef MODULE

#ifndef THIS_MODULE

#define THIS_MODULE (&__this_module)

#endif

#ifndef module_init

#define module_init(x)  int init_module(void) { return x(); }

#endif

#ifndef module_exit

#define module_exit(x)  void cleanup_module(void) { x(); }

#endif

#endif

 

#ifndef MODULE_LICENSE

#define MODULE_LICENSE(x)

#endif

 

#ifndef __exit

#define __exit

#endif

 

#ifndef DECLARE_MUTEX

#define DECLARE_MUTEX(name)                struct semaphore name=MUTEX

#define init_MUTEX(x)                              *(x)=MUTEX

#endif

 

#ifndef DECLARE_WAITQUEUE

#define DECLARE_WAITQUEUE(wait, current) struct wait_queue wait = { current, NULL }

#define DECLARE_WAIT_QUEUE_HEAD(wait)      wait_queue_head_t wait

typedef struct wait_queue *wait_queue_head_t;

#define init_waitqueue_head(x)          *(x)=NULL

#endif

 

#ifndef set_current_state

#define __set_current_state(state_value) do { current->state = state_value; } while (0)

#ifdef __SMP__

#define set_current_state(state_value)  do { __set_current_state(state_value); mb(); } while (0)

#else

#define set_current_state(state_value)  __set_current_state(state_value)

#endif

#endif // set_current_state

 

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)

#define get_zeroed_page get_free_page

#define try_inc_mod_count(mod) ((mod && !(mod->flags & MOD_DELETED)) ? __MOD_INC_USE_COUNT(mod), 1 : 0)

#endif // LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)

 

#ifndef PREPARE_TQUEUE

/*

* Emit code to initialise a tq_struct's routine and data pointers

*/

#define PREPARE_TQUEUE(_tq, _routine, _data)  \

do {      \

  (_tq)->routine = _routine;  \

  (_tq)->data = _data;    \

} while (0)

#endif

 

#ifndef INIT_TQUEUE

/*

* Emit code to initialise all of a tq_struct

*/

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)

#define INIT_TQUEUE(_tq, _routine, _data)  \

do {      \

  INIT_LIST_HEAD(&(_tq)->list);    \

  (_tq)->sync = 0;    \

  PREPARE_TQUEUE((_tq), (_routine), (_data)); \

} while (0)

#else

#define INIT_TQUEUE(_tq, _routine, _data)  \

do {      \

  (_tq)->next = NULL;    \

  (_tq)->sync = 0;    \

  PREPARE_TQUEUE((_tq), (_routine), (_data)); \

} while (0)

#endif

#endif

 

#ifndef DECLARE_TASKLET

#define tasklet_struct tq_struct

#define tasklet_init(tlet, func, parm) INIT_TQUEUE(tlet, (void (*)(void *))(func), (void *)(parm))

#define tasklet_schedule(tlet) queue_task(tlet, &tq_immediate); mark_bh(IMMEDIATE_BH)

static inline void tasklet_kill(struct tasklet_struct *t)

{

unsigned long flags;

struct tq_struct **pp;

 

spin_lock_irqsave(&tqueue_lock, flags);

 

if(t->sync) {

  for(pp = &tq_immediate; *pp; pp = &(*pp)->next) {

  if(*pp == t) {

    *pp = t->next;

    t->sync = 0;

    break;

  }

  }

}

 

spin_unlock_irqrestore(&tqueue_lock, flags);

}

#endif

 

#if defined(EXPORT_SYMTAB)

 

#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)) && defined(memcpy)

/* accomodate references to memcpy caused by gcc */

void * memcpy_for_gcc(void *dest, const void *src, __kernel_size_t n)

{

return memcpy(dest, src, n);

}

#undef memcpy

void * memcpy(void *dest, const void *src, __kernel_size_t n) __attribute__ ((weak, alias ("memcpy_for_gcc")));

#endif

 

#if defined(PROJECT) && (PROJECT == PRJ_HSF)

void OsModuleUseCountInc(void)

{

MOD_INC_USE_COUNT;

}

 

void OsModuleUseCountDec(void)

{

MOD_DEC_USE_COUNT;

}

#endif

 

#endif // EXPORT_SYMTAB

 

 

#if defined(DEBUG_CHECK_STACK) && (defined(EXPORT_SYMTAB) || defined(CNXTSERIAL_INCLUDE_CORE))

 

/* inspired by Benjamin LaHaise's CONFIG_X86_STACK_CHECK patch */

 

static void __attribute__ ((unused, used))

_OSUNIQDEF(stack_overflow)(void *esp, void *eip)

{

printk(KERN_ERR "%s: from %p.  esp: %p\n", __FUNCTION__, eip, esp);

KDB_ENTER();

}

 

void mcount(void) __attribute__ ((alias (_OSUNIQDEF_STR(mcount))));

 

static int __attribute__ ((unused)) stack_danger_zone =

  sizeof(struct task_struct) + 512;

 

asm("

 

THREAD_SIZE      = 8192 /* 2 * PAGE_SIZE */

 

.data

 

stack_overflowed:

.long  0

 

.text

 

.align 16

 

.type    "_OSUNIQDEF_STR(mcount)",@function

.globl "_OSUNIQDEF_STR(mcount)"

 

"_OSUNIQDEF_STR(mcount)":

push %eax

movl $(THREAD_SIZE - 1),%eax

andl %esp,%eax

cmpl stack_danger_zone, %eax

jle 1f

2:

popl %eax

ret

 

1:

movl %esp,%eax

 

lock; btsl $0,stack_overflowed /* prevent re-entry */

jc 2b

 

pushf

cli

 

# push eip then esp of error for stack_overflow

pushl 4(%eax)

pushl %eax

call "_OSUNIQDEF_STR(stack_overflow)"

addl $8,%esp

 

popf

 

popl %eax

movl    $0,stack_overflowed

ret

");

 

#warning stack check enabled

 

#endif

 

#if defined(PROJECT) && (PROJECT == PRJ_HSF)

void OsObtainedLock(void);

void OsReleasedLock(void);

int OsLocksHeld(void);

 

#define OSContextAllowsSleeping() (!in_interrupt()) && (!OsLocksHeld())

#endif

 

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)

struct usb_ctrlrequest {

__u8 bRequestType;

__u8 bRequest;

__u16 wValue;

__u16 wIndex;

__u16 wLength;

} __attribute__ ((packed));

#endif

 

#ifdef __cplusplus

}

#endif

 

#endif /* __OSCOMPAT_H */

 

I've made the lines that it is having troubles with bold.

 

I think it's a C programming related issue.

Does anyone know how to fix it? :unsure:

 

I'm using kernel 2.4.25-2 and noticed that "KERNEL_VERSION(2,4,20)" appears a couple of times. Does this mean it's incompatible with my kernel?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...