Quote:
Originally Posted by rtmistler
|
Hi rtmistler, thanks for your help. I did add the extra flag in my Makefile as the website said. My Makefile is like below
**********************************************************
obj-m += hello.o
HOSTCFLAGS=-march=armv6zk -mtune=arm1176jzf-s
all:
make -C /home/gwang/raspi_tool/kernel M=$(PWD) modules
clean:
make -C /home/gwang/raspi_tool/kernel M=$(PWD) clean
**********************************************************
But however I did "modinfo hello.ko" after I compiled it. It still shows the arch is ARMv5.
Here below is compile message it gives:
****************************************************************
gwang@george-dell:~/Dropbox/modules$ make ARCH=arm CROSS_COMPILE=arm-bcm2708-linux-gnueabi-
make -C /home/gwang/raspi_tool/kernel M=/home/gwang/Dropbox/modules modules
make[1]: Entering directory `/home/gwang/raspi_tool/kernel'
CC [M] /home/gwang/Dropbox/modules/hello.o
/home/gwang/Dropbox/modules/hello.c:1:0: warning: "MODULE" redefined [enabled by default]
this is the location of the previous definition
/home/gwang/Dropbox/modules/hello.c:3:0: warning: "__KERNEL__" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
Building modules, stage 2.
MODPOST 1 modules
WARNING: "__gnu_mcount_nc" [/home/gwang/Dropbox/modules/hello.ko] undefined!
CC /home/gwang/Dropbox/modules/hello.mod.o
LD [M] /home/gwang/Dropbox/modules/hello.ko
make[1]: Leaving directory `/home/gwang/raspi_tool/kernel
gwang@george-dell:~/Dropbox/modules$ modinfo hello.ko
filename: hello.ko
license: GPL
srcversion: 81534A67BAB6D41BF92CCE5
depends:
vermagic: 3.6.11+ mod_unload modversions ARMv5 p2v8
***********************************************************************************