This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: SD card bootloader placement instead of FAT-formatted partition?

Part Number: AM623


Tool/software:

the latest version of mkfs.vfat in dosfstools 4.2 has an issue where it incorrectly calculates the number of sectors (value at 0x20 in the FAT filesystem header) https://github.com/dosfstools/dosfstools/issues/165

This seems to affect AM33 and AM62 ability to corretly read the bootloader files from the FAT filesystem for SD card boot. Two questions:

1. Is it possible to use ext formatted filesystem instead of FAT32?

2. On AM33 I was writing the booloader to the sectors before the first partition like so. Is it possible to do something similar for AM62?  It appears they are written to raw offsets in a 'boot0' partition area for eMMC. 

# Write AM33 bootloader files to the SD card block device:
INSTALL_DEV=${INSTALL_DEV:-"/dev/mmcblk0"}
dd if="$BASEDIR/MLO"        of="$INSTALL_DEV" count=1 seek=1 bs=128k conv=sync,fsync,notrunc
dd if="$BASEDIR/u-boot.img" of="$INSTALL_DEV" count=2 seek=1 bs=384k conv=sync,fsync,notrunc

  • Hi Thomas,

    1. It is not possible to format a partition to ext4 in U-Boot.

    2. Yes. You can refer the section  4.1.4 How to flash eMMC and Boot with e MMC Boot. under  AM62X user guide

    software-dl.ti.com/.../How_to_emmc_boot.html

    Regards,

    Dilna K

  • 1. I was not asking if you can create an ext4 filesystem *from* u-boot which is what that snippet is referring to. I am asking if the boot partition where the bootloader resides can be ext rather than FAT.

    2. Sorry I meant can I write the bootloader to raw offsets on the SD block device, similar to the AM33, which my code snippet demonstrates above.  I understand how the eMMC is partitioned but the SD card does not have the same BOOT0 and BOOT1 layout.  If it did, that would be preferable.

  • Hi Thomsa,

    Let me check with the team internally and get back to you.

    Regards,

    Dilna K

  • Hi Thomas,

    1. Sorry for the delay. I have an internal discussion according to that the boot partition where the bootloader resides should be FAT. 

    2. Could you please clarify the second query again?

    Regards,

    Dilna K

  • 2. Could you please clarify the second query again?

    I use this to make a bootable SD card for AM33:

    # Write AM33 bootloader files to the SD card block device:
    INSTALL_DEV=${INSTALL_DEV:-"/dev/mmcblk0"}
    dd if="$BASEDIR/MLO"        of="$INSTALL_DEV" count=1 seek=1 bs=128k conv=sync,fsync,notrunc
    dd if="$BASEDIR/u-boot.img" of="$INSTALL_DEV" count=2 seek=1 bs=384k conv=sync,fsync,notrunc

    So the bootloader is written to raw offsets in the BL section of the block device instead of in a filesystem.

    For AM62, can I similarly write tiboot3.bin, tispl.bin, and u-boot.img to raw offsets on the SD card block device instead of on the FAT partition?

    Thanks.

  • Hi Thomas,

    AM62 support SD-card boot in raw-mode. The ROM tries to boot the image from RAW OFFSET of 0x0.

    Usually incase of AM62 for SD-card boot we have use create-sdcard.sh script. which create FAT type boot partition and write  tiboot3.bin, tispl.bin, and u-boot.img images into boot partition.

    Regards,

    Dilna K

  • Hey that's helpful, thank you!  Can you please provide the raw offsets for each of:

    • tiboot3.bin
    • tispl.bin
    • u-boot.img

    Thanks!

  • Hi, 

    The expert is currently out of office until the end of this week, please expect a delay in response. Feel free to ping this thread if you don't receive a response by Monday.

    Regards,

    Johnson

  • Hi Thomas,

    Sorry for the delay in response. I was out of office.

    I had a further discussion with our MMC/SD expert they had an opinion that, The partition table is stored at 0x0 offset which conflicts with the tiboot3.bin offset so RAW boot is not practical for SD card.

    In case of eMMC, we have dedicated RAW boot partitions. So, the U-Boot images are flashed here and the Linux filesystem is stored in the different hardware partition. So, it's possible.

    Regards,

    Dilna K

  • Ok thank you for looking into this and answering my question.