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

현철님과 재훈님의 NOR MTD 문서를 보고 따라하기를 해봤습니다..

=============================================

U-Boot 1.1.2 (May  5 2006 - 02:50:19)

U-Boot code: 33C00000 -> 33C3FC50  BSS: -> 33C794F0
RAM Configuration:
Bank #0: 30000000 64 MB
Get flash bank 0 size @ 0x0
Total Flash bank's sizes: 0x200000
protect monitor 3fc50 bytes @ address 0
Flash:  2 MB
NAND:64 MB
In:    serial
Out:   serial
Err:   serial

SD Initialize fail..

Hit any key to stop autoboot:  0
TFTP from server 192.168.10.105; our IP address is 192.168.10.120
Filename 'aesopk'.
Load address: 0x32000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ########
done
Bytes transferred = 1369800 (14e6c8 hex)
## Booting image at 32000000 ...
   Image Name:   Linux-2.6.13-h1940-aesop2440
   Created:      2006-05-05  10:14:38 UTC
   Image Type:   ARM Linux Kernel Image (gzip compressed)
   Data Size:    1369736 Bytes =  1.3 MB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.13-h1940-aesop2440 (root@aesop) (gcc version 3.3.4) #4 Fri May 5 19:14:34 KST 2006
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
Machine: aESOP-2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C2440: core 399.651 MHz, memory 133.217 MHz, peripheral 66.608 MHz
S3C2410 Clocks, (c) 2004 Simtec Electronics
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU0: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Built 1 zonelists
Kernel command line: root=/dev/nfs rw nfsroot=192.168.10.105:/scratchbox/users/aesop/targets/AESOP ip=192.168.10.120:192.168.10.105:192.168.10.1:255.255.255.0::eth0:off console=ttySAC0,115200n81 mtdparts=aesop-nor:512k(uboot),-(kernel)
irq: clearing subpending status 00000002
PID hash table entries: 512 (order: 9, 8192 bytes)
timer tcon=00500000, tcnt d8d2, tcfg 00000200,00000000, usec 0000170f
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 61824KB available (2301K code, 574K data, 112K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C2440: Clock Support, UPLL 47.980 MHz
SCSI subsystem initialized
usbcore: registered new driver hub
S3C2410 DMA Driver, (c) 2003-2004 Simtec Electronics
DMA channel 0 at c4800000, irq 33
DMA channel 1 at c4800040, irq 34
DMA channel 2 at c4800080, irq 35
DMA channel 3 at c48000c0, irq 36
NetWinder Floating Point Emulator V0.97 (double precision)
yaffs May  5 2006 19:11:53 Installing.
Initializing Cryptographic API
s3c2410 Backlight Driver Initialized.
Console: switching to colour frame buffer device 96x34
S3C24X0 fb0: s3c2410fb frame buffer device initialize done
GPIO L3 bus interface for S3C2440, installed
S3C2410 RTC, (c) 2004 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
nbd: registered device at major 43
cs89x0:cs89x0_probe(0x0)
PP_addr=0x3000
cs89x0.c: v2.4.3-pre1 Russell Nelson <[email protected]>, Andrew Morton <[email protected]>
eth0: cs8900 rev J found at 0xf8000300
cs89x0: Extended EEPROM checksum bad and no Cirrus EEPROM, relying on command line
cs89x0 media RJ-45, IRQ 53, programmed I/O, MAC 00:00:c0:ff:ee:08
cs89x0_probe1() successful
cs89x0:cs89x0_probe(0x0)
cs89x0: request_region(0xf8000300, 0x10) failed
cs89x0: no cs8900 or cs8920 detected.  Be sure to disable PnP with SETUP
AESOP NOR-Flash Driver, (c) 2006 AESOP Embedded
aesop-nor: Found 1 x16 devices at 0x0 in 16-bit bank
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
2 cmdlinepart partitions found on MTD device aesop-nor
Creating 2 MTD partitions on "aesop-nor":
0x00000000-0x00080000 : "uboot"
0x00080000-0x00200000 : "kernel"
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2410-nand: mapped registers at c4b00000
s3c2410-nand: timing: Tacls 13ns, Twrph0 66ns, Twrph1 39ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 4059 at 0x03f6c000
Creating 1 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x00000000-0x04000000 : "Total nand"
usbmon: debugfs is not available
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
s3c2410_udc: version 28 Aug 2005
mice: PS/2 mouse device common for all mice
s3c2410-buttons successfully loaded
s3c2410 TouchScreen successfully loaded
i2c /dev entries driver
s3c2440-i2c s3c2440-i2c: slave address 0x10
s3c2440-i2c s3c2440-i2c: bus frequency set to 378 KHz
s3c2440-i2c s3c2440-i2c: i2c-0: S3C I2C adapter
mmci-s3c2410: probe: mapped sdi_base=c5100000 irq=37 irq_cd=62 dma=0.
mmci-s3c2410: initialisation done.
godori: AESOP2440 SOUND driver register
godori: AESOP2440 SOUND driver.........probe
AESOP2440 UDA1341 audio driver initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: using half-duplex 10Base-T (RJ-45)
MMC: sd_app_op_cond timed out. Probably no SD-Card here.
IP-Config: Complete:
      device=eth0, addr=192.168.10.120, mask=255.255.255.0, gw=192.168.10.1,
     host=192.168.10.120, domain=, nis-domain=(none),
     bootserver=192.168.10.105, rootserver=192.168.10.105, rootpath=
Looking up port of RPC 100003/2 on 192.168.10.105
Looking up port of RPC 100005/1 on 192.168.10.105
VFS: Mounted root (nfs filesystem).
Freeing init memory: 112K
INIT: version 2.86 booting
Initializing udev dynamic device directory.
mount: Mounting /dev/root on / failed: No such file or directory
INIT: Entering runlevel: 3
[: 0: unknown operand


Linux 2.6.13-h1940-aesop2440.

/) /)
(='.'=)

login[288]: root login  on `tts/0'

root@godori:~#

================================================

Nor에 파티션까지 설정이 되었네요...

uboot 파티션을 512k로 하고 커널은 1.3M 정도라서 나머지를 커널로 파티션을 잡았습니다..

그러면 2M안에 uboot와 kernel이 딱 들어가겠네요...


root@godori:~# flash_eraseall /dev/mtd/0
Erasing 64 Kibyte @ 70000 -- 87 % complete.
root@godori:~# cat aesopb > /dev/mtdblock0
root@godori:~#

root@godori:~# flash_eraseall /dev/mtd/1
Erasing 64 Kibyte @ 170000 -- 95 % complete.
root@godori:~# cat aesopk > /dev/mtdblock1
root@godori:~#

커널도 위와 같은 방법으로 올리는게 맞는지요....

그리고 nand일때는

nand write 32000000 0 커널사이즈

setenv bootcmd nand read 32000000 0 1FFFFF ;bootm 32000000


이렇게 해주면 되는데 nor일때는 setenv 설정을 어떻게 해줘야 하는지

찾아봐도 없는거 같아서 질문 드립니다........

uboot 명령으로 가능한 것인지 아니면 uboot에서 좀 수정을 해줘야 하는건지요...

nor에 부트로더와 커널을 올리고 nand에 rootfs를 올려볼려고 합니다...

고현철

2006.05.06 05:22:57
*.190.41.69

지금 방식으로는 무쟈게 조심을 해야합니당....쩝....

왜냐하면, NOR 2M중 맨 마지막 블럭은 u-boot의 환경변수로
사용이 됩니다.

해서 u-boot를 고쳐서 환경변수 영역을 u-boot가 올라간 위치 다음에서
사용이 되도록 하거나, 아니면 mtd영역을 세개로 쪼개야 합니다.

잘 못 하다가는 환경변수 영역을 싸그리 밀어버리는 현상이 발생할 겁니다.

그리고, 커널도 위와같은 방법으로 하는게 맞습니다.

nand에 rootfs를 올릴때는 nfs로 부팅한 후 flash erase해주고, yaffs로 마운트 한 후 쓰시면 됩니다.

아닐 경우는 좀 복잡한데, 이유는 nand의 bad처리때문입니다.

이홍석

2006.05.06 09:15:41
*.43.152.229

^^; 환경변수 영역을 깜빡했네요...ㅋ

조심해서 설정해야겠네요....... 답변 감사합니다...

이홍석

2006.05.06 10:12:18
*.43.152.229

나중에 확장성 문제를 생각을 해서 nand에다가 파티션을 kernel과 rootfs와 user으로 나누고 yaffs로 마운트 해서 하는 방향으로 해봐야겠습니다...

고현철

2006.05.06 10:40:03
*.190.41.69

nand에 커널 놓지 마세요. 깨지면 어떡하실라고....aesop 보드가 괜히 그렇게 설계된게 아닙니다. 상용화 레벨로 설계된겁니다.

이홍석

2006.05.06 19:41:36
*.43.152.229

아~.. 넵....^^;
List of Articles
번호 제목 글쓴이 날짜sort 조회 수
68 이솝보드 u-boot의 cs8900과 관련한 port 세팅에 관한 질문..--> ... [7] 임동관 2006-05-15 1444
67 SD 카드 인식 문제.[미해결] [3] 오용석 2006-05-15 1158
66 ffplay에 libmad 붙이기 방법 또 질문[완료] [2] 오용석 2006-05-14 1346
65 H.264의 CAVLC 구현방법에 대한 자료를 구합니다. [1] 장석원 2006-05-14 1243
64 [질문] Nand Flash 128MB에 관련해서. [3] 이재훈 2006-05-11 1165
63 SD Card속도 문제 [5] 정창환 2006-05-10 1799
62 아직도 비디오 디코딩으로 해매고 있습니다. <--완료 [2] 박영학 2006-05-10 1154
61 현철님의 Root Filesystem 질문이요~ <= 완료 [8] 안정섭 2006-05-10 1415
60 battery 연결시 동작문제...[완료] [3] 이홍석 2006-05-09 1043
59 gplflash 질문입니다 <==완료 [2] 윤현승 2006-05-09 918
58 insmod 에러 질문드립니다. <= 완료 [6] 안정섭 2006-05-08 1055
57 mkyaffsimage 질문입니다...[완료] [4] 이홍석 2006-05-07 2624
56 에고.. 다시한번 nor mtd관련 질문 드립니다.. [완료] [4] 이홍석 2006-05-06 1160
» NOR MTD 질문입니다.. [완료] [5] 이홍석 2006-05-06 3312
54 요즘 yaffs <= 요질문이 자주 올라오네요..^^ [완료] [2] 이홍석 2006-05-05 1181
53 플레시 플레이어를 돌리려구 하는데여...<==완료 [1] 윤현승 2006-05-05 1297
52 아래글 최종 에러 메세지 다시한번 올립니다.. [완료] [3] 이홍석 2006-05-04 1454
51 NAND boot 에 관하여....<= 완료 [1] 박현진 2006-05-04 1242
50 자료실에 현철님이 올려주신 rootfs 부팅에러...[완료] [13] 이홍석 2006-05-04 1497
49 보드를 이용한 방화벽에 대해 질문드립니다.<--완료 [2] 이상화 2006-05-04 944

사용자 로그인