개발 관련/U-Boot

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000fcac: 0x0b45 instead

우진샘 2013. 9. 25. 16:57

Node at 0x0000fca8 with length 0x00000b45 would run over the end of the erase block Perhaps the file system was created with the wrong erase size?
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000fcac: 0x0b45 instead

임베디드 시스템에 U-Boot, Kernel, Root File System을 올리고 부팅을 하는 과정에서 위와 같은 에러가 발생하였다.

원인은 다양할 수 있으나 어찌 됐건 Flash와 연관이 있는 문제이다.

일단 U-Boot를 올리는데 문제가 없었고 잘 동작하였으므로 U-Boot에서의 Flash설정과는 문제가 없다.

결국 Root File System을 만드는 과정에서 문제가 밝혀 졌다.

부팅시 U-Boot에서 출력하는 Flash의 size정보를 보면 Block Size가 64KB인 것을 알 수 있다.

U-Boot 2010.06-svn83 (Jan 06 2013 - 17:36:14)
DRAM:  256 MiB
NAND:  Special Nand id table Version 1.35
Nand ID: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
No NAND device found!!!
0 MiB
Spi(cs1) ID: 0xC2 0x20 0x18 0xC2 0x20 0x18
Spi(cs1): Block:64KB Chip:16MB Name:"MX25L128"   <=============

하지만 Root File System을 jffs2로 변환하는 과정에서 아래와 같이 256KB용으로 생성이 되도록 설정을 하였었다.

mkfs.jffs2 –d ./ rootbox -l –e 0x40000 -o jffs2-root.img

따라서 jffs2로 변환하는 과정에서 아래와 같이 64KB용으로 생성이 되도록 변경하였더니 문제가 해결이 됐다.

mkfs.jffs2 –d ./ rootbox -l –e 0x10000 -o jffs2-root.img

참고로 아래는 jffs2를 만들 때의 옵션이다.

 Parameter

 Description

 d

 Specifies the root file system.

 l

 Indicates the little-endian mode.

 e

 Specifies the buffer size of the flash memory.

 o

 Exports image files.


'개발 관련 > U-Boot' 카테고리의 다른 글

U-Boot에서 NFS(Network File System)로 부팅 설정하기  (0) 2013.10.17
U-Boot(uBoot) 설정  (0) 2011.11.22