UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor flytercel
Visitor
2,496 Views
Registered: ‎06-02-2011

How to Creating New Kernel Modules in petalinux

I have already read the petalinux UserGuider,i want to Creating New Kernel Modules,so i use petalinux-new-module helloworld creat a helloworld modules,then i use make commandto build this module, some wrong happend

 

make -C /home/yfj/petalinux-v0.40-final/software/petalinux-dist/linux-2.6.x M=/home/yfj/petalinux-v0.40-final/software/user-modules/hello modules
make[1]: 正在进入目录 `/home/yfj/petalinux-v0.40-final/software/linux-2.6.x-petalogix'
  CC [M]  /home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.o
In file included from include/asm/bitops.h:17,
                 from include/linux/bitops.h:9,
                 from include/linux/kernel.h:15,
                 from /home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.c:3:
include/asm/system.h:31:5: warning: "CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR" is not defined
In file included from include/linux/prefetch.h:15,
                 from include/linux/list.h:8,
                 from include/linux/module.h:10,
                 from /home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.c:5:
include/asm/cache.h:24:5: warning: "CONFIG_XILINX_MICROBLAZE0_ICACHE_USE_FSL" is not defined
include/asm/cache.h:30:5: warning: "CONFIG_XILINX_MICROBLAZE0_DCACHE_USE_FSL" is not defined
include/asm/cache.h:36:5: warning: "CONFIG_XILINX_MICROBLAZE0_USE_ICACHE" is not defined
include/asm/cache.h:89:5: warning: "CONFIG_XILINX_MICROBLAZE0_USE_DCACHE" is not defined
In file included from include/linux/kobject.h:25,
                 from include/linux/module.h:17,
                 from /home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.c:5:
include/linux/rwsem.h:24:65: asm/rwsem.h: No such file or directory
In file included from include/linux/module.h:17,
                 from /home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.c:5:
include/linux/kobject.h:174: error: field `rwsem' has incomplete type
In file included from include/linux/memory_hotplug.h:7,
                 from include/linux/mmzone.h:443,
                 from include/linux/gfp.h:4,
                 from include/linux/slab.h:14,
                 from include/linux/percpu.h:5,
                 from include/asm-generic/local.h:4,
                 from include/asm/local.h:1,
                 from include/linux/module.h:19,
                 from /home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.c:5:
include/linux/notifier.h:62: error: field `rwsem' has incomplete type
In file included from include/asm/hardirq.h:15,
                 from include/linux/hardirq.h:7,
                 from include/asm-generic/local.h:5,
                 from include/asm/local.h:1,
                 from include/linux/module.h:19,
                 from /home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.c:5:
include/linux/irq.h:174: error: `CONFIG_XILINX_INTC_0_NUM_INTR_INPUTS' undeclared here (not in a function)
In file included from include/asm-generic/local.h:5,
                 from include/asm/local.h:1,
                 from include/linux/module.h:19,
                 from /home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.c:5:
include/linux/hardirq.h:40:27: warning: "CONFIG_XILINX_INTC_0_NUM_INTR_INPUTS" is not defined
make[2]: *** [/home/yfj/petalinux-v0.40-final/software/user-modules/hello/hello.o] 错误 1
make[1]: *** [_module_/home/yfj/petalinux-v0.40-final/software/user-modules/hello] 错误 2
make[1]:正在离开目录 `/home/yfj/petalinux-v0.40-final/software/linux-2.6.x-petalogix'
make: *** [modules] 错误 2

 

anybody can help me ,thank you

0 Kudos