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.

AM57X: Boot question

Other Parts Discussed in Thread: AM5728

Hi, all.

PSDK: 03.02.05

Kernel: 4.4.32

CPU: AM5728

sysboot[5:0] = 0b000010, it means booting order is USB first, SD second  and EMMC third.

Firstly in my board, the sd card and mmc work perfectly.

When I save a file( custom file produced by my board),  and reboot, the board can not bootup.

After checking, I found the reason that board boot failed is the file previously saved. After delete it, the board is ok to bootup.

But I don not known why, please help!!!!

The 16GB image using image writer to read from SD card failed.

URL:http://ul.to/fn8pns7b

  • Hi,

    What is the name of the file you save? Where do you save this file?
  • Sorry, the url can not access now, please use link below to download file.

    my.syncplicity.com/.../startfail

    Thanks!

  • Please answer the questions I posted above.
  • The file is “kcx-DLA-20190222.prec”, size:39,370,768 bytes, the location is at root dir.

    The 16GB image file only contains one file not deleted.

    16GB image is formated using mkfs.vfat, and using "dd if=/dev/zero of=/dev/sdcard bs=1 count=4" to fill zero of head 4 bytes.

  • Hi, any suggestion for me?

  • Hello,

    Could you please help me understand the purpose of the file "kcx-DLA-20190222.prec"? Also, I do not understand why the second 16GB image file is needed. I am wondering if you could please share more information about your current test so I could help appropriately.

    Regards,
    Krunal
  • My instrument do something like these:

    AD -> FPGA -> PCI-E -> Software -> Software Display Image and Save AD data to SD card.

    The SD card is formated as Vfat, using mkfs.vfat and using "dd if=/dev/zero of=/dev/sdcard bs=1 count=4" to fill zero of head 4 bytes

    The "kcx-DLA-20190222.prec" is a normal file for saving AD data with additional sofeware information.

    Nothing special for this file.

    Before send 16 SD image to you, the SD card save some files like "kcx-DLA-20190222.prec", But just the file will cause instrument not to bootup.

    So I delete all other file, and just left the only file cause the problem.

  • The second image is the same as the first one.

    After I upload to http://ul.to/fn8pns7b , I found I can not download.

    So I found another space to upload to keep file can be download by you.
  • I want to known why instrument can not bootup with this file?

    What binary sequence cause CPU to thick it is a SD card with boot file, eg MLO, u-boot.

    I use winHex to check the image, but I can not foud anything wrong.

  • Hello,

    We do not really support PSDK: 03.02.05 and I am wondering if it would be possible for you to migrate to a newer PSDK. Also, in our PSDK, we have a create-sdcard.sh script that will format your SD card. The script will create 2 partitions on your SD card (boot and rootfs). Uboot will look for the relevant files (u-boot.img and MLO) in the boot partition and kernel is in the rootfs/boot partition. If you are not modifying the images such as MLO, u-boot.img, zImage and the dtb file, your board should be able to re-boot without any problems. I do not know where you are copying your kcx-DLA-20190222.prec file but as an experiment, try to save the file in the rootfs/home/root directory.

    Regards,
    Krunal
  • Migrate to a newer PSDK is no use for my problem.

    According to CPU manual, firstly it will check a valid VFAT partition, then find a bootfile, eg MLO, finally call MLO to bootup.

    But in my SD card, no MLO will be found, and the VFAT partition struct is ok when using winhex to check.

    So I really want to know what cause cpu hang up?

    Or the beginning of Vfat partition I should move to a new offset to avoid the problem?

    The only solution to the problem is formated as two partition?

  • Any suggestion for me?

    The only solution to the problem is formated as two partition?
  • Hello,

    Could you please share how you are loading the bootloader (MLO and u-boot.img)? Our script creates two partitions and in the boot partition, we store MLO and u-boot.img. In the rootfs, we store kernel and the Filesystem. Our devices will not boot properly, if you are missing the bootloader, Kernel and the Filesystem.

    I am hoping if you could please share how you are loading these components to your board. Also, if you are booting from a SD card, why don't you have a MLO?

    Regards,
    Krunal
  • sysboot[5:0] = 0b100010, it means booting order is SD first, EMMC second and USB third.

    Normally, Instrument boot from emmc, emmc is formated as 4 partitions, first is boot: including mlo, u-boot, kernel,logo, second is app for my application, third is rootfs, fourth is user space.

    SD card is the removable device of my instrument.

    Three purpose for SD card:

    1.Store some data file produced by instrument.
    2.Update software
    3.Rescure disk when software is crashed, eg, u-boot or mlo is broken, so it has to be boot from sd card to rescure the whole instrument.

    The most purpose is the first for my client.

    For second and thrid, I will send a software package to my client, after updating or rescuring, the software package will be deleted.

    When using sd card first time, instrument will format sd card, using mkfs.vfat and dd.

    Normally, the SD card does not contain any file for booting, only save some data produced by instument for normal using.

    But, After saving some file to sd card, cpu will hang up on boot with SD card.

    But It can boot without sd card, it means emmc is all ok.

    The 16GB image is readed from SD card cause the problem by using image_writer from ti sdk,  and it contains only one file, name: kcx-DLA-20190222.prec.

    I do not known why.

  • Hello,

    Please correct me if I am wrong but initially you boot from eMMC (No SD card connected) without any problems. Next, you plug a SD card to store a software package (one file called kcx-DLA-20190222.prec). Upon reboot, the CPU hangs and I am wondering if you see any messages appearing on the serial console. If yes, please share the output log in a text file.

    I need to verify with our experts but I believe the ROM is not able to find the MLO in the SD card. When the SD card is not detected, ROM looks at eMMC  for the appropriate images. If the SD card is connected, ROM looks for the images in the SD card since it is first in the sequence. Please refer to the following document to learn more about the boot process. 

    Regards,

    Krunal

  • Nothing appearing on the serial console when hanging up.

    "I need to verify with our experts but I believe the ROM is not able to find the MLO in the SD card. When the SD card is not detected, ROM looks at eMMC  for the appropriate images. If the SD card is connected, ROM looks for the images in the SD card since it is first in the sequence. Please refer to the following document to learn more about the boot process. "

    The question above I ask before at following links:

    The SD is formated according to the above links, and it works.

  • Hello,

    1. After installing the file kcx-DLA-20190222.prec on the SD card, could you please share the output of the command "sudo hexdump /dev/sdb -n 16"?

    2. After the board fails to boot, I am wondering if you could please connect to the arm core via CCS (no GEL files) and share the Program Counter Value.

    3. Lastly, after the board fails to boot, using CCS please run the following file and share the output: http://git.ti.com/sitara-dss-files/am57xx-dss-files/blobs/master/am57xx-boot.dss. There is a README available on the following link: http://git.ti.com/sitara-dss-files/am57xx-dss-files/blobs/master/README

    Regards,

    Krunal

  • “1. After installing the file kcx-DLA-20190222.prec on the SD card, could you please share the output of the command "sudo hexdump /dev/sdb -n 16"?”

    Hexdump ouput: 0000000 0000 0000 d08e 00bc b8b0 0000 d88e c08e

    I have no debug probe for debuging CPU with CCS.

  • Hello,

    I apologize for the delayed response but I am not able to replicate your issue. I took a AM5728 GPEVM and configured the board for eMMC boot. Using the fdisk method mentioned in the following thread, I formatted my SD card. After formatting the card, I created a text file and copied it to the SD Card. After installing the SD card, I was still able to boot from the eMMC without any problem.

    Regards,

    Krunal