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.

Linux/AM4378: eMMC boot fails

Part Number: AM4378

Tool/software: Linux

Dear,

We have designed board broadly based on AM437x-gp-evm and We use SDK  4.01. It is working good.

Now I want to boot my system from eMMC.  I made two partitions (mmcblk1p1 and mmcblk1p2). as per below guidelines.

  1. The eMMC is /dev/mmcblk1. Format it this way:
  2. fdisk /dev/mmcblk1
  3. o- this clears the existing partitions
  4. p - this lists all partition tables on the card (there should be none)
  5. n - create a new partition
  6. p - primary partition
  7. 1 - partition number
  8. 2048 - default value for the first sector
  9. +16M - last sector / partition size
  10. t - change the partition type (select partition 1)
  11. e - change tha partition type to "W95 FAT16 (LBA)"
  12. a - set the bootable flag for the selected partition (1)
  13. n - create a new partition
  14. p - primary partition
  15. 2 - partition number
  16. hit Enter to choose the default (next available) value for the first sector
  17. hit Enter to choose the default (last) value for the last sector
  18. p - this lists all partition tables on the card (there should be two)
  19. w - write all the above changes to disk
  20. umount /dev/mmcblk1p1; mkfs.vfat -F 16 /dev/mmcblk1p1 - format the first partition
  21. umount /dev/mmcblk1p2; mkfs.ext4 /dev/mmcblk1p2 - format the second partition.

It formated correctly. Then i copied the files as given below from root@am437x-evm :

# mkdir boot

  • # mount /dev/mmcblk1p1 boot
  • # cp MLO boot
  • # cp u-boot.img boot
  • #umount boot

Copied file system as given below

  • # mkdir root
  • # mount /dev/mmcblk1p2 root
  •  cp -r /usr/bin/rootfs/* root
  • # umount root

Both partitions has been done perfectly and copied all the files also.

I used sdk 2.0 uboot source and generated MLO and u-boot.img and copied to my eMMC first partition.

I have edited below lines in "am43xx.h"

#define FAT_ENV_DEVICE_AND_PART "1:1"        from        #define FAT_ENV_DEVICE_AND_PART "0:1" 

and i have edited "bootpart=1:2\0" \       from      "bootpart=0:2\0" \ below bold line in below function

#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
DEFAULT_MMC_TI_ARGS \
"fdtfile=undefined\0" \
"bootpart=1:2\0" \
"bootdir=/boot\0" \
"bootfile=zImage\0" \

Please find my attached "am43xx.h"

4382.am43xx_evm.h

Now i removed sd card and boot from eMMC, I am getting only one line of message as given below

U-Boot SPL 2015.07-00114-gf8d68d1-dirty (Sep 03 2018 - 15:12:44) 

It does not boot. from eMMC .Kindly go through my "am43xx.h" file.

Is there any mistake in my "am43xx.h"?  How do i solve this problem?

Regards,

Winiston.P

  • Hello Winiston.P,

    If you #defined DEBUG in <Processor SDK>/board-support/u-boot-<version>/include/configs/ti_armv7_omap.h you will see why the board stucks at that point.

    Best regards,
    Kemal

  • Dear Kemal,

    As you said i used #defined DEBUG  in "u-boot-<version>/include/configs/ti_armv7_omap.h ". and compiled u-boot source code . Now i did not get any message at bootup. 

    "U-Boot SPL 2015.07-00114-gf8d68d1-dirty (Sep 03 2018 - 15:12:44) "     This message is also disappeared.

     

    Is there any mistake in my "am43xx.h" file to boot from emmc ?

     

    Regards,

    Winiston.P

     

  • What if you do not define DEBUG? Does the MLO prints any message then? Are you sure that the DEBUG flag causes this?

    There is no mistakes in your am43xx.h file. It is all correct.

  • Dear Kemal,
    Yes sure. I declared #define DEBUG after #define CONFIG_OMAP_COMMON in the "u-boot-<version>/include/configs/ti_armv7_omap.h ". After declaring there is no message in the console port. If i remove #define DEBUG , i am getting one line of message as i told you.

    Please check my below uboot compilation process .

    1. go to uboot source directory
    cd ~/ti-processor-sdk-linux-am437x-evm-02.00.00.00/board-support/u-boot-2015.07+gitAUTOINC+d49aa5effa/

    2.configure board
    export PATH=/home/futura/ti-processor-sdk-linux-am437x-evm-02.00.00.00/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH

    3. remove directory
    rm -rf ./am43xx_evm

    4. compile uboot source file
    make CROSS_COMPILE=arm-linux-gnueabihf- O=am43xx_evm am43xx_evm_config all
    (or)
    make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm O=am43xx_evm am43xx_evm_config all

    5. check am43xx_evm directory under uboot sorce directory and find out "u-boot.img" and "MLO"

    6. Copy u-boot.img & MLO to boot partition.


    Is there any mistake in the above process?

    Regards,
    Winiston.P
  • Just for the test. Can you do these steps on the latest Processor SDK, and check if it prints any different message?

  • Dear Kemal,

    If you have " MLO and u-boot.img " for booting from emmc, please send it to me.
    So that i can confirm, whether it boots from emmc or not ?

    Regards,
    Winiston.P
  • Dear Kemal,
    I have already installed this sdk. I tried the same steps in latest sdk 5.00.00.15. But i did not get any message at all.
    Should i edit anything other than "am43xx.h" ?

    Regards,
    Winiston.P
  • Sounds like an EEPROM issue. Can you check if your board boots with these images? These are from the latest Processor SDK with enabled DEBUG and hardcoded AM43__GP EEPROM board name.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/PLSDK5.0_5F00_DB_5F00_EN_5F00_AM43_5F005F00_GP_5F00_EPPROM_5F00_HC_5F00_BOOT_5F00_PARTITION.tar.xz

  • Dear Kemal,

    Thanks for your quick help. As you said, it is EEPROM problem. Now i have programmed EEPROM. It started working. Thanks Kemal.

    Regards,

    Winiston.P