お知らせ

  • 利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。
  • メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。

#1 2014-07-21 07:58:22

accept
新しいメンバ
登録日: 2010-01-22

EZUSB2131がビルドできない

http://ezusb2131.sourceforge.net/
http://sourceforge.net/projects/ezusb2131/

上記で配布されているドライバ"Ezusb2131-1.0.tar.gz"がUbuntu14.04 LTS x64日本語Remix版上でビルドできません。
Makefileは以下のように編集しました。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
INCLUDEDIR = /usr/src/linux/include

INCLUDEDIR1 = /usr/src/linux/include
INCLUDEDIR2 = /usr/src/linux/arch/x86/include
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
CFLAGS += -I$(INCLUDEDIR) -I.

CFLAGS += -I$(INCLUDEDIR1) -I$(INCLUDEDIR2) -I.
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー


カーネルのソースコードはaptで取得し、下記を参考に"make oldconfig" "make prepare" "make scripts"を掛けました。
http://techracho.bpsinc.jp/skk/2013_03_07/6748

結果です。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
root@xxxxxxxx:/usr/src/linux# make oldconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
kernel/irq/Kconfig:41:error: recursive dependency detected!
kernel/irq/Kconfig:41:    symbol GENERIC_IRQ_CHIP is selected by GPIO_DWAPB
drivers/gpio/Kconfig:124:    symbol GPIO_DWAPB depends on IRQ_DOMAIN
kernel/irq/Kconfig:46:    symbol IRQ_DOMAIN is selected by GENERIC_IRQ_CHIP
#
# configuration written to .config
#
root@xxxxxxxx:/usr/src/linux# make prepare
scripts/kconfig/conf --silentoldconfig Kconfig
kernel/irq/Kconfig:41:error: recursive dependency detected!
kernel/irq/Kconfig:41:    symbol GENERIC_IRQ_CHIP is selected by GPIO_DWAPB
drivers/gpio/Kconfig:124:    symbol GPIO_DWAPB depends on IRQ_DOMAIN
kernel/irq/Kconfig:46:    symbol IRQ_DOMAIN is selected by GENERIC_IRQ_CHIP
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_64.h
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/x86/include/generated/asm/clkdev.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
root@xxxxxxxx:/usr/src/linux# make scripts
  HOSTCC  scripts/genksyms/genksyms.o
  SHIPPED scripts/genksyms/lex.lex.c
  SHIPPED scripts/genksyms/keywords.hash.c
  SHIPPED scripts/genksyms/parse.tab.h
  HOSTCC  scripts/genksyms/lex.lex.o
  SHIPPED scripts/genksyms/parse.tab.c
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTLD  scripts/genksyms/genksyms
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  CC      scripts/mod/devicetable-offsets.s
  GEN     scripts/mod/devicetable-offsets.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/selinux/genheaders/genheaders
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/recordmcount
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/asn1_compiler
root@xxxxxxxx:/usr/src/linux#
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー


その上でドライバのビルド時に下記のエラーが出てしまいます。
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
root@xxxxxxxx:/opt/ezusb2131# make
gcc -D__KERNEL__ -DMODULE -DLINUX -DEXPORT_SYMTAB -DCONFIG_PROC_FS -I/usr/src/linux/include -I/usr/src/linux/arch/x86/include -I.  -O2 -pipe  -c ezusb2131.c -o ezusb2131_.o
In file included from /usr/src/linux/arch/x86/include/asm/bitops.h:16:0,
                 from /usr/src/linux/include/linux/bitops.h:33,
                 from /usr/src/linux/include/linux/kernel.h:10,
                 from /usr/src/linux/include/linux/cache.h:4,
                 from /usr/src/linux/include/linux/time.h:4,
                 from /usr/src/linux/include/linux/stat.h:18,
                 from /usr/src/linux/include/linux/module.h:10,
                 from ezusb2131.c:83:
/usr/src/linux/arch/x86/include/asm/arch_hweight.h: In function ‘__arch_hweight64’:
/usr/src/linux/arch/x86/include/asm/arch_hweight.h:53:42: error: expected ‘:’ or ‘)’ before ‘POPCNT64’
  asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT)
                                          ^
/usr/src/linux/arch/x86/include/asm/alternative.h:98:31: note: in definition of macro ‘ALTINSTR_REPLACEMENT’
  b_replacement(number)":\n\t" newinstr "\n" e_replacement(number) ":\n\t"
                               ^
/usr/src/linux/arch/x86/include/asm/arch_hweight.h:53:7: note: in expansion of macro ‘ALTERNATIVE’
  asm (ALTERNATIVE("call __sw_hweight64", POPCNT64, X86_FEATURE_POPCNT)
       ^
In file included from /usr/src/linux/arch/x86/include/asm/segment.h:148:0,
                 from /usr/src/linux/arch/x86/include/asm/ptrace.h:4,
                 from /usr/src/linux/arch/x86/include/asm/alternative.h:8,
                 from /usr/src/linux/arch/x86/include/asm/bitops.h:16,
                 from /usr/src/linux/include/linux/bitops.h:33,
                 from /usr/src/linux/include/linux/kernel.h:10,
                 from /usr/src/linux/include/linux/cache.h:4,
                 from /usr/src/linux/include/linux/time.h:4,
                 from /usr/src/linux/include/linux/stat.h:18,
                 from /usr/src/linux/include/linux/module.h:10,
                 from ezusb2131.c:83:
/usr/src/linux/arch/x86/include/asm/processor.h: At top level:
/usr/src/linux/arch/x86/include/asm/cache.h:7:25: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ undeclared here (not in a function)
#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
                         ^
/usr/src/linux/arch/x86/include/asm/cache.h:8:30: note: in expansion of macro ‘L1_CACHE_SHIFT’
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
                              ^
/usr/src/linux/include/linux/cache.h:12:25: note: in expansion of macro ‘L1_CACHE_BYTES’
#define SMP_CACHE_BYTES L1_CACHE_BYTES
                         ^
/usr/src/linux/arch/x86/include/asm/processor.h:131:30: note: in expansion of macro ‘SMP_CACHE_BYTES’
} __attribute__((__aligned__(SMP_CACHE_BYTES)));
                              ^
In file included from /usr/src/linux/arch/x86/include/asm/thread_info.h:22:0,
                 from /usr/src/linux/include/linux/thread_info.h:54,
                 from /usr/src/linux/arch/x86/include/asm/preempt.h:6,
                 from /usr/src/linux/include/linux/preempt.h:18,
                 from /usr/src/linux/include/linux/spinlock.h:50,
                 from /usr/src/linux/include/linux/seqlock.h:35,
                 from /usr/src/linux/include/linux/time.h:5,
                 from /usr/src/linux/include/linux/stat.h:18,
                 from /usr/src/linux/include/linux/module.h:10,
                 from ezusb2131.c:83:
/usr/src/linux/arch/x86/include/asm/processor.h:131:1: error: requested alignment is not an integer constant
} __attribute__((__aligned__(SMP_CACHE_BYTES)));
^
/usr/src/linux/arch/x86/include/asm/processor.h:164:0: warning: "cache_line_size" redefined [enabled by default]
#define cache_line_size() (boot_cpu_data.x86_cache_alignment)
^
In file included from /usr/src/linux/include/linux/time.h:4:0,
                 from /usr/src/linux/include/linux/stat.h:18,
                 from /usr/src/linux/include/linux/module.h:10,
                 from ezusb2131.c:83:
/usr/src/linux/include/linux/cache.h:64:0: note: this is the location of the previous definition
#define cache_line_size() L1_CACHE_BYTES
^
In file included from /usr/src/linux/include/linux/list.h:7:0,
                 from /usr/src/linux/include/linux/module.h:9,
                 from ezusb2131.c:83:
/usr/src/linux/arch/x86/include/asm/processor.h: In function ‘load_cr3’:
/usr/src/linux/arch/x86/include/asm/page_32_types.h:16:28: error: ‘CONFIG_PAGE_OFFSETUL’ undeclared (first use in this function)
#define __PAGE_OFFSET  _AC(CONFIG_PAGE_OFFSET, UL)
                            ^
/usr/src/linux/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET  ((unsigned long)__PAGE_OFFSET)
                                      ^
/usr/src/linux/arch/x86/include/asm/page_32.h:12:39: note: in expansion of macro ‘PAGE_OFFSET’
#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
                                       ^
/usr/src/linux/arch/x86/include/asm/page_32.h:16:25: note: in expansion of macro ‘__phys_addr_nodebug’
#define __phys_addr(x)  __phys_addr_nodebug(x)
                         ^
/usr/src/linux/arch/x86/include/asm/page.h:40:18: note: in expansion of macro ‘__phys_addr’
#define __pa(x)  __phys_addr((unsigned long)(x))
                  ^
/usr/src/linux/arch/x86/include/asm/processor.h:204:12: note: in expansion of macro ‘__pa’
  write_cr3(__pa(pgdir));
            ^
/usr/src/linux/arch/x86/include/asm/page_32_types.h:16:28: note: each undeclared identifier is reported only once for each function it appears in
#define __PAGE_OFFSET  _AC(CONFIG_PAGE_OFFSET, UL)
                            ^
/usr/src/linux/arch/x86/include/asm/page_types.h:30:38: note: in expansion of macro ‘__PAGE_OFFSET’
#define PAGE_OFFSET  ((unsigned long)__PAGE_OFFSET)
                                      ^
/usr/src/linux/arch/x86/include/asm/page_32.h:12:39: note: in expansion of macro ‘PAGE_OFFSET’
#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
                                       ^
/usr/src/linux/arch/x86/include/asm/page_32.h:16:25: note: in expansion of macro ‘__phys_addr_nodebug’
#define __phys_addr(x)  __phys_addr_nodebug(x)
                         ^
/usr/src/linux/arch/x86/include/asm/page.h:40:18: note: in expansion of macro ‘__phys_addr’
#define __pa(x)  __phys_addr((unsigned long)(x))
                  ^
/usr/src/linux/arch/x86/include/asm/processor.h:204:12: note: in expansion of macro ‘__pa’
  write_cr3(__pa(pgdir));
            ^
In file included from /usr/src/linux/arch/x86/include/asm/thread_info.h:22:0,
                 from /usr/src/linux/include/linux/thread_info.h:54,
                 from /usr/src/linux/arch/x86/include/asm/preempt.h:6,
                 from /usr/src/linux/include/linux/preempt.h:18,
                 from /usr/src/linux/include/linux/spinlock.h:50,
                 from /usr/src/linux/include/linux/seqlock.h:35,
                 from /usr/src/linux/include/linux/time.h:5,
                 from /usr/src/linux/include/linux/stat.h:18,
                 from /usr/src/linux/include/linux/module.h:10,
                 from ezusb2131.c:83:
/usr/src/linux/arch/x86/include/asm/processor.h: At top level:
/usr/src/linux/arch/x86/include/asm/processor.h:253:1: error: requested alignment is not an integer constant
} __attribute__((packed)) ____cacheline_aligned;
^
/usr/src/linux/arch/x86/include/asm/processor.h:284:1: error: requested alignment is not an integer constant
} ____cacheline_aligned;
^
In file included from /usr/src/linux/arch/x86/include/asm/atomic.h:255:0,
                 from /usr/src/linux/include/linux/atomic.h:4,
                 from /usr/src/linux/arch/x86/include/asm/thread_info.h:23,
                 from /usr/src/linux/include/linux/thread_info.h:54,
                 from /usr/src/linux/arch/x86/include/asm/preempt.h:6,
                 from /usr/src/linux/include/linux/preempt.h:18,
                 from /usr/src/linux/include/linux/spinlock.h:50,
                 from /usr/src/linux/include/linux/seqlock.h:35,
                 from /usr/src/linux/include/linux/time.h:5,
                 from /usr/src/linux/include/linux/stat.h:18,
                 from /usr/src/linux/include/linux/module.h:10,
                 from ezusb2131.c:83:
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:19:1: error: unknown type name ‘atomic64_t’
static inline long atomic64_read(const atomic64_t *v)
^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h: In function ‘atomic64_read’:
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:21:32: error: request for member ‘counter’ in something not a structure or union
  return (*(volatile long *)&(v)->counter);
                                ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h: At top level:
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:31:33: error: unknown type name ‘atomic64_t’
static inline void atomic64_set(atomic64_t *v, long i)
                                 ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:43:41: error: unknown type name ‘atomic64_t’
static inline void atomic64_add(long i, atomic64_t *v)
                                         ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:57:41: error: unknown type name ‘atomic64_t’
static inline void atomic64_sub(long i, atomic64_t *v)
                                         ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:73:49: error: unknown type name ‘atomic64_t’
static inline int atomic64_sub_and_test(long i, atomic64_t *v)
                                                 ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:84:33: error: unknown type name ‘atomic64_t’
static inline void atomic64_inc(atomic64_t *v)
                                 ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:97:33: error: unknown type name ‘atomic64_t’
static inline void atomic64_dec(atomic64_t *v)
                                 ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:112:41: error: unknown type name ‘atomic64_t’
static inline int atomic64_dec_and_test(atomic64_t *v)
                                         ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:125:41: error: unknown type name ‘atomic64_t’
static inline int atomic64_inc_and_test(atomic64_t *v)
                                         ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:139:49: error: unknown type name ‘atomic64_t’
static inline int atomic64_add_negative(long i, atomic64_t *v)
                                                 ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:151:48: error: unknown type name ‘atomic64_t’
static inline long atomic64_add_return(long i, atomic64_t *v)
                                                ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:156:48: error: unknown type name ‘atomic64_t’
static inline long atomic64_sub_return(long i, atomic64_t *v)
                                                ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:164:37: error: unknown type name ‘atomic64_t’
static inline long atomic64_cmpxchg(atomic64_t *v, long old, long new)
                                     ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:169:34: error: unknown type name ‘atomic64_t’
static inline long atomic64_xchg(atomic64_t *v, long new)
                                  ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:183:39: error: unknown type name ‘atomic64_t’
static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
                                       ^
/usr/src/linux/arch/x86/include/asm/atomic64_64.h:207:45: error: unknown type name ‘atomic64_t’
static inline long atomic64_dec_if_positive(atomic64_t *v)
                                             ^
In file included from /usr/src/linux/include/linux/srcu.h:33:0,
                 from /usr/src/linux/include/linux/notifier.h:15,
                 from /usr/src/linux/include/linux/memory_hotplug.h:6,
                 from /usr/src/linux/include/linux/mmzone.h:797,
                 from /usr/src/linux/include/linux/gfp.h:4,
                 from /usr/src/linux/include/linux/kmod.h:22,
                 from /usr/src/linux/include/linux/module.h:13,
                 from ezusb2131.c:83:
/usr/src/linux/include/linux/rcupdate.h:282:2: error: #error "Unknown RCU implementation specified to kernel configuration"
#error "Unknown RCU implementation specified to kernel configuration"
  ^
In file included from /usr/src/linux/include/linux/ktime.h:25:0,
                 from /usr/src/linux/include/linux/timer.h:5,
                 from /usr/src/linux/include/linux/workqueue.h:8,
                 from /usr/src/linux/include/linux/srcu.h:34,
                 from /usr/src/linux/include/linux/notifier.h:15,
                 from /usr/src/linux/include/linux/memory_hotplug.h:6,
                 from /usr/src/linux/include/linux/mmzone.h:797,
                 from /usr/src/linux/include/linux/gfp.h:4,
                 from /usr/src/linux/include/linux/kmod.h:22,
                 from /usr/src/linux/include/linux/module.h:13,
                 from ezusb2131.c:83:
/usr/src/linux/include/linux/jiffies.h:39:3: error: #error Invalid value of HZ.
# error Invalid value of HZ.
   ^
/usr/src/linux/include/linux/jiffies.h:60:39: error: division by zero in #if
#define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ)
                                       ^
/usr/src/linux/include/linux/jiffies.h:256:31: note: in expansion of macro ‘TICK_NSEC’
#if !((((NSEC_PER_SEC << 2) / TICK_NSEC) << (SEC_JIFFIE_SC - 2)) & 0x80000000)
                               ^
In file included from /usr/src/linux/include/linux/kmod.h:22:0,
                 from /usr/src/linux/include/linux/module.h:13,
                 from ezusb2131.c:83:
/usr/src/linux/include/linux/gfp.h: In function ‘gfp_zonelist’:
/usr/src/linux/include/linux/gfp.h:272:17: error: ‘CONFIG_NUMA’ undeclared (first use in this function)
  if (IS_ENABLED(CONFIG_NUMA) && unlikely(flags & __GFP_THISNODE))
                 ^
In file included from /usr/src/linux/include/linux/elf.h:4:0,
                 from /usr/src/linux/include/linux/module.h:14,
                 from ezusb2131.c:83:
/usr/src/linux/arch/x86/include/asm/elf.h: In function ‘elf_common_init’:
/usr/src/linux/arch/x86/include/asm/elf.h:172:3: error: ‘struct thread_struct’ has no member named ‘fs’
  t->fs = t->gs = 0;
   ^
/usr/src/linux/arch/x86/include/asm/elf.h: At top level:
/usr/src/linux/arch/x86/include/asm/elf.h:366:1: error: requested alignment is not an integer constant
} ____cacheline_aligned;
^
In file included from /usr/src/linux/include/linux/module.h:22:0,
                 from ezusb2131.c:83:
/usr/src/linux/arch/x86/include/asm/module.h:57:2: error: #error unknown processor family
#error unknown processor family
  ^
In file included from ezusb2131.c:98:0:
/usr/src/linux/include/linux/slab.h:246:42: error: ‘KMALLOC_SHIFT_HIGH’ undeclared here (not in a function)
extern struct kmem_cache *kmalloc_caches[KMALLOC_SHIFT_HIGH + 1];
                                          ^
/usr/src/linux/include/linux/slab.h: In function ‘kmalloc_index’:
/usr/src/linux/include/linux/slab.h:242:32: error: ‘KMALLOC_SHIFT_LOW’ undeclared (first use in this function)
#define KMALLOC_MIN_SIZE (1 << KMALLOC_SHIFT_LOW)
                                ^
/usr/src/linux/include/linux/slab.h:264:14: note: in expansion of macro ‘KMALLOC_MIN_SIZE’
  if (size <= KMALLOC_MIN_SIZE)
              ^
/usr/src/linux/include/linux/slab.h: In function ‘kmalloc_size’:
/usr/src/linux/include/linux/slab.h:242:32: error: ‘KMALLOC_SHIFT_LOW’ undeclared (first use in this function)
#define KMALLOC_MIN_SIZE (1 << KMALLOC_SHIFT_LOW)
                                ^
/usr/src/linux/include/linux/slab.h:472:16: note: in expansion of macro ‘KMALLOC_MIN_SIZE’
  if (n == 1 && KMALLOC_MIN_SIZE <= 32)
                ^
/usr/src/linux/include/linux/slab.h: In function ‘kmem_cache_size’:
/usr/src/linux/include/linux/slab.h:654:10: error: dereferencing pointer to incomplete type
  return s->object_size;
          ^
In file included from /usr/src/linux/include/linux/preempt_mask.h:5:0,
                 from /usr/src/linux/include/linux/hardirq.h:4,
                 from /usr/src/linux/include/linux/interrupt.h:12,
                 from /usr/src/linux/include/linux/usb.h:15,
                 from ezusb2131.c:100:
/usr/src/linux/arch/x86/include/asm/hardirq.h: At top level:
/usr/src/linux/arch/x86/include/asm/hardirq.h:36:1: error: requested alignment is not an integer constant
} ____cacheline_aligned irq_cpustat_t;
^
In file included from /usr/src/linux/include/linux/dcache.h:12:0,
                 from /usr/src/linux/include/linux/fs.h:8,
                 from /usr/src/linux/include/linux/usb.h:19,
                 from ezusb2131.c:100:
/usr/src/linux/include/linux/lockref.h:21:13: error: missing binary operator before token "("
  (IS_ENABLED(CONFIG_ARCH_USE_CMPXCHG_LOCKREF) && \
             ^
/usr/src/linux/include/linux/lockref.h:26:5: note: in expansion of macro ‘USE_CMPXCHG_LOCKREF’
#if USE_CMPXCHG_LOCKREF
     ^
In file included from /usr/src/linux/include/linux/fs.h:8:0,
                 from /usr/src/linux/include/linux/usb.h:19,
                 from ezusb2131.c:100:
/usr/src/linux/include/linux/dcache.h:163:1: error: requested alignment is not an integer constant
} ____cacheline_aligned;
^
In file included from /usr/src/linux/include/linux/usb.h:19:0,
                 from ezusb2131.c:100:
/usr/src/linux/include/linux/fs.h:1595:1: error: requested alignment is not an integer constant
} ____cacheline_aligned;
^
In file included from /usr/src/linux/include/linux/sched.h:24:0,
                 from /usr/src/linux/include/linux/usb.h:21,
                 from ezusb2131.c:100:
/usr/src/linux/include/linux/mm_types.h:28:13: error: missing binary operator before token "("
   IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK))
             ^
/usr/src/linux/include/linux/mm_types.h:144:45: note: in expansion of macro ‘USE_SPLIT_PMD_PTLOCKS’
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && USE_SPLIT_PMD_PTLOCKS
                                             ^
/usr/src/linux/include/linux/mm_types.h:28:13: error: missing binary operator before token "("
   IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK))
             ^
/usr/src/linux/include/linux/mm_types.h:429:46: note: in expansion of macro ‘USE_SPLIT_PMD_PTLOCKS’
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
                                              ^
ezusb2131.c:142:18: error: expected ‘)’ before string constant
MODULE_PARM(uid, "i");
                  ^
ezusb2131.c:144:27: error: expected ‘)’ before string constant
MODULE_PARM(multi_boards, "i");
                           ^
ezusb2131.c:146:24: error: expected ‘)’ before string constant
MODULE_PARM(vendor_id, "i");
                        ^
ezusb2131.c:148:25: error: expected ‘)’ before string constant
MODULE_PARM(product_id, "i");
                         ^
ezusb2131.c:150:34: error: expected ‘)’ before string constant
MODULE_PARM(ignore_renum_modula, "i");
                                  ^
ezusb2131.c:299:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c:302:26: error: field ‘procfs_entry’ has incomplete type
    struct proc_dir_entry procfs_entry;
                          ^
ezusb2131.c:320:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c:344:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c:360:4: warning: initialization from incompatible pointer type [enabled by default]
    probe:      ezusb_probe,
    ^
ezusb2131.c:360:4: warning: (near initialization for ‘ezusb_driver.probe’) [enabled by default]
ezusb2131.c:361:4: warning: initialization from incompatible pointer type [enabled by default]
    disconnect: ezusb_disconnect,
    ^
ezusb2131.c:361:4: warning: (near initialization for ‘ezusb_driver.disconnect’) [enabled by default]
ezusb2131.c:362:4: error: unknown field ‘fops’ specified in initializer
    fops:       NULL,
    ^
ezusb2131.c:363:4: error: unknown field ‘minor’ specified in initializer
    minor:      0,
    ^
ezusb2131.c:365:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c: In function ‘setup_ezusb_procfs’:
ezusb2131.c:432:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c: In function ‘free_ezusb_list_element’:
ezusb2131.c:595:41: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
                                         ^
ezusb2131.c: In function ‘ezusb_cleanup’:
ezusb2131.c:642:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c:660:7: error: ‘MOD_DEC_USE_COUNT’ undeclared (first use in this function)
       MOD_DEC_USE_COUNT;
       ^
ezusb2131.c: In function ‘ezusb_open_procfs’:
ezusb2131.c:725:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c:743:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
              EZUSB_MOD_NAME, pinode->i_ino, __FILE__, __LINE__);
              ^
ezusb2131.c: In function ‘ezusb_close_procfs’:
ezusb2131.c:792:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
              EZUSB_MOD_NAME, pinode->i_ino, __FILE__, __LINE__);
              ^
In file included from /usr/include/x86_64-linux-gnu/asm/param.h:1:0,
                 from /usr/include/linux/param.h:4,
                 from /usr/src/linux/include/linux/timex.h:63,
                 from /usr/src/linux/include/linux/jiffies.h:8,
                 from /usr/src/linux/include/linux/ktime.h:25,
                 from /usr/src/linux/include/linux/timer.h:5,
                 from /usr/src/linux/include/linux/workqueue.h:8,
                 from /usr/src/linux/include/linux/srcu.h:34,
                 from /usr/src/linux/include/linux/notifier.h:15,
                 from /usr/src/linux/include/linux/memory_hotplug.h:6,
                 from /usr/src/linux/include/linux/mmzone.h:797,
                 from /usr/src/linux/include/linux/gfp.h:4,
                 from /usr/src/linux/include/linux/kmod.h:22,
                 from /usr/src/linux/include/linux/module.h:13,
                 from ezusb2131.c:83:
ezusb2131.c: In function ‘ezusb_download’:
ezusb2131.c:183:35: error: ‘CONFIG_HZ’ undeclared (first use in this function)
#define EZUSB_LOAD_TIMEOUT       (HZ*3) /* three seconds, good enough eh? */
                                   ^
ezusb2131.c:967:55: note: in expansion of macro ‘EZUSB_LOAD_TIMEOUT’
          mod_timer(&pezusb->download_timer, jiffies + EZUSB_LOAD_TIMEOUT);
                                                       ^
ezusb2131.c: At top level:
ezusb2131.c:1155:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c: In function ‘ezusb_probe’:
ezusb2131.c:1257:55: error: ‘struct usb_host_config’ has no member named ‘bConfigurationValue’
    if (usb_set_configuration(usbdev, usbdev->config[0].bConfigurationValue) < 0)
                                                       ^
ezusb2131.c:1271:4: error: ‘MOD_INC_USE_COUNT’ undeclared (first use in this function)
    MOD_INC_USE_COUNT;
    ^
ezusb2131.c: In function ‘ezusb_module_init’:
ezusb2131.c:1314:41: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
                                         ^
ezusb2131.c:1318:28: warning: assignment from incompatible pointer type [enabled by default]
    ezusb_procfs_fops.write = ezusb_write_procfs;
                            ^
ezusb2131.c:1322:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c:1327:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    pezusb_proc_root = (struct proc_dir_entry*)
                       ^
ezusb2131.c:1339:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0))
                                          ^
ezusb2131.c:1344:28: error: ‘RW_LOCK_UNLOCKED’ undeclared (first use in this function)
    pezusb_dev->list_lock = RW_LOCK_UNLOCKED;
                            ^
ezusb2131.c:1380:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
ezusb2131.c:1427:42: error: missing binary operator before token "("
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0))
                                          ^
In file included from ezusb2131.c:100:0:
/usr/src/linux/include/linux/usb.h:1139:43: error: ‘KBUILD_MODNAME’ undeclared (first use in this function)
  usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
                                           ^
ezusb2131.c:1435:10: note: in expansion of macro ‘usb_register’
    if (i=usb_register(&ezusb_driver))
          ^
make: *** [ezusb2131.o] エラー 1
root@xxxxxxxx:/opt/ezusb2131#
ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー


調べたところ下記の方のエラーと似ているというところまではわかったのですが、そこから手詰まり状態です。
http://toyoda-eizi-ja.blogspot.jp/2013/08/via-vnt6656-usb-wifi-module-ubuntu.html

Linuxはまだまだ初心者の域を脱せていませんので、説明等至らないところがあるとは思いますが、どうかよろしくお願いします。

オフライン

 

Board footer

Powered by FluxBB