기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.

28페이지에 보면 make mkyaffs 와 make mkyaffsimage를 실행 시켜야 하는데.
make mkyaffs는 보드에서 실행시키위해 크로스 컴파일을 해야하는 한다고 되어 있어

Makefile을 아래와 같이 수정 했습니다.

***************** Makefile  *********************

CREDITS         Makefile     System.map      drivers/  init/     lib/     scripts/   usr/
#Makefile for mkyaffs
#
# NB this is not yet suitable for putting into the kernel tree.
# YAFFS: Yet another FFS. A NAND-flash specific file system.
#
# Copyright (C) 2002 Aleph One Ltd.
#   for Toby Churchill Ltd and Brightstar Engineering
#
# Created by Charles Manning <[email protected]>
#
#Makefile for mkyaffs
#
# NB this is not yet suitable for putting into the kernel tree.
# YAFFS: Yet another FFS. A NAND-flash specific file system.
#
# Copyright (C) 2002 Aleph One Ltd.
#   for Toby Churchill Ltd and Brightstar Engineering
#
# Created by Charles Manning <[email protected]>
#
# 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.
#Makefile for mkyaffs
#
# NB this is not yet suitable for putting into the kernel tree.
# YAFFS: Yet another FFS. A NAND-flash specific file system.
#
# Copyright (C) 2002 Aleph One Ltd.
#   for Toby Churchill Ltd and Brightstar Engineering
#
# Created by Charles Manning <[email protected]>
#
# 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

KERNELDIR = /korea-dokdo/linux-2.4.20-aesop2440/            <--------     수정한 부분

CFLAGS =   -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL
CFLAGS+=   -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations
CFLAGS+=   -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline

## Change if you are using a cross-compiler
MAKETOOLS =

CC=$(MAKETOOLS)arm-linux-gcc                                <---------     수정한 부분


MKYAFFSOBJS = mkyaffs.o

MKYAFFSIMAGEOBJS = mkyaffsimage.o yaffs_ecc.o


all: mkyaffs mkyaffsimage

$(MKYAFFSIMAGEOBJS): %.o: %.c
        $(CC) -c $(CFLAGS) $< -o $@

mkyaffsimage: $(MKYAFFSIMAGEOBJS)
        $(CC) -o $@ $(MKYAFFSIMAGEOBJS)

$(MKYAFFSOBJS): %.o: %.c
        $(CC) -c $(CFLAGS) $< -o $@

mkyaffs: $(MKYAFFSOBJS)
        $(CC) -o $@ $(MKYAFFSOBJS)

yaffs_ecc.c:
        ln -s ../yaffs_ecc.c yaffs_ecc.c

******************************************************



두 부분을 수정하고 아래와 같이 make mkyaffs를 하면 아래와 같습니다.



root@ibthere4u:/jun/yaffs/utils# make mkyaffs
arm-linux-gcc -c -I/usr/include -I.. -O2 -Wall -DCONFIG_YAFFS_UTIL -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline mkyaffs.c -o mkyaffs.o
In file included from mkyaffs.c:29:
/usr/include/unistd.h:1036: warning: redundant redeclaration of `ctermid' in same scope
/usr/include/stdio.h:779: warning: previous declaration of `ctermid'
mkyaffs.c:35:26: mtd/mtd-user.h: No such file or directory
mkyaffs.c:73: error: variable `yaffs_oobinfo' has initializer but incomplete type
mkyaffs.c:74: error: unknown field `useecc' specified in initializer
mkyaffs.c:74: warning: excess elements in struct initializer
mkyaffs.c:74: warning: (near initialization for `yaffs_oobinfo')
mkyaffs.c:75: error: unknown field `eccpos' specified in initializer
mkyaffs.c:75: error: extra brace group at end of initializer
mkyaffs.c:75: error: (near initialization for `yaffs_oobinfo')
mkyaffs.c:75: warning: excess elements in struct initializer
mkyaffs.c:75: warning: (near initialization for `yaffs_oobinfo')
mkyaffs.c:78: error: variable `yaffs_noeccinfo' has initializer but incomplete type
mkyaffs.c:79: error: unknown field `useecc' specified in initializer
mkyaffs.c:79: warning: excess elements in struct initializer
mkyaffs.c:79: warning: (near initialization for `yaffs_noeccinfo')
mkyaffs.c: In function `main':
mkyaffs.c:96: error: variable `oob' has initializer but incomplete type
mkyaffs.c:96: warning: excess elements in struct initializer
mkyaffs.c:96: warning: (near initialization for `oob')
mkyaffs.c:96: warning: excess elements in struct initializer
mkyaffs.c:96: warning: (near initialization for `oob')
mkyaffs.c:96: warning: excess elements in struct initializer
mkyaffs.c:96: warning: (near initialization for `oob')
mkyaffs.c:96: error: storage size of `oob' isn't known
mkyaffs.c:97: error: `mtd_info_t' undeclared (first use in this function)
mkyaffs.c:97: error: (Each undeclared identifier is reported only once
mkyaffs.c:97: error: for each function it appears in.)
mkyaffs.c:97: error: parse error before "meminfo"
mkyaffs.c:98: error: `erase_info_t' undeclared (first use in this function)
mkyaffs.c:99: error: storage size of `oobsel' isn't known
mkyaffs.c:151: error: `MEMGETINFO' undeclared (first use in this function)
mkyaffs.c:151: error: `meminfo' undeclared (first use in this function)
mkyaffs.c:159: error: `MEMSETOOBSEL' undeclared (first use in this function)
mkyaffs.c:190: error: `MEMREADOOB' undeclared (first use in this function)
mkyaffs.c:204: error: `erase' undeclared (first use in this function)
mkyaffs.c:207: error: `MEMERASE' undeclared (first use in this function)
mkyaffs.c:231: error: `MEMWRITEOOB' undeclared (first use in this function)
mkyaffs.c:96: warning: unused variable `oob'
mkyaffs.c:99: warning: unused variable `oobsel'
mkyaffs.c: At top level:
mkyaffs.c:73: error: storage size of `yaffs_oobinfo' isn't known
mkyaffs.c:78: error: storage size of `yaffs_noeccinfo' isn't known
make: *** [mkyaffs.o] Error 1
root@ibthere4u:/jun/yaffs/utils#


에러 나있는 부분을 보면 mtd/mtd-user.h 라는 파일을 찾지 못해서 인거 같은데  

어떻게 해야할지  조언을 부탁드립니다.  읽어주셔서 감사합니다.



고현철

2006.08.28 10:50:25
*.232.213.128

yaffs쪽 유틸의 경우

2.4.x 대 커널에서만 유용합니다. 실제로 mkyaffsimage의 경우도
존재하기는 하나(2.6.13 작업할때도) 컴파일은 에러가 나더군요.

수정할까 하다가 그냥 놔뒀었던 기억이 나네요.

만일 2.4.x 커널을 사용하신다면 2.4.x용의 yaffs source를 가지고
작업하셔야 합니다.

2.6.x용으로 나온 녀석은 필요도 없고, 컴파일도 안되는 듯 하더군요.

yaffs2가 아닌 yaffs의 경우 mkyaffsimage의 경우는 kernel 2.6.x대에서도 2.4.x 대 용으로 컴파일된 녀석을 가지고 image를 만들고
aesop의 u-boot에서 write해도 잘 되긴 합니다.

List of Articles
번호 제목 글쓴이 날짜 조회 수sort
» aESOP 가지고놀기 라는 PDF 자료중 yaffs 관련 문의 입니다.-&gt... [1] 공경준 2006-08-28 2685
6127 [질문] LX800 보드 부품수급 관련 질문` [2] 박명대 2007-11-03 2675
6126 [질문]RTC 오차 관련해서 질문 드립니다. [3] 백승준 2008-06-10 2674
6125 YAFFS2 마운트는 되는데 파일쓰기 에러... [1] 공정표 2009-08-03 2673
6124 터치 스크린.. [3] 이재철 2006-09-16 2667
6123 mf2530f의 연산 성능은 s3c2440a에 비해서 어떠한가요? [3] 성진호 2007-10-24 2664
6122 안드로이드 디바이스 드라이버 [1] jacket 2010-01-13 2653
6121 log 출력에 관해서. [3] 권윤택 2009-07-15 2652
6120 cygwin을 사용하여 u-boot 컴파일 가능? [2] 한석준 2009-03-03 2648
6119 안드로이드 overlay 서정민 2009-06-09 2642
6118 NAND 변경시 나온 문제 (OverWrite 문제) [2] cshqq 2013-12-09 2634
6117 XPe용 VGA 비디오 드라이버를 구할곳이 있나요 [3] 정인수 2007-05-30 2634
6116 [질문]LCD 백라이트 하드웨어적으로 ON 시키는 방범좀...(완료) [6] 안문기 2007-05-14 2630
6115 Android Kernel 2.6.29로 업데이트 방법? [1] 김태준 2009-05-15 2628
6114 mkyaffsimage 질문입니다...[완료] [4] 이홍석 2006-05-07 2624
6113 Android kernel 2.6.28 재업 smdk6410 커널용 [2] 최종환 2009-04-09 2622
6112 화면잔상 해결법? [1] 이동술 2007-05-14 2621
6111 Android 동작시 mtd부분에서 uevent관련 하여 죽어 버립니다. [3] 최종환 2009-03-26 2614
6110 U-boot상에서 Ping 테스트 에러(LAN91C111 이더넷 드라이브 사용) [2] 한석준 2009-03-11 2612
6109 tftp 파일 수신 시 timeout 이 발생 [8] blue0sky 2012-08-23 2609

사용자 로그인