Other Parts Discussed in Thread: AM623
Goal: partition eMMC flash to support RAW boot (tiboot3, etc), then the backup RAW boot at 0x40 0000
First cut of flash division. sectors are 512bytes +-------------- @0x0 0000 0000 - primary eMMC location + tiboot3.bin, tispl.bin, u-boot.img etc... size=0x40 0000 (sectors=8192) +-------------- @0x0040 0000 - backup eMMC location + tiboot3.bin, tispl.bin, u-boot.img etc... size=0x40 0000 (sectors=8192) +-------------- @0x0 0080 0000 - begining rootfs (PING) + rootfs etc.. (sectors=15539695) +-------------- @0x1 DABB DE00 - begining rootfs (PONG) + rootfs etc.. (sectors=15539695) +-------------- @0x3 B4F7 BBFF - end rootfs (PONG) I believe I can create 4 partitions. If I offset the partitions to account for RAW At the beginning. The rootfs could be broken out to 4 partitions starting with PING: (PONG NOT shown +-------------- @0x0080 0000 - begining Image (PING) + Image, dtb.. (sectors=15539695/2-1) +-------------- @0xsensible - begining RFS (PING) + rootfs etc.. (sectors=15539695/2-1) +-------------- @0xsensible - end RFS (PING)
What is difference between hwpartion, and gpt partitions?
Is the first RAW partition an actual partition?
For eMMC, are the next two partitions be rootfs only partitions ext4?
That is a53/u-boot.bin is loaded to
In working to test this I cleared the eMMC via:
mmc erase 0 31080414 -- This should set eMMC flash to all. Count was based on creating a single partition and looking at the last LBA sector.
=> mmcinfo Device: mmc@fa10000 Manufacturer ID: 13 OEM: 4e Name: S0J56X Bus Speed: 200000000 Mode: HS200 (200MHz) Rd Block Len: 512 MMC version 5.1 High Capacity: Yes Capacity: 14.8 GiB Bus Width: 8-bit Erase Group Size: 512 KiB HC WP Group Size: 8 MiB User Capacity: 14.8 GiB WRREL Boot Capacity: 31.5 MiB ENH RPMB Capacity: 4 MiB ENH Boot area 0 is not write protected Boot area 1 is not write protected
uEnv.txt mods
cmd_0=mmc dev 0
# Erase the device, prep for future writes.
cmd_1a=mmc erase 0 31080414
cmd_1b=setenv uuid_gpt_disk e1402411-be20-4dc6-a229-915e6bd66f33
cmd_1c=setenv uuid_gpt_rootfs e7dbd504-c47a-493d-a1d4-aa34686b4b5b
cmd_1d=setenv partitions "uuid_disk=${uuid_gpt_disk};name=rootfs,start=16384,size=15539695,uuid=${uuid_gpt_rootfs}"
cmd_1e=gpt write mmc 0 $partitions
cmd_1f=emmc part
# See what we have
cmd_1g=setenv uuid_gpt_rootfs 93e4c649-cb27-4c27-ab7f-eb65a9ec348c
cmd_1h=setenv partitions "uuid_disk=${uuid_gpt_disk};name=rootfs,start=15540719,size=15539695,uuid=${uuid_gpt_rootfs}"
cmd_1i=gpt write mmc 0 $partitions
cmd_1j=emmc part
# See what we have
However after erasing flash I attempted the above commands:
=> setenv uuid_gpt_disk e1402411-be20-4dc6-a229-915e6bd66f33
=> setenv uuid_gpt_rootfs e7dbd504-c47a-493d-a1d4-aa34686b4b5b
=> setenv partitions "uuid_disk=${uuid_gpt_disk};name=rootfs,start=16384,size=15539695,uuid=${uuid_gpt_rootfs}"
=> gpt write mmc 0 $partitions
Writing GPT: error!
=> mmc part
## Unknown partition table type 0
=> mmc info
Device: mmc@fa10000
Manufacturer ID: 13
OEM: 4e
Name: S0J56X
Bus Speed: 200000000
Mode: HS200 (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.8 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.8 GiB WRREL
Boot Capacity: 31.5 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
=> gpt repair mmc 0
Repairing GPT: sdhci_transfer_data: Transfer data timeout
error!
=>
I'm not sure how to recover from this.
Is there a good explanation of how to recover from this state?
- mmc hwpartion commands - examples of
- mmc hwpartition <USER> <GP> <MODE> - does hardware partitioning
arguments (sizes in 512-byte blocks):
USER - <user> <enh> <start> <cnt> <wrrel> <{on|off}>
: sets user data area attributes
GP - <{gp1|gp2|gp3|gp4}> <cnt> <enh> <wrrel> <{on|off}>
: general purpose partition
MODE - <{check|set|complete}>
: mode, complete set partitioning completed
- mmc hwpartition <USER> <GP> <MODE> - does hardware partitioning
- gpt and related commands
What is the easiest recovery mechanism?
The goal here is for factory programming of the initially blank eMMC, or in the case of RMAs to erase the flash to a fresh state before creating partitions and downloading images.
Thanks