카테고리 없음

supervivi에서 u-boot 이미지 라이팅 후, SD카드로 리눅스 이미지 fusing하기 전까지

벅스바니 2010. 2. 18. 23:49
mini2440 보드 기준으로 하였습니다.

<Supervivi로 부팅>
##### FriendlyARM BIOS for 2440 #####
[x] bon part 0 320k 2368k
[v] Download vivi
[k] Download linux kernel
[y] Download root_yaffs image
[c] Download root_cramfs image
[a] Absolute User Application
[n] Download Nboot
[e] Download Eboot
[i] Download WinCE NK.nb0
[w] Download WinCE NK.bin
[d] Download & Run
[z] Download zImage into RAM
[g] Boot linux from RAM
[f] Format the nand flash
[p] Partition for Linux
[b] Boot the system
[s] Set the boot parameters
[t] Print the TOC struct of wince
[u] Backup NAND Flash to HOST through USB(upload)
[r] Restore NAND Flash from HOST through USB
[q] Goto shell of vivi
Enter your selection: q
Supervivi>
Supervivi> load ram 0x31000000 242332 u
USB host is not connected yet.
USB host is connected. Waiting a download.

Now, Downloading [ADDRESS:31000000h,TOTAL:242342]
RECEIVED FILE SIZE: 242342 (236KB/S, 1S)
Downloaded file at 0x31000000, size = 242332 bytes
Supervivi> go 0x31000000
go to 0x31000000
argument 0 = 0x00000000
argument 1 = 0x00000000
argument 2 = 0x00000000
?argument 3 = 0x00000000

U-Boot 1.3.2-mini2440 (Oct 6 2009 - 12:51:09)

I2C: ready
DRAM: 64 MB
Flash: 2 MB
NAND: Bad block table not found for chip 0
Bad block table not found for chip 0
64 MiB
*** Warning - bad CRC or NAND, using default environment

USB: S3C2410 USB Deviced
In: serial
Out: serial
Err: serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot: 0

MINI2440 # nand scrub

NAND scrub: device 0 whole chip
Warning: scrub option will erase all factory set bad blocks!
There is no reliable way to recover them.
Use this command only for testing purposes if you
are sure of what you are doing!

Really scrub this NAND flash? <y/N>
Erasing at 0xe14000 -- 22% complete.
NAND 64MiB 3,3V 8-bit: MTD Erase failure: -5
Erasing at 0x3e14000 -- 97% complete.
NAND 64MiB 3,3V 8-bit: MTD Erase failure: -5
Erasing at 0x3ffc000 -- 100% complete.
Bad block table not found for chip 0
Bad block table not found for chip 0
OK
MINI2440 # nand createbbt
Create BBT and erase everything ? <y/N>
Skipping bad block at 0x00e24000
Skipping bad block at 0x03e48000
Skipping bad block at 0x03ff0000
Skipping bad block at 0x03ff4000
Skipping bad block at 0x03ff8000
Skipping bad block at 0x03ffc000

Creating BBT. Please wait ...Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x03ffc000, version 0x01
Bad block table written to 0x03ff8000, version 0x01

MINI2440 # nand write 0x31000000 u-boot

NAND write: device 0 offset 0x0, size 0x40000
262144 bytes written: OK
MINI2440 #

<---------------------------------------------여기서 NAND Boot로 돌리고 리셋을 겁니다

U-Boot 1.3.2-mini2440 (Oct 6 2009 - 12:51:09)

I2C: ready
DRAM: 64 MB
Flash: 2 MB
NAND: Bad block table not found for chip 0
Bad block table not found for chip 0
64 MiB
*** Warning - bad CRC or NAND, using default environment

USB: S3C2410 USB Deviced
In: serial
Out: serial
Err: serial
MAC: 08:08:11:18:12:27
Hit any key to stop autoboot: 0
MINI2440 # dynenv set 40000
device 0 offset 0x40000, size 0x3fc0000
45 4e 56 30 - 00 00 04 00
MINI2440 # nand erase kernel

NAND erase: device 0 offset 0x60000, size 0x500000
Erasing at 0x55c000 -- 100% complete.
OK

<<-------------------------------여기서 리눅스커널이미지인 uImage가 카피된 SD카드를 삽입합니다.

MINI2440 # mmcinit
trying to detect SD Card...
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
MMC found. Card desciption is:
Manufacturer ID = 000000
HW/FW Revision = 0 0
Product Name =
Serial Number = 000000
Month = 0
Year = 1997
===============> MMC CMD Timeout
===============> MMC CMD Timeout
READ_BL_LEN=0, C_SIZE_MULT=0, C_SIZE=0
size = 0
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
mmc_block_read: err SDIDSTA=0x00000020

MINI2440 # mmcinit
trying to detect SD Card...
===============> MMC CMD Timeout
MMC found. Card desciption is:
Manufacturer ID = 000000
HW/FW Revision = 0 0
Product Name =
Serial Number = 80ff00
Month = 0
Year = 1997
===============> MMC CMD Timeout
===============> MMC CMD Timeout
READ_BL_LEN=0, C_SIZE_MULT=0, C_SIZE=1020
size = 0
===============> MMC CMD Timeout
===============> MMC CMD Timeout
===============> MMC CMD Timeout
mmc_block_read: err SDIDSTA=0x00000020

MINI2440 # fatload mmc 0:1 0x31000000 uImage
===============> MMC CMD Timeout
===============> MMC CMD Timeout
mmc_block_read: err SDIDSTA=0x00000020

** Unable to use mmc 0:1 for fatload **
MINI2440 # fatload mmc 0 0x31000000 uImage
===============> MMC CMD Timeout
===============> MMC CMD Timeout
mmc_block_read: err SDIDSTA=0x00000020

** Unable to use mmc 0:1 for fatload **
MINI2440 #


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

이후로 SD카드의 uImage가 읽혀지지 않아서 커널이미지 라이팅은 안되고 있습니다.


실제로는 아래와 같이 명령을 넣어야 합니다.


vivi:
load ram 0x31000000 242332 u
go 0x31000000
u-boot:
nand scrub
nand createbbt
nand write 0x31000000 u-boot

<switch the nand/nor switch back to nand>
reset

dynenv set 40000
nand erase kernel
mmcinit
fatload mmc 0:1 0x31000000 uImage
nand write 0x31000000 kernel
setenv bootcmd nboot.e kernel \; bootm
saveenv