工具/软件:
以下是我进入 u-boot 环境后执行的步骤
=> MMC 列表
MMC@fa10000:0 (eMMC)
MMC@fa00000:1.
=> MMC dev 0
切换到分区#0、确定
mmc0 (第0部分)是当前设备
已尝试清除分区表数据、失败
=> MMC 写入0 0x22
MMC 写入:dev # 0、块# 0、count 34……sdhci_transfer_data:transfer data t
MMC 写入失败
0块写入:错误
这是 eMMC 信息
=> MMC 信息
设备:MMC@fa10000
制造商 ID:13
OEM:4e.
名称:G1M15L
总线速度:200000000
模式:HS200 (200MHz)
Rd Block Len:512
MMC 版本5.1
高容量:是
容量:29.6 GB
总线宽度:8位
擦除组大小:512KiB
HC WP 组大小:8 MIB
用户容量:29.6 GiB WRREL
启动容量:31.5 MIB 加强版
RPMB 容量:4 MIB 加强版
已尝试对 eMMC 进行分区和写入
=> setenv uuuid_gpt_disk 858b79ff-605c-413d-9b37-a4fa34aa9e1d
=> setenv uuuid_GPT_boot 1dc2a05a-7801-4a5a-9624-ca7d84757352
=> setenv uuid_GPT_rootfs 853f35d9-d517-4865-8829-b205f336f0ca
=> setenv 分区"uuid_disk=${uuid_gpt_disk};\
>name=boot、start=32MiB、size=128MiB、uuid=${uuuid_gp_boot};\
>name=rootfs、start=160MiB、size=-、uuid=${uuid_gp_rootfs}"
=> GPT 写入 MMC 0 ${partitions}
GPT - GUID 分区表
用法:
GPT
- GUID 分区表恢复和有效性检查
恢复或验证所连接设备上的 GPT 信息
难以连接
用例:
GPT 维修 MMC 0
-维修设备上的 GPT
GPT 写入 MMC 0 $partitions
-将 GPT 写入设备
GPT 验证 MMC 0 $partitions
-对照$partitions 验证设备上的 GPT
gpt setenv MMC 0 $name
-为分区$name 设置环境变量:
gpt_partition_addr、gpt_partition_size、
GPT_partition_name、GPT_partition_entry、
gpt_partition_bootable
GPT 枚举 MMC 0
-将分区列表存储到 GPT_partition_list 环境变量
GPT guid
-打印磁盘 GUID
GPT guid
-将环境变量设置为磁盘 GUID
用例:
GPT guid MMC 0
GPT guid MMC 0变量名
复位后、重新进入 u-boot、
发现只有一个 rootfs 分区、没有引导分区
=> MMC dev 0
切换到分区#0、确定
mmc0 (第0部分)是当前设备
=> MMC 器件
MMC 设备0的分区映射--分区类型:EFI
零件开始 LBA 结束 LBA 名称
Attributes
键入 GUID
分区 GUID
1 0x00001000 0x03b47fde "rootfs"
属性:0x0000000000000000
类型:ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
GUID:1dc2a05a-7801-4a5a-9624-ca7d84757352