walxdwa 发表于 2009-5-13 20:36

yaffs中的在编译mtdemul2k.o时遇到的错误~

最近在想把Yaffs文件系统编入内核,现已支持。但是要测试比较麻烦,还好Yaffs下可以支持基于file和ram的模拟。<br />但是都是基于MTD层的接口,我在编译mtdemul2k.o文件就遇到了如下错误,前大半部分错误都是内核文件错误,不大可能吧,希望得到指教。谢谢。<br /><br />我的makefile文件:<br />Makefile&nbsp;for&nbsp;NANDemul&nbsp;MTD<br />#<br />#&nbsp;NB&nbsp;this&nbsp;is&nbsp;not&nbsp;yet&nbsp;suitable&nbsp;for&nbsp;putting&nbsp;into&nbsp;the&nbsp;kernel&nbsp;tree.<br />#&nbsp;YAFFS:&nbsp;Yet&nbsp;another&nbsp;Flash&nbsp;File&nbsp;System.&nbsp;A&nbsp;NAND-flash&nbsp;specific&nbsp;file&nbsp;system.&nbsp;<br />#<br />#&nbsp;Copyright&nbsp;(C)&nbsp;2002&nbsp;Aleph&nbsp;One&nbsp;Ltd.<br />#&nbsp;for&nbsp;Toby&nbsp;Churchill&nbsp;Ltd&nbsp;and&nbsp;Brightstar&nbsp;Engineering<br />#<br />#&nbsp;Created&nbsp;by&nbsp;Charles&nbsp;Manning&nbsp;&ltcharles@aleph1.co.uk&gt<br />#<br />#&nbsp;This&nbsp;program&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or&nbsp;modify<br />#&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;General&nbsp;Public&nbsp;License&nbsp;version&nbsp;2&nbsp;as<br />#&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation.<br /><br />##&nbsp;Change&nbsp;or&nbsp;override&nbsp;KERNELDIR&nbsp;to&nbsp;your&nbsp;kernel<br />##&nbsp;comment&nbsp;out&nbsp;USE_xxxx&nbsp;if&nbsp;you&nbsp;don't&nbsp;want&nbsp;these&nbsp;features.<br /><br />KERNELDIR&nbsp;=&nbsp;/lib/modules/$(shell&nbsp;uname&nbsp;-r)/build<br /><br /><br />#CFLAGS&nbsp;=&nbsp;-D__KERNEL__&nbsp;-DMODULE&nbsp;-I$(KERNELDIR)/include&nbsp;-O2&nbsp;-Wall&nbsp;-g<br />CFLAGS&nbsp;=&nbsp;-D__KERNEL__&nbsp;-DMODULE&nbsp;-I$(KERNELDIR)/include&nbsp;-O2&nbsp;-Wall&nbsp;-g<br /><br /><br /><br />TARGET&nbsp;=&nbsp;nandemul2k.o<br /><br />default:&nbsp;$(TARGET)<br /><br />clean:<br />rm&nbsp;-f&nbsp;$(TARGET)<br /><br />$(TARGET):&nbsp;%.o:&nbsp;%.c<br />gcc&nbsp;-c&nbsp;$(CFLAGS)&nbsp;$&lt&nbsp;-o&nbsp;$@<br /><br /><br /><br /><br />报错的内容:<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/thread_info.h:16,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/thread_info.h:21,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/preempt.h:9,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/spinlock.h:49,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/capability.h:45,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/sched.h:44,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/module.h:9,<br />from&nbsp;nandemul2k.c:20:<br />/lib/modules/2.6.18-pae/build/include/asm/processor.h:80:&nbsp;error:&nbsp;‘CONFIG_X86_L1_CACHE_SHIFT’&nbsp;undeclared&nbsp;here&nbsp;(not&nbsp;in&nbsp;a&nbsp;function)<br />/lib/modules/2.6.18-pae/build/include/asm/processor.h:80:&nbsp;error:&nbsp;requested&nbsp;alignment&nbsp;is&nbsp;not&nbsp;a&nbsp;constant<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/rwsem.h:24,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:42,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/sched.h:57,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/module.h:9,<br />from&nbsp;nandemul2k.c:20:<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:&nbsp;In&nbsp;function&nbsp;‘__down_read’:<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:97:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:&nbsp;In&nbsp;function&nbsp;‘__down_write_nested’:<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:149:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:&nbsp;In&nbsp;function&nbsp;‘__up_read’:<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:192:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:192:&nbsp;warning:&nbsp;unused&nbsp;variable&nbsp;‘tmp’<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:&nbsp;In&nbsp;function&nbsp;‘__up_write’:<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:216:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:&nbsp;In&nbsp;function&nbsp;‘__downgrade_write’:<br />/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:242:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/sched.h:57,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/module.h:9,<br />from&nbsp;nandemul2k.c:20:<br />/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:&nbsp;In&nbsp;function&nbsp;‘down’:<br />/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:99:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:&nbsp;In&nbsp;function&nbsp;‘down_interruptible’:<br />/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:123:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:&nbsp;In&nbsp;function&nbsp;‘down_trylock’:<br />/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:145:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:&nbsp;In&nbsp;function&nbsp;‘up’:<br />/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:172:&nbsp;error:&nbsp;expected&nbsp;‘:’&nbsp;or&nbsp;‘)’&nbsp;before&nbsp;‘KBUILD_BASENAME’<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/smp.h:17,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/smp.h:18,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/sched.h:63,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/module.h:9,<br />from&nbsp;nandemul2k.c:20:<br />/lib/modules/2.6.18-pae/build/include/asm/mpspec.h:6:25:&nbsp;error:&nbsp;mach_mpspec.h:&nbsp;No&nbsp;such&nbsp;file&nbsp;or&nbsp;directory<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/smp.h:17,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/smp.h:18,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/sched.h:63,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/module.h:9,<br />from&nbsp;nandemul2k.c:20:<br />/lib/modules/2.6.18-pae/build/include/asm/mpspec.h:&nbsp;At&nbsp;top&nbsp;level:<br />/lib/modules/2.6.18-pae/build/include/asm/mpspec.h:8:&nbsp;error:&nbsp;‘MAX_MP_BUSSES’&nbsp;undeclared&nbsp;here&nbsp;(not&nbsp;in&nbsp;a&nbsp;function)<br />/lib/modules/2.6.18-pae/build/include/asm/mpspec.h:22:&nbsp;error:&nbsp;‘MAX_IRQ_SOURCES’&nbsp;undeclared&nbsp;here&nbsp;(not&nbsp;in&nbsp;a&nbsp;function)<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/smp.h:18,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/sched.h:63,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/module.h:9,<br />from&nbsp;nandemul2k.c:20:<br />/lib/modules/2.6.18-pae/build/include/asm/smp.h:76:26:&nbsp;error:&nbsp;mach_apicdef.h:&nbsp;No&nbsp;such&nbsp;file&nbsp;or&nbsp;directory<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/smp.h:18,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/sched.h:63,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/module.h:9,<br />from&nbsp;nandemul2k.c:20:<br />/lib/modules/2.6.18-pae/build/include/asm/smp.h:&nbsp;In&nbsp;function&nbsp;‘hard_smp_processor_id’:<br />/lib/modules/2.6.18-pae/build/include/asm/smp.h:80:&nbsp;warning:&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;function&nbsp;‘GET_APIC_ID’<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/module.h:9,<br />from&nbsp;nandemul2k.c:20:<br />/lib/modules/2.6.18-pae/build/include/linux/sched.h:&nbsp;In&nbsp;function&nbsp;‘dequeue_signal_lock’:<br />/lib/modules/2.6.18-pae/build/include/linux/sched.h:1209:&nbsp;warning:&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;function&nbsp;‘local_irq_save’<br />/lib/modules/2.6.18-pae/build/include/linux/sched.h:1211:&nbsp;warning:&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;function&nbsp;‘local_irq_restore’<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:244,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/mm.h:38,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/pagemap.h:7,<br />from&nbsp;nandemul2k.c:27:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;In&nbsp;function&nbsp;‘set_pte’:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:55:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:55:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;In&nbsp;function&nbsp;‘pte_clear’:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:97:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;At&nbsp;top&nbsp;level:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:100:&nbsp;error:&nbsp;expected&nbsp;‘)’&nbsp;before&nbsp;‘*’&nbsp;token<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;In&nbsp;function&nbsp;‘ptep_get_and_clear’:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:114:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:114:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:115:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;In&nbsp;function&nbsp;‘pte_same’:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:122:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:122:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;In&nbsp;function&nbsp;‘pte_none’:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:129:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;In&nbsp;function&nbsp;‘pte_pfn’:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:135:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;In&nbsp;function&nbsp;‘pfn_pte’:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:144:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:144:&nbsp;warning:&nbsp;right&nbsp;shift&nbsp;count&nbsp;&gt=&nbsp;width&nbsp;of&nbsp;type<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:146:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:&nbsp;At&nbsp;top&nbsp;level:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:152:&nbsp;error:&nbsp;expected&nbsp;‘=’,&nbsp;‘,’,&nbsp;‘;’,&nbsp;‘asm’&nbsp;or&nbsp;‘__attribute__’&nbsp;before&nbsp;‘pfn_pmd’<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/mm.h:38,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/pagemap.h:7,<br />from&nbsp;nandemul2k.c:27:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:&nbsp;In&nbsp;function&nbsp;‘pte_modify’:<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:318:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:319:&nbsp;error:&nbsp;‘pte_t’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘pte_high’<br />/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:319:&nbsp;warning:&nbsp;right&nbsp;shift&nbsp;count&nbsp;&gt=&nbsp;width&nbsp;of&nbsp;type<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:450,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/mm.h:38,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/pagemap.h:7,<br />from&nbsp;nandemul2k.c:27:<br />/lib/modules/2.6.18-pae/build/include/asm-generic/pgtable.h:&nbsp;At&nbsp;top&nbsp;level:<br />/lib/modules/2.6.18-pae/build/include/asm-generic/pgtable.h:199:&nbsp;error:&nbsp;expected&nbsp;‘)’&nbsp;before&nbsp;‘*’&nbsp;token<br />/lib/modules/2.6.18-pae/build/include/asm-generic/pgtable.h:223:&nbsp;error:&nbsp;expected&nbsp;‘)’&nbsp;before&nbsp;‘*’&nbsp;token<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/pagemap.h:7,<br />from&nbsp;nandemul2k.c:27:<br />/lib/modules/2.6.18-pae/build/include/linux/mm.h:&nbsp;In&nbsp;function&nbsp;‘lowmem_page_address’:<br />/lib/modules/2.6.18-pae/build/include/linux/mm.h:531:&nbsp;warning:&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;function&nbsp;‘__page_to_pfn’<br />/lib/modules/2.6.18-pae/build/include/linux/mm.h:&nbsp;At&nbsp;top&nbsp;level:<br />/lib/modules/2.6.18-pae/build/include/linux/mm.h:809:&nbsp;error:&nbsp;expected&nbsp;declaration&nbsp;specifiers&nbsp;or&nbsp;‘...’&nbsp;before&nbsp;‘pmd_t’<br />/lib/modules/2.6.18-pae/build/include/linux/mm.h:810:&nbsp;error:&nbsp;expected&nbsp;‘)’&nbsp;before&nbsp;‘*’&nbsp;token<br />/lib/modules/2.6.18-pae/build/include/linux/mm.h:823:&nbsp;error:&nbsp;expected&nbsp;‘=’,&nbsp;‘,’,&nbsp;‘;’,&nbsp;‘asm’&nbsp;or&nbsp;‘__attribute__’&nbsp;before&nbsp;‘*’&nbsp;token<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/irq.h:22,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/hardirq.h:5,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/hardirq.h:7,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/interrupt.h:11,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/highmem.h:23,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/highmem.h:23,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/pagemap.h:10,<br />from&nbsp;nandemul2k.c:27:<br />/lib/modules/2.6.18-pae/build/include/asm/irq.h:15:25:&nbsp;error:&nbsp;irq_vectors.h:&nbsp;No&nbsp;such&nbsp;file&nbsp;or&nbsp;directory<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/hardirq.h:5,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/hardirq.h:7,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/interrupt.h:11,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/highmem.h:23,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/highmem.h:23,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/pagemap.h:10,<br />from&nbsp;nandemul2k.c:27:<br />/lib/modules/2.6.18-pae/build/include/linux/irq.h:169:&nbsp;error:&nbsp;‘NR_IRQS’&nbsp;undeclared&nbsp;here&nbsp;(not&nbsp;in&nbsp;a&nbsp;function)<br />In&nbsp;file&nbsp;included&nbsp;from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/irq.h:182,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/hardirq.h:5,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/hardirq.h:7,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/interrupt.h:11,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/asm/highmem.h:23,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/highmem.h:23,<br />from&nbsp;/lib/modules/2.6.18-pae/build/include/linux/pagemap.h:10,<br />from&nbsp;nandemul2k.c:27:<br />/lib/modules/2.6.18-pae/build/include/asm/hw_irq.h:31:&nbsp;error:&nbsp;‘NR_IRQ_VECTORS’&nbsp;undeclared&nbsp;here&nbsp;(not&nbsp;in&nbsp;a&nbsp;function)<br />nandemul2k.c:&nbsp;In&nbsp;function&nbsp;‘nand_read’:<br />nandemul2k.c:307:&nbsp;warning:&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;function&nbsp;‘nand_read_ecc’<br />nandemul2k.c:&nbsp;At&nbsp;top&nbsp;level:<br />nandemul2k.c:314:&nbsp;error:&nbsp;static&nbsp;declaration&nbsp;of&nbsp;‘nand_read_ecc’&nbsp;follows&nbsp;non-static&nbsp;declaration<br />nandemul2k.c:307:&nbsp;error:&nbsp;previous&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;‘nand_read_ecc’&nbsp;was&nbsp;here<br />nandemul2k.c:&nbsp;In&nbsp;function&nbsp;‘nand_read_oob’:<br />nandemul2k.c:387:&nbsp;error:&nbsp;invalid&nbsp;operands&nbsp;to&nbsp;binary&nbsp;*&nbsp;(have&nbsp;‘int’&nbsp;and&nbsp;‘size_t&nbsp;*’)<br />nandemul2k.c:&nbsp;In&nbsp;function&nbsp;‘nand_write’:<br />nandemul2k.c:410:&nbsp;warning:&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;function&nbsp;‘nand_write_ecc’<br />nandemul2k.c:&nbsp;At&nbsp;top&nbsp;level:<br />nandemul2k.c:416:&nbsp;error:&nbsp;static&nbsp;declaration&nbsp;of&nbsp;‘nand_write_ecc’&nbsp;follows&nbsp;non-static&nbsp;declaration<br />nandemul2k.c:410:&nbsp;error:&nbsp;previous&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;‘nand_write_ecc’&nbsp;was&nbsp;here<br />nandemul2k.c:&nbsp;In&nbsp;function&nbsp;‘nandemul2k_scan’:<br />nandemul2k.c:602:&nbsp;error:&nbsp;‘struct&nbsp;mtd_info’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘oobavail’<br />nandemul2k.c:617:&nbsp;warning:&nbsp;assignment&nbsp;from&nbsp;incompatible&nbsp;pointer&nbsp;type<br />nandemul2k.c:618:&nbsp;warning:&nbsp;assignment&nbsp;from&nbsp;incompatible&nbsp;pointer&nbsp;type<br />nandemul2k.c:619:&nbsp;warning:&nbsp;assignment&nbsp;from&nbsp;incompatible&nbsp;pointer&nbsp;type<br />nandemul2k.c:620:&nbsp;warning:&nbsp;assignment&nbsp;from&nbsp;incompatible&nbsp;pointer&nbsp;type<br />nandemul2k.c:623:&nbsp;error:&nbsp;‘struct&nbsp;mtd_info’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘readv’<br />make:&nbsp;***&nbsp;&nbsp;Error&nbsp;1<br />

sinanjj 发表于 2009-5-13 22:17

.

make&nbsp;|grep&nbsp;nandemul2k<br /><br />再看出错信息,找那几行

walxdwa 发表于 2009-5-14 10:14

还是这几行代码。。。

我make&nbsp;|grep&nbsp;nandemul2k之后,出错代码没有减少。

未来是梦 发表于 2009-5-14 12:59

makefile 写的不对,2.6内核kbuild和2.4不同

<br />ifneq&nbsp;($(KERNELRELEASE),)<br />obj-m&nbsp;:=&nbsp;nandemul2k.o&nbsp;<br />else<br />KERNELDIR&nbsp;?=&nbsp;/lib/modules/$(shell&nbsp;uname&nbsp;-r)/build<br />PWD&nbsp;:=&nbsp;$(shell&nbsp;pwd)&nbsp;<br />modules:<br />&nbsp;&nbsp;&nbsp;$(MAKE)&nbsp;-C&nbsp;$(KERNELDIR)&nbsp;M=$(PWD)&nbsp;modules<br />endif&nbsp;<br />

walxdwa 发表于 2009-5-14 13:58

谢谢,果然是Makefile写错了,但是还有错误。。。

修改过后的错误:<br /><br />make&nbsp;-C&nbsp;/lib/modules/2.6.18-pae/build&nbsp;M=/usr/src/linux-2.6.18/fs/yaffs2/mtdemul&nbsp;modules<br />make:&nbsp;Entering&nbsp;directory&nbsp;`/usr/src/linux-2.6.18'<br />&nbsp;&nbsp;CC&nbsp;&nbsp;&nbsp;/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.o<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:&nbsp;In&nbsp;function&nbsp;‘nand_read’:<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:307:&nbsp;warning:&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;function&nbsp;‘nand_read_ecc’<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:&nbsp;At&nbsp;top&nbsp;level:<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:314:&nbsp;error:&nbsp;static&nbsp;declaration&nbsp;of&nbsp;‘nand_read_ecc’&nbsp;follows&nbsp;non-static&nbsp;declaration<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:307:&nbsp;error:&nbsp;previous&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;‘nand_read_ecc’&nbsp;was&nbsp;here<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:&nbsp;In&nbsp;function&nbsp;‘nand_read_oob’:<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:387:&nbsp;error:&nbsp;invalid&nbsp;operands&nbsp;to&nbsp;binary&nbsp;*&nbsp;(have&nbsp;‘int’&nbsp;and&nbsp;‘size_t&nbsp;*’)<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:&nbsp;In&nbsp;function&nbsp;‘nand_write’:<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:410:&nbsp;warning:&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;function&nbsp;‘nand_write_ecc’<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:&nbsp;At&nbsp;top&nbsp;level:<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:416:&nbsp;error:&nbsp;static&nbsp;declaration&nbsp;of&nbsp;‘nand_write_ecc’&nbsp;follows&nbsp;non-static&nbsp;declaration<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:410:&nbsp;error:&nbsp;previous&nbsp;implicit&nbsp;declaration&nbsp;of&nbsp;‘nand_write_ecc’&nbsp;was&nbsp;here<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:&nbsp;In&nbsp;function&nbsp;‘nandemul2k_scan’:<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:602:&nbsp;error:&nbsp;‘struct&nbsp;mtd_info’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘oobavail’<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:617:&nbsp;warning:&nbsp;assignment&nbsp;from&nbsp;incompatible&nbsp;pointer&nbsp;type<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:618:&nbsp;warning:&nbsp;assignment&nbsp;from&nbsp;incompatible&nbsp;pointer&nbsp;type<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:619:&nbsp;warning:&nbsp;assignment&nbsp;from&nbsp;incompatible&nbsp;pointer&nbsp;type<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:620:&nbsp;warning:&nbsp;assignment&nbsp;from&nbsp;incompatible&nbsp;pointer&nbsp;type<br />/usr/src/linux-2.6.18/fs/yaffs2/mtdemul/nandemul2k.c:623:&nbsp;error:&nbsp;‘struct&nbsp;mtd_info’&nbsp;has&nbsp;no&nbsp;member&nbsp;named&nbsp;‘readv’<br />make:&nbsp;***&nbsp;&nbsp;Error&nbsp;1<br />make:&nbsp;***&nbsp;&nbsp;Error&nbsp;2<br />make:&nbsp;Leaving&nbsp;directory&nbsp;`/usr/src/linux-2.6.18'<br />make:&nbsp;***&nbsp;&nbsp;Error&nbsp;2<br />
页: [1]
查看完整版本: yaffs中的在编译mtdemul2k.o时遇到的错误~