임베디드 리눅스 timer 커널모듈 컴파일 해서 insmod하는데 symbol오류가 발생합니다. ㅠ 해결방법을 모르겠습니다.

skaskawl의 이미지

타켓보드에서 insmod할시에 계속 이와같은 오류가나오는데 방법을 모르겠습니다.
root@am57xx-evm:/WaveFile/home/root# insmod timer_dev.ko
[ 47.038103] timer_dev: disagrees about version of symbol kmem_cache_alloc
[ 47.044934] timer_dev: Unknown symbol kmem_cache_alloc (err -22)
[ 47.050992] timer_dev: disagrees about version of symbol kmalloc_caches
[ 47.061224] timer_dev: Unknown symbol kmalloc_caches (err -22)
insmod: ERROR: could not insert module timer_dev.ko: Invalid parameters

아시는분 알려주세요 ㅠㅠ

————Makefile———————————-

KERDIR:=/home/ksm/ti-processor-sdk-linux-rt-am57xx-evm-05.01.00.11/board-support/linux-rt-4.14.67+gitAUTOINC+cfb76a2032-gcfb76a2032
PATHCEK:=/home/ksm/ti-processor-sdk-linux-rt-am57xx-evm-05.01.00.11/targetNFS
obj-m:=timer_dev.o
 
PWD:=$(shell pwd)
 
all: $(MAKE) C $(KERDIR) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf tisdk_am57xx-evm-rt_defconfig $(MAKE) C $(KERDIR) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf SUBDIRS=$(PWD) modules $(MAKE) C $(KERDIR) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf INSTALL_MOD_PATH=/tmp INSTALL_MOD_STRIP=1 modules_install
 
clean: rm -rf *.ko rm -rf .mod. rm -rf .*.cmd rm -rf .tmp* rm -rf *.o rm -rf modules.order rm -rf Module.markers rm -rf Module.symvers rm -rf /tmp/lib

——timer_dev.c———————————-

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/wait.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/proc_fs.h>
#include <linux/workqueue.h>
#include <asm/uaccess.h>
#include <asm/ioctl.h>
#include <asm/unistd.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/gpio.h>
#include <linux/irq.h>
#include <linux/time.h>
#include <linux/timer.h>
#include <asm/mach/arch.h>
 
#define TIME_HZ 100
 
struct timer_list *timer;
static int TimerCount=0;
 
void Timer_function(unsigned long arg);
void Timer_register(struct timer_list* rtimer);
int timer_init(void);
void timer_exit(void);
 
void Timer_register(struct timer_list *rtimer)
{ init_timer(timer); rtimer->expires = get_jiffies_64() + TIME_HZ; rtimer->data = 0; rtimer->function = Timer_function; add_timer(timer);
}
 
void Timer_function(unsigned long arg)
{ printk(" Count : %d \n",TimerCount++); Timer_register(timer);
}
 
int timer_init(void)
{ timer=kmalloc(sizeof(struct timer_list),GFP_KERNEL); if(timer == NULL) return -ENOMEM;
  memset(timer,0,sizeof(struct timer_list)); Timer_register(timer); return 0;
}
 
void timer_exit(void)
{ if(timer!= NULL) { del_timer(timer); kfree(timer); }
}
 
module_init(timer_init);
module_exit(timer_exit);
 
MODULE_LICENSE("Dual BSD/GPL");

AustinKim의 이미지

다음과 같이 GPL 테이블을 설정해보시는 것은 어떨까요?
MODULE_LICENSE("GPL");
module_init(my_init);
module_exit(my_exit);

(개인블로그)
http://rousalome.egloos.com

skaskawl의 이미지

아 댓글 감사합니다.. 확인해서 해결했는데 제가 컴파일한 커널이랑 타겟보드에 올라간 커널이 서로 달라서 나오는 오류였었어요 ..

댓글 달기

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