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

안녕하세요. 항상 많은 도움을 받고있는 왕초보입니다.

현재 루트파일시스템을 yaffs2 로 바꾸려고 포팅중입니다.

고도리님 말씀대로 로그 첨부합니다.^^;;

추가 현재 쓰는 nand 데이터시트와 적용한 패치파일을 첨부합니다.


* 커널버젼 : 2.6.32.2

* Nand : 512m (모델 : NAND04GW3B2D)

* CPU : Ppc440

* board : 회사개발보드


순서는 다음과 같이 진행했습니다.


-. yaffs사이트 에서 최신버젼 (yaffs2-d43e901.tar.gz)다운.


-. 압축 풀고 커널 패치.

  (# sudo ./patch-ker.sh c m 커널path)


-. make menuconfig에서 yaffs옵션 선택


-. make 커널 -> 커널이미지 생성 및 타겟보드에 fusing


-. utils에 들어가서 make 해서 mkyaffs2image 생성.


-. 생성된 바이너리로 루트파일 시스템 이미지 생성.
(sudo ./mkyaffs2image 파일패스 이미지이름)


-. u-boot에서 루트파일 시스템영역에 yaffs2이미지 fusing.


nand.write.yaffs2 추가 수정 소스 (http://lists.denx.de/pipermail/u-boot/2010-January/066156.html)

------------------------------------------------------
 common/cmd_nand.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 075a8af..38c6480 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -390,6 +390,27 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 				ret = nand->read_oob(nand, off, &ops);
 			else
 				ret = nand->write_oob(nand, off, &ops);
+		} else if (!strcmp(s, ".yaffs2") && !read) {
+			mtd_oob_ops_t ops = {
+				.mode = MTD_OOB_AUTO,
+				.len = 2048,	/* page size */
+				.ooblen = 64,	/* spare size */
+			};
+
+			ulong page = 0;
+			ulong block_size = ops.len + ops.ooblen;
+			while (page * block_size < size) {
+				ops.datbuf = addr + page * block_size;
+				ops.oobbuf = ops.datbuf + ops.len;
+
+				ret = nand->write_oob(nand, 
+						      off + page * ops.len,
+						      &ops);
+
+				if (ret) break;
+
+				page++;
+			}
 		} else {
 			printf("Unknown nand command suffix '%s'.\n", s);
 			return 1;
-- 
1.6.3.3
-----------------------------------------------------------------------

-. u-boot에서 mtd_args에서 boot type을 yaffs2로 변경.


그리고 부트하면 No init found try passing init option to kernel 메세지가 나옵니다.


커널패치확인을 위해 jffs2파일시스템으로 커널 부팅후

cat /proc/filesystem으로 yaffs,yaffs2 확인하였습니다.


혹시 몰라 mtdblock7을 만든 후, 테스트yaffs2 파일을 u-boot에서 write를 하고 

커널에서 mount /dev/mtdblock7 임의폴더/ 로 하면

lost+found 폴더만 보이고 제가 넣어놓은 파일들은 보이지 않습니다.


정리하면 증상은 다음과 같습니다.

-. yaffs2 루트파일시스템 : No init found try passing init option to kernel

-. 커널에서 mtdblock mount : lost+found 폴더만 나옴

-. 커널에서 테스트 yaffs이미지 직접 마운트 : 마운트 안됨 ( 에러메세지도 없음 )


인터넷에서 좀 찾아보니, mkyaffs2image.c 소스를 수정해야된다고 하는데, 

수정할부분을 통 찾지 못하겠더군요..ㅠㅠ

(h/w ecc를 disable해야된다길래 했지만 소용없음;;)


고수분들의 많은 도움 부탁드립니다.


감사합니다.


로그

------------------------------------------------------------------------

NAND read: device 0 offset 0x1700000, size 0x400000

 4194304 bytes read: OK


NAND read: device 0 offset 0x2500000, size 0x25000

 151552 bytes read: OK

## Booting kernel from Legacy Image at 00600000 ...

   Image Name:   Linux-2.6.36.2-dmc

   Created:      2011-12-21   8:05:33 UTC

   Image Type:   PowerPC Linux Kernel Image (gzip compressed)

   Data Size:    3794471 Bytes =  3.6 MB

   Load Address: 00000000

   Entry Point:  00000000

   Verifying Checksum ... OK

## Flattened Device Tree blob at 01000000

   Booting using the fdt blob at 0x1000000

   Uncompressing Kernel Image ... OK

   Loading Device Tree to 00ffa000, end 00ffffff ... OK

Using PowerPC 44x Platform machine description

Linux version 2.6.36.2-dmc (kimyk@kimyk-desktop) (gcc version 4.5.1 (Sourcery G+                                                                             + Lite 2010.09-110) ) #1 Wed Dec 21 17:05:31 KST 2011

Zone PFN ranges:

  DMA      0x00000000 -> 0x00002000

  Normal   empty

Movable zone start PFN for each node

early_node_map[1] active PFN ranges

    0: 0x00000000 -> 0x00002000

MMU: Allocated 1088 bytes of context maps for 255 contexts

Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8188

Kernel command line: root=/dev/mtdblock6 rw rootfstype=yaffs2 ip=168.219.195.157                                                                             :168.219.195.156:168.219.195.193:255.255.255.192::eth0:off panic=1 console=ttyS0                                                                             ,115200 init=/linuxrc raid=noautodetect

PID hash table entries: 2048 (order: -3, 8192 bytes)

Dentry cache hash table entries: 65536 (order: 2, 262144 bytes)

Inode-cache hash table entries: 32768 (order: 1, 131072 bytes)

Memory: 514496k/524288k available (7616k kernel code, 9792k reserved, 576k data,                                                                              682k bss, 448k init)

Kernel virtual memory layout:

  * 0xfffd0000..0xffff0000  : fixmap

  * 0xfd600000..0xfe000000  : consistent mem

  * 0xfd600000..0xfd600000  : early ioremap

  * 0xe1000000..0xfd600000  : vmalloc & ioremap

Hierarchical RCU implementation.

        RCU-based detection of stalled CPUs is disabled.

        Verbose stalled-CPUs detection is disabled.

NR_IRQS:512

UIC0 (32 IRQ sources) at DCR 0xc0

UIC1 (32 IRQ sources) at DCR 0xd0

UIC2 (32 IRQ sources) at DCR 0xe0

UIC3 (32 IRQ sources) at DCR 0xf0

clocksource: timebase mult[400000] shift[22] registered

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 8192

NET: Registered protocol family 16

OCM1: 32768 Bytes (enabled)

OCM1: 32768 Bytes (non-cached)

OCM1: 0 Bytes (cached)

256k L2-cache enabled

PCIE0: Checking link...

PCIE0: Device detected, waiting for link...

PCIE0: link is up !

PCI host bridge /plb/pciex@d00000000 (primary) ranges:

 MEM 0x0000000e00000000..0x0000000e7fffffff -> 0x0000000080000000

 MEM 0x0000000f00000000..0x0000000f000fffff -> 0x0000000000000000

  IO 0x0000000f80000000..0x0000000f8000ffff -> 0x0000000000000000

 Removing ISA hole at 0x0000000f00000000

4xx PCI DMA offset set to 0x00000000

/plb/pciex@d00000000: Legacy ISA memory support enabled

PCIE0: successfully set as root-complex

Max pay load supported =0x8700 max pay load prog 0x2010

PCI: Probing PCI hardware

PCI: Hiding 4xx host bridge resources 0000:40:00.0

pci 0000:40:00.0: PCI bridge to [bus 41-7f]

pci 0000:40:00.0: BAR 8: assigned [mem 0xe00000000-0xe000fffff]

pci 0000:40:00.0: BAR 9: assigned [mem 0xe00100000-0xe001fffff pref]

pci 0000:41:00.0: BAR 0: assigned [mem 0xe00000000-0xe0001ffff 64bit]

pci 0000:41:00.0: BAR 0: set to [mem 0xe00000000-0xe0001ffff 64bit] (PCI address                                                                              [0x80000000-0x8001ffff]

pci 0000:41:00.0: BAR 6: assigned [mem 0xe00100000-0xe0010ffff pref]

pci 0000:40:00.0: PCI bridge to [bus 41-7f]

pci 0000:40:00.0:   bridge window [io  disabled]

pci 0000:40:00.0:   bridge window [mem 0xe00000000-0xe000fffff]

pci 0000:40:00.0:   bridge window [mem 0xe00100000-0xe001fffff pref]

CPM0: pm-iic-device resource /plb/opb/i2c@ef600700

CPM0: pm-emac-device resource /plb/opb/ethernet@ef600c00

CPM0: pm-monitor-event property not defined

CPM0: DCR at 0x160

CPM: ocm suspend address 0xe1040000

CPM: ocm resume address 0xe1040400

CPM: ocm data address 0xe10407d0

bio: create slab <bio-0> at 0

Dmc USB OTG Intr 28

DMC control driver: Successfully installed Dmc IRQ handler for USB OTG

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

mod_init:1060

ppc460ex_dma_per_chan_init:1072

Bluetooth: Core ver 2.15

NET: Registered protocol family 31

Bluetooth: HCI device and connection manager initialized

Bluetooth: HCI socket layer initialized

cfg80211: Calling CRDA to update world regulatory domain

Switching to clocksource timebase

NET: Registered protocol family 2

IP route cache hash table entries: 16384 (order: 0, 65536 bytes)

TCP established hash table entries: 16384 (order: 1, 131072 bytes)

TCP bind hash table entries: 16384 (order: 0, 65536 bytes)

TCP: Hash tables configured (established 16384 bind 16384)

TCP reno registered

UDP hash table entries: 4096 (order: 0, 65536 bytes)

UDP-Lite hash table entries: 4096 (order: 0, 65536 bytes)

NET: Registered protocol family 1

RPC: Registered udp transport module.

RPC: Registered tcp transport module.

RPC: Registered tcp NFSv4.1 backchannel transport module.

setting trigger mode 3 for irq 38 failed (uic_set_irq_type+0x0/0x244)

setting trigger mode 3 for irq 38 failed (uic_set_irq_type+0x0/0x244)

Probing AMCC DMA driver

PPC4xx PLB DMA engine IRQ 42

PPC460ex PLB DMA engine @0x00_00000100 size 263

new_chan->chan_id 0x0

new_chan->chan->chan_id 0x0

kcpm: can't read pm-monitor-app

kcpm: unable to parse device tree; aborting

Installing knfsd (copyright (C) 1996 [email protected]).

NTFS driver 2.1.29 [Flags: R/O].

JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.

fuse init (API version 7.15)

SGI XFS with security attributes, large block/inode numbers, no debug enabled

msgmni has been set to 1004

Cryptodev Interface Loaded

User space CryptoAPI driver v0.1 loaded

async_tx: api initialized (async)

io scheduler noop registered

io scheduler deadline registered

io scheduler cfq registered (default)

Generic non-volatile memory driver v1.1

Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled

serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 20) is a U6_16550A

console [ttyS0] enabled

4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 20) is a 16550

brd: module loaded

of:sata-dwc 4bffd1800.sata: Gettting DMA channel 1

of:sata-dwc 4bffd1800.sata: id 0, controller version 1.91

of:sata-dwc 4bffd1800.sata: DMA initialized

of:sata-dwc 4bffd1800.sata: DMA CFG = 0x00000001

dwc_dma_register_intpr register irq (36)

ata4294967295: dwc_port_start: setting burst size in DBTSR: 0x00100010

of:sata-dwc 4bffd1800.sata: **** No neg speed (nothing attached?)

ata4294967295: call dwc_freeze ...

scsi0 : sata-dwc

ata1: SATA max UDMA/133 irq 35

ata1: call dwc_freeze ...

ata1: dwc_hardreset

NAND device: Manufacturer ID: 0x20, Chip ID: 0xdc (ST Micro NAND 512MiB 3,3V 8-b                                                                             it)

Scanning device for bad blocks

Creating 8 MTD partitions on "4e4000000.ndfc.nand":

0x000000000000-0x000020000000 : "NAND 512MiB 3,3V 8-bit"

0x000000000000-0x000000c00000 : "firmware"

0x000000c00000-0x000001700000 : "environment"

0x000001700000-0x000002500000 : "kernel"

0x000002500000-0x000003000000 : "device-tree"

0x000003000000-0x000003e00000 : "ramdisk"

0x000003e00000-0x00001fe00000 : "root"

0x00001fe00000-0x000020000000 : "diag"

e1000e: Intel(R) PRO/1000 Network Driver - 1.2.7-k2

e1000e: Copyright (c) 1999 - 2010 Intel Corporation.

PPC 4xx OCP EMAC driver, version 3.54

mal0: descriptor-memory = ocm

MAL: Enabled Interrupt Coal TxCnt: 32 RxCnt: 8

                            TxTimer: 100000 RxTimer: 5000

MAL v2 /plb/mcmal, 1 TX channels, 1 RX channels

RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support

TAH /plb/opb/emac-tah@ef601350 initialized

/plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode

PHY ID: 0x001cc915

eth0: EMAC-0 /plb/opb/ethernet@ef600c00, MAC 00:00:00:ff:44:22

eth0: found Realtek 8211CL Ethernet PHY (0x00)

Intel(R) Gigabit Ethernet Network Driver - version 2.1.0-k2

Copyright (c) 2007-2009 Intel Corporation.

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

usbcore: registered new interface driver libusual

usbcore: registered new interface driver usbserial

usbserial: USB Serial Driver core

USB Serial support registered for FTDI USB Serial Device

usbcore: registered new interface driver ftdi_sio

ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver

driver ftdi-elan built at 17:05:20 on Dec 21 2011

usbcore: registered new interface driver ftdi-elan

dwc_otg: version 2.60a 22-NOV-2006

dwc_otg: Shared Tx FIFO mode

dwc_otg: Using DMA mode

of:dwc_otg 4bff80000.usbotg: DWC OTG Controller

of:dwc_otg 4bff80000.usbotg: new USB bus registered, assigned bus number 1

of:dwc_otg 4bff80000.usbotg: irq 28, io mem 0x00000000

dwc_otg: Init: Port Power? op_state=1

dwc_otg: Init: Power Port (0)

usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

usb usb1: Product: DWC OTG Controller

usb usb1: Manufacturer: Linux 2.6.36.2-dmc dwc_otg_hcd

usb usb1: SerialNumber: 4bff80000.usbotg

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 1 port detected

DMC control driver: USB device connected to host port

i2c /dev entries driver

of:ibm-iic 4ef600700.i2c: using standard (100 kHz) mode

rtc-m41t80 0-0068: chip found, driver version 0.05

rtc-m41t80 0-0068: rtc core: registered m41t80 as rtc0

of:ibm-iic 4ef600800.i2c: using standard (100 kHz) mode

ata1: call dwc_thaw ...

ata1: SATA link down (SStatus 0 SControl 300)

DMC control driver: USB device connected to host port

usb 1-1: new high speed USB device using of:dwc_otg and address 2

DMC control driver: USB device connected to host port

DMC control driver: USB device connected to host port

device-mapper: ioctl: 4.18.0-ioctl (2010-06-29) initialised: [email protected]

Bluetooth: Broadcom Blutonium firmware driver ver 1.2

usbcore: registered new interface driver bcm203x

Bluetooth: Digianswer Bluetooth USB driver ver 0.10

usbcore: registered new interface driver bpa10x

Bluetooth: BlueFRITZ! USB driver ver 1.2

usbcore: registered new interface driver bfusb

Bluetooth: Generic Bluetooth USB driver ver 0.6

usbcore: registered new interface driver btusb

AMCC 4xx PKA v0.1 @0x04_00114000 size 16384 IRQ 21

Initializing PKA...

PKA Driver Successfully Initialized

Reading pvr value = 12c41c82

usb 1-1: New USB device found, idVendor=0424, idProduct=2513

usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0

hub 1-1:1.0: USB hub found

hub 1-1:1.0: 2 ports detected

apm82181-adma: Probing AMCC APM82181 ADMA engines...

AMCC(R) APM82181 ADMA Engine found [1]: ( capabilities: memcpy )

apm82181 adma1: allocated 512 descriptor slots

AMCC(R) APM82181 ADMA Engine found [2]: ( capabilities: memcpy )

apm82181 adma2: allocated 512 descriptor slots

AMCC(R) APM82181 ADMA Engine found [3]: ( capabilities: memcpy )

apm82181 adma3: allocated 512 descriptor slots

AMCC(R) APM82181 ADMA Engine found [4]: ( capabilities: xor int )

apm82181 adma4: allocated 819 descriptor slots

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

oprofile: using timer interrupt.

Macsec proc interface Initiliazed

Registered Macsec Interface

IPv4 over IPv4 tunneling driver

GRE over IPv4 tunneling driver

TCP cubic registered

NET: Registered protocol family 10

IPv6 over IPv4 tunneling driver

NET: Registered protocol family 17

Bridge firewalling registered

Bluetooth: L2CAP ver 2.15

Bluetooth: L2CAP socket layer initialized

Bluetooth: SCO (Voice Link) ver 0.6

Bluetooth: SCO socket layer initialized

Bluetooth: RFCOMM TTY layer initialized

Bluetooth: RFCOMM socket layer initialized

Bluetooth: RFCOMM ver 1.11

Bluetooth: BNEP (Ethernet Emulation) ver 1.3

Bluetooth: BNEP filters: protocol multicast

Bluetooth: HIDP (Human Interface Emulation) ver 1.2

802.1Q VLAN Support v1.8 Ben Greear <[email protected]>

All bugs added by David S. Miller <[email protected]>

lib80211: common routines for IEEE802.11 drivers

Registering the dns_resolver key type

Init external interrupt for Dmc...

Install interrupt for button and overtemp events

Dmc Driver support linux event

input: APM NAS Platform Events as /devices/virtual/input/input0

Button PAD0 Interrupt

Button PAD1 Interrupt

POWER BTN Interrupt

Button ResetInterrupt

Button BACKUP Interrupt

Dmc ctrl driver initialization complete

rtc-m41t80 0-0068: setting system clock to 2070-01-01 22:40:58 UTC (3155841658)

usb 1-1.1: new full speed USB device using of:dwc_otg and address 3

usb 1-1.1: New USB device found, idVendor=0403, idProduct=6001

usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-1.1: Product: FT232R USB UART

usb 1-1.1: Manufacturer: FTDI

usb 1-1.1: SerialNumber: A700fkeK

ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected

usb 1-1.1: Detected FT232RL

usb 1-1.1: Number of endpoints 2

usb 1-1.1: Endpoint 1 MaxPacketSize 16384

usb 1-1.1: Endpoint 2 MaxPacketSize 16384

usb 1-1.1: Setting MaxPacketSize 64

usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB0

eth0: link is down

ADDRCONF(NETDEV_UP): eth0: link is not ready

usb 1-1.2: new high speed USB device using of:dwc_otg and address 4

usb 1-1.2: New USB device found, idVendor=1516, idProduct=8628

usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

usb 1-1.2: Product: Drive AL_USB20

usb 1-1.2: Manufacturer: Flash

usb 1-1.2: SerialNumber: 00000000000000007BEF999C

scsi1 : usb-storage 1-1.2:1.0

IP-Config: Gateway not on directly connected network.

yaffs: dev is 32505862 name is "mtdblock6" rw

yaffs: passed flags ""

VFS: Mounted root (yaffs2 filesystem) on device 31:6.

Freeing unused kernel memory: 448k init

Failed to execute /linuxrc.  Attempting defaults...

Kernel panic - not syncing: No init found.  Try passing init= option to kernel.                                                                              See Linux Documentation/init.txt for guidance.

Rebooting in 1 seconds..


List of Articles
번호 제목 글쓴이 날짜 조회 수sort
6148 S3C6410 IROM booting [6] 전병환 2009-02-19 2771
6147 오드로이드 SDCARD의 Root FS를 안보이게 하는 방법은... [2] 김영일 2010-08-25 2768
6146 [질문] 이솝보드에 삼성의 DNW(USB/Sireal 다운로더)사용하려면..? [6] 박재흥 2006-08-16 2759
6145 삼성 2440 I/O Speed [1] 전철웅 2007-11-17 2759
6144 [완료] 터치 증상이 이상합니다. [6] 강경완 2007-05-11 2751
6143 가속도 센서 관련하여 문의글 올립니다. [2] 리오살다 2013-04-02 2750
6142 [완료]dm9000a [10] 이진우 2007-09-14 2741
6141 프로젝트 계획 조언부탁드립니다. [5] 시그인트 2014-02-19 2734
6140 Opencore 와 Openmax 그리고 mfc 와의 관계. [11] 임기영 2009-09-04 2732
6139 [완료]SDL 기본 화면 뛰우기 [3] 윤치호 2007-11-15 2731
6138 [완료] LX800 PDS에 있는 WINCE BSP는 무엇인지요. [6] 오주열 2007-05-26 2731
6137 안드로이더 에 touch cal 값을 어떻게 얻었나요? [3] 이성호 2009-04-06 2717
6136 ubuntu 10.04 오드로이드 타겟 adb 연결 문제 [1] rapel 2010-06-11 2711
» yaffs2 포팅(lost+found증상) file 푸르름 2011-12-23 2709
6134 [완료]pci slot확장시 bios수정필요한지? [2] 조성철 2007-06-05 2709
6133 aesop lx800 구입문의 [1] 조정근 2008-09-18 2704
6132 [re] [질문] 동영상 재생 & LCD 잔상 [5] 강덕하 2007-05-22 2703
6131 안드로이드-S 구글맵관련 앱 설치가 안됩니다. [3] 바람돌이0 2010-07-21 2692
6130 LX800 주변기기 추천 부탁드립니다.[완료] [7] 조준동 2007-05-10 2692
6129 만든 앱이 수퍼 유저 권한 획득하려면 에 대한 질문입니다. [7] 프로그램개발자 2014-01-08 2689

사용자 로그인