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.

66AK2G12: Linux SD card does not boot up

Part Number: 66AK2G12

Hi,

My customer reported an issue using SD card boot with Linux SDK.

HW: K2GEVM
SW: SDK Linux 06_03_00_106

Customer made SD card for boot following description in below document.
https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Overview/Processor_SDK_Linux_create_SD_card_script.html
Script log is attached.

$ sudo ./create-sdcard.sh

################################################################################

This script will create a bootable SD card from custom or pre-built binaries.

The script must be run with root permissions and from the bin directory of
the SDK

Example:
 $ sudo ./create-sdcard.sh

Formatting can be skipped if the SD card is already formatted and
partitioned properly.

################################################################################


Available Drives to write images to:

#  major   minor    size   name
1:   8        0 1000204632 sda
2:   8       48   15588352 sdd

Enter Device Number or n to exit: 2

sdd was selected

/dev/sdd is an sdx device
Current size of sdd1 2295 bytes
Current size of sdd2 15585547 bytes

################################################################################

        Select 2 partitions if only need boot and rootfs (most users).
        Select 3 partitions if need SDK & other content on SD card.  This is
        usually used by device manufacturers with access to partition tarballs.

        ****WARNING**** continuing will erase all data on sdd

################################################################################

Number of partitions needed [2/3] : 2


Now partitioning sdd with 2 partitions...


################################################################################

                Now making 2 partitions

################################################################################

1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.429287 s, 2.4 MB/s
DISK SIZE - 15962472448 bytes
Warning: The resulting partition is not properly aligned for best performance: 1s % 2048s != 0s
Warning: The resulting partition is not properly aligned for best performance: 4591s % 2048s != 0s

################################################################################

                Partitioning Boot

################################################################################
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
WARNING: Not enough clusters for a 32 bit FAT!

################################################################################

                Partitioning rootfs

################################################################################
mke2fs 1.45.5 (07-Jan-2020)
/dev/sdd2 contains a ext3 file system labelled 'rootfs'
        last mounted on Wed Jan 27 20:52:03 2021
Proceed anyway? (y,N) y
Creating filesystem with 3896386 4k blocks and 974848 inodes
Filesystem UUID: f03870b4-458a-4700-a547-38ab69f19bc3
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks):
done
Writing superblocks and filesystem accounting information: done



################################################################################

   Partitioning is now done
   Continue to install filesystem or select 'n' to safe exit

   **Warning** Continuing will erase files any files in the partitions

################################################################################


Would you like to continue? [y/n] :

Please enter y or n
Would you like to continue? [y/n] : y



Mount the partitions

Emptying partitions


Syncing....

################################################################################

        Choose file path to install from

        1 ) Install pre-built images from SDK
        2 ) Enter in custom boot and rootfs file paths

################################################################################

Choose now [1/2] : 1


Will now install from SDK pre-built images
now installing:  ti-processor-sdk-linux-k2g-evm-06.03.00.106

################################################################################

   Multiple rootfs Tarballs found

################################################################################

         1:tisdk-server-rootfs-image-k2g-evm.tar.xz
         2:tisdk-docker-rootfs-image-k2g-evm.tar.xz

Enter Number of rootfs Tarball: 1

################################################################################

        Copying files now... will take minutes

################################################################################

Copying boot partition



MLO copied


u-boot.img copied


Copying rootfs System partition



Syncing...

Un-mount the partitions

Remove created temp directories

Operation Finished

Customer used this SD card for boot, but nothing is displayed on terminal console.

FYI, if customer created SD card with below prebuild binary, it worked fine.
Initialization logs are displayed on terminal and Linux prompt is shown.
https://software-dl.ti.com/processor-sdk-linux/esd/K2G/latest/exports/k2g-evm-linux-06.03.00.106.img.zip

Anything is missing in this SD card creating process?

Thanks and regards,
Koichiro Tashiro

  • Hello Tashiro-san,

    The customer's steps look correct. However, I do not usually see the warnings that the customer observed:
    "Warning: The resulting partition is not properly aligned for best performance".

    I do not have a K2G EVM to run tests on at the moment. Let's see if we can get another TI engineer to check if the create-sdcard.sh output works on their board.

    Regards,

    Nick

  • Hello Tashiro-san,

    Ok, I have confirmation that the Linux Processor SDK 6.3 create-sdcard.sh output was able to boot as expected on an unmodified K2GEVM. So I suspect something funny happened either with the SD card, or with the board.

    1) Was the board observed booting from SD card image you linked above after the create-sdcard.sh attempt? If not, please try it and verify that the SD card is the boot media used during booting. That way we can ensure that the board is still working as expected.

    2) Can the customer try again with a different SD card? If a different SD card still does not work, are they seeing the exact same warnings from create-sdcard.sh as with the first SD card?

    Regards,

    Nick

  • Dear Nick,

    > 1) Was the board observed booting from SD card image you linked above after the create-sdcard.sh attempt?
    The board is not booted from the SD card which is created by the create-sdcard.sh of
    <software-dl.ti.com/.../ti-processor-sdk-linux-rt-k2g-evm-06.03.00.106-Linux-x86-Install.bin>.

    However, the board is booted from the same SD card which k2g-evm-linux-rt-06.03.00.106.img of <software-dl.ti.com/.../k2g-evm-linux-rt-06.03.00.106.img.zip> is written by Win32 Disk Imager according to the guide <software-dl.ti.com/.../Processor_SDK_Linux_Creating_a_SD_Card_with_Windows.html>.

    > 2) Can the customer try again with a different SD card?
    No, I don't have a different SD card, so I can't try.

    Best regards,

    T. Y

  • Hello TY,

    Ok, we have tried both Linux 6.3 and RT Linux 6.3 create-sdcard.sh. Both worked as expected on our end.

    1) Have you verified that the board still works? (e.g., did you successfully boot with the SD card created with the .img file AFTER nothing happened with the create-sdcard.sh SD card?)

    2) When you run the create-sdcard.sh script again, do you see the same warnings? What size are the two partitions on the SD card after you run the create-sdcard.sh script?

    for example, this is what my SD card looks like after I run create-sdcard.sh:

    $ sudo fdisk -l /dev/sdc
    Disk /dev/sdc: 14.9 GiB, 15931539456 bytes, 31116288 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0xbfb1543c

    Device     Boot  Start      End  Sectors  Size Id Type
    /dev/sdc1  *      2048   145407   143360   70M  c W95 FAT32 (LBA)
    /dev/sdc2       145408 31084543 30939136 14.8G 83 Linux

    Regards,

    Nick