Can TegraBoot load u-boot from external sd card?

Using SD cards to test different installs is great however I’m working with multiple versions of u-boot(since l4t doesn’t support latest uboot and latest kernel doesn’t support old uboot) so while I can have a different linux install on SD cards I still need to reflash uboot to mmc0 between switches. Is it possible to get TegraBoot to load u-boot from mmc1 (external sd card)? I tried simply copying mmc0 to mmc1 and then erasing mmc0 however TegraBoot failed to locate a bootloader.

The partition from which U-Boot tries to find the extlinux.conf is based on the flash.sh command line (JetPack is a front end to this). mmcblk0p1 is the first partition of eMMC, mmcblk1p1 is the first partition of SD card. An example flash to each:

# eMMC:
sudo ./flash.sh -S 14580MiB jetson-tx1 mmcblk0p1
# SD card:
sudo ./flash.sh -S 14580MiB jetson-tx1 mmcblk1p1

This is how you tell U-Boot where to find extlinux.conf. The above also puts rootfs on the same partition as extlinux.conf, but this can be changed.

What you seem to be interested in is moving the U-Boot binary itself to the SD card. I’m not sure if you can do that. The U-Boot binary normally is in a hidden GPT partition on eMMC. I don’t know if T-Boot looks for this by label or by fixed convention…if by label you might have a simple solution by adding a GPT partition of the same label on the SD card and removing the GPT partition on eMMC (I’m guessing that if a label is used then T-Boot has a search order…if that is the case and if eMMC is searched first, then it would make sense that label must not exist on the hidden eMMC partition for T-Boot to move on to SD card…but this is all purely guessing).

Does anyone from NVIDIA know if T-Boot searches for the U-Boot binary via GPT partition label? If so, is there a list of devices to search for? Can T-Boot search environment be modified during flash?

Yes, I’m looking at installing the u-boot binary itself on the SD card. According to the serial logs Tegra Boot searches for GPT then searches for PT. However I did try erasing the blocks with the partition table on mmc0 yet tegraboot still somehow found u-boot on mmc0. To verify that my erasing was working I erased the section that contains u-boot and Tegra Boot then failed to find a valid bootloader.

If it really does search for a label, then changing the label might do a better job…perhaps label is still present after other erase.

That is true, I forgot that GPT has a secondary partition table at the end of the disk. I tried changing all the partition names (there aren’t any labels) and it did indeed fail to boot past TegraBoot:

[0000.290] Using GPT Primary to query partitions
[0000.295] GPT: Partition NOT found !
[0000.298] Find Partition via GPT Failed
[0000.302] Find Partition via PT Failed
[0000.305] function NvTbootGetBinaryOffsets: 0x1 error
[0000.310] Error in NvTbootLoadBinary: 0x1 !
[0000.314] GPT: Partition NOT found !
[0000.318] Find Partition via GPT Failed
[0000.321] Find Partition via PT Failed
[0000.325] function NvTbootGetBinaryOffsets: 0x1 error
[0000.329] Error in NvTbootLoadBinary: 0x1 !
[0000.333] Error is 1

I do have the exact same partitions with the same names on the SD card… I’m guessing something in the BootConfigTable tells it to look for a named partition first on GPT and then on PT on mmc0. If anyone has any experience with this please do share, there must be a way to tell TegraBoot to look at mmc1

What you are trying to achieve is not possible but to speed up flashing you can use the command

sudo ./flash.sh -k EBT jetson-tx1 mmcblk0p1