LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-12-2009, 05:35 AM   #1
walxdwa
LQ Newbie
 
Registered: Feb 2008
Posts: 8

Rep: Reputation: 0
Unhappy yaffs compiled problem


I want to complie the kernel 2.6.18.1 with yaffs(a file system) in Vmware Station 6.5. I actually did it. But i also want to test the code
and i found that yaffs supports file or ram emulation. You should complie the code mtdemul2k.o and insmod the mtdemul2k.ko.But when i make the Makefie in the same directory of mtdemul2k.o .Many errors occured. I will post it and want some help~ thanks a lot~

Makefile:

Makefile for NANDemul MTD
#
# NB this is not yet suitable for putting into the kernel tree.
# YAFFS: Yet another Flash File System. A NAND-flash specific file system.
#
# Copyright (C) 2002 Aleph One Ltd.
# for Toby Churchill Ltd and Brightstar Engineering
#
# Created by Charles Manning <charles@aleph1.co.uk>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.

## Change or override KERNELDIR to your kernel
## comment out USE_xxxx if you don't want these features.

KERNELDIR = /lib/modules/$(shell uname -r)/build


#CFLAGS = -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include -O2 -Wall -g
CFLAGS = -D__KERNEL__ -DMODULE -I$(KERNELDIR)/include -O2 -Wall -g



TARGET = nandemul2k.o

default: $(TARGET)

clean:
rm -f $(TARGET)

$(TARGET): %.o: %.c
gcc -c $(CFLAGS) $< -o $@


The errors i got:

In file included from /lib/modules/2.6.18-pae/build/include/asm/thread_info.h:16,
from /lib/modules/2.6.18-pae/build/include/linux/thread_info.h:21,
from /lib/modules/2.6.18-pae/build/include/linux/preempt.h:9,
from /lib/modules/2.6.18-pae/build/include/linux/spinlock.h:49,
from /lib/modules/2.6.18-pae/build/include/linux/capability.h:45,
from /lib/modules/2.6.18-pae/build/include/linux/sched.h:44,
from /lib/modules/2.6.18-pae/build/include/linux/module.h:9,
from nandemul2k.c:20:
/lib/modules/2.6.18-pae/build/include/asm/processor.h:80: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ undeclared here (not in a function)
/lib/modules/2.6.18-pae/build/include/asm/processor.h:80: error: requested alignment is not a constant
In file included from /lib/modules/2.6.18-pae/build/include/linux/rwsem.h:24,
from /lib/modules/2.6.18-pae/build/include/asm/semaphore.h:42,
from /lib/modules/2.6.18-pae/build/include/linux/sched.h:57,
from /lib/modules/2.6.18-pae/build/include/linux/module.h:9,
from nandemul2k.c:20:
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h: In function ‘__down_read’:
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:97: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h: In function ‘__down_write_nested’:
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:149: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h: In function ‘__up_read’:
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:192: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:192: warning: unused variable ‘tmp’
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h: In function ‘__up_write’:
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:216: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h: In function ‘__downgrade_write’:
/lib/modules/2.6.18-pae/build/include/asm/rwsem.h:242: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
In file included from /lib/modules/2.6.18-pae/build/include/linux/sched.h:57,
from /lib/modules/2.6.18-pae/build/include/linux/module.h:9,
from nandemul2k.c:20:
/lib/modules/2.6.18-pae/build/include/asm/semaphore.h: In function ‘down’:
/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:99: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.18-pae/build/include/asm/semaphore.h: In function ‘down_interruptible’:
/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:123: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.18-pae/build/include/asm/semaphore.h: In function ‘down_trylock’:
/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:145: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
/lib/modules/2.6.18-pae/build/include/asm/semaphore.h: In function ‘up’:
/lib/modules/2.6.18-pae/build/include/asm/semaphore.h:172: error: expected ‘:’ or ‘)’ before ‘KBUILD_BASENAME’
In file included from /lib/modules/2.6.18-pae/build/include/asm/smp.h:17,
from /lib/modules/2.6.18-pae/build/include/linux/smp.h:18,
from /lib/modules/2.6.18-pae/build/include/linux/sched.h:63,
from /lib/modules/2.6.18-pae/build/include/linux/module.h:9,
from nandemul2k.c:20:
/lib/modules/2.6.18-pae/build/include/asm/mpspec.h:6:25: error: mach_mpspec.h: No such file or directory
In file included from /lib/modules/2.6.18-pae/build/include/asm/smp.h:17,
from /lib/modules/2.6.18-pae/build/include/linux/smp.h:18,
from /lib/modules/2.6.18-pae/build/include/linux/sched.h:63,
from /lib/modules/2.6.18-pae/build/include/linux/module.h:9,
from nandemul2k.c:20:
/lib/modules/2.6.18-pae/build/include/asm/mpspec.h: At top level:
/lib/modules/2.6.18-pae/build/include/asm/mpspec.h:8: error: ‘MAX_MP_BUSSES’ undeclared here (not in a function)
/lib/modules/2.6.18-pae/build/include/asm/mpspec.h:22: error: ‘MAX_IRQ_SOURCES’ undeclared here (not in a function)
In file included from /lib/modules/2.6.18-pae/build/include/linux/smp.h:18,
from /lib/modules/2.6.18-pae/build/include/linux/sched.h:63,
from /lib/modules/2.6.18-pae/build/include/linux/module.h:9,
from nandemul2k.c:20:
/lib/modules/2.6.18-pae/build/include/asm/smp.h:76:26: error: mach_apicdef.h: No such file or directory
In file included from /lib/modules/2.6.18-pae/build/include/linux/smp.h:18,
from /lib/modules/2.6.18-pae/build/include/linux/sched.h:63,
from /lib/modules/2.6.18-pae/build/include/linux/module.h:9,
from nandemul2k.c:20:
/lib/modules/2.6.18-pae/build/include/asm/smp.h: In function ‘hard_smp_processor_id’:
/lib/modules/2.6.18-pae/build/include/asm/smp.h:80: warning: implicit declaration of function ‘GET_APIC_ID’
In file included from /lib/modules/2.6.18-pae/build/include/linux/module.h:9,
from nandemul2k.c:20:
/lib/modules/2.6.18-pae/build/include/linux/sched.h: In function ‘dequeue_signal_lock’:
/lib/modules/2.6.18-pae/build/include/linux/sched.h:1209: warning: implicit declaration of function ‘local_irq_save’
/lib/modules/2.6.18-pae/build/include/linux/sched.h:1211: warning: implicit declaration of function ‘local_irq_restore’
In file included from /lib/modules/2.6.18-pae/build/include/asm/pgtable.h:244,
from /lib/modules/2.6.18-pae/build/include/linux/mm.h:38,
from /lib/modules/2.6.18-pae/build/include/linux/pagemap.h:7,
from nandemul2k.c:27:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: In function ‘set_pte’:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:55: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:55: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: In function ‘pte_clear’:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:97: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: At top level:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:100: error: expected ‘)’ before ‘*’ token
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: In function ‘ptep_get_and_clear’:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:114: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:114: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:115: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: In function ‘pte_same’:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:122: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:122: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: In function ‘pte_none’:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:129: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: In function ‘pte_pfn’:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:135: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: In function ‘pfn_pte’:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:144: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:144: warning: right shift count >= width of type
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:146: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h: At top level:
/lib/modules/2.6.18-pae/build/include/asm/pgtable-3level.h:152: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘pfn_pmd’
In file included from /lib/modules/2.6.18-pae/build/include/linux/mm.h:38,
from /lib/modules/2.6.18-pae/build/include/linux/pagemap.h:7,
from nandemul2k.c:27:
/lib/modules/2.6.18-pae/build/include/asm/pgtable.h: In function ‘pte_modify’:
/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:318: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:319: error: ‘pte_t’ has no member named ‘pte_high’
/lib/modules/2.6.18-pae/build/include/asm/pgtable.h:319: warning: right shift count >= width of type
In file included from /lib/modules/2.6.18-pae/build/include/asm/pgtable.h:450,
from /lib/modules/2.6.18-pae/build/include/linux/mm.h:38,
from /lib/modules/2.6.18-pae/build/include/linux/pagemap.h:7,
from nandemul2k.c:27:
/lib/modules/2.6.18-pae/build/include/asm-generic/pgtable.h: At top level:
/lib/modules/2.6.18-pae/build/include/asm-generic/pgtable.h:199: error: expected ‘)’ before ‘*’ token
/lib/modules/2.6.18-pae/build/include/asm-generic/pgtable.h:223: error: expected ‘)’ before ‘*’ token
In file included from /lib/modules/2.6.18-pae/build/include/linux/pagemap.h:7,
from nandemul2k.c:27:
/lib/modules/2.6.18-pae/build/include/linux/mm.h: In function ‘lowmem_page_address’:
/lib/modules/2.6.18-pae/build/include/linux/mm.h:531: warning: implicit declaration of function ‘__page_to_pfn’
/lib/modules/2.6.18-pae/build/include/linux/mm.h: At top level:
/lib/modules/2.6.18-pae/build/include/linux/mm.h:809: error: expected declaration specifiers or ‘...’ before ‘pmd_t’
/lib/modules/2.6.18-pae/build/include/linux/mm.h:810: error: expected ‘)’ before ‘*’ token
/lib/modules/2.6.18-pae/build/include/linux/mm.h:823: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
In file included from /lib/modules/2.6.18-pae/build/include/linux/irq.h:22,
from /lib/modules/2.6.18-pae/build/include/asm/hardirq.h:5,
from /lib/modules/2.6.18-pae/build/include/linux/hardirq.h:7,
from /lib/modules/2.6.18-pae/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.18-pae/build/include/asm/highmem.h:23,
from /lib/modules/2.6.18-pae/build/include/linux/highmem.h:23,
from /lib/modules/2.6.18-pae/build/include/linux/pagemap.h:10,
from nandemul2k.c:27:
/lib/modules/2.6.18-pae/build/include/asm/irq.h:15:25: error: irq_vectors.h: No such file or directory
In file included from /lib/modules/2.6.18-pae/build/include/asm/hardirq.h:5,
from /lib/modules/2.6.18-pae/build/include/linux/hardirq.h:7,
from /lib/modules/2.6.18-pae/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.18-pae/build/include/asm/highmem.h:23,
from /lib/modules/2.6.18-pae/build/include/linux/highmem.h:23,
from /lib/modules/2.6.18-pae/build/include/linux/pagemap.h:10,
from nandemul2k.c:27:
/lib/modules/2.6.18-pae/build/include/linux/irq.h:169: error: ‘NR_IRQS’ undeclared here (not in a function)
In file included from /lib/modules/2.6.18-pae/build/include/linux/irq.h:182,
from /lib/modules/2.6.18-pae/build/include/asm/hardirq.h:5,
from /lib/modules/2.6.18-pae/build/include/linux/hardirq.h:7,
from /lib/modules/2.6.18-pae/build/include/linux/interrupt.h:11,
from /lib/modules/2.6.18-pae/build/include/asm/highmem.h:23,
from /lib/modules/2.6.18-pae/build/include/linux/highmem.h:23,
from /lib/modules/2.6.18-pae/build/include/linux/pagemap.h:10,
from nandemul2k.c:27:
/lib/modules/2.6.18-pae/build/include/asm/hw_irq.h:31: error: ‘NR_IRQ_VECTORS’ undeclared here (not in a function)
nandemul2k.c: In function ‘nand_read’:
nandemul2k.c:307: warning: implicit declaration of function ‘nand_read_ecc’
nandemul2k.c: At top level:
nandemul2k.c:314: error: static declaration of ‘nand_read_ecc’ follows non-static declaration
nandemul2k.c:307: error: previous implicit declaration of ‘nand_read_ecc’ was here
nandemul2k.c: In function ‘nand_read_oob’:
nandemul2k.c:387: error: invalid operands to binary * (have ‘int’ and ‘size_t *’)
nandemul2k.c: In function ‘nand_write’:
nandemul2k.c:410: warning: implicit declaration of function ‘nand_write_ecc’
nandemul2k.c: At top level:
nandemul2k.c:416: error: static declaration of ‘nand_write_ecc’ follows non-static declaration
nandemul2k.c:410: error: previous implicit declaration of ‘nand_write_ecc’ was here
nandemul2k.c: In function ‘nandemul2k_scan’:
nandemul2k.c:602: error: ‘struct mtd_info’ has no member named ‘oobavail’
nandemul2k.c:617: warning: assignment from incompatible pointer type
nandemul2k.c:618: warning: assignment from incompatible pointer type
nandemul2k.c:619: warning: assignment from incompatible pointer type
nandemul2k.c:620: warning: assignment from incompatible pointer type
nandemul2k.c:623: error: ‘struct mtd_info’ has no member named ‘readv’
make: *** [nandemul2k.o] Error 1
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with the cross compiled executable??? raklo Linux - Kernel 0 04-03-2007 07:16 AM
sound problem after i compiled 2.4.26 b0nd Slackware 8 01-21-2006 01:36 PM
problem(s) with compiled kernel nice_indian Linux - Newbie 4 01-31-2005 04:28 AM
mod_python (with -DEAPI) compiled problem dominant Linux - Software 0 12-05-2004 06:28 AM
Compiled kernel problem movitto Linux - Software 8 07-25-2004 12:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration