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.

PROCESSOR-SDK-AM437X: AM437x - Internal EMMC and Boot Problem

Part Number: PROCESSOR-SDK-AM437X

Hi  i am using a 3rd party AM437x CPU module MYD-C437x with processor SDK LINUX-RT.
Which has an internal 4GB memory(emmc1) and a pre-installed linux kernel that is bootable from it.

I wanted to overwrite the kernel files (MLO,uboot, rootfs, zImage, .dtb) already pre-installed in MYC-437X's onboard emmc1.
So i booted my board with a sd-card(alias emmc0), located the relevant kernel/boot files, run a script that overwrites the related kernel/boot files that i found in the partitions /dev/mmcblkp1 and /dev/
mmcblkp2, it was succesful(with some clock skew future warnings ), then i configured the boot pins to boot from internal memory. Rebooted the system hoping it would read the edited boot/kernel files from its internal emmc1. 

There is a problem, my board does not even turn-on now, not even tries to read uboot-MLO files from its internal emmc1, i thought my overwrite operation was somehow resulted into a corrupted emmc1, so i switched the boot gates back where it boots from sd-card(emmc0).

Now it cannot even boot from sd-card, but with valid sd-card and correct boot-pins configuration, the emmc shouldn't cause any problem even if its damaged/corrupted, it has nothing to do with the boot process if its not selected as a boot medium. 

Can you please tell me the reason for this, and maybe a way to overwrite pre-installed kernel/boot files located in MYC437x's internal emmc1?

Thanks!

  • Hello,

    Apologies for the delayed response. What boot pin settings are you using to 1) boot from SD card? What about the boot pin settings to 2) boot from emmc?

    Regards,

    Nick

  • Hi,

    I had been configuring the boot pins accordingly before this incident, it was working well, i could boot both from SD and internal emmc using a switch, there is no problem with it i can assure you. 

    My questions are:

    1) How can I overwrite a already partitioned emmc with a pre-built kernel in it, i can observe the related kernel partitions and files under mmc1blkp1(MLO, uboot) and mmc1blkp2(rootfs), however  the problem occured just after i tried to overwrite the files. Could you please provide me a script or the tell me the right way to do it?


    My script for emmc1 manipulation:
    DRIVE=$1

    sync
    umount -f ${DRIVE}p*
    #create tmp directories
    mkdir tmp
    mkdir tmp/boot
    mkdir tmp/rootfs

    echo "tmp directories created under mnt"
    #mount
    sync
    mount ${DRIVE}p1 tmp/boot
    mount ${DRIVE}p2 tmp/rootfs
    echo "mounted"
    #clear
    sync
    rm -rf tmp2/boot/*
    rm -rf tmp2/rootfs/*
    echo "cleared"
    #copy boot
    sync
    cp -r boot/* tmp2/boot
    echo "boot copied"
    #copy rootfs.tar.gz
    cd tmp/rootfs
    echo "dir is ${myPWD}"
    tar zxvf ${myPWD}/rootfs.tar.gz
    echo "rootfs copied"
    #cp -r kernel/* /mnt/sdcard2/boot
    #unmount
    cd -
    echo "synching!"
    sync
    echo "synched!"
    umount -f ${DRIVE}p*
    echo "unmounted"
    #clear
    sync
    rm -rf tmp
    echo "mnt cleared and finished!"


    My steps were:
    1 - Boot from SD card (with minicom connection)
    2 - Mount emmc0

    3 - Locate pre-installed kernel files under mmc1blkp1(MLO, uboot) and mmc1blkp2(rootfs), as expected.
    4 - Use the script to overwrite the files 
    5 - Power off
    6 - Configure boot pins for emmc0 so that it boots the new kernel
    7-  Power on

    2 ) After the step 6, i observed that it cannot boot from emmc0, no kernel log nothing, so i configured the pins back to boot from SD-card, still nothing displayed on the kernel log, which is a surprize because the there is no way that a possible emmc1(internal) corruption would cause the boot process fail when the boot pins are configured for emmc0(sd-card).

       

  • Hi Cansin,
    Please help me understand your issue better:
    1. Both SD-card boot and eMMC boot used to work on your board previously?
    2. Are you able to boot from SD-card now on your board?
    3. If "yes" to #2, can you upload your full boot log file in attachment?
    4. if "No" to #2, do you have JTAG access on your board?
    Best,
    -Hong

  • 1. Yes
    2. No, I have JTAG access but there is no u-boot log when i turn my board on

    Thanks!

  • Hi Cansin,

    2. No, I have JTAG access but there is no u-boot log when i turn my board on

    Can we try "attaching" JTAG to running target to pinpoint to which point code is running up to?
    where "attaching" means attach/connect JTAG without target reset.
    Let's use JTAG debugger to find out if SPL starts to run on your board.
    a). if yes, SPL needs to be debugged further to see where lock-up is.
    b). if no, check SYSBOOT[] latched in CM CTRL_STS register @0x44E10040 to see if it is matching SYSBOOT pin configured on your board.
    Additionally bootrom boot progress can be checked via reading trace vector as described in "5.2.3.2.5 Tracing Data" of the TRM.
    Best,
    -Hong