How can I reset the whole eMMC (TK1 variant with 16GB) for debugging purposes? I thought about adding some u-boot command emmc_full_erase
by adding it to flash_eth.scr (I transmit via eth), generating u-boot script (flash_eth.img) from it by running mk-u-boot-scripts.sh
and making it accessible in u-boot with Apalis TK1 # run setupdate
.
You could do that with the mmc erase blk# cnt
U-Boot command. Keep in mind that the eMMC also has two hardware area boot partitions the first of which containing U-Boot, its environment as well as the Toradex factory configuration block. One can switch the hardware area partition with the mmc dev [dev] [part]
U-Boot command which would have to be executed prior to any other mmc related commands. Use the mmc info
U-Boot command to find out about the sizes of resp. hardware area boot partitions.
You could do that with the
mmc erase blk# cnt
U-Boot command.
I know about the command but I am missing the parameters (start, size).
Keep in mind that the eMMC also has two hardware area boot partitions the first of which containing U-Boot, its environment as well as the Toradex factory configuration block.
The partitions which I read from partition 0 of the eMMC (dev 0) have been created by me. (The only partition table I am able to read.)
Apalis TK1 # mmc dev 0 0
switch to partitions #0, OK
mmc0(part 0) is current device
Apalis TK1 # mmc part
Partition Map for MMC device 0 -- Partition Type: DOS
Part Start Sector Num Sectors UUID Type
1 8192 32768 0006423e-01 0c
2 40960 12288000 0006423e-02 83
3 12328960 12288000 0006423e-03 83
4 24616960 7417856 0006423e-04 83
Do you mean Tegra SD/MMC: 1
(u-boot, u-boot environment) and Tegra SD/MMC: 2
(Toradex factory configuration block)?
Apalis TK1 # mmc list
Tegra SD/MMC: 0 (eMMC)
Tegra SD/MMC: 1
Tegra SD/MMC: 2
Use the mmc info U-Boot command to find out about the sizes of resp. hardware area boot partitions.
From my output the size of the hardware boot partitions is not obvious for me:
Apalis TK1 # mmc info
Device: Tegra SD/MMC
Manufacturer ID: 11
OEM: 100
Name: 016G3
Tran Speed: 52000000
Rd Block Len: 512
MMC version 4.0
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
For your partitions I guess you should know the offsets and sizes.
No, mmc list
only shows the devices being eMMC, 8-bit and 4-bit MMC/SD card slots and has nothing to do with the hardware area partition stuff.
The hardware area boot partition size may only be printed in the latest U-Boot 2016.11 we are about to release. Otherwise you may have to revert to read probing like we do in the config block migration of our regular U-Boot update scripts on T20/T30.
Right, for my partitions I know it. Ok, I use U-boot 2015.04. Where can I find the T20/T30 update scripts and the relevant sections? (What about conf_blk_offset
in the TK1 update script?)
Yes, that’s exactly what I am talking about.
There is an article for the Apalis TK1 SOM on developer.toradex.com / how to erase emmc flash memory now.
Thanks for reading the article. Is your problem got solved?