커널 컴파일 및 모듈 컴파일

MrLord의 이미지

안녕하세요 .. 래뎃 9.0 커널 2.4.20-8에서..

IPVS Netfilter Patch를 적용하고 xconfig로 몇가지 옵션을 선택하고..

Netfilter 부분은 대부분 모듈로 선택한후 컴파일하면

커널은 컴파일이 되는것 같은데요..(bzImage 작성이 잘됩니다.)

모듈 컴파일을 하면 에러가 나는데요.. 에러가...

ip_vs_sync.c: in function 'sync_thread':
ip_vs_sync.c:687: structure has no member named 'sigmask_lock'

라는 구문 에러가 나네요.. ip_vs_sync.c는 IPVS Netfilter 패치를 해서

생성된 파일인데요.. 왜 이런 에러가 나는지 좀체 알수가 없네요..

소스 파일을 잠깐 보면요.. &current->sigmask_lock 라고 돼있구요..

current라는 구조체를 찾을수가 없더군요 어떤분말에 의하면 현재 돌아가는

프로세스의 포인터라는 말도 있구요.. 좀 아시는분 자세한 답변좀 부탁드리

겠습니다.

ahgod의 이미지

>ip_vs_sync.c: in function 'sync_thread':
>ip_vs_sync.c:687: structure has no member named 'sigmask_lock'

current는 현재 task를 나타내는 structure가 맞습니다.

이 구조체는 task_struct를 Kernel Library에서 찾아보시면 알 수 있을 것입니다.

이 부분은 보통 /usr/src/linux-2.4.20-8/include/linux 밑에 있구요

kernel 2.4.20-8 버젼에서는 sigmask_lock이란 Structure member가 사라져 있습니다. 그래서 문제가 발생하는군요... 이 부분은 제가 보기에

Structure 구조로 바뀌어서 쓰임새가 바뀐 것으로 보입니다.

spinlock_t sigmask_lock ==> struct signal_struct *signal
struct signal_struct *sig ==> struct sighand_struct *sighand;

이렇게 바뀌었습니다.

예전의 signal_struct 정의가 sighand_struct로 변경되었고, spinlock에 대한 Tag인 sigmask_lock이 signal_struct로 정의되면서 lock할 수 있는 조건들이 좀 더 늘은 것 같네요. (이 부분은 저도 자세히 보지를 않아서 잘 모르겠습니다...)

질문하신 구문이 포함되어 있는 Module이 kernel-2.4.20-8에서 컴파일을 하려면 이 부분을 수정하셔야 할 듯 합니다.

두서가 없는 듯 해서 도움이 되셨을런지 모르겠습니다.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.