모듈빌드시 에러가 발생합니다.

hongyabi의 이미지

안녕하세요.

모듈빌드시 아래와 같은 에러가 발생하는데요.
해결 방법을 아시는 분이 계시면 지도 부탁드립니다.

[root@localhost test]# make
make -C /home/hongyabi/sti_kernel/Speed_Kernel SUBDIRS=/home/hongyabi/test modules
make[1]: Entering directory `/home/hongyabi/sti_kernel/Speed_Kernel'
CC [M] /home/hongyabi/test/hello.o
cc1: error: unrecognized command line option "-msoft-float"
make[2]: *** [/home/hongyabi/test/hello.o] Error 1
make[1]: *** [_module_/home/hongyabi/test] Error 2
make[1]: Leaving directory `/home/hongyabi/sti_kernel/Speed_Kernel'
make: *** [default] Error 2
[root@localhost test]#

모듈빌드에 사용된 hello.c 파일은 다음과 같고.
[root@localhost test]# cat hello.c
int hellow_init(void)
{
printk("<1>Hello, world\n");
return 0;
}

void hellow_exit(void)
{
printk("<1>Goodbye cruel Worled\n");
}

module_init(hellow_init);
module_exit(hellow_exit);
[root@localhost test]#

모듈빌드에 사용된 makefile은 다음과 같습니다.
[root@localhost test]# cat Makefile
obj-m := hello.o

KDIR := /home/hongyabi/sti_kernel/Speed_Kernel
PWD := $(shell pwd)

default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules

clean:
rm -rf *.ko
rm -rf *.mod.*
rm -rf .*.cmd
rm -rf *.o
[root@localhost test]#

리눅스 PC는 레드햇 9.0을 사용하고 있는 STM이라는 tool-chain을 이용하여 cross-build로 모듈을 빌드하려고 하였습니다.

원인이 무엇일까요?
고수님들의 의견 부탁드립니다.

bushi의 이미지

   $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) V=$(V) modules

로 고치고
 make V=1

처럼 해서 결과를 보세요. 컴파일러가 잘못 지정되어 있겠지요.
이런거 어떻게 아느냐고요 ?
 make help

하면 보실 수 있습니다.

/home/hongyabi/sti_kernel/Speed_Kernel
디렉토리에서 make zImage 를 했을 때 성공해야만 합니다.

ARCH, CROSS_COMPILE 을 따로 지정하는 방법이 없는 것은 아니지만,
기초가 부실하면 나중에 같은 문제로 또 삽질하십니다.

...두고 볼 수가 없어서 댓글을 달긴했지만... 솔직히 지금 이 순간에도 취소하고 싶은 마음이 굴뚝같습니다.
다른 데 갈 필요도 없이 바로 여기 KLDP 에서 검색 ... 부탁드립니다.

OTL

댓글 달기

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