昨天晚上弄了好几个小时,想在linux下烧写flash,通过网络搜索发现有一个叫Jflash的软件包可以实现这功能; 就是没有成功,一气之下看电影,看到4点多,然后快11点时才起来,脑子突然一想,会不会是我的虚拟机没有开启并口啊,象先前我没有开启串口导致看不到启动信息; 呵呵,马上开机,先把虚拟机打开,在关机,因为我的虚拟机是挂起的; 然后VM-->Setting,把并口Parallel port加进去,开机,呵呵,运行那个编译好的软件,呵呵,搞定。
Jflash这个软件我就不介绍了,因为这两篇博文介绍得很详细啦,http://blog.chinaunix.net/u/24474/showart_227846.html 和 http://blog.chinaunix.net/u/23070/showart.php?id=157735; 一定要仔细看喽; 至于软件包麻,前面那个网址上有下载的,另外广州友之臂上有基于S3C2440的Jflash软件包下载,其实是一样的,因为CPU的ID是一样的;首先把软件包下下来;其次按如下操作:
[root@localhost root]# chmod +x 你的软件包
[root@localhost root]# tar 你的软件包
[root@localhost root]# cd 你的解压后的文件夹
然后修改你的 jtag.h文件,具体怎么修改请看我上面给的第二个网址,第一个也可以,不过不怎么详细
前面几个步骤不就不详细指出啦,因为是昨晚解压的,反正我的是:
[root@localhost root]# cd Jflash_s3c2410_linux/
[root@localhost Jflash_s3c2410_linux]# ls
def.h jtag.h k9sxx08.o pin2410.o sbc_vivi
Jflash-s3c2410 jtag.o Makefile ppt.c sjf.c
Jflash_s3c2410_linux.bz2 k9sxx08.c pin2410.c ppt.h sjf.h
jtag.c k9sxx08.h pin2410.h ppt.o sjf.o
//接下来我运行Jflash-s3c2410
[root@localhost Jflash_s3c2410_linux]# ./Jflash-s3c2410
+------------------------------------+
| SEC JTAG FLASH(SJF) v 0.11 +
| modified by MIZI 2002.7.13 +
+------------------------------------+
Usage: SJF /t= /d=//这是格式
Flash Type List
1:SMDK2410:K9S3208 4MB
2:SMDK2410:K9S6408 8MB
3:SMDK2410:K9S2808 16MB
4:SMDK2410:K9S5608 32MB
5:SMDK2410:K9S1208 64MB
6:SMDK2410:AM29LV800BB
//然后我按照格式下载,见如下
[root@localhost Jflash_s3c2410_linux]# ./Jflash-s3c2410 GEC2410_BIOS.bin /t=5
+------------------------------------+
| SEC JTAG FLASH(SJF) v 0.11 +
| modified by MIZI 2002.7.13 +
+------------------------------------+
> flashType=5
> S3C2410X(ID=0x0032409d) is detected.
> K9S1208 is detected. ID=0xec76
K9S1208 NAND Flash JTAG Programmer Ver 0.0
0:K9S1208 Program 1:K9S1208 Pr BlkPage 2: Exit
Select the function to test :
//当我看到这东西出来后,那个喜啊,好兴奋啊!不管怎么样,先烧进去再说
Select the function to test :0
[SMC(K9S1208) NAND Flash Writing Program]
Source size: 0x92f3
Available target block number: 0~4095
Input target block number:0
target start block number =0
target size (0x4000*n) =0xc000
STATUS:Epppppppppppppppppppppppppppppppp
Epppppppppppppppppppppppppppppppp
Epppppppppppppppppppppppppppppppp
K9S1208 NAND Flash JTAG Programmer Ver 0.0
0:K9S1208 Program 1:K9S1208 Pr BlkPage 2: Exit
//这下呵呵,烧进去也,不过速度真的比在windows用Sjflash慢很多,要十几分钟呢。不管了,先看看能不能运行,接下来退回到终端,进入串口,复位目标板,哈哈,看看下面的结果,果然很好
Select the function to test :2
[root@localhost Jflash_s3c2410_linux]# minicom
** Parameter bits is public, but is marked private in global config file
** Parameter parity is public, but is marked private in global config file
** Parameter stopbits is public, but is marked private in global config file
Welcome to minicom 2.00.0
OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n
Compiled on Jan 25 2003, 00:15:18.
Press CTRL-A Z for help on special keys
Power on reset
Read chip id = ec76
Nand flash status = c0
Env.Os_Auto_Flag=2
************************************
* *
* GEC2410 BIOS V1.0 *
* *
* *
************************************
NAND Flash Boot
Please select function :
0 : USB download file
1 : Uart download file
2 : Write Nand flash with download file
3 : Load Pragram from Nand flash and run
4 : Erase Nand flash regions
5 : Write NOR flash with download file
6 : Set boot params
7 : Set AutoBoot parameter,1:linux 2:wince
阅读(2941) | 评论(0) | 转发(0) |