Created
February 7, 2022 11:58
-
-
Save piratecarrot/74331b06a7303404a0793533de38672f to your computer and use it in GitHub Desktop.
Updating MMC device with file loaded over TFTP all within u-boot - STM32MP157F-DK2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STM32MP> mmc part | |
Partition Map for MMC device 0 -- Partition Type: EFI | |
Part Start LBA End LBA Name | |
Attributes | |
Type GUID | |
Partition GUID | |
1 0x00000022 0x00000221 "fsbl1" | |
attrs: 0x0000000000000000 | |
type: 8da63339-0007-60c0-c436-083ac8230908 | |
guid: 8ef917d1-2c6f-4bd0-a5b2-331a19f91cb2 | |
2 0x00000222 0x00000421 "fsbl2" | |
attrs: 0x0000000000000000 | |
type: 8da63339-0007-60c0-c436-083ac8230908 | |
guid: 77877125-add0-4374-9e60-02cb591c9737 | |
3 0x00000422 0x00001421 "ssbl" | |
attrs: 0x0000000000000000 | |
type: 8da63339-0007-60c0-c436-083ac8230908 | |
guid: b4b84b8a-04e3-48ae-8536-aff5c9c495b1 | |
4 0x00001422 0x00021421 "bootfs" | |
attrs: 0x0000000000000004 | |
type: 0fc63daf-8483-4772-8e79-3d69d8477de4 | |
type: linux | |
guid: 35219908-c613-4b08-9322-3391ff571e19 | |
5 0x00021422 0x00029421 "vendorfs" | |
attrs: 0x0000000000000000 | |
type: 0fc63daf-8483-4772-8e79-3d69d8477de4 | |
type: linux | |
guid: 8e123a33-e3d3-4db9-92f4-d3ebd9b3224f | |
6 0x00029422 0x0019e421 "rootfs" | |
attrs: 0x0000000000000000 | |
type: 0fc63daf-8483-4772-8e79-3d69d8477de4 | |
type: linux | |
guid: e91c4e10-16e6-4c0e-bd0e-77becf4a3582 | |
7 0x0019e422 0x01dacbdc "userfs" | |
attrs: 0x0000000000000000 | |
type: 0fc63daf-8483-4772-8e79-3d69d8477de4 | |
type: linux | |
guid: 02a90af2-5d1c-4a29-9177-97a513e3cae4 | |
STM32MP> ext4ls mmc 0:5 | |
<DIR> 1024 . | |
<DIR> 1024 .. | |
<DIR> 12288 lost+found | |
<DIR> 1024 lib | |
STM32MP> setenv ipaddr 192.168.1.10 | |
STM32MP> tftp ${loadaddr} image.ext4 | |
Using ethernet@5800a000 device | |
TFTP from server 192.168.1.1; our IP address is 192.168.1.10 | |
Filename 'image.ext4'. | |
Load address: 0xc0000000 | |
Loading: ################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
################################################################# | |
###################################### | |
10.5 MiB/s | |
done | |
Bytes transferred = 16777216 (1000000 hex) | |
STM32MP> setexpr fs ${filesize} + 1ff | |
STM32MP> setexpr fs ${fs} / 200 | |
STM32MP> mmc write ${fileaddr} 0x00021422 ${fs} | |
MMC write: dev # 0, block # 136226, count 32768 ... 32768 blocks written: OK | |
STM32MP> ext4ls mmc 0:5 | |
<DIR> 1024 . | |
<DIR> 1024 .. | |
<DIR> 12288 lost+found | |
<DIR> 1024 lib | |
25 my-content-test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment