falcon模式

簡介

在該模式下,SPL可以直接加載內核,開機時間較少不少。目前該模式支持的芯片不多,但是TI的AM335x是其中之一,網上資料也不不多。u-boot-2016.09中有兩處有關資料。

  • doc/README.falcon
  • board/ti/am335x/README

開啓

如果啓動源爲Nand,則默認開啓該模式。該模式下需設置的環境變量和參數在README.falcon在有詳細描述。

設備樹

在使用傳統的ATAGs傳參數時是沒有問題的。
但是在使用設備樹時,遇到了需問題,而且文檔中也描述了說falcon模式在設備樹下的功能沒有測試過。

tftp 0x88000000 am335x-evm.dtb
tftp 0x82000000 zImage
spl export fdt 0x82000000 - 0x88000000
=> spl export fdt 0x82000000 - 0x88000000
data abort
pc : [<8ffac5de>]          lr : [<8ffaf85d>]
reloc pc : [<8080b5de>]    lr : [<8080e85d>]
sp : 8ef80cc0  ip : 8ffd1d13     fp : 00000000
r10: 8ef80d5c  r9 : 8ef80ed8     r8 : 00000003
r7 : 00000007  r6 : 8ffe71b4     r5 : 00000000  r4 : 8ffe71b4
r3 : 00000000  r2 : 2ff20112     r1 : 00000000  r0 : 8ffd91af
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

這個問題是spl export fdt命令後面只能跟uImage,不支持zImage
uImage = header + zImage,header爲長度爲0x40的描述信息。

tftp 0x88000000 am335x-evm.dtb
tftp 0x82000000 uImage
spl export fdt 0x82000000 - 0x88000000
=> spl export fdt 0x82000000 - 0x88000000
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-3.14.0
   Created:      2017-08-30   8:13:42 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3582648 Bytes = 3.4 MiB
   Load Address: 81ffffc0
   Entry Point:  81ffffc0
   Verifying Checksum ... OK
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Kernel Image ... OK
   Loading Device Tree to 8ef74000, end 8ef7f696 ... OK
subcommand not supported
subcommand not supported
   Loading Device Tree to 8ef65000, end 8ef73696 ... OK
Argument image is now in RAM: 0x8ef65000

nand erase 0x60000 0x20000
nand write.i 0x8ef65000 0x60000 ${filesize}

Nand的分區

0x000000000000-0x000000020000 : "SPL"
0x000000020000-0x000000040000 : "SPL.backup1"
0x000000040000-0x000000060000 : "SPL.backup2"
0x000000060000-0x000000080000 : "SPL.backup3"
0x000000080000-0x000000260000 : "U-Boot"
0x000000260000-0x000000280000 : "U-Boot Env"
0x000000280000-0x000000780000 : "Kernel"
0x000000780000-0x000010000000 : "File System"

setenv nandboot "echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.SPL.backup2; nand read ${loadaddr} NAND.kernel; bootm ${loadaddr} - ${fdtaddr}"

可以看到SPL.backup2存放了non-falcon模式使用的設備樹,SPL.backup3存放了falcon模式下使用的設備樹。

燒寫

其實燒寫時,可以直接燒寫,不需要export命令。

tftp 0x82000000 am335x-evm.dtb
nand erase 0x40000 0x20000
nand write.i 0x82000000 0x40000 ${filesize}

nand erase 0x60000 0x20000
nand write.i 0x82000000 0x60000 ${filesize}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章