8GB eMMC partitionning

Hi All,
I’d to flash an L4T image to my custom board (very similar to the Jetson TK1) which is populated with a micron 8GiB eMMC.
Could you please tell what are the files i need to modify and which is the right parameters for the /flash.sh utility ?
I did few tests with a custom config file (by modifying EMMCSIZE & ROOTFSSIZE) similar to the jetson tk1.
The programming works well but u-boot is not able to parse the partitions table (Unknown partition table)
Any help will be very appreciated.
BR,
Greg

I’m wondering if more information might be found by attempting to clone the partition table on your hardware. If I were to clone from a Jetson from an R21.4 L4T directory “Linux_for_Tegra”, I would do something like this

bootloader/nvflash --getpartitiontable "table_clone.cfg" --bl bootloader/ardbeg/fastboot.bin --go

…this will tell you if the 3pserver believes there is a partition table, and if so, what it contains. Assuming the table is readable, you could compare this to a table clone of an actual Jetson for clues.

Hi

I have recently made changes to the flash.cfg to add an additional partition to my emmc. As soon as I made some mistakes the “mkgpt” binary threw an error, but the flashing would not start then. My assumption is that you might be using a wrong emmc size for your gpt.

Changing the two values EMMCSIZE and ROOTFSSIZE should be fine. Just make sure that the ROOTFSSIZE is 734003200 smaller than the EMMCSIZE so the other 19 partitions still fit.

Hi linuxdev,
Thanks for your feedback.
Below the difference between the default jetson-tk1 partition table and my partition table:

##############################################################
Name=APP
DeviceId=18
StartSector=13824
-NumSectors=3670016
+NumSectors=1745408
BytesPerSector=4096

PartitionId=13
Name=DTB
DeviceId=18
-StartSector=3683840
+StartSector=1759232
NumSectors=1024
BytesPerSector=4096

@@ -97,7 +97,7 @@
PartitionId=14
Name=EFI
DeviceId=18
-StartSector=3684864
+StartSector=1760256
NumSectors=16384
BytesPerSector=4096

@@ -105,7 +105,7 @@
PartitionId=15
Name=USP
DeviceId=18
-StartSector=3701248
+StartSector=1776640
NumSectors=1024
BytesPerSector=4096

@@ -113,7 +113,7 @@
PartitionId=16
Name=TP1
DeviceId=18
-StartSector=3702272
+StartSector=1777664
NumSectors=1024
BytesPerSector=4096

@@ -121,7 +121,7 @@
PartitionId=17
Name=TP2
DeviceId=18
-StartSector=3703296
+StartSector=1778688
NumSectors=1024
BytesPerSector=4096

@@ -129,7 +129,7 @@
PartitionId=18
Name=TP3
DeviceId=18
-StartSector=3704320
+StartSector=1779712
NumSectors=1024
BytesPerSector=4096

@@ -137,7 +137,7 @@
PartitionId=19
Name=WB0
DeviceId=18
-StartSector=3705344
+StartSector=1780736
NumSectors=512
BytesPerSector=4096

@@ -145,15 +145,15 @@
PartitionId=20
Name=UDA
DeviceId=18
-StartSector=3705856
-NumSectors=142848
+StartSector=1781248
+NumSectors=131072
BytesPerSector=4096

PartitionId=21
Name=GPT
DeviceId=18
-StartSector=3848704
+StartSector=1912320
NumSectors=512
BytesPerSector=4096

##############################################################
I suspect a difference between boot partition size.
In the jetson-tk1 config file, BOOTPARTSIZE=8388608.
The 16GB Sandisk eMMC mapping indicates 2x1MB BOOT PARTITION and 1x2MB RPMB partition.
i don’t understand the mapping between eMMC and the partition described by the “gnu_linux_fastboot_emmc_full.cfg” file
Is there a good documentation about eMMC partitionning and mkgpt utility ?
BR,
Greg

So obviously your partition table is there, and it is writing to the memory. The message about not being able to read the table has several possible causes, but memory error is not one of them since you know table read is working.

One cause might be that the boot loader is looking in the wrong place. I’m not positive on this, but I think the boot loaders provided with L4T R21.x probably expect this to start at a specific offset; if reading via partition labels, you’re ok, if reading by offset, then the location of the table itself would matter. Unfortunately, I don’t know which partition “Name” goes with the partition table (perhaps “PT” means “partition table”?). Due to the diff output, you know the table itself has to be somewhere different than where it is in the default partition scheme. I suspect that the boot loader expecting this table to be in a different place is the fault. Someone knowing more about the boot loader would have to answer. Please verify which boot loader you use…it appears you use fastboot, but I’m not sure.

A second cause could be that the boot loader itself is truncated. I consider this possibility to be trivial, but if the code to find the boot loader table were truncated and somehow other code survived simply to understand that the table was not loaded, then you would have the same problem as not finding the table for other reasons.

There is a detail about the mechanics of the boot loader install which might be useful to know. The provided boot loaders have the suffix “.bin”, and normal flash has a reference copy in “bootloader/ardbeg/.bin", which is copied to "bootloader/.bin” during a flash. What isn’t obvious is that [at least in the case of u-boot] the binary file copy of the reference may be altered. Check the timestamps of the copies and you should see the time of flash. Check the sha1sum of copies plus originals, and you may not get an exact copy (file sizes may also differ slightly). I’m not positive, but the change between reference file and copied boot loader is likely due to changes in options for partition table reading.

Can anyone verify if the boot loaders search for a partition table via partition label versus physical offset address?

Hi,
The problem comes from the eMMC parameters (BOOTPARTSIZE, …).
More info in this document “Platform Adaptation and Bring-Up Guide” (Page 6 & 7)
Greg

1 Like

What is your calculated size?

I am using a Toradex SOM, however there is no debugging information on the serial console when it is being flashed.

@linuxdev Do you have any idea how to enable the debugging log for fastboot.bin?

Hello, @grp62
How did you solve the mkgpt issue with BOOTPARTSIZE=66060288,

creating gpt(ppt.img)…
Error: Invalid bootpart size(66060288)
creating gpt(ppt.img) failed.

Thank you!!!

Sorry, I do not know specifics of adding serial console output to fastboot. Bootloaders typically need to be recompiled to change options. By default the software used on the reference design dev kits would have this enabled at the earliest possible point, but Toradex would have likely changed this. Toradex does provide fairly thorough documentation though, and source code, and so the answer is probably there in their documentation.