How to calculate the router flash burning address from uboot

Source: Internet
Author: User
How to calculate the router flash burning address from uboot

First, we get the base address of flash partition from Uboot
First, find the Uboot compiled Bootstrap.map or u-boot.map file, find the following sentence,
. Text 0x000000009f000000 0x3520
Where 0x9f000000 is the base site of the Flash Division;
Second, to view the source code of Uboot, such as qca9531 chip, its flash partition base address is defined in the following header file;
U-boot\include\configs\board953x.h
/* NOR Flash Start Address * *
#define Cfg_flash_base 0x9f000000

View router Flash partition information
~ # CAT/PROC/MTD
Dev:size erasesize Name
mtd0:00040000 00010000 "U-boot"
mtd1:00010000 00010000 "U-boot-env"
mtd2:00630000 00010000 "Rootfs"
mtd3:00160000 00010000 "Uimage"
mtd4:00010000 00010000 "Mib0"
mtd5:00010000 00010000 "ART"

~ # Cat/proc/partitions
Major Minor #blocks name
0 256 Mtdblock0
1 Mtdblock1
2 6336 Mtdblock2
3 1408 Mtdblock3
4 Mtdblock4
5 MTDBLOCK5

Start to compute the flash address and write command for each module
Burn Write Uboot:
TFTP 0x80060000 U-boot.bin
Erase 0x9f000000 +0x40000
CP.B 0x80060000 0x9f000000 0x40000

Burn Write JFFS2
TFTP 0x80060000 AP143-JFFS2
Erase 0x9f050000 +0x630000
CP.B 0x80060000 0x9f050000 0x630000

Burn Write Vmlinux
TFTP 0x80060000 Vmlinux.lzma.uImage
Erase 0x9f680000 +0x160000
CP.B 0x80060000 0x9f680000 0x160000

Burn Writing Art:
TFTP 0x80060000 Art.bin
Erase 0x9f7f0000 +0x10000
CP.B 0x80060000 0x9f7f0000 0x10000

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.