Get error when try to compile the kernel module

Hi,
First I am sorry cause I sent this to another email address but I think I sent to a wrong address.

I try to compile the kernel module to run on beagleboard, but I didn’t have success.
My layout directory is:
$OEBASE = oe
/build

/conf
/hellokernel
hellokernel.bb
/files
hellokernel.c
Makefile
/openembedded
/bitbake
/tmp

This is the error I got:

naruto@naruto-laptop:~/oe$ bitbake hellokernel
NOTE: Handling BitBake files: - (6693/6693) [100 %]
NOTE: Parsing finished. 6412 cached, 1 parsed, 280 skipped, 0 masked.
NOTE: build 200904281957: started

OE Build Configuration:
BB_VERSION = “1.8.13”
METADATA_BRANCH = “org.openembedded.dev”
METADATA_REVISION = “ec28f9410ac96d8ad3df6b5fb8e07306b417ed67”
TARGET_ARCH = “arm”
TARGET_OS = “linux-gnueabi”
MACHINE = “beagleboard”
DISTRO = “angstrom”
DISTRO_VERSION = “2009.X-test-20090429”
TARGET_FPU = “hard”

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing runqueue
NOTE: Running task 339 of 547 (ID: 4, /home/naruto/oe/build/hellokernel/hellokernel.bb, do_unpack)
NOTE: package hellokernel-1.0-r28: task do_unpack: started
NOTE: Unpacking /home/naruto/oe/build/hellokernel/files/hellokernel.cfile to /home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/
cp: cannot stat `/home/naruto/oe/build/hellokernel/files/hellokernel.cfile’: No such file or directory
NOTE: Task failed:
NOTE: package hellokernel-1.0-r28: task do_unpack: failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/naruto/oe/build/hellokernel/hellokernel.bb do_unpack failed
ERROR: Task 4 (/home/naruto/oe/build/hellokernel/hellokernel.bb, do_unpack) failed
NOTE: Tasks Summary: Attempted 338 tasks of which 338 didn’t need to be rerun and 1 failed.
ERROR: ‘/home/naruto/oe/build/hellokernel/hellokernel.bb’ failed
NOTE: build 200904281957: completed

I am starting working with the linux module, so I hope you help me.
Thank you for your time to read and answer my question.

Best regards,
Thang Nguyen

hellokernel.c (294 Bytes)

Makefile (778 Bytes)

hellokernel.bb (1.19 KB)

Thang Nguyen wrote:

Hi,
First I am sorry cause I sent this to another email address but I think I sent to a wrong address.

I try to compile the kernel module to run on beagleboard, but I didn't have success.
My layout directory is:
$OEBASE = oe
                           /build /conf
                                    /hellokernel
                                                hellokernel.bb <http://hellokernel.bb/>
                                                /files
                                                             hellokernel.c
                                                             Makefile
                           /openembedded
                           /bitbake
                           /tmp

This is the error I got:

naruto@naruto-laptop:~/oe$ bitbake hellokernel
NOTE: Handling BitBake files: - (6693/6693) [100 %]
NOTE: Parsing finished. 6412 cached, 1 parsed, 280 skipped, 0 masked.
NOTE: build 200904281957: started

OE Build Configuration:
BB_VERSION = "1.8.13"
METADATA_BRANCH = "org.openembedded.dev"
METADATA_REVISION = "ec28f9410ac96d8ad3df6b5fb8e07306b417ed67"
TARGET_ARCH = "arm"
TARGET_OS = "linux-gnueabi"
MACHINE = "beagleboard"
DISTRO = "angstrom"
DISTRO_VERSION = "2009.X-test-20090429"
TARGET_FPU = "hard"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing runqueue
NOTE: Running task 339 of 547 (ID: 4, /home/naruto/oe/build/hellokernel/hellokernel.bb <http://hellokernel.bb/>, do_unpack)
NOTE: package hellokernel-1.0-r28: task do_unpack: started
NOTE: Unpacking /home/naruto/oe/build/hellokernel/files/hellokernel.cfile to /home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/
cp: cannot stat `/home/naruto/oe/build/hellokernel/files/hellokernel.cfile': No such file or directory
NOTE: Task failed:
NOTE: package hellokernel-1.0-r28: task do_unpack: failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/naruto/oe/build/hellokernel/hellokernel.bb <http://hellokernel.bb/> do_unpack failed
ERROR: Task 4 (/home/naruto/oe/build/hellokernel/hellokernel.bb <http://hellokernel.bb/>, do_unpack) failed
NOTE: Tasks Summary: Attempted 338 tasks of which 338 didn't need to be rerun and 1 failed.
ERROR: '/home/naruto/oe/build/hellokernel/hellokernel.bb <http://hellokernel.bb/>' failed
NOTE: build 200904281957: completed

I am starting working with the linux module, so I hope you help me.
Thank you for your time to read and answer my question.

Best regards,
Thang Nguyen

In hellokernel.bb at line 12 you have

file://hellokernel.c\

You need a space between the c and the \
As it is the two lines are joined so as to read

file://hellokernel.cfile://Makefile

Thank Darus for your help.
I fix that one, then I got another error. As I understand there is something wrong with Makefile but I checked it, and I don’t sure what is the issue. I need your help.

naruto@naruto-laptop:~/oe$ bitbake hellokernel
NOTE: Handling BitBake files: - (6693/6693) [100 %]
NOTE: Parsing finished. 6413 cached, 0 parsed, 280 skipped, 0 masked.
NOTE: Cache is clean, not saving.
NOTE: build 200904292153: started

OE Build Configuration:
BB_VERSION = “1.8.13”
METADATA_BRANCH = “org.openembedded.dev”
METADATA_REVISION = “ec28f9410ac96d8ad3df6b5fb8e07306b417ed67”
TARGET_ARCH = “arm”
TARGET_OS = “linux-gnueabi”
MACHINE = “beagleboard”
DISTRO = “angstrom”
DISTRO_VERSION = “2009.X-test-20090430”
TARGET_FPU = “hard”

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing runqueue
NOTE: Running task 387 of 547 (ID: 8, /home/naruto/oe/build/hellokernel/hellokernel.bb, do_compile)
NOTE: package hellokernel-1.0-r28: task do_compile: started
ERROR: function do_compile failed
ERROR: log data follows (/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/temp/log.do_compile.8921)

NOTE: make CROSS_COMPILE=arm-angstrom-linux-gnueabi- KERNELDIR=/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.28-r28/git CC=ccache arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
Makefile:27: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
FATAL: oe_runmake failed
NOTE: Task failed: /home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/temp/log.do_compile.8921
NOTE: package hellokernel-1.0-r28: task do_compile: failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/naruto/oe/build/hellokernel/hellokernel.bb do_compile failed
ERROR: Task 8 (/home/naruto/oe/build/hellokernel/hellokernel.bb, do_compile) failed
NOTE: Tasks Summary: Attempted 386 tasks of which 386 didn’t need to be rerun and 1 failed.
ERROR: ‘/home/naruto/oe/build/hellokernel/hellokernel.bb’ failed
NOTE: build 200904292153: completed

Makefile (998 Bytes)

log.do_compile.8921 (360 Bytes)

Makefile:27: *** missing separator (did you mean TAB instead of 8

spaces?). Stop.

Good old Make is very sensitive to TABs and SPACEs. As the message says “***
missing separator (did you mean TAB instead of 8 spaces?). Stop.” Most
likely you have inserted SPACEs instead of TABs in your Makefile?

You need to use TAB and not SPACEs for indenting text
Søren

Hi,
After replacing all of the space with TAB, I still get the same problem. Then I went to this folder:
/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28. I found that there is still an old version of my Makefile in the hellokernel directory. I decided to remove all of my hellokernel-1.0-r28 and run bitbake again and I got this error:

Note: It clearly runs the command in Makefile, so why it says cannot find the makefile?

I attach here my updated Makefile

NOTE: package hellokernel-1.0-r28: task do_compile: started
ERROR: function do_compile failed
ERROR: log data follows (/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/temp/log.do_compile.6094)

NOTE: make CROSS_COMPILE=arm-angstrom-linux-gnueabi- KERNELDIR=/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.28-r28/git CC=ccache arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
make: *** No targets specified and no makefile found. Stop.
FATAL: oe_runmake failed
NOTE: Task failed: /home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/temp/log.do_compile.6094
NOTE: package hellokernel-1.0-r28: task do_compile: failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/naruto/oe/build/hellokernel/hellokernel.bb do_compile failed
ERROR: Task 8 (/home/naruto/oe/build/hellokernel/hellokernel.bb, do_compile) failed
NOTE: Tasks Summary: Attempted 386 tasks of which 386 didn’t need to be rerun and 1 failed.
ERROR: ‘/home/naruto/oe/build/hellokernel/hellokernel.bb’ failed
NOTE: build 200904302114: completed

Makefile (1 KB)

I’ve just tried to remove the tmp folder and rebuild again by bitbake hellokernel. And I got the message behind. I wonder should I use another kernel?

ERROR: function do_compile failed
ERROR: log data follows (/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/temp/log.do_compile.16711)

NOTE: make CROSS_COMPILE=arm-angstrom-linux-gnueabi- KERNELDIR=/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.28-r28/git CC=ccache arm-angstrom-linux-gnueabi-gcc -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
make -C /home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.28-r28 M=/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/hellokernel ARCH=arm CROSS_COMPILE=/home/naruto/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi- modules
make[1]: Entering directory /home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.28-r28' make[1]: *** No rule to make target modules’. Stop.
make[1]: Leaving directory `/home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/linux-omap-2.6.28-r28’
make: *** [kernel-module] Error 2
FATAL: oe_runmake failed
NOTE: Task failed: /home/naruto/oe/tmp/work/beagleboard-angstrom-linux-gnueabi/hellokernel-1.0-r28/temp/log.do_compile.16711
NOTE: package hellokernel-1.0-r28: task do_compile: failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/naruto/oe/build/hellokernel/hellokernel.bb do_compile failed
ERROR: Task 8 (/home/naruto/oe/build/hellokernel/hellokernel.bb, do_compile) failed
NOTE: Tasks Summary: Attempted 386 tasks of which 0 didn’t need to be rerun and 1 failed.
ERROR: ‘/home/naruto/oe/build/hellokernel/hellokernel.bb’ failed
NOTE: build 200905011822: completed

Makefile (1 KB)

log.do_compile.16711 (875 Bytes)