insmod시에 모듈 파라메터를 먹게 하는 방법!

pleasantman의 이미지

안녕하세요. 날씨가 정말 좋군요. 봄 같아요..

insmod시에 모듈 파라메터가 먹질 않습니다.

DM:~# insmod usbserial vender=0xXXX product=0xXXXX
Using /lib/modules/2.4.24/kernel/drivers/usb/serial/usbserial.o
Warning: ignoring vender=0xXXXX, no such parameter in this module
Module usbserial loaded, with warnings
DM:~#

와 같이 나오는 군요.. 혹시 커널 config에서 이런걸 활성화 하는 부분이

따로 있나요?

new5244의 이미지

Quote:
DM:~# insmod usbserial vender=0xXXX product=0xXXXX
Using /lib/modules/2.4.24/kernel/drivers/usb/serial/usbserial.o
Warning: ignoring vender=0xXXXX, no such parameter in this module
Module usbserial loaded, with warnings
DM:~#

에러 메시지 상으로는 parameter 가 인식안되는게 아니라
usbserial.o 모듈에 해당 parameter 옵션이 없는거 같은데요.

from saibi

cwryu의 이미지

modinfo usbserial

pleasantman의 이미지

[root@innolinux root]# modinfo usbserial
filename:    /lib/modules/2.4.18-4/kernel/drivers/usb/serial/usbserial.o
description: "USB Serial Driver core"
author:      "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux-usb/"
license:     "GPL"
parm:        debug int, description "Debug enabled or not"
parm:        vendor short, description "User specified USB idVendor"
parm:        product short, description "User specified USB idProduct"

위와 같다면.. 맞는데. 왜 안될까요? 커널의 usb-serial.txt에도 된다고 나와 있고... 안되네요..

codebank의 이미지

혹시나해서...
두가지가 걸리는게 있는데 첫번째 문제로 보이는건 vender에서 0x###로 하셨다는데
0x0###로 4자리가 안맞추어져서 그런게 아닌가 조심스럽게 추측을 해봅니다.
두번째 경우는 지정한 vender가 등록되어 있지않을 경우인데...
이 두번째 경우는 헤더파일 어딘가에 등록시켜주고 커널 컴파일을 다시해주어야 한다는
소리를 들은것도 같고...
첫번째 경우처럼 조금 황당하지만 커널을 손보지 않고 문제를 해결하셨으면 하는 마음입니다.

------------------------------
좋은 하루 되세요.

ai의 이미지

pleasantman wrote:
[root@innolinux root]# modinfo usbserial
filename:    /lib/modules/2.4.18-4/kernel/drivers/usb/serial/usbserial.o
description: "USB Serial Driver core"
author:      "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux-usb/"
license:     "GPL"
parm:        debug int, description "Debug enabled or not"
parm:        vendor short, description "User specified USB idVendor"
parm:        product short, description "User specified USB idProduct"

위와 같다면.. 맞는데. 왜 안될까요? 커널의 usb-serial.txt에도 된다고 나와 있고... 안되네요..


vendor 아닐까요.?

War doesnt determine whos right, just whos left.

pleasantman의 이미지

우선 윗분의 vender -> vendor 가 맞구요.. 제가 틀리게 입력했더군요..

그리고 맞은 vendor / product 는 short type으로 커널 쏘스 사에서

직접 수정해야 하더군요..

/usr/src/linux/drivers/usb/serial/usbserial.c 파일을 수정했습니다.

#ifdef CONFIG_USB_SERIAL_GENERIC
static __u16    vendor  = 0x05f9;
static __u16    product = 0xffff;

static struct usb_device_id generic_device_ids[] = {
                { USB_DEVICE(0xXXXX, 0xXXXX) },
                {}
        };

에 등록을 강제로 해줘야 인식을 하더군요..

usbserial은 몇몇 규격이 있더군요.. 이 규격에 맞는 디바이스는
이런식으로 사용이 가능하다고 하네요..

혹시 노트북에서 usb-serial를 사용하시는 분은 참고 하시기 바랍니다.

도움 주신 윗 분들께 감사드립니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.