|
发表于 2005-8-19 13:50:21
|
显示全部楼层
我在linux2.4内核也是这样的情况,正在修改.可能与makefile文件有关系,这是我的makefile.
#
# Makefile for the linux YAFFS filesystem routines.
#
#
O_TARGET := yaffs.o
obj-y := yaffs_fs.o yaffs_guts.o yaffs_mtdif.o yaffs_ecc.o
obj-m := $(O_TARGET)
obj-$(CONFIG_YAFFS_FS) += yaffs.o
yaffs-objs := yaffs_fs.o yaffs_guts.o yaffs_mtdif.o yaffs_ecc.o yaffs_ramem.o
include $(TOPDIR)/Rules.make
可以编译通过,确是和你的结果一样!
参考http://www.linuxforum.net/forum/showflat.php?Cat=&Board=embedded&Number=573286&page=0&view=collapsed&sb=5&o=0&fpart=
中的makefile : 别人用它可以编译进内核
YAFFS_CONFIGS := -DCONFIG_YAFFS_MTD_ENABLED \
-DCONFIG_YAFFS_USE_GENERIC_RW \
-DCONFIG_YAFFS_USE_NANDECC \
-DCONFIG_SHORT_NAMES_IN_RAM
O_TARGET := yaffs.o
EXTRA_CFLAGS = $(YAFFS_CONFIGS)
obj-y := yaffs_fs.o yaffs_guts.o yaffs_mtdif.o yaffs_ecc.o yaffs_ramem.o
obj-m := $(O_TARGET)
include $(TOPDIR)/Rules.make
出错,编译不过
arm-linux-gcc -D__KERNEL__ -I/friendly-arm/kernel/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -mapcs -fno-strict-aliasing -fno-common -fno-common -pipe -mapcs-32 -march=armv4 -mtune=arm9tdmi -mshort-load-bytes -msoft-float -DCONFIG_YAFFS_MTD_ENABLED -DCONFIG_YAFFS_USE_GENERIC_RW -DCONFIG_YAFFS_USE_NANDECC -DCONFIG_SHORT_NAMES_IN_RAM -DKBUILD_BASENAME=yaffs_mtdif -c -o yaffs_mtdif.o yaffs_mtdif.c
yaffs_mtdif.c:32: variable `yaffs_oobinfo' has initializer but incomplete type
yaffs_mtdif.c:33: unknown field `useecc' specified in initializer
yaffs_mtdif.c:33: warning: excess elements in struct initializer
yaffs_mtdif.c:33: warning: (near initialization for `yaffs_oobinfo')
yaffs_mtdif.c:38: unknown field `eccpos' specified in initializer
yaffs_mtdif.c:38: extra brace group at end of initializer
yaffs_mtdif.c:38: (near initialization for `yaffs_oobinfo')
yaffs_mtdif.c:38: warning: excess elements in struct initializer
yaffs_mtdif.c:38: warning: (near initialization for `yaffs_oobinfo')
yaffs_mtdif.c:41: variable `yaffs_noeccinfo' has initializer but incomplete type
yaffs_mtdif.c:42: unknown field `useecc' specified in initializer
yaffs_mtdif.c:42: warning: excess elements in struct initializer
yaffs_mtdif.c:42: warning: (near initialization for `yaffs_noeccinfo')
yaffs_mtdif.c: In function `nandmtd_WriteChunkToNAND':
yaffs_mtdif.c:60: too many arguments to function
yaffs_mtdif.c:62: too many arguments to function
yaffs_mtdif.c: In function `nandmtd_ReadChunkFromNAND':
yaffs_mtdif.c:97: too many arguments to function
yaffs_mtdif.c:101: too many arguments to function
make[3]: *** [yaffs_mtdif.o] Error 1
make[3]: Leaving directory `/friendly-arm/kernel/fs/yaffs'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/friendly-arm/kernel/fs/yaffs'
make[1]: *** [_subdir_yaffs] Error 2
make[1]: Leaving directory `/friendly-arm/kernel/fs'
make: *** [_dir_fs] Error 2
郁闷.
你把你的makefile贴出来,参考一下@ |
|