可視分區能使用 "mmc part", "ext2ls" 等指令操作. 但是 U-Boot 存在於 EBT 分區中, 為隱藏分區, 只能利用 mmc read/write 指令對指定區塊操作.

<< 表列 MMC 0 分區 >>

切換至 MMC 0.

Tegra124 (Jetson TK1) # mmc dev 0
switch to partitions #0, OK
mmc0(part 0) is current device

讀取 MMC 0 分區資訊.

Tegra124 (Jetson TK1) # mmc part

Partition Map for MMC device 0 -- Partition Type: EFI

Part       Start LBA End LBA Name
              Attributes
              Type GUID
              Partition GUID
1            0x00017000 0x01c16fff "APP"
              attrs: 0x0001000000000001
              type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
              guid: 7369c667-ff51-ec4a-29cd-baabf2fbe346
2            0x01c17000 0x01c18fff "DTB"
              attrs: 0x0002000000000001
              ...
9            0x01c42000 0x01d58fff "UDA"
              attrs: 0x0009000000000001
              type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
              guid: 00f7ef05-a1e9-e53a-ca0b-cbd0484764bd

<< 表列 APP 分區根目錄檔案 >>

MMC 0, APP 分區編號為 1.

Tegra124 (Jetson TK1) # ext2ls mmc 0:1
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
<DIR> 4096 boot
<DIR> 4096 bin
<DIR> 4096 dev
<DIR> 12288 etc
<DIR> 4096 home
<DIR> 4096 lib
<DIR> 4096 media
<DIR> 4096 mnt
<DIR> 4096 opt
<DIR> 4096 proc
           62 README.txt
<DIR> 4096 root
<DIR> 4096 run
<DIR> 12288 sbin
<DIR> 4096 srv
<DIR> 4096 sys
<DIR> 4096 tmp
<DIR> 4096 usr
<DIR> 4096 var

 << 讀取 MMC 中 U-Boot >>

刷新 Jetson TK1 一文中, Jetson TK1 EBT 分區起始區塊為第 8192 (0x2000) 區塊. 使用 "mmc read" 讀取 U-Boot 到 DRAM 0x90000000 位置.

Tegra124 (Jetson TK1) # mmc info
Device: Tegra SD/MMC
Manufacturer ID: 45
OEM: 100
Name: SEM16
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.5
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 8-bit

Tegra124 (Jetson TK1) # mmc read 0x90000000 0x2000 0x20

MMC read: dev # 0, block # 8192, count 32 ... 32 blocks read: OK

使用 md 指令顯示 U-Boot 在 DRAM 0x90000000 的內容.

Tegra124 (Jetson TK1) # md 0x90000000 0x20
90000000: e59ff018 e59ff018 e59ff018 e59ff018 ................
90000010: e59ff018 e59ff018 e59ff018 e59ff018 ................
90000020: 83d88060 83d88040 83d88040 83d88040 `...@...@...@...
90000030: 83d88040 83d88040 83d88040 83d88040 @...@...@...@...
90000040: ebfffffe e1a00000 e1a00000 e1a00000 ................
90000050: e1a00000 e1a00000 e1a00000 e1a00000 ................
90000060: e10f0000 e3c0001f e38000d3 e129f000 ..............).
90000070: eb000000 e1a0f00e e59fd02c e3cdd007 ........,.......

<< 讀取 USB  磁碟檔案 >>

使用 "usb start" 掃描 USB 裝置. "usb storage" 表列 USB 磁碟. "usb part" 表列 USB 磁碟分區.

Tegra124 (Jetson TK1) # usb start
(Re)start USB...
USB0: USB EHCI 1.10
scanning bus 0 for devices... 1 USB Device(s) found
USB1: USB EHCI 1.10
scanning bus 1 for devices... 2 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
scanning usb for ethernet devices... 0 Ethernet Device(s) found

Tegra124 (Jetson TK1) # usb storage
Device 0: Vendor: Sony Rev: 1.00 Prod: Storage Media
Type: Removable Hard Disk
Capacity: 7520.0 MB = 7.3 GB (15400960 x 512)

Tegra124 (Jetson TK1) # usb part

Partition Map for USB device 0 -- Partition Type: EFI

Part Start LBA End LBA Name
        Attributes
        Type GUID
        Partition GUID
1      0x00000022 0x00eaffde ""
        attrs: 0x0000000000000000
        type: 0fc63daf-8483-4772-8e79-3d69d8477de4
        guid: 237ca095-610c-49c8-ab83-8d29eced2871

使用 "ext2ls" 表列 USB 磁碟根目錄檔案.

Tegra124 (Jetson TK1) # ext2ls usb 0:1
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
           439072 u-boot-dtb-tegra.bin 

 (完) 

 

文章標籤
創作者介紹
創作者 版大 的頭像
版大

嵌入式系統

版大 發表在 痞客邦 留言(0) 人氣()