Re: [Voyage-linux] Re:Compile kenel on Alix failed

2009-08-18 Thread Kim-man 'Punky' TSE

Hi Robert,

Possibly my build script runs "make-kpkg clean" before building the 
image, so I didn't realize this problem before.  But the build script 
also runs "make-kpkg clean" before generating kernel source package.


Regards,
Punky

Robbert wrote:

Hi Alvaro,

I just compiled my kernel successfully, and think the command "make-kpkg
clean" instead of "make clean" did the trick. Does it suggest that the
linux-source-2.6.26-voyage_6.0-3_all.deb provide by Punky not in clean
status?

Anyway, many thanks for your help!
Robbert

-Original Message-
From: Robbert [mailto:r...@vmsys.com] 
Sent: Thursday, August 13, 2009 8:38 AM

To: 'r...@vmsys.com'; 'voyage-li...@voyage.hk'
Subject: RE: [Voyage-linux] Re:Compile kenel on Alix failed

Hi Alvaro,

One more interesting thing, the reason I tried to compile the kernel is I
want to use the latest sierra driver. 


As make-kpkg failed at final stage, I thought I might could use the the
sierra.ko compiled, so I copied the module in /lib/modules/2.6.26-486-
voyage/kernel/drivers/usb/serial
Then I tried to load the module, but the OS complained format not correct:
===
voyage: modprobe sierra 
FATAL: Error inserting sierra

(/lib/modules/2.6.26-486-voyage/kernel/drivers/usb/serial/sierra.ko):
Invalid module format
==

Attached is the source file, if anybody could help me to compile the module
that will be great.

Robbert



___
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux
  



--
Regards,
Punky

Voyage Solutions (http://solution.voyage.hk)
* Embedded Solutions and Systems
 - Mesh Networking, Captive Portal, IP Surveillance, VoIP/PBX
 - Network Engineering, Development Platform and Consultation
 
	



___
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux


RE: [Voyage-linux] Re:Compile kenel on Alix failed

2009-08-12 Thread Robbert
Hi Alvaro,

I just compiled my kernel successfully, and think the command "make-kpkg
clean" instead of "make clean" did the trick. Does it suggest that the
linux-source-2.6.26-voyage_6.0-3_all.deb provide by Punky not in clean
status?

Anyway, many thanks for your help!
Robbert

-Original Message-
From: Robbert [mailto:r...@vmsys.com] 
Sent: Thursday, August 13, 2009 8:38 AM
To: 'r...@vmsys.com'; 'voyage-li...@voyage.hk'
Subject: RE: [Voyage-linux] Re:Compile kenel on Alix failed

Hi Alvaro,

One more interesting thing, the reason I tried to compile the kernel is I
want to use the latest sierra driver. 

As make-kpkg failed at final stage, I thought I might could use the the
sierra.ko compiled, so I copied the module in /lib/modules/2.6.26-486-
voyage/kernel/drivers/usb/serial
Then I tried to load the module, but the OS complained format not correct:
===
voyage: modprobe sierra 
FATAL: Error inserting sierra
(/lib/modules/2.6.26-486-voyage/kernel/drivers/usb/serial/sierra.ko):
Invalid module format
==

Attached is the source file, if anybody could help me to compile the module
that will be great.

Robbert



___
Voyage-linux mailing list
Voyage-linux@list.voyage.hk
http://list.voyage.hk/mailman/listinfo/voyage-linux


RE: [Voyage-linux] Re:Compile kenel on Alix failed

2009-08-12 Thread Robbert
Hi Alvaro,

One more interesting thing, the reason I tried to compile the kernel is I
want to use the latest sierra driver. 

As make-kpkg failed at final stage, I thought I might could use the the
sierra.ko compiled, so I copied the module in /lib/modules/2.6.26-486-
voyage/kernel/drivers/usb/serial
Then I tried to load the module, but the OS complained format not correct:
===
voyage: modprobe sierra 
FATAL: Error inserting sierra
(/lib/modules/2.6.26-486-voyage/kernel/drivers/usb/serial/sierra.ko):
Invalid module format
==

Attached is the source file, if anybody could help me to compile the module
that will be great.

Robbert

/*
  USB Driver for Sierra Wireless

  Copyright (C) 2006, 2007, 2008  Kevin Lloyd 

  IMPORTANT DISCLAIMER: This driver is not commercially supported by
  Sierra Wireless. Use at your own risk.

  This driver is free software; you can redistribute it and/or modify
  it under the terms of Version 2 of the GNU General Public License as
  published by the Free Software Foundation.

  Portions based on the option driver by Matthias Urlichs 
  Whom based his on the Keyspan driver by Hugh Blemings 

  Back ported to kernel 2.6.26
*/

#define DRIVER_VERSION "v.1.3.1b"
#define DRIVER_AUTHOR "Kevin Lloyd "
#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define SWIMS_USB_REQUEST_SetPower  0x00
#define SWIMS_USB_REQUEST_SetNmea   0x07
#define SWIMS_USB_REQUEST_SetMode   0x0B
#define SWIMS_SET_MODE_Modem0x0001

/* per port private data */
#define N_IN_URB4
#define N_OUT_URB   4
#define IN_BUFLEN   4096

static int debug;
static int nmea;
static int truinstall = 1;

enum devicetype {
DEVICE_3_PORT = 0,
DEVICE_1_PORT = 1,
DEVICE_INSTALLER =  2,
};

static int sierra_set_power_state(struct usb_device *udev, __u16 swiState)
{
int result;
dev_dbg(&udev->dev, "%s", __func__);
result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
SWIMS_USB_REQUEST_SetPower, /* __u8 request  */
USB_TYPE_VENDOR,/* __u8 request type */
swiState,   /* __u16 value   */
0,  /* __u16 index   */
NULL,   /* void *data*/
0,  /* __u16 size*/
USB_CTRL_SET_TIMEOUT);  /* int timeout   */
return result;
}

static int sierra_set_ms_mode(struct usb_device *udev, __u16 eSWocMode)
{
int result;
dev_dbg(&udev->dev, "%s", "DEVICE MODE SWITCH\n");
result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
SWIMS_USB_REQUEST_SetMode,  /* __u8 request  */
USB_TYPE_VENDOR,/* __u8 request type */
eSWocMode,  /* __u16 value   */
0x, /* __u16 index   */
NULL,   /* void *data*/
0,  /* __u16 size*/
USB_CTRL_SET_TIMEOUT);  /* int timeout   */
return result;
}

static int sierra_vsc_set_nmea(struct usb_device *udev, __u16 enable)
{
int result;
dev_dbg(&udev->dev, "%s", __func__);
result = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
SWIMS_USB_REQUEST_SetNmea,  /* __u8 request  */
USB_TYPE_VENDOR,/* __u8 request type */
enable, /* __u16 value   */
0x, /* __u16 index   */
NULL,   /* void *data*/
0,  /* __u16 size*/
USB_CTRL_SET_TIMEOUT);  /* int timeout   */
return result;
}

static int sierra_calc_num_ports(struct usb_serial *serial)
{
int result;
int *num_ports = usb_get_serial_data(serial);
dev_dbg(&serial->dev->dev, "%s", __func__);

result = *num_ports;

if (result) {
kfree(num_ports);
usb_set_serial_data(serial, NULL);
}

return result;
}

static int sierra_calc_interface(struct usb_serial *serial)
{
int interface;
struct usb_interface *p_interface;
struct usb_host_interface *p_host_interface;
dev_dbg(&serial->dev->dev, "%s", __func__);