裸板烧写linux内核,JZ2440开发板裸板烧写方法

1、启动nor/nand flash上的uboot烧写裸板:

设置开发板为nor flash启动,上电按空格进入uboot,如下:

##### 100ask Bootloader for OpenJTAG #####

[n] Download u-boot to Nand Flash

[o] Download u-boot to Nor Flash

[k] Download Linux kernel uImage

[j] Download root_jffs2 image

[y] Download root_yaffs image

[d] Download to SDRAM & Run

[z] Download zImage into RAM

[g] Boot linux from RAM

[f] Format the Nand Flash

[s] Set the boot parameters

[b] Boot the system

[r] Reboot u-boot

[q] Quit from menu

Enter your selection:

输入:n,在等待界面启动dnw,上传文件烧写到nand flash中即可。

2、用tftp下载裸板程序:

设置开发板nor flash启动,配置服务器IP:

set serverip 192.168.48.103   //为PC机IP地址

保存:

save

启动“tftpd32”工具,设置待下载文件目录“Current Directory”和服务器ip"Server interface"即可使用

下载:

tftp 30000000 leds.bin

烧写到nand flash中运行:

nand erase 0 40000

nand write 30000000 0 40000

或者直接跳转到30000000内存地址中运行:

go 30000000                       //此处使用bootm命令无效,烧写内核可以用bootm

注意:使用tftp工具下载时,文件不能在中文路径下,否则下载的时候找不到文件导致下载失败。

3、用nfs下载裸板程序:

参考博文“Ubuntu下如何安装NFS服务及其配置”设置NFS下载路径(Ubuntu中存放待下载bin文件的目录,在/etc/exports文件中修改)权限;

设置服务器IP:

set serverip 192.168.48.105   //Ubuntu的IP地址

save

nfs 30000000 192.168.48.105:/home/book/workspace/jz2440/temp/led.bin

烧写到nand flash中运行:

nand erase 0 40000

nand write 30000000 0 40000

或者直接跳转到30000000内存地址中运行:

go 30000000           //此处使用bootm命令无效,烧写内核可以用bootm

注意:如果程序中已经设置堆栈指针sp指向片内SRAM地址,比如ldr sp, =4096,那就只能把程序烧写到nand flash中再运行,否则go 30000000到SDRAM中运行时系统会崩溃。当然也可以把sp指向SDRAM地址,比如ldr sp, =0x34000000。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值