Use TFTP to burn uimage to NAND Flash Under u_boot

Source: Internet
Author: User

Use TFTP to burn uimage to NAND Flash Under u_boot (refer to Shen embedded)

Copy uimage to/tftpboot/

 

In securecrt, enter:

Smdk2440a> TFTP 0x30008000 uimage // write the uimage to the unit starting from 0x3000 in the memory. It will not be available after power loss.

Smdk2440a> NAND erase 60000 500000 0000 // erase the size starting with 0x6000 unit in nandflash is 0x50 (that is, 5 m storage space is actually only 2 m points in the kernel)

Smdk2440a> NAND write 0x30008000 0x60000 0x50 0000

// Write the content starting from 0x3000 8000 units in the memory to the storage space starting from 0x50 0000 units in nandflash (after power loss, there are still some)

 

Experiment execution process and result:

[U-boot @ smdk2440a] # printenv

Bootargs = console = ttysac0 root =/dev/nfs nfsroot = 192.168.1.72:/opt/rootfs IP = 192.168.1.226: 192.168.1.72: 192.168.1.72: 255.255.255.0: smdk2440a.embedclub.com: eth0: Off

Bootcmd = NAND read 0x30008000 60000 500000; bootm 0x30008000

Bootdelay = 1

Baudrate = 115200

Ethaddr = 08: 08: 11: 18: 12: 27

Netmask = 255.255.255.0

Embedclub = bmp d 70000.

Stdin = serial

Stdout = serial

Stderr = serial

Lcdtype = W

Ethact = dm9000

Serverip = 192.168.1.108

Ipaddr = 192.168.1.266

Gatewayip = 192.168.1.1

 

Environment size: 451/131068 bytes

[U-boot @ smdk2440a] # TFTP 30008000 uimage

Dm9000 I/O: 0x20000300, ID: 0x90000a46

Dm9000: Running in 16 Bit mode

Mac: 08: 08: 11: 18: 12: 27

Operating at 100 m full duplex mode

Using dm9000 Device

TFTP from server 192.168.1.108; our IP address is 192.168.1.10

Filename 'uimage '.

Load address: 0x30008000

Loading: t ####################################### ##########################

######################################## #########################

##########################

Done

Bytes transferred = 2286828 (22e4ec HEX)

[U-boot @ smdk2440a] # NAND erase 60000 500000

 

Nand erase: device 0 offset 0x60000, size 0x500000

Erasing at 0x54000002800000 -- 0% complete.

OK

[U-boot @ smdk2440a] # NAND write 30008000 60000

 

Nand write: device 0 offset 0x60000, size 0x500000

Writing at 0x54000000020000 -- 100% is complete. 5242880 bytes written: OK

[U-boot @ smdk2440a] # boot // boot successful

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.