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

현철님과 재훈님의 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
6248 우분투 9.04에서 tslib-1.0설치시 에러.. [2] Kevin 2009-10-24 3500
6247 ramdisk를 위한 lib의 작게 하는 방법 [3] 김경호 2006-04-13 3488
6246 컴파일 시 libc 와 관련된 골아픈 질문.. [11] 칼마 2018-02-27 3472
6245 I2S를 구현하다 문제가 있어 질문 드립니다. [5] 션한물 2013-04-12 3448
6244 [질문] 장시간 사용시에 LCD 문제 [3] 한영민 2007-05-23 3414
6243 [참고] PCI 수정 제안...^^ [1] 이승진 2007-05-11 3414
6242 WinCE 5.0 LCD관련 질문입니다. [4] 김해성 2007-10-06 3388
6241 [v210] SMSC LAN9220 이더넷 문제 [7] 유구무언 2013-06-11 3371
6240 udev 적용문제 확인부탁드립니다. [1] ice179 2014-02-28 3363
6239 [완료] 리눅스 관련 자료는 언제 올라오나요? [4] 임은향 2007-05-14 3361
6238 Android binder 사용 방법 문의 [2] 이윤택 2009-06-11 3335
6237 [re] [요청] LX800에 부팅시 사용되었던 Image file [1] 이제현 2007-08-29 3318
» NOR MTD 질문입니다.. [완료] [5] 이홍석 2006-05-06 3312
6235 root 로그인이 안될때. [8] 박상진 2009-05-20 3301
6234 [질문] CPU 성능 테스트는 어떤 프로그램이 적합할까요? [1] 성진호 2007-06-28 3297
6233 Origen보드에 Linaro-Linux 올리기 -- SD카드에 Kernel 이미지 쓰... [1] 다콩 2012-07-19 3283
6232 리눅스 개발환경에 대해(이더넷, OTG) 활용 방안 [1] pedor11 2013-11-06 3274
6231 이솦보드 키패드 처리 방법?[완료] [3] 김대영 2006-04-12 3252
6230 프레임버퍼 디스플레이가 잘 안되는데요 [1] timul1 2014-02-24 3251
6229 [질문]wince 올리는 방법 [6] 김형기 2007-06-26 3249

사용자 로그인