리눅스에서 모듈프로그래밍컴파일시 <asm/uaccess.h>파일

togo00의 이미지

리눅스에서 모듈프로그래밍해볼려고 하는데
컴파일시 <asm/uaccess.h>파일을 찾을수 없다고 하는데요
제가 커널 2.4.20을 쓰는데요 래드핫 9.0이요
검색을 해보니 컴파일시 옵션을 줘서 어떻게 하라는 답변이 있던데 그것도 해봣는데 안되네요....

답변부탁드립니다... _ _;

File attachments: 
첨부파일 크기
Image icon sys.png60.33 KB
운형의 이미지

컴파일 옵션 문제 맞는거 같은데요.
에러 메시지를 보기 전에는 머라구 말하기 그렇네요.
에러 메시지도 올려 주세요

Do you think that's the air you are breathing now?

togo00의 이미지

운형 wrote:
컴파일 옵션 문제 맞는거 같은데요.
에러 메시지를 보기 전에는 머라구 말하기 그렇네요.
에러 메시지도 올려 주세요
댓글 첨부 파일: 
첨부파일 크기
Image icon 0바이트
shnam7의 이미지

아마도 커널소스가 설치되지 않았거나, 설치되었어어도 config가 되어있지 않은 것 같네요.
uaccess 파일은 커널소스에 있고, 커널 소스의 일부 헤더(주로, 플랫폼에 의존적인 것들)는 config될 때 자동 생성됩니다.
커널소스에서 make xconfig 하시고 다시 해 보시면 될 것 같네요... ^^

avimimus의 이미지

제가 알기로도 그 파일은 커널 소스의 include 디렉토리에 있는 걸로 아는데요..

커널 소스가 /usr/src/linux/ 에 있다면,
/usr/src/linux/include/asm 을 /usr/include/asm 으로 소프트 링크 시켜 주시면 될 것 같습니다.
그리고 모듈 프로그래밍할 때, asm 디렉토리 뿐 아니라 linux 디렉토리도 자주 쓰이는 것 같은데,
그 경우를 대비해서 /usr/src/linux/include/linux 를 /usr/include/linux 로 소프트 링크 시켜주시는 것도 좋을 듯 합니다.

제가 잘못 알고 있는 거라면 죄송합니다..;;

Necromancer의 이미지

커널 소스를 적당한데 풀어놓은 다음 make mrproper, make symlinks를
순차적으로 해주고 나서 컴파일시 -I<커널소스>/include 옵션을 추가하세요.

asm의 정체는 커널 소스의 include 디렉토리 보시면 asm-xxxx라는 디렉토리들이
보이는데 이것들은 다 CPU 아키텍쳐별로 고유한 헤더파일들입니다. 이들 중
하나를 심볼릭 링크하고 있는게 asm이고요.

정 안된다면 /usr/include 디렉토리 이하에 커널 헤더파일들이 설치되어 있는지
조사해 보시고요. (조사할꺼 -> linux 디렉토리, asm 디렉토리-asm 디렉토리는
asm 디렉토리 그대로 설치된경우도 있고, asm-i386 등등이 설치되고 여기에
링크걸린 경우도 있습니다.)

Written By the Black Knight of Destruction

운형의 이미지

current는 /usr/src/linux/include/asm-i386/current.h에 선언되있군요.

이 헤더를 /usr/src/linux/include/sched.h가 포함하고 일반적으로 이 헤더를 포함해서 사용합니다.

다른 에러는 신텍스군요.

Do you think that's the air you are breathing now?

ahgod의 이미지

include/asm은 config할 때 설정할 때 정해진 Platform에 따라 Symbolic Linux됩니다. 그렇기 때문에 Platform을 설정하지 않은 채 Compile이 될 때에 그 디렉토리 자체가 없을 수도 있죠...

도움이 되었을라나...

익명 사용자의 이미지

운형 I completely agree with your words.

댓글 달기

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