2.2. Create a Linux Bootable SD Card

The simplest way to boot Linux is through a micro SD card flashed with a bootable Linux image. In this section, we will present two methods to create a micro SD card with a Linux image.

Warning

The prebuilt SD card WIC images provided in AM64x Processor SDK v8.4 by default will boot on TMDS64EVM and SK-AM64B, which have AM64x SR2.0 on it.

The SD card, after being flashed using one of the following methods, can be modified to boot on TMDS64GPEVM and SK-AM64 which have AM64x SR1.0. Please refer to Boot SD card on AM64x SR1.0 below for the modification procedure.

2.2.1. Create SD Card Using balenaEtcher

This method uses a popular GUI based tool, balenaEtcher, to write the Linux image to an SD card. It works on any platform (MS Windows, Linux, or Apple macOS). Please refer to the EVM Quick Start Guide provided in What is Needed to Evaluate Linux? for how to create an SD card using balenaEtcher.

2.2.2. Create SD Card Using Command Line

This method uses Linux command line and the bmap tool to create an SD card with a Linux image. Follow the steps given below to flash the SD card:

  1. Install the bmap tool if it’s not already installed:

    $ sudo apt-get install bmap-tools
    
  2. Insert a micro SD card to an SD card reader and plug the SD card reader into a Linux PC.

  3. Unmount the SD card. Find the device name of the SD card using command “lsblk”, and then use command “umount” to unmout the SD card.

    For example, if command “lsblk” returns:

    $ lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    :
    sdc      8:32   1    15G  0 disk
    ├─sdc1   8:33   1 131.8M  0 part /media/localUser/boot
    └─sdc2   8:34   1 765.9M  0 part /media/localUser/root
    

    Then unmount sdc1 and sdc2 (the actual device name may be different on your Linux host):

    $ sudo umount /media/localUser/boot
    $ sudo umount /media/localUser/root
    $ lsblk
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    :
    sdc      8:32   1    15G  0 disk
    ├─sdc1   8:33   1 131.8M  0 part
    └─sdc2   8:34   1 765.9M  0 part
    
  4. Flash the SD card with the Linux WIC image using the bmap tool. Make sure to use the correct image name and device name:

    $ sudo bmaptool copy --nobmap tisdk-default-image-am64xx-evm.wic.xz /dev/sdc
    

    Option “–nobmap” is used here to avoid needing to provide a bmap file.

Boot SD card on AM64x SR1.0

The SD card flashed using one of the methods above will boot AM64x SR2.0, but not AM64x SR1.0. AM64x SR2.0 and SR1.0 use different tiboot3.bin binaries. The SD card first partition has both binaries but uses SR2.0 tiboot3.bin as the default. Using the following procedure to make SR1.0 tiboot3.bin as the default will make the SD card to boot on AM64x SR1.0.

Plug the flashed SD card to Linux or Windows host. The SD card first partition should have the following files.

tiboot3-am64x-gp-evm.bin      tiboot3.bin  u-boot.img  wificfg
tiboot3-am64x_sr2-hs-evm.bin  tispl.bin    uEnv.txt

where tiboot3-am64x-gp-evm.bin is the SR1.0 tiboot3.bin binary, and tiboot3.bin is the SR2.0 tiboot3.bin binary.

Now rename tiboot3.bin to something else, for example, tiboot3-am64x-hsfs.bin, and rename tiboot3-am64x-gp-evm.bin to tiboot3.bin. Then unmount/eject the SD card. It is ready to boot AM64x SR1.0 EVM now.