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.

AM3358: Create-sdcard.sh issue

Part Number: AM3358

I have tried multiple times to install the SDK on sdcard using sudo ./create_sdcard.sh as per the instructions provided in the Getting Started Guide. 

I have also followed along a u-tube tutorial which follows the exact same steps. I have tried on two different brand new SanDisk 16Gb sd cards and the result is always the same. Cannot boot my AM3358 Starter Kit .

If I try to check the file contents in the file explorer I get the following message on the rootfs partition: Error mounting /dev/sdb2 at /media/edward/rootfs: mount (2) system call failed: structure needs cleaning

I am using a linux host machine with unbuntu 18.04 LTS and sdk 06.01.08.00

I cannot find any solutions on the forum, and according to the user guide my system is compatible

Could you please advise on what the potential issue is and how I can fix this, Would love to get this resolve so I can move onto creating a custom image. I have included the output from the terminal below. 

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

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 16 15975424 sdb

Enter Device Number or n to exit: 1

sdb was selected

/dev/sdb is an sdx device
Unmounting the sdb drives
unmounted /dev/sdb1
Current size of sdb1 71680 bytes
Current size of sdb2 15886336 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 sdb

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

Number of partitions needed [2/3] : 2


Now partitioning sdb 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.460311 s, 2.3 MB/s
DISK SIZE - 16358834176 bytes

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

Partitioning Boot

################################################################################
mkfs.fat 4.1 (2017-01-24)
mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
mkfs.vfat: unable to open /dev/sdb1: No such file or directory

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

Partitioning rootfs

################################################################################
mke2fs 1.44.1 (24-Mar-2018)
/dev/sdb2 contains a ext3 file system labelled 'rootfs'
last mounted on Sun Mar 15 17:37:48 2020
Proceed anyway? (y,N) y
Creating filesystem with 3971584 4k blocks and 993568 inodes
Filesystem UUID: c86fad17-72b1-484a-b26f-4e8c358ef285
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] : y



Mount the partitions
mount: /home/edward/ti-processor-sdk-linux-am335x-evm-06.01.00.08/bin/rootfs: mount(2) system call failed: Structure needs cleaning.

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-am335x-evm-06.01.00.08

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

Multiple rootfs Tarballs found

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

1:tisdk-rootfs-image-am335x-evm.tar.xz
2:tisdk-docker-rootfs-image-am335x-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
umount: rootfs: not mounted.

Remove created temp directories

Operation Finished

  • Hello,

    Do you get any console output from the SK when you try to boot from the SD Card? If so, can you please provide that? Preferably, can you attach it as a .txt file to your post. It is easier to read and search that way.

    Thanks.

  • Ron, 

    I have not connected the device to my computer to receive any console output as I am still trying to create and boot from SDCard at this stage, I have not managed to get to the next step as per the Getting Started Guide. 

    As far as any output on the SK display, nothing shows up, when I try to boot from the SDCard nothing happens and nothing appears on the display. The only led that lights up is the power led, there is no activity from the SDCard led. The original SDCard provided works fine. The only error message I am getting is: 

    mount: /home/edward/ti-processor-sdk-linux-am335x-evm-06.01.00.08/bin/rootfs: mount(2) system call failed: Structure needs cleaning. 

    This appears in the terminal output that I provided in the original post. Also if I try to check the SDCard content in file explorer I get the same message: mount(2) system call failed: Structure needs cleaning. 

    The partition sizes also do not appear to make sense, the first partion (boot) is around 70Mb, while the Rootfs partition on the SDCard when I check is over 15Gb. I don't know if this information helps. 

    I have run the check setup script and no errors reported there. 

    KR,

    Ed. 

  • Hi Edward,

    I never saw some of the messages in your log before and not sure what those warning messages mean, but I am wondering if you have tried different brand of the SD cards and do they show the same issue?

    Or can you try to add some delay in the create-sdcard.sh script to see if the issue still happens.

    Edward Batt said:
    mkfs.fat 4.1 (2017-01-24)
    mkfs.fat: warning - lowercase labels might not work properly with DOS or Windows
    mkfs.vfat: unable to open /dev/sdb1: No such file or directory

    please add a couple seconds delay before calling mkfs.vfat in the script to see if it solve this error.

    Edward Batt said:
    Mount the partitions
    mount: /home/edward/ti-processor-sdk-linux-am335x-evm-06.01.00.08/bin/rootfs: mount(2) system call failed: Structure needs cleaning.

    please add 'sync' command and a couple seconds delay here before calling mount to see if this system call failure still happens?

    Edward Batt said:
    Un-mount the partitions
    umount: rootfs: not mounted.

    This message tells the images are not written to the SD card properly. Try adding delays in the 2 places I mentioned above to see if this error message goes away.

  • The changes you suggested had no impact. 

    I tried with a different brand SDcard (samsung 32GB), this worked however there is still an issue in that once the SK boots the touchscreen does not work. 

    I also tried to download and reinstall the SDK and recreate the SDcards (SANdisk 16GB and Samsung 32GB) same issues with all cards. 16GB does not work, and 32GB touhscreen does not work. 

    I tried to copy the pointercal file from the sdcard that shipped with the SK, however this did not work. I followed the userguide, and that did not fix the touchscreen issue either. I will try the Tslib utility when I can get the device connected via router.

    In the meantime due to the ongoing issue with being unable to fix the create-sdcard.sh I don't have any confidence in proceeding to the next step of creating a custom build with QT apps. 

    I would greatly appreciate any assistance that can be provided in resolving this first step, so I am able to move on with confidence that my build setup is correct 

    Thanks in advance,

    Ed

  • Hi Ed, 

    Sorry you're having this trouble. How are you connecting the SD Card to the PC? Can you try a different method. We've seen quite a few flaky USB SD Card adapters over the years.

    For the touchscreen issue, could you please give us the console output of the board so that we can try to diagnose what is going wrong?

    Thanks.

  • hi

    as you said you are using ubuntu 18.04 LTS

    plug sd card in ubuntu machine and

    search Disks apk in ubuntu

    and you will find your sd card volume,

    try to format sd card using Disks application.

    then after unmount sd card and plug again and try to run sudo ./create-sdcard.sh script

  • My apologies for my delayed reply, I have tried to use several different SD card readers, however the end result is the same for all. 

    I have not been able to set up my board to the console yet, will do so as soon as possible and get back to you. I have been solely focussed on trying to get create-sdcard.sh to work properly with the 16GB card. 

    I have reformatted using the builty in disk utility in Ubuntu, I have used fsck to clean and repair the permissions and no matter what I try i get the same error over and over again. 

    This is extremely frustrating. 

    Incidentally i also tried coping the iso image as per windows instructions, this also failed. 

  • Thanks trying to help Raju, I have tried this several time already, same results every time. I have also tried reformatting on i-MAC and Windows 10... also same results. 

    I am going to try set up VMs with earlier versions of linux (12:04 and 14:04) and see if I can get those working

    Cheers,

  • hello

    i don't thing VMs with earlier versions of linux (12:04 and 14:04) helps you

    because as per my experience in past i have face same issue and for temporary i am switch to new sd card and later i am able to format my old sd card

    using disks and now both are working fine.

    so in my case i found there is an issue with sd card rootfs partition.

    in disks i have format partition and give name boot and rootfs manually and run sd card create script.

  • Raju, 

    I have tried partitioning as you mention above, however when I ran create-sdcard.sh it recognised the partitions, and then installation failed with error messages saying it could not create directors and no space remaining. 

    I also note that in Disk is does not allow me to select ext3 for the rootfs filesystem. 

    Would it be possible for you to share your step by step process with me so that I can replicate what you did?

    Thanks in advance.