Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 18/07/2012, à 18:19

lambertine

resolu compilation driver modem intel536Ep impossible

Bonjour,
j'ai recupere une carte modem intell 536Ep que je tente de faire fonctionner avec ubuntu 10.04.
A priori , il faut un driver qui n'est pas installe . Apres des recherches , je l'ai telecharge, desarchiver mais je suis en echec a la compilation

catherine@hermes:~/intel-536EP-2.56.76.0$ make 536
   Module precompile check
   Current running kernel is: 2.6.32-41-generic
   /lib/modules...   autoconf.h exists
diff: /boot/vmlinuz.autoconf.h: Aucun fichier ou dossier de ce type
   autoconf.h matches running kernel
diff: /boot/vmlinuz.version.h: Aucun fichier ou dossier de ce type
   version.h matches running kernel
uname -r|grep "2.6" && \
    cd coredrv && make 536core_26 && \
    cp Intel536.ko .. && cd .. && \
    strip --strip-debug Intel536.ko && \
    exit; \
    ls Intel536.ko >/dev/null 2>&1 ||  uname -r | grep "2.6" && echo "Failed to build driver" && exit; \
        if [  ]; then \
    cd coredrv; make TARGET=TARGET_SELAH KERNEL_SOURCE_PATH= "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
    else \
    cd coredrv; make TARGET=TARGET_SELAH KERNEL_INCLUDES=/lib/modules/`uname -r`/build/include \
       "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
        fi ; \
    cp Intel536.o .. ; \
    if [ -a /boot/vmlinuz.version.h ]; then \
        cp /boot/vmlinuz.version.h /lib/modules/`uname -r`/build/include/linux/version.h;\
        fi
2.6.32-41-generic
make[1]: entrant dans le répertoire « /home/catherine/intel-536EP-2.56.76.0/coredrv »
make -C /lib/modules/2.6.32-41-generic/build SUBDIRS=/home/catherine/intel-536EP-2.56.76.0/coredrv modules
make[2]: entrant dans le répertoire « /usr/src/linux-headers-2.6.32-41-generic »
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.o
/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.c: In function ‘create_hamproc’:
/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.c:785: error: ‘struct proc_dir_entry’ has no member named ‘owner’
make[3]: *** [/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.o] Erreur 1
make[2]: *** [_module_/home/catherine/intel-536EP-2.56.76.0/coredrv] Erreur 2
make[2]: quittant le répertoire « /usr/src/linux-headers-2.6.32-41-generic »
make[1]: *** [536core_26] Erreur 2
make[1]: quittant le répertoire « /home/catherine/intel-536EP-2.56.76.0/coredrv »
2.6.32-41-generic
Failed to build driver

Le but est d'envoyer des fax a partir de mon ordinateur

Lambertine

Dernière modification par lambertine (Le 20/07/2012, à 17:18)

Hors ligne

#2 Le 18/07/2012, à 20:56

lambertine

Re : resolu compilation driver modem intel536Ep impossible

voir plus haut

Hors ligne

#3 Le 18/07/2012, à 21:45

darunia_goron

Re : resolu compilation driver modem intel536Ep impossible

On dirait que ce sont les sources qui contiennent une erreur. Peut-on avoir un lien vers les sources dudit pilote ?



lambertine a écrit :

voir plus haut

Merci pour l'indice.

J'avais pas vu.
J'avais pas vu !

Hors ligne

#4 Le 19/07/2012, à 08:28

lambertine

Re : resolu compilation driver modem intel536Ep impossible

voila la page ou j'ai trouve le driver

et j'ai choisi le dernier lien

As of today, March 11 2009, the latest driver is:

    http://linmodems.technion.ac.il/package … 08.tar.bz2

lambertine

Hors ligne

#5 Le 19/07/2012, à 10:11

darunia_goron

Re : resolu compilation driver modem intel536Ep impossible

Ce n'est pas très à jour tout ça. Voici les erreurs à corriger.

Dans locks.c, remplace DECLARE_MUTEX par DEFINE_SEMAPHORE (plusieurs occurrences).

Dans coredrv.c, commente la ligne 786

   /* hamproc->owner = THIS_MODULE; */

Dans softserial.c remplace ptty->ldisc.ops par ptty->ldisc->ops (deux occurrences).


Ensuite, ça plante au linking car je suis en 64 bits et c'est un driver 32 bits. Si tu es en 32 bits ça devrait passer.

Hors ligne

#6 Le 19/07/2012, à 13:02

lambertine

Re : resolu compilation driver modem intel536Ep impossible

j'ai fait les modif mais sans resultat apparent

catherine@hermes:~/intel-536EP-2.56.76.0$ make 536
   Module precompile check
   Current running kernel is: 2.6.32-41-generic
   /lib/modules...   autoconf.h exists
diff: /boot/vmlinuz.autoconf.h: Aucun fichier ou dossier de ce type
   autoconf.h matches running kernel
diff: /boot/vmlinuz.version.h: Aucun fichier ou dossier de ce type
   version.h matches running kernel
uname -r|grep "2.6" && \
    cd coredrv && make 536core_26 && \
    cp Intel536.ko .. && cd .. && \
    strip --strip-debug Intel536.ko && \
    exit; \
    ls Intel536.ko >/dev/null 2>&1 ||  uname -r | grep "2.6" && echo "Failed to build driver" && exit; \
        if [  ]; then \
    cd coredrv; make TARGET=TARGET_SELAH KERNEL_SOURCE_PATH= "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
    else \
    cd coredrv; make TARGET=TARGET_SELAH KERNEL_INCLUDES=/lib/modules/`uname -r`/build/include \
       "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
        fi ; \
    cp Intel536.o .. ; \
    if [ -a /boot/vmlinuz.version.h ]; then \
        cp /boot/vmlinuz.version.h /lib/modules/`uname -r`/build/include/linux/version.h;\
        fi
2.6.32-41-generic
make[1]: entrant dans le répertoire « /home/catherine/intel-536EP-2.56.76.0/coredrv »
make -C /lib/modules/2.6.32-41-generic/build SUBDIRS=/home/catherine/intel-536EP-2.56.76.0/coredrv modules
make[2]: entrant dans le répertoire « /usr/src/linux-headers-2.6.32-41-generic »
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.o
/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.c:785:36: warning: "/*" within comment
/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.c:794:2: warning: "/*" within comment
/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.c:1019:1: warning: "/*" within comment
/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.c:1022:2: error: #endif without #if
/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.c: In function ‘create_hamproc’:
/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.c:784: error: expected declaration or statement at end of input
make[3]: *** [/home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.o] Erreur 1
make[2]: *** [_module_/home/catherine/intel-536EP-2.56.76.0/coredrv] Erreur 2
make[2]: quittant le répertoire « /usr/src/linux-headers-2.6.32-41-generic »
make[1]: *** [536core_26] Erreur 2
make[1]: quittant le répertoire « /home/catherine/intel-536EP-2.56.76.0/coredrv »
2.6.32-41-generic
Failed to build driver

Hors ligne

#7 Le 19/07/2012, à 15:43

darunia_goron

Re : resolu compilation driver modem intel536Ep impossible

Chez moi ça fonctionne. Poste coredrv.c en entier.

Hors ligne

#8 Le 19/07/2012, à 18:20

lambertine

Re : resolu compilation driver modem intel536Ep impossible

je n'arrive pas a le poster a cause des caracteres speciaux

Hors ligne

#9 Le 19/07/2012, à 18:26

lambertine

Re : resolu compilation driver modem intel536Ep impossible

/*****************************************************************************
 Copyright (c) 1999-2004, Intel Corporation 

 All rights reserved.

 Redistribution and use in source and binary forms, with or without 
 modification, are permitted provided that the following conditions are met:

 1. Redistributions of source code must retain the above copyright notice, 
 this list of conditions and the following disclaimer.

 2. Redistributions in binary form must reproduce the above copyright notice,
 this list of conditions and the following disclaimer in the documentation 
 and/or other materials provided with the distribution.

 3. Neither the name of Intel Corporation nor the names of its contributors 
 may be used to endorse or promote products derived from this software 
 without specific prior written permission.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 DISCLAIMED. IN NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
 LIABILITY, WHETHER IN CONTRACT, STRICT 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. 

June 2002- August 2002 Modified for use with Linux kernel 2.6
                         by Philippe Vouters (Philippe.Vouters@laposte.net)
****************************************************************************/
#include "hamcore.h"
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/sched.h>
#include <linux/pci.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/serialP.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/uaccess.h>

#undef CONFIG_PM

#ifdef CONFIG_PM
#include <linux/pm.h>
#endif

#include "uart.h"
#include "rts.h"
#include "lock_lin.h"

/////////////////////////////////////////////////////////////////////
//////////////////////////// softcore changes ///////////////////////
/////////////////////////////////////////////////////////////////////
asmlinkage int (*Debug_Printf)(const char*, ...)
         __attribute__ ((format (printf, 1, 2)));

#if !defined (TARGET_CATAWBA)
extern PUCHAR       pBaseAddress;
#endif
extern asmlinkage void (*CRAM_CallBack)(void);
unsigned int*      dsp_irq;


#include"softcore.h"
int softcore_init_struct(struct softcore_struct*);
//#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
EXPORT_SYMBOL(softcore_init_struct);
//#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,21)
#define pci_find_device pci_get_device
#endif
int open(void);
void close(void);
void stop(void);
void start(void);
int  write(int);
void dtr_on(void);
void rts_on(void);
void hangup(void);
void put_char(unsigned char);
void dtr_off(void);
void rts_off(void);
void msr_wait(void);
void send_xchar(unsigned char);
int  write_free(void);
void write_flush(void);
int  write_pending(void);
int  get_line_status(unsigned char);
unsigned int set_char(int, char, char, char);
void get_char(int *, char *, char *, char *);

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) 
 int interrupt_handler(int irq, void *dev_id, struct pt_regs *regs);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
 irqreturn_t interrupt_handler(int irq, void *dev_id);
#else
 void interrupt_handler(int irq, void *dev_id, struct pt_regs *regs);
#endif

void send_data_to_user(void);//rs_recieve
extern volatile ubyte dce_tx_enabled;

static struct global
{
   struct softcore_struct* softcore;
   int irq_share;
   unsigned int irq;

}G;

#if defined (TARGET_CATAWBA)
int get_pci_info_537(void *data)
{
    // We assume 1 or 0 catawba devices installed. This is stated in requirements.
    struct pci_dev *pdev = NULL;
    struct softcore_struct* driver = (struct softcore_struct*)data;

    // This should be first!!!
    pdev = pci_find_device (TJ320_VENDOR_ID, TJ320_DEVICE_ID, pdev);
    if (pdev)
    {
        printk(KERN_INFO"Intel 537 card found\n");
        if (strstr(VER_PRODUCTNAME_STR, "537 "))
        {
            driver->afe_type = TJ320_VENDOR_ID;
            driver->pci.ven_id = TJ320_VENDOR_ID;
            driver->pci.dev_id = TJ320_DEVICE_ID;
            driver->pci.function_id = 0;
            return 0;
        }
        else
        {
            printk(KERN_ERR"This %s driver won't install on Intel 537 card, please download the right driver\n",
                    VER_PRODUCTNAME_STR);
            return -1;
        }
     }

    pdev = pci_find_device (SI3052_VENDOR_ID, SI3052_DEVICE_ID, pdev);
    if (pdev)
    {
        printk(KERN_INFO"Intel 537EP card found\n");
        if (strstr(VER_PRODUCTNAME_STR, "537EP"))
        {
            driver->afe_type = SI3052_VENDOR_ID + 2;
            driver->pci.ven_id = SI3052_VENDOR_ID;
            driver->pci.dev_id = SI3052_DEVICE_ID;
            driver->pci.function_id = 0;
            return 0;
        }
        else
        {
            printk(KERN_ERR"This %s driver won't install on Intel 537EP card, please download the right driver\n",
                    VER_PRODUCTNAME_STR);
            return -1;
        }
    }
    pdev = pci_find_device (NEW_SI3052_VENDOR_ID, NEW_SI3052_DEVICE_ID, pdev);
    if (pdev)
    {
        printk(KERN_INFO"Intel 537EP card found\n");
        if (strstr(VER_PRODUCTNAME_STR, "537EP"))
        {
            driver->afe_type = TJ320_VENDOR_ID + 1;
            driver->pci.ven_id = NEW_SI3052_VENDOR_ID;
            driver->pci.dev_id = NEW_SI3052_DEVICE_ID;
            driver->pci.function_id = 0;
            return 0;
        }
        else
        {
            printk(KERN_ERR"This %s driver won't install on Intel 537EP card, please download the right driver\n",
                    VER_PRODUCTNAME_STR);
            return -1;
        }
    }
    pdev = pci_find_device (SELAH_PCI_VENDOR_ID, SELAH_PCI_DEVICE_ID, pdev);
    if (pdev)
    {
        printk(KERN_INFO"Intel 537SP card found\n");
        if (strstr(VER_PRODUCTNAME_STR, "537SP"))
        {
            driver->afe_type = SELAH_PCI_VENDOR_ID + 1; // Dirty hack
            driver->pci.ven_id = SELAH_PCI_VENDOR_ID;
            driver->pci.dev_id = SELAH_PCI_DEVICE_ID;
            driver->pci.function_id = 0;
            return 0;
        }
        else
        {
            printk(KERN_ERR"This %s driver won't install on Intel 537SP card, please download the right driver\n",
                    VER_PRODUCTNAME_STR);
            return -1;
        }
    }

    if (!strstr(VER_PRODUCTNAME_STR, "537EA") && !strstr(VER_PRODUCTNAME_STR, "537AA"))
    {
        printk(KERN_ERR"This %s driver won't install on AC97 modem card, please download intel537EA "
                       "driver to check if it supports your modem\n",
                VER_PRODUCTNAME_STR);
        return -1;
    }

    pdev = pci_find_device (ALI_VENDOR_ID, ALI_DEVICE_ID, pdev);
    if (pdev)
    {
        driver->afe_type = ALI_VENDOR_ID;
        driver->pci.ven_id = ALI_VENDOR_ID;
        driver->pci.dev_id = ALI_DEVICE_ID;
        driver->pci.function_id = 0;
        return 0;
    }

    pdev = pci_find_device (ATI_VENDOR_ID, ATI_DEVICE_ID, pdev);
    if (pdev)
    {
        driver->afe_type = ATI_VENDOR_ID;
        driver->pci.ven_id = ATI_VENDOR_ID;
        driver->pci.dev_id = ATI_DEVICE_ID;
        driver->pci.function_id = 0;
        return 0;
    }

    pdev = pci_find_device (INTEL_VENDOR_ID, INTEL_DEVICE_ID, pdev);
    if (pdev)
    {
        driver->afe_type = INTEL_VENDOR_ID;
        driver->pci.ven_id = INTEL_VENDOR_ID;
        driver->pci.dev_id = INTEL_DEVICE_ID;
        driver->pci.function_id = 0;
        return 0;
    }
    pdev = pci_find_device (INTEL_VENDOR_ID, INTEL_ICH4_DEVICE_ID, pdev);
    if (pdev)
    {
        driver->afe_type = INTEL_VENDOR_ID;
        driver->pci.ven_id = INTEL_VENDOR_ID;
        driver->pci.dev_id = INTEL_ICH4_DEVICE_ID;
        driver->pci.function_id = 0;
        return 0;
    }
    pdev = pci_find_device (INTEL_VENDOR_ID, INTEL_ICH5_DEVICE_ID, pdev);
    if (pdev)
    {
        driver->afe_type = INTEL_VENDOR_ID;
        driver->pci.ven_id = INTEL_VENDOR_ID;
        driver->pci.dev_id = INTEL_ICH5_DEVICE_ID;
        driver->pci.function_id = 0;
        return 0;
    }

    pdev = pci_find_device (NVIDIA_VENDOR_ID, NVIDIA_DEVICE_ID, pdev);
    if (pdev)
    {
        driver->afe_type = NVIDIA_VENDOR_ID;
        driver->pci.ven_id = NVIDIA_VENDOR_ID;
        driver->pci.dev_id = NVIDIA_DEVICE_ID;
        driver->pci.function_id = 0;
        return 0;
    }

    pdev = pci_find_device (SIS_VENDOR_ID, SIS_DEVICE_ID, pdev);
    if (pdev)
    {
        driver->afe_type = SIS_VENDOR_ID;
        driver->pci.ven_id = SIS_VENDOR_ID;
        driver->pci.dev_id = SIS_DEVICE_ID;
        driver->pci.function_id = 0;
        return 0;
    }

    pdev = pci_find_device (VIA_VENDOR_ID, VIA_DEVICE_ID, pdev);
    if (pdev)
    {
        driver->afe_type = VIA_VENDOR_ID;
        driver->pci.ven_id = VIA_VENDOR_ID;
        driver->pci.dev_id = VIA_DEVICE_ID;
        driver->pci.function_id = 0;
        return 0;
    }

    printk(KERN_ERR"Cannot find modem h/w supported by this driver\n");
    return -1;
}
#endif
#ifdef CONFIG_PM
static    struct pm_dev *power_dev;
static int power_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
{
    switch(rqst)
    {
        case PM_SUSPEND:
            close();
            break;
        case PM_RESUME:
            open();
            break;
//        case PM_SAVE_STATE:
//            printk(KERN_WARNING"Saving power state is not implemented\n");
//            break;
        default:
            printk(KERN_WARNING"Unknown power mode request to 537 modem driver\n");
    }
    return 0;
}
#endif


int softcore_init_struct(struct softcore_struct* s)
{
  #if defined (TARGET_SELAH)
   s->pci.ven_id = 0x8086;
   s->pci.dev_id = 0x1040;
   s->pci.function_id = 0;
  #elif defined(TARGET_CATAWBA)
   if (get_pci_info_537(s))
       return -1;
  #endif

   s->open              = open;
   s->stop              = stop;
   s->close             = close;
   s->start             = start;
   s->write             = write;
   s->dtr_on            = dtr_on;
   s->rts_on            = rts_on;
   s->hangup            = hangup;
   s->putchar           = put_char;
   s->dtr_off           = dtr_off;
   s->rts_off           = rts_off;
   s->msr_wait          = msr_wait;
   s->send_xchar        = send_xchar;
   s->write_free        = write_free;
   s->write_flush       = write_flush;
   s->write_pending     = write_pending;
   s->get_line_status   = get_line_status;
   s->set_char          = set_char;
   s->get_char          = get_char;
   G.softcore = s;
  #if defined (TARGET_SELAH)
   Debug_Printf = printk;
  #endif

//  printk("softcore: init struct done\n");
  return 0;
}


int open(void)
{
   int retval = 0;
   if(pci_enable_device(G.softcore->pci.pdev))  
   {
      return(-ENODEV);
   }
                   
   G.irq = G.softcore->pci.pdev->irq;
   dsp_irq = &G.irq;
#if !defined (TARGET_CATAWBA)
   {
       unsigned long   phy_mem_start;
       unsigned long   phy_mem_len;
       phy_mem_start = pci_resource_start(G.softcore->pci.pdev,
                                          G.softcore->pci.function_id);
       phy_mem_len   = pci_resource_len(G.softcore->pci.pdev,
                                        G.softcore->pci.function_id);
       pBaseAddress = (PUCHAR) ioremap(phy_mem_start,
                                       phy_mem_len);
   }
#else
   G.softcore->mem_base  = pci_resource_start(G.softcore->pci.pdev, 0);
   G.softcore->mem_range = pci_resource_len(G.softcore->pci.pdev, 0);
   G.softcore->io_base  = pci_resource_start(G.softcore->pci.pdev, 1);
   G.softcore->io_range = pci_resource_len(G.softcore->pci.pdev, 1);
   if (0 != modem_init(G.softcore))
       return -1;
#endif

   clm_configure();

   dspdrv_clear_dsp_interrupt();
   dspdrv_SetCramISRCallBack(line_int);

   G.irq_share = 1;
   retval = request_irq(G.irq,
               &interrupt_handler,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
           IRQF_SHARED,
#else
               SA_SHIRQ,
#endif
               MDM_DEVICE_NAME,
               &G.irq_share);
   
//   printk("softcore:open: irq status %d, irq %d\n",retval,G.irq);
   UART_init(115200,8,0,1);
//   dspdrv_SetCramISRCallBack(line_int);
   
   clm_initialize();
   #if defined(TARGET_CATAWBA)
     ModemCardStart();    
#ifdef CONFIG_PM
{
    power_dev = pm_register(PM_PCI_DEV, PM_PCI_ID(G.softcore->pci.pdev),
                            power_callback);
}
#endif

   #endif
   return(retval);
}

void close(void)
{
   clm_terminate();
  #if defined(TARGET_CATAWBA)
   ModemCardStop();    
  #endif

   free_irq(G.irq, &(G.irq_share));

#if !defined (TARGET_CATAWBA)
    vfree(pBaseAddress);
#endif
#ifdef CONFIG_PM
    pm_unregister(power_dev);
#endif
}


void stop(void)
{
   return;
}

void start(void)
{
   return;
}

int  write(int size)
{
   int i = 0;

   for(i = 0; i < size; i++)
   {
      if(!UART_dce_to_free())
      {
         //full
         return(i);
      }
      UART_dce_to_char(G.softcore->tx_fifo[i]);
   }
   return(size);
}

void dtr_on(void)
{
   UART_dtr_on();
}

void rts_on(void)
{
   UART_rts_on();
}

void dtr_off(void)
{
   UART_dtr_off();
}

void hangup(void)
{
   return;
}

void put_char(unsigned char ch)
{
   UART_dce_to_char(ch);
}

void rts_off(void)
{
   UART_rts_off();
}

void msr_wait(void)
{
   UART_msr_wait();
}

void send_xchar(unsigned char ch)
{
      UART_dce_to_char(ch);
}

int  write_free(void)
{
   return(UART_dce_to_free());
}

void write_flush(void)
{
   UART_dce_flush();
}

int  write_pending(void)
{
   return(UART_dce_to_num());
}

int  get_line_status(unsigned char parameter)
{

   int status = 0;
   switch(parameter)
   {
   default:
   case 0:
      if(UART_line_status(RTS))     status |= TIOCM_RTS;
      if(UART_line_status(DTR))     status |= TIOCM_DTR;
      if(UART_line_status(RINGING)) status |= TIOCM_RNG;
      if(UART_line_status(DSR))     status |= TIOCM_DSR;
      if(UART_line_status(CTS))     status |= TIOCM_CTS;
      if(UART_line_status(RLSD))    status |= TIOCM_CAR;
      return(status);

   case 1:
      return(UART_line_status(RINGING));

   case 2:
      return(UART_line_status(DSR));

   case 3:
      return(UART_line_status(RLSD));

   case 4:
      return(UART_line_status(CTS));
   }
}
unsigned int set_char(int baud_rate,char data_bits, char parity, char stop_bits)
{
   UART_set_baud(baud_rate);
   UART_data_bits(data_bits);
   UART_parity(parity);
   UART_stop_bits(stop_bits);
   dce_stop_bits = stop_bits;
   dte_init();
   return 1;
}
void get_char(int *baud_rate,char *data_bits, char *parity, char *stop_bits)
{
   *baud_rate = UART_get_baud();
   *data_bits = UART_get_data_bits();
   *parity = UART_get_parity();
   *stop_bits = dce_stop_bits;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) 
  int interrupt_handler(int irq, void *dev_id, struct pt_regs *regs)
  {
  #if defined (TARGET_CATAWBA)
    if (AfeIRQ()) return IRQ_NONE;
  #else
    if ((IM_Peek_Reg(CMHISR) & bHIS_MP) == 0) return IRQ_NONE;//not our interrupt
  #endif
    dspdrv_CommRamISR();
    return IRQ_HANDLED;
  }
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
  irqreturn_t interrupt_handler(int irq, void *dev_id)
  {
  #if defined (TARGET_CATAWBA)
    if (AfeIRQ()) return IRQ_NONE;
  #else
    if ((IM_Peek_Reg(CMHISR) & bHIS_MP) == 0) return IRQ_NONE;//not our interrupt
  #endif
    dspdrv_CommRamISR();
    return IRQ_HANDLED;
  }
#else //before 2.5 kernel or after 2.6.19 kernel
  void interrupt_handler(int irq, void *dev_id, struct pt_regs *regs)
  {
  #if defined (TARGET_CATAWBA)
    if (AfeIRQ()) return;
  #else
    if ((IM_Peek_Reg(CMHISR) & bHIS_MP) == 0) return;//not our interrupt
  #endif
    dspdrv_CommRamISR();
  }
#endif
#define TTY_FLIP_BUFFER_SIZE 1000

void send_data_to_user(void)
{
   unsigned char ch;
   char flip_flag=0;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
   unsigned long flags;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
   int imax=0;
   int i=0;
#endif


   while ((UART_dte_to_num() > 0) 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
         && (G.softcore->ptty->flip.count < TTY_FLIPBUF_SIZE)
#else
         && (i < TTY_FLIP_BUFFER_SIZE)
#endif
    )
   {
      ch = UART_dte_from_char();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
      if(!imax)
         imax=tty_buffer_request_room(G.softcore->ptty,TTY_FLIP_BUFFER_SIZE);
      i+=tty_insert_flip_char(G.softcore->ptty, ch, flip_flag);
#else
      spin_lock_irqsave(&(G.softcore->ptty->read_lock), flags);
      *(G.softcore->ptty->flip.char_buf_ptr) = ch;
      *(G.softcore->ptty->flip.flag_buf_ptr) = flip_flag;

      G.softcore->ptty->flip.flag_buf_ptr++;
      G.softcore->ptty->flip.char_buf_ptr++;
      G.softcore->ptty->flip.count++;
      tty_flip_buffer_push(G.softcore->ptty);
      spin_unlock_irqrestore(&(G.softcore->ptty->read_lock), flags);
#endif
   }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
     if (i){
         tty_flip_buffer_push(G.softcore->ptty);
     }
#endif
}

#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) 
extern struct work_struct softserial_bg_event_work;
#endif

void schedule_background_event(void)
{
   struct async_struct* async_struct_ptr  = G.softcore->ptty->driver_data;  
   async_struct_ptr->event |= 1 << RS_EVENT_WRITE_WAKEUP;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 
   queue_task(&async_struct_ptr->tqueue, &tq_immediate);
   mark_bh(IMMEDIATE_BH);
#else
   schedule_work(&softserial_bg_event_work);
#endif
}

/////////////////////////////////////////////////////////////////////
//////////////////////END /// softcore changes ///////////////////////
/////////////////////////////////////////////////////////////////////


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

#if defined(TARGET_CATAWBA)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) 
   EXPORT_SYMBOL_NOVERS(ModemCardStart);
   EXPORT_SYMBOL_NOVERS(ModemCardStop);
   EXPORT_SYMBOL_NOVERS(AfeIRQ);
#endif //kernel 2.4
#endif //catawba

#endif //2.4.0

//globals
unsigned int*      io_base;
unsigned int*      io_range;
unsigned int*      mm_range;

//#if defined(TARGET_SELAH)
 // extern PUCHAR       pBaseAddress;
//#else
//  extern PUCHAR       pMappedComram;
//#endif

asmlinkage void   kdelay(short);
asmlinkage void kdisable_irq(unsigned int);
asmlinkage void kenable_irq(unsigned int);
#ifdef KGDB
extern void do_schedule(void);
#endif

   DECLARE_MUTEX(exec_reg_sem);
   DECLARE_WAIT_QUEUE_HEAD(persistWriteQ);
   DECLARE_WAIT_QUEUE_HEAD(persistReadQ);
   DECLARE_WAIT_QUEUE_HEAD(persistShutdownQ);

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,10) && \
    LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
   MODULE_LICENSE("Proprietary");
#else
   MODULE_LICENSE("GPL");
#endif

extern asmlinkage void ham_proc_shutdown(void);

//extern int ham_proc_function(char*, char**, off_t, int, int);
//extern int ham_proc_recieve(struct file*, const char*, unsigned long, void*); 
//extern read_proc_t hamproc_read;
//extern write_proc_t hamproc_write;
struct proc_dir_entry* hamproc;
extern asmlinkage int persist_hamproc_write(const char*);
extern asmlinkage int persist_hamproc_read(char*);


int hamproc_write(struct file* file, 
                     const char *buffer,
                     unsigned long count,
                     void *data)
{
#if 0
   static char temp[4096];

   if(copy_from_user(temp, buffer, (count > 4096) ? 4096 : count))
      return -EFAULT;
   return(persist_hamproc_write(temp));
#else
#define SIZE 4096
   char *temp;
   char *cp = (char *)buffer;
   unsigned long len = count;
   int rc = 0;

   if ((temp = kmalloc(SIZE,GFP_KERNEL)) == NULL)
        return -ENOMEM;
   while (len > 0){
       if (copy_from_user(temp, cp, (len > SIZE) ? SIZE : len)){
           kfree(temp);
           return -EFAULT;
       }
       cp += (len > SIZE) ? SIZE : len;
       len -= (len > SIZE) ? SIZE : len;
       rc = persist_hamproc_write(temp);
       if (rc < 0){
           kfree(temp);
           return rc;
       }
   }
   kfree(temp);
   return count;
#endif
}
//used to send data to app reading the ham proc
int hamproc_read(char* page,
                  char** start,
                  off_t offset,
                  int len, int* eof, void* data)
{
#if 0
   *eof = 1;
   return(persist_hamproc_read(page));
#else
   if (offset > 0){
       *eof = 1;
       return 0;
   }
   return(persist_hamproc_read(page));
#endif
}
const char *proc_file_name = "ham";

int create_hamproc(void)
{
   hamproc = create_proc_entry(proc_file_name, S_IFREG | S_IRUGO, NULL);
   if(hamproc == NULL) return -ENOMEM;
   hamproc->read_proc = hamproc_read;
   hamproc->write_proc = hamproc_write;
/*   hamproc->owner = THIS_MODULE; */
   return 0;
}
void detach_hamproc(void)
{
   remove_proc_entry(proc_file_name, NULL);
}


//************************************************************************
int core_init_module(void)
{
   int rc;
   rc = create_hamproc();
//   printk(KERN_INFO"hamcore module init\n");
   #if defined (TARGET_CATAWBA)
   sound_init();
   #endif
   return rc;
}

void core_cleanup_module(void)
{
//   printk(KERN_INFO"hamcore module cleanup\n");
   ham_proc_shutdown();
   detach_hamproc();
   #if defined (TARGET_CATAWBA)
      modem_kill();
   #endif
}

asmlinkage void kdelay(short x)
{
//   printk("hamdelay %d\n",x);
   mdelay(x);
}

asmlinkage void kudelay(unsigned long x)
{
   udelay(x);
}

asmlinkage void up_exec_reg_sem(void)
{
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) 
   up(&exec_reg_sem);
#else
   ;
#endif
}

asmlinkage void down_exec_reg_sem(void)
{
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0) 
   down(&exec_reg_sem);
#else
   ;
#endif
}

static int writeQSem = 0, readQSem = 0;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) 
void WakeTask(void *foo)
{
   readQSem = 0;
   wake_up_interruptible(&persistReadQ);
}
static int *pkt_to_app1;
static int timeout1;
void WakeTask2(void *foo)
{
   while((*pkt_to_app1 == TRUE) && timeout1 > 0) //while pkt hasnt been read yet.
   {
      timeout1 = wait_event_interruptible_timeout(persistReadQ, 0, timeout1);
   }
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
DECLARE_WORK(wait_wq2, (work_func_t)WakeTask2);
DECLARE_WORK(wait_wq, (work_func_t)WakeTask);
#else
DECLARE_WORK(wait_wq2, WakeTask2, 0);
DECLARE_WORK(wait_wq, WakeTask, 0);
#endif
#endif

asmlinkage void wake_up_interruptible_persistWriteQ(void)
{
   writeQSem = 0;
   wake_up_interruptible(&persistWriteQ);
}

asmlinkage void wake_up_interruptible_persistReadQ(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) 
   if (in_atomic()||in_softirq()||in_interrupt())
   {
      schedule_work(&wait_wq);
      return;
   }
#endif
   readQSem = 0;
   wake_up_interruptible(&persistReadQ);
}

asmlinkage void interruptible_sleep_on_persistReadQ(void)
{
   readQSem = 1;
   wait_event_interruptible(persistReadQ, readQSem == 0);
}

asmlinkage void interruptible_sleep_on_timeout_persistWriteQ(int* pkt_from_app, unsigned long timeout)
{
   while((*pkt_from_app == FALSE) && timeout > 0) //while we have not gotten ack pkt yet.
   {
      writeQSem = 1;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 
      timeout = interruptible_sleep_on_timeout(&persistWriteQ, timeout);
#else
      timeout = wait_event_interruptible_timeout(persistWriteQ, writeQSem == 0, timeout);
#endif
   }
}

asmlinkage void interruptible_sleep_on_timeout_persistReadQ(int* pkt_to_app, unsigned long timeout)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) 
   if (in_atomic()||in_softirq()||in_interrupt())
   {
      pkt_to_app1 = pkt_to_app;
      timeout1 = timeout;
      schedule_work(&wait_wq2);
      return;
   }
#endif

   while((*pkt_to_app == TRUE) && timeout > 0) //while pkt hasnt been read yet.
   {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) 
      timeout = interruptible_sleep_on_timeout(&persistReadQ, timeout);
#else
      timeout = wait_event_interruptible_timeout(persistReadQ, 0, timeout);
#endif
   }
}

asmlinkage void ham_proc_shutdown_wait(void)
{
   int timeout = HZ*2;
   while(timeout > 0)
   {
      current->state = TASK_INTERRUPTIBLE;
      timeout = schedule_timeout(timeout);
   }
}

asmlinkage void kdisable_irq(unsigned int irq)
{
#if defined (TARGET_CATAWBA)
#else
   disable_irq(irq);
#endif
}

asmlinkage void kenable_irq(unsigned int irq)
{
#if defined (TARGET_CATAWBA)
#else
   enable_irq(irq);
#endif

}

asmlinkage char* kCurrentComm(void)
{
   return(current->comm);
}

void dpc_function(unsigned long x)
{
   dce_tx_enabled = TRUE; 
   if(CRAM_CallBack != NULL) CRAM_CallBack();
}

DECLARE_TASKLET(dpc_tasklet,dpc_function,0);

asmlinkage void kScheduleDPC(void)
{
#ifdef CONFIG_PM
    pm_access(power_dev);
#endif
   #if defined(TARGET_CATAWBA)
      dpc_function( 0 );
   #else
      tasklet_schedule(&dpc_tasklet);
   #endif
}

//Purpose: 
//DSP interrupt service routine. This ISR clears the DSP Interrupt
//and calls the CommRam interface handler.
extern asmlinkage void dspdrv_CommRamHandler(void);

asmlinkage void dspdrv_CommRamISR(void)
{
//    asmlinkage void kScheduleDPC();
    // clear DSP interrupt
//    #if !defined (TARGET_SELAH)
    dspdrv_clear_dsp_interrupt();
//    #endif
    
    dce_tx_enabled = TRUE;    // Enable TX
    dspdrv_CommRamHandler();
    kScheduleDPC();
}

int IM_atomic_dec(void *t)
{
return 0;
}
int IM_atomic_inc(void *t)
{
return 0;
}
int IM_atomic_set(int *address, int value)
{
return 0;
}
int IM_atomic_get(void *t)
{
return 0;
}


#ifdef CONFIG_PM
/* Power management code goes here*/


#endif

Hors ligne

#10 Le 19/07/2012, à 20:12

darunia_goron

Re : resolu compilation driver modem intel536Ep impossible

lambertine a écrit :

je n'arrive pas a le poster a cause des caracteres speciaux

Quels caractères spéciaux ? C'est de l'ASCII !

J'ai copié ton fichier et j'ai pu le compiler sans problème (juste des warnings). Tu n'aurais pas mis des caractères spéciaux (genre des espaces insécables) ?
Tant que tu n'arrives pas à compiler coredrv.c, je ne peux pas t'aider plus.

Hors ligne

#11 Le 19/07/2012, à 21:24

lambertine

Re : resolu compilation driver modem intel536Ep impossible

j'ai effectivement enleve des blanc sur la ligne commentee
j'ai refait un make , je ne sais pas si c'est mieux,

catherine@hermes:~/intel-536EP-2.56.76.0$ make 536
   Module precompile check
   Current running kernel is: 2.6.32-28-generic
   /lib/modules...   autoconf.h exists
diff: /boot/vmlinuz.autoconf.h: Aucun fichier ou dossier de ce type
   autoconf.h matches running kernel
diff: /boot/vmlinuz.version.h: Aucun fichier ou dossier de ce type
   version.h matches running kernel
uname -r|grep "2.6" && \
    cd coredrv && make 536core_26 && \
    cp Intel536.ko .. && cd .. && \
    strip --strip-debug Intel536.ko && \
    exit; \
    ls Intel536.ko >/dev/null 2>&1 ||  uname -r | grep "2.6" && echo "Failed to build driver" && exit; \
        if [  ]; then \
    cd coredrv; make TARGET=TARGET_SELAH KERNEL_SOURCE_PATH= "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
    else \
    cd coredrv; make TARGET=TARGET_SELAH KERNEL_INCLUDES=/lib/modules/`uname -r`/build/include \
       "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
        fi ; \
    cp Intel536.o .. ; \
    if [ -a /boot/vmlinuz.version.h ]; then \
        cp /boot/vmlinuz.version.h /lib/modules/`uname -r`/build/include/linux/version.h;\
        fi
2.6.32-28-generic
make[1]: entrant dans le répertoire « /home/catherine/intel-536EP-2.56.76.0/coredrv »
make -C /lib/modules/2.6.32-28-generic/build SUBDIRS=/home/catherine/intel-536EP-2.56.76.0/coredrv modules
make[2]: entrant dans le répertoire « /usr/src/linux-headers-2.6.32-28-generic »
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/clmmain.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/rts.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/task.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/uart.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/wwh_dflt.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/locks.o
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:154: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:154: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:154: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:155: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:155: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:155: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:156: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:156: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:156: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:157: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:157: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:157: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:158: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:158: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:158: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:159: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:159: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:159: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:160: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:160: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:160: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:161: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:161: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:161: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:162: warning: data definition has no type or storage class
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:162: warning: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:162: warning: parameter names (without types) in function declaration
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c: In function ‘linux_RSAGetExclusive’:
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:170: error: ‘sem0’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:170: error: (Each undeclared identifier is reported only once
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:170: error: for each function it appears in.)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:174: error: ‘sem1’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:178: error: ‘sem2’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:182: error: ‘sem3’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:186: error: ‘sem4’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:190: error: ‘sem5’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:194: error: ‘sem6’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:198: error: ‘sem7’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:202: error: ‘sem8’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c: In function ‘linux_RSAFreeExclusive’:
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:220: error: ‘sem0’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:223: error: ‘sem1’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:226: error: ‘sem2’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:229: error: ‘sem3’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:232: error: ‘sem4’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:235: error: ‘sem5’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:238: error: ‘sem6’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:241: error: ‘sem7’ undeclared (first use in this function)
/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.c:244: error: ‘sem8’ undeclared (first use in this function)
make[3]: *** [/home/catherine/intel-536EP-2.56.76.0/coredrv/locks.o] Erreur 1
make[2]: *** [_module_/home/catherine/intel-536EP-2.56.76.0/coredrv] Erreur 2
make[2]: quittant le répertoire « /usr/src/linux-headers-2.6.32-28-generic »
make[1]: *** [536core_26] Erreur 2
make[1]: quittant le répertoire « /home/catherine/intel-536EP-2.56.76.0/coredrv »
2.6.32-28-generic
Failed to build driver

Hors ligne

#12 Le 19/07/2012, à 23:49

darunia_goron

Re : resolu compilation driver modem intel536Ep impossible

As-tu modifié locks.c comme je t'avais dit de le faire ? Si oui, défais les modifications; si non, fais-les.

Hors ligne

#13 Le 20/07/2012, à 10:06

lambertine

Re : resolu compilation driver modem intel536Ep impossible

oui j'avais fait les modifs et les ai de nouveau corrigées . Je n'ai plus de message d 'erreurs mais un laius .

catherine@hermes:~/intel-536EP-2.56.76.0$ make 536
   Module precompile check
   Current running kernel is: 2.6.32-41-generic
   /lib/modules...   autoconf.h exists
diff: /boot/vmlinuz.autoconf.h: Aucun fichier ou dossier de ce type
   autoconf.h matches running kernel
diff: /boot/vmlinuz.version.h: Aucun fichier ou dossier de ce type
   version.h matches running kernel
uname -r|grep "2.6" && \
    cd coredrv && make 536core_26 && \
    cp Intel536.ko .. && cd .. && \
    strip --strip-debug Intel536.ko && \
    exit; \
    ls Intel536.ko >/dev/null 2>&1 ||  uname -r | grep "2.6" && echo "Failed to build driver" && exit; \
        if [  ]; then \
    cd coredrv; make TARGET=TARGET_SELAH KERNEL_SOURCE_PATH= "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
    else \
    cd coredrv; make TARGET=TARGET_SELAH KERNEL_INCLUDES=/lib/modules/`uname -r`/build/include \
       "PSTN_DEF=-DTARGET_SELAH -DTARGET_LINUX -DLINUX" 536core; \
        fi ; \
    cp Intel536.o .. ; \
    if [ -a /boot/vmlinuz.version.h ]; then \
        cp /boot/vmlinuz.version.h /lib/modules/`uname -r`/build/include/linux/version.h;\
        fi
2.6.32-41-generic
make[1]: entrant dans le répertoire « /home/catherine/intel-536EP-2.56.76.0/coredrv »
make -C /lib/modules/2.6.32-41-generic/build SUBDIRS=/home/catherine/intel-536EP-2.56.76.0/coredrv modules
make[2]: entrant dans le répertoire « /usr/src/linux-headers-2.6.32-41-generic »
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/coredrv.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/clmmain.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/rts.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/task.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/uart.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/wwh_dflt.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/locks.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/softserial_io.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/softserial_ioctl.o
  CC [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/softserial.o
  LD [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/Intel536.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: could not find /home/catherine/intel-536EP-2.56.76.0/coredrv/.536core.lib.cmd for /home/catherine/intel-536EP-2.56.76.0/coredrv/536core.lib
  CC      /home/catherine/intel-536EP-2.56.76.0/coredrv/Intel536.mod.o
  LD [M]  /home/catherine/intel-536EP-2.56.76.0/coredrv/Intel536.ko
make[2]: quittant le répertoire « /usr/src/linux-headers-2.6.32-41-generic »
make[1]: quittant le répertoire « /home/catherine/intel-536EP-2.56.76.0/coredrv »

Hors ligne

#14 Le 20/07/2012, à 10:11

lambertine

Re : resolu compilation driver modem intel536Ep impossible

j'ai fait le make install mais la aussi une erreur

catherine@hermes:~/intel-536EP-2.56.76.0$ sudo make install
[sudo] password for catherine: 
rm -f /etc/hamregistry.bin
bash Intel536_inst
running kernel 2.6.32-41-generic
installing hamregistry, used for persistant storage
installing Intel536 driver
unknown distribution - no boot scripts have been installed
make: *** [install] Erreur 1

Hors ligne

#15 Le 20/07/2012, à 10:33

darunia_goron

Re : resolu compilation driver modem intel536Ep impossible

Dans « Intel536_inst », tu décommentes ce bloc (enlèves les #) :

#case $D in
#   *lsb*) D=`sed '/ID=/!d' /etc/lsb-release | tr [:upper:] [:lower:]`;;
#esac

J'espère qu'après ça, ce sera fini.

Hors ligne

#16 Le 20/07/2012, à 11:03

lambertine

Re : resolu compilation driver modem intel536Ep impossible

et non

catherine@hermes:~/intel-536EP-2.56.76.0$ sudo make install
[sudo] password for catherine: 
rm -f /etc/hamregistry.bin
bash Intel536_inst
running kernel 2.6.32-41-generic
installing hamregistry, used for persistant storage
installing Intel536 driver
Intel536_inst: line 87: Erreur de syntaxe près du symbole inattendu « ) »
Intel536_inst: line 87: `   *lsb*) D=`sed '/ID=/!d' /etc/lsb-release | tr [:upper:] [:lower:]`;;'
make: *** [install] Erreur 2

Hors ligne

#17 Le 20/07/2012, à 11:17

darunia_goron

Re : resolu compilation driver modem intel536Ep impossible

Euh si…

Au vu de ton message d'erreur, tu n'as supprimé qu'un seul des trois # (celui de la ligne centrale). Quand j'écris « enlèves les # » je sous-entends que tu dois enlever TOUS les # dudit bloc. L'emploi du pluriel n'était pas anodin.

Hors ligne

#18 Le 20/07/2012, à 11:34

lambertine

Re : resolu compilation driver modem intel536Ep impossible

la je pense que c'est bon

catherine@hermes:~/intel-536EP-2.56.76.0$ sudo make install
[sudo] password for catherine: 
rm -f /etc/hamregistry.bin
bash Intel536_inst
running kernel 2.6.32-41-generic
installing hamregistry, used for persistant storage
installing Intel536 driver
install UBUNTU Intel536 boot script and links
starting module and utilities
done

Hors ligne

#19 Le 20/07/2012, à 11:50

lambertine

Re : resolu compilation driver modem intel536Ep impossible

ok
merci pour ce bout de chemin pas facile en tout cas

maintenant j'essaye d'envoyer un fax
j'ai telecharge efax , mais je ne sais pas quoi lui injecter.
Je prends un fichier d'essais. Je fais imprimer dans un fichier pour avoir un format .ps il me met une erreur de format

Socket running on port 9900
efax-0.9a: 11:41:44 Error: can't read multi-strip TIFF files
efax-0.9a: 11:41:44 Error: missing offset to TIFF data
efax-0.9a: 11:41:44 finished - unrecoverable error

La question est plus large qu'estce que je peux envoyer comme fichier en entree
est-ce qu'il ya une autre methode que efax ?

Hors ligne

#20 Le 20/07/2012, à 12:36

darunia_goron

Re : resolu compilation driver modem intel536Ep impossible

Mon domaine de compétence s'arrête malheureusement ici. Bonne chance pour régler tes autres problèmes.

Hors ligne

#21 Le 20/07/2012, à 17:17

lambertine

Re : resolu compilation driver modem intel536Ep impossible

merci en tout cas
je vais mettre de cote le driver en cas de réinstallation
et je marque resolu
Catherine

Hors ligne