UBL descriptor ti dm365 引导分析 RBL,UBLU-BOOT

1.        分析NAND  ubl

dump uboot 描述符(一页大小0x800)

nanddump -o -s 0x320000 -l 0x20 -f ./nand_uboot_description_dump.bin /dev/mtd0

写 uboot 描述符

nandwrite -s 0x320000 /dev/mtd0  ./nand_uboot_description_dump.bin

 

BLOCK ERASE : 128K+4K Bytes    块的大小 128K = 0x2 0000

PAGE SIZE: 2K + 64 byte       页大小2K = 0x800

 

 

nanddump[1] -o   -f ./nand_ubl_dump.bin /dev/mtd0

 

ubl描述符    第1个块第0页: 0x20000

 

00020000h: 00 ED AC A1 00 01 00 00 0A 00 00 00 01 00 00 00

00020010h: 01 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF

 

 

 

Page 0 Address

Value

Address

32-Bits

Description

0

A1ACED00

 

0xA1AC EDxx

Magic number (0xA1ACEDxx)

4

00000100

 

Entry Point Address of UBL

Entry point address for the user bootloader (absolute address)

8

0000000A

 

Number of pages in UBL

Number of blocks (size of user bootloader in number of blocks)

12

00000001

1 * 20000 = 0x2 0000

Starting Block # of UBL

Block number where user bootloader is located

16

00000001

2K = 0x800

Starting Page # of UBL

Page number where user bootloader is present

20

00000000

 

PLL settings -M

PLL setting -Multiplier (only valid is Magic Number indicates PLL enable)

24

FFFFFFFFF

 

PLL settings -N

PLL setting -Divider (only valid is Magic Number indicates PLL enable)

28

FFFFFFFFF

 

Fast EMIF setting

Fast EMIF settings(only valid is Magic Number indicates fast EMIF boot)

 

 

 

 

 

 

UBL内容开始地址20000+800 = 0x20800         第1个块第1页

结束地址 0x20800 + 0x7800(30K) = 0x28000

 

UBL二进制文件有数据的结束地方为20800 + 4550 = 0x24D50

00004550h: 44 4D 33 36 78 00 00 00 FF 00 00 00 00 00 00 00 ; DM36x..........

 

先烧写ubl描述符到 0x20000

再烧写ubl      到  0x20800

 

1.1.       先烧写ubl描述符到 0x20000

l  擦除nand

nand erase 0 0x8000000

l  下载ubl_description.bin到内存

tftp 0x80700000  ubl_description.bin

l  写32 字节uboot描述符到nand

nand write 0x80700000  0x20000 0x20

1.2.       再烧写ubl      到  0x20800

l  下载ubl

tftp 0x80700000 UBL_DM36x_NAND.bin

l  写入nand

nand write 0x80700000  0x20800  0x7800

 

2.        U-boot

uboot描述符    第0x19=25个块第0页: 0x320000   

00320000h: 66 ED AC A1 00 00 08 81 98 00 00 00 19 00 00 00 ; f憩?..仒.......

00320010h: 01 00 00 00 00 00 08 81 FF FF FF FF FF FF FF FF ; .......?

 

Page 0 Address

Value

Address

32-Bits

Description

0

A1ACED66

 

0xA1AC EDxx

Magic number (0xA1ACEDxx)

4

81080000

 

Entry Point Address of UBL

Entry point address for the user bootloader (absolute address)

8

00000098

 

Number of pages in UBL

Number of blocks (size of user bootloader in number of blocks)

12

00000019

0x19 * 0x20000 =

0x32 0000

Starting Block # of UBL

Block number where user bootloader is located

16

00000001

0x800

Starting Page # of UBL

Page number where user bootloader is present

20

81080000

 

PLL settings -M

PLL setting -Multiplier (only valid is Magic Number indicates PLL enable)

24

FFFFFFFFF

 

PLL settings -N

PLL setting -Divider (only valid is Magic Number indicates PLL enable)

28

FFFFFFFFF

 

Fast EMIF setting

Fast EMIF settings(only valid is Magic Number indicates fast EMIF boot)

 

 

 

 

 

 

 

Uboot内容:第0x19=25块第1页:0x320800

Uboot大小 0x4bab0 ; 结束处:0x320800 + 0x4bab0 = 0x36C2B0   (此地址和dump下来的有些出入,可能是因为这里的uboot烧写文件和已烧到nand里面的不同吧)

 

0x320800  + 0x60000 = 0x38 0800 => 0x40 0000

 

先烧写uboot描述符到 0x320000

再烧写uboot     到  0x320800

 

2.1.       先烧写uboot描述符到 0x320000

 

l  擦除nand

nand erase 0 0x8000000

l  下载uboot_description.bin到内存

tftp 0x80700000  uboot_description.bin

l  写32 字节uboot描述符到nand

当前块为0x19

nand write 0x80700000  0x320000 0x20

2.2.       再烧写uboot到  0x320800

l  下载uboot

tftp 0x80700000 u-boot.bin

l  写入nand 需要先得到uboot大小  0x4bab0  < 0x60000

nand write 0x80700000  0x320800 0x60000

 

2.3.       写内核到nand

下载内核镜像到内存某个地方,镜像大小0x20c7a8 = 2M

tftp 0x80700000 uImage.ti

擦除

nand erase 0x400000 0x400000

写入

nand write 0x80700000 0x400000 0x20c7a8

 

修改为nand启动

setenv bootcmd "nand read 0x80700000 0x400000 20c7a8 ; bootm 0x80700000"

saveenv

boot

3.        NAND 正常引导信息

TI UBL Version: 1.50

Booting Catalog Boot Loader

BootMode = NAND

Starting NAND Copy...

Valid magicnum, 0xA1ACED66, found in block 0x00000019.

   DONE

Jumping to entry point at 0x81080000.

 

 

U-Boot 2010.12-rc2 (Jan 12 2011 - 19:44:22)

 

Cores: ARM 297 MHz

DDR:   270 MHz

I2C:   ready

DRAM:  128 MiB

NAND:  2048 MiB

MMC:   davinci: 0, davinci: 1

Bad block table found at page 524224, version 0x01

Bad block table found at page 1048512, version 0x01

Bad block table found at page 524160, version 0x01

Bad block table found at page 1048448, version 0x01

nand_read_bbt: Bad block at 0x000000a00000

nand_read_bbt: Bad block at 0x000002fe0000

nand_read_bbt: Bad block at 0x000015b40000

nand_read_bbt: Bad block at 0x000017100000

nand_read_bbt: Bad block at 0x00001d420000

nand_read_bbt: Bad block at 0x00002ba80000

nand_read_bbt: Bad block at 0x000042440000

nand_read_bbt: Bad block at 0x000053320000

nand_read_bbt: Bad block at 0x000077be0000

Net:   Ethernet PHY: GENERIC @ 0x00

DaVinci-EMAC

Hit any key to stop autoboot:  0

DM365 EVM #

 



[1] nanddump -o -l len -f <file> /dev/mtdX

 

 
现今比较理想的分配方式是:
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值