All pastes #777015 Raw Edit

Kernel module for avr32

public text v1 · immutable
·published 2007-11-16 13:09 UTC
rendered paste body
tbpdesign@tbpdesign-linux:~/Projects/LEDTEST1$ cat Makefile
ARCH := avr32
CROSS_COMPILE := /home/tbpdesign/Desktop/avr32_buildroot/buildroot_11_13/build_avr32_nofpu/staging_dir/bin/avr32-linux-
KDIR := /home/tbpdesign/Desktop/avr32_buildroot/buildroot_11_13/project_build_avr32_nofpu/atngw100/linux-2.6.23
PWD := $(shell pwd)

obj-m := testmodule.o

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

clean:
        rm -rf testmodule.ko testmodule.o testmodule.mod.* .testmodule* .project .tmp* .cd*


tbpdesign@tbpdesign-linux:~/Projects/LEDTEST1$ cat testmodule.c
#include "linux/module.h"

int init_module(void)
{
        printk("hello\n");
        return 0;

}

void cleanup_module(void)
{
        printk("world\n");
}



tbpdesign@tbpdesign-linux:~/Projects/LEDTEST1$ make
make -C /home/tbpdesign/Desktop/avr32_buildroot/buildroot_11_13/project_build_avr32_nofpu/atngw100/linux-2.6.23 SUBDIRS=/home/tbpdesign/Projects/LEDTEST1 modules
make[1]: Entering directory `/home/tbpdesign/Desktop/avr32_buildroot/buildroot_11_13/project_build_avr32_nofpu/atngw100/linux-2.6.23'
  CC [M]  /home/tbpdesign/Projects/LEDTEST1/testmodule.o
In file included from include/linux/irqflags.h:46,
                 from include/asm/system.h:72,
                 from include/linux/list.h:9,
                 from include/linux/module.h:9,
                 from /home/tbpdesign/Projects/LEDTEST1/testmodule.c:1:
include/asm/irqflags.h: In function ‘__raw_local_save_flags’:
include/asm/irqflags.h:15: error: implicit declaration of function ‘__builtin_mfsr’
include/asm/irqflags.h: In function ‘raw_local_irq_restore’:
include/asm/irqflags.h:30: error: implicit declaration of function ‘__builtin_mtsr’
In file included from include/linux/byteorder/big_endian.h:12,
                 from include/asm/byteorder.h:23,
                 from include/asm/bitops.h:11,
                 from include/linux/bitops.h:9,
                 from include/linux/kernel.h:15,
                 from include/linux/cache.h:4,
                 from include/linux/time.h:7,
                 from include/linux/stat.h:60,
                 from include/linux/module.h:10,
                 from /home/tbpdesign/Projects/LEDTEST1/testmodule.c:1:
include/linux/byteorder/swab.h: In function ‘__fswab16’:
include/linux/byteorder/swab.h:165: error: implicit declaration of function ‘__builtin_bswap_16’
include/linux/byteorder/swab.h: In function ‘__fswab32’:
include/linux/byteorder/swab.h:178: error: implicit declaration of function ‘__builtin_bswap_32’
In file included from include/linux/spinlock.h:333,
                 from include/linux/seqlock.h:29,
                 from include/linux/time.h:8,
                 from include/linux/stat.h:60,
                 from include/linux/module.h:10,
                 from /home/tbpdesign/Projects/LEDTEST1/testmodule.c:1:
include/asm/atomic.h: In function ‘atomic_sub_return’:
include/asm/atomic.h:45: error: matching constraint references invalid operand number
include/asm/atomic.h:36: error: matching constraint references invalid operand number
include/asm/atomic.h: In function ‘atomic_sub_unless’:
include/asm/atomic.h:105: error: matching constraint references invalid operand number
include/asm/atomic.h:105: error: matching constraint references invalid operand number
include/asm/atomic.h:92: error: matching constraint references invalid operand number
include/asm/atomic.h:92: error: matching constraint references invalid operand number
make[2]: *** [/home/tbpdesign/Projects/LEDTEST1/testmodule.o] Error 1
make[1]: *** [_module_/home/tbpdesign/Projects/LEDTEST1] Error 2
make[1]: Leaving directory `/home/tbpdesign/Desktop/avr32_buildroot/buildroot_11_13/project_build_avr32_nofpu/atngw100/linux-2.6.23'
make: *** [default] Error 2
tbpdesign@tbpdesign-linux:~/Projects/LEDTEST1$