---------------------------------------------------
-----------compile gpio driver---------------------
make[1]: 正在进入目录 `/home/share/HI3516CV300/Hi3516CV300_SDK_V1.0.1.1/package/osdrv/opensource/kernel/linux-3.18.y'
CC [M] /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.o
In file included from ./arch/x86/include/asm/bitops.h:500:0,
from include/linux/bitops.h:36,
from include/linux/kernel.h:10,
from include/linux/list.h:8,
from include/linux/module.h:9,
from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:38:
./arch/x86/include/asm/arch_hweight.h: 在函数‘__arch_hweight64’中:
./arch/x86/include/asm/arch_hweight.h:53:7: 错误: expected ‘:’ or ‘)’ before ‘POPCNT64’
In file included from ./arch/x86/include/asm/thread_info.h:23:0,
from include/linux/thread_info.h:54,
from ./arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:18,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:38:
./arch/x86/include/asm/processor.h: 在文件作用域:
./arch/x86/include/asm/processor.h:130:30: 错误: ‘CONFIG_X86_L1_CACHE_SHIFT’未声明(不在函数内)
./arch/x86/include/asm/processor.h:130:1: 错误: 要求的对齐边界不是常量
./arch/x86/include/asm/processor.h:163:0: 警告: “cache_line_size”重定义 [默认启用]
include/linux/cache.h:64:0: 附注: 这是先前定义的位置
./arch/x86/include/asm/processor.h:252:1: 错误: 要求的对齐边界不是常量
./arch/x86/include/asm/processor.h:283:1: 错误: 要求的对齐边界不是常量
In file included from ./arch/x86/include/asm/atomic.h:235:0,
from include/linux/atomic.h:4,
from ./arch/x86/include/asm/thread_info.h:24,
from include/linux/thread_info.h:54,
from ./arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:18,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:38:
./arch/x86/include/asm/atomic64_64.h:19:1: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h: 在函数‘atomic64_read’中:
./arch/x86/include/asm/atomic64_64.h:21:9: 错误: 在非结构或联合中请求成员‘counter’
./arch/x86/include/asm/atomic64_64.h:21:9: 错误: 在非结构或联合中请求成员‘counter’
./arch/x86/include/asm/atomic64_64.h: 在文件作用域:
./arch/x86/include/asm/atomic64_64.h:31:33: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:43:41: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:57:41: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:73:49: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:84:33: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:97:33: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:112:41: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:125:41: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:139:49: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:151:48: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:156:48: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:164:37: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:169:34: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:183:39: 错误: 未知的类型名‘atomic64_t’
./arch/x86/include/asm/atomic64_64.h:207:45: 错误: 未知的类型名‘atomic64_t’
In file included from include/linux/atomic.h:129:0,
from ./arch/x86/include/asm/thread_info.h:24,
from include/linux/thread_info.h:54,
from ./arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:18,
from include/linux/spinlock.h:50,
from include/linux/seqlock.h:35,
from include/linux/time.h:5,
from include/linux/stat.h:18,
from include/linux/module.h:10,
from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:38:
include/asm-generic/atomic64.h:21:18: 错误: 与‘atomic64_read’类型冲突
./arch/x86/include/asm/atomic64_64.h:19:20: 附注: ‘atomic64_read’的上一个定义在此
include/asm-generic/atomic64.h:46:0: 警告: “atomic64_inc_return”重定义 [默认启用]
./arch/x86/include/asm/atomic64_64.h:161:0: 附注: 这是先前定义的位置
include/asm-generic/atomic64.h:50:0: 警告: “atomic64_dec_return”重定义 [默认启用]
./arch/x86/include/asm/atomic64_64.h:162:0: 附注: 这是先前定义的位置
include/asm-generic/atomic64.h:52:0: 警告: “atomic64_inc_not_zero”重定义 [默认启用]
./arch/x86/include/asm/atomic64_64.h:198:0: 附注: 这是先前定义的位置
In file included from include/linux/elf.h:4:0,
from include/linux/module.h:14,
from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:38:
./arch/x86/include/asm/elf.h: 在函数‘elf_common_init’中:
./arch/x86/include/asm/elf.h:178:3: 错误: ‘struct thread_struct’没有名为‘fs’的成员
./arch/x86/include/asm/elf.h: 在文件作用域:
./arch/x86/include/asm/elf.h:368:1: 错误: 要求的对齐边界不是常量
In file included from include/linux/module.h:22:0,
from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:38:
./arch/x86/include/asm/module.h:57:2: 错误: #error unknown processor family
In file included from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:38:0:
include/linux/module.h:302:27: 错误: 字段‘arch’的类型不完全
In file included from include/linux/fs.h:8:0,
from include/linux/proc_fs.h:8,
from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:46:
include/linux/dcache.h:163:1: 错误: 要求的对齐边界不是常量
In file included from include/linux/proc_fs.h:8:0,
from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:46:
include/linux/fs.h:1613:1: 错误: 要求的对齐边界不是常量
In file included from /home/share/HI3516CV300/3516_driver/gpio/hi_gpio.c:52:0:
./arch/x86/include/asm/io.h:42:31: 致命错误: asm/early_ioremap.h:没有那个文件或目录
编译中断。
make[2]: *** [/home/share/HI3516CV300/3516_driver/gpio/hi_gpio.o] 错误 1
make[1]: *** [_module_/home/share/HI3516CV300/3516_driver/gpio] 错误 2
make[1]:正在离开目录 `/home/share/HI3516CV300/Hi3516CV300_SDK_V1.0.1.1/package/osdrv/opensource/kernel/linux-3.18.y'
make: *** [default] 错误 2
指定内核路径后还是这样编译不过,最后发现指定一下交叉编译链就可以了make ARCH=arm CROSS_COMPILE=arm-hisiv500-linux-