I am working on resin.io support for the Jetson TX1. I would like to better understand the partition table that is needed for the Jetson TX1, as the gnu_linux_fastboot_emmc_full.cfg contains some 21 partitions, not sure where goes what. Could anyone shed some light on the partition table?
That file is for fastboot…are you using fastboot, or U-Boot?
There is much I don’t know about any particular partition, but you can boot up your Jetson and run “sudo gdisk -l /dev/mmcblk0” to see existing partitions based on sectors. You have to actually run “sudo gdisk /dev/mmcblk0” and use the “i” option to list details for each partition one at a time if you want more detail.
The cfg files gives all sizes in 4K blocks. Running “stat /dev/mmcblk0p1” on a running Jetson shows an IO block size of 4096. The particular cfg file you mentioned shows a size of 2,097,152, so 2,097,152 blocks * 4096 bytes/block = 8,589,934,592 bytes. You would need to use the flash “-S” option if you wanted a larger partition.
When I log in to a JTX1 which was flashed with “-S 14580MiB” the rootfs (including metadata and overhead) should be 1458010241024 = 15,288,238,080 bytes…cloning rootfs would provide a file of this size, and the system.img.raw would also be this exact size. If you wanted this size in a cfg, then you’d set as 15,288,238,080 / 4096 = 3,732,480 blocks (of size 4096). Overhead means actual available space would be slightly less.
Each cfg file gives both a numeric id and a name to a partition. In “sudo gdisk /dev/mmcblk0”, if you use the “i” option to list details of a partition you’ll see a “Partition name”…this name can be used by the driver package to generically refer to a partition regardless of what numeric order it appears in. I’m unsure as to how the order of partitions (see “sudo gdisk -l /dev/mmcblk0”) relates to the numeric id when using fastboot, but the config is different for U-Boot (it’s XML). The “-k” option when flashing fastboot is based on numeric id…if you customize and flash fastboot you may want to verify the “-k” uses the numeric id of the kernel partition…the partition name in the cfg file and under the details listed via gdisk would be “LNX”…“LNX” partition exists even with U-Boot, but is not used in U-Boot…this partition is used with fastboot for storing the kernel image (thus if “LNX” is id 6 a fastboot flash would use “-k 6” option to flash.sh, and “-k” is omitted if flashing with U-Boot).
If you flash with U-Boot then “bootloader/t210ref/cfg/gnu_linux_tegraboot_emmc_full.xml” is the default config.
I have done that, the problem is that our OS is using a very specific partition table. In order: Boot_part, rootfs_partA, rootfs_partB, state_part and data_part. We usually flash internal media by creating an image of these 5 partition and then using the dd utility to burn them. Now, this will mean that a lot of the partitions described in the default partition table will disappear and I do not want to strip something that is necessary. Also we would also like to flash u-boot and I am not sure how is fastboot pointing to the partition containing the u-boot image.
Is this L4T (even if modified)? I can’t answer your question, but in L4T some of the unused partitions still seem to need to be in place (I don’t know why the LNX partition is used when U-Boot is the boot loader, but it seems to be required…somewhere some software might be expecting a certain number of partitions). It could be that T-Boot (which is the real start boot process and is wired into the Jetson) expects to hand off to a particular partition and that partition might need to be in a specific place).
Do know that in recovery mode fastboot is loaded as a kind of mini operating system environment…it is used in the flash process even when fastboot is not flashed. You’ll always see fastboot when the driver connects to the Jetson, but it won’t remain after a U-Boot version of flash.
About fastboot handing off to U-Boot…this would be chain loading and so far as I know there is no provision for chain loading from one boot loader image to another boot loader image. Perhaps this is just confusion over recovery mode operating with fastboot even when it only installs U-Boot. T-Boot hands off directly to whatever flashed boot loader is used. I don’t think you can modify T-Boot.
I know we cannot modify T-boot, but I am not sure where does t-boot expect the u-boot image blob. Where is the u-boot image flashed?
See this for some URLs of documentation:
…anything on Tegra 210 implies the tegra21x series, the Tegra 210 is specifically the Jetson TX1 module. I do not know where T-Boot itself is stored or where it gets its notion of where to find/load the boot loader which follows it.