新手上路
- 积分
- 21
- 金钱
- 21
- 注册时间
- 2023-4-26
- 在线时间
- 4 小时
|
make -C /home/xy/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek M=/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase modules
make[1]: 进入目录“/home/xy/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek”
CC [M] /home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.o
In file included from include/linux/printk.h:5:0,
from include/linux/kernel.h:13,
from /home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c:2:
/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c: In function ‘chrdevbase_exit’:
include/linux/init.h:348:27: error: invalid storage class for function ‘__inittest’
static inline initcall_t __inittest(void) \
^
/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c:41:1: note: in expansion of macro ‘module_init’
module_init(chrdevbase_init);
^~~~~~~~~~~
/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c:41:1: warning: ‘alias’ attribute ignored [-Wattributes]
In file included from include/linux/printk.h:5:0,
from include/linux/kernel.h:13,
from /home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c:2:
include/linux/init.h:354:27: error: invalid storage class for function ‘__exittest’
static inline exitcall_t __exittest(void) \
^
/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c:42:1: note: in expansion of macro ‘module_exit’
module_exit(chrdevbase_exit);
^~~~~~~~~~~
include/linux/init.h:354:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static inline exitcall_t __exittest(void) \
^
/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c:42:1: note: in expansion of macro ‘module_exit’
module_exit(chrdevbase_exit);
^~~~~~~~~~~
/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c:42:1: warning: ‘alias’ attribute ignored [-Wattributes]
/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.c:42:1: error: expected declaration or statement at end of input
scripts/Makefile.build:264: recipe for target '/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.o' failed
make[2]: *** [/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase/chrdevbase.o] Error 1
Makefile:1387: recipe for target '_module_/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase' failed
make[1]: *** [_module_/home/xy/linux/IMX6ULL/Linux_Drivers/1_chrdevbase] Error 2
make[1]: 离开目录“/home/xy/linux/IMX6ULL/linux/linux-imx-rel_imx_4.1.15_2.1.0_ga_alientek”
Makefile:8: recipe for target 'kernel_modules' failed
make: *** [kernel_modules] Error 2
以上为编译情况,一直报invalid storage class for function ‘__exittest’ 错误,Linux源码编译未出错(正点原子出厂的Linux源码和第三期的源码都试过了都是同样的问题)
网上说是少了“}”但源码我未动过,应该没有问题啊
求解!!!!
|
|