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.

[FAQ] AM62L: How to perform EMMC boot using Linux SDK for custom appimages

Part Number: AM62L

Tool/software:

I am using the AM62L E1 EVM. But, I am unable to perform EMMC boot using custom appimages instead of the default tiboot3.bin and appimage.

What do I need to do for this process?

This FAQ is specifically written for the AM62L E1 EVM.

  • EMMC boot mode testing process using SD Card:

    1. Flash the linux image and add the custom appimages in the boot partition in the SD card
    2. Go to SD card boot mode (1100001001000000 - mentioned in order of Pin 0 to Pin 15) which is in fs mode, UDA enabled mode and SD card mode(Port is not taken, Reserved chosen). There is no need to select any backup boot mode.
    3. After the entire booting, we need to mount the images to the correct location.
    4. echo 0 > /sys/block/mmcblk0/force_ro 

      this enables read/write to the mmcblk0 (so, emmc partition).
    5. Next, create 2 directories, the mmcboot and sdboot and then, mount:
      1. mount /dev/mmcblk1p1 /mnt/sdboot

        here, we get all the files present in the sd card boot that was done, to this folder to use the created appimages and add them to the correct location to boot
      2. mount /dev/mmcblk0 /mnt/mmcboot 

        So we can do file operations in the mmc partition
    6. dd if=empty.release.appimage.hs_fs of=/dev/mmcblk0 seek=0 bs=512

      This is writing the PreBL image to the eMMC partition at the start without skipping any blocks, as seek=0. And, bs=512 implies that the block size is 512 B.
    7. dd if=gpio_led_blink.debug.appimage.hs_fs of=/dev/mmcblk0 seek=1024 bs=512

      Then write the 2nd appimage which is taken from the addr 1024*512 = 0x80000. This value is passed during handoff from the IPC - #define K3_SPL_IMG_OFFSET (0x80000) - sets the secondary program loader offset to 0x80000 so, the 2nd appimage will be taken from this address.
    8. Then reboot and stop in the u-boot and write the following commands to enable booting from the UDA partition:
      mmc partconf 0 1 7 1
      mmc bootbus 0 2 0 0
    9. Now, change the boot mode to use raw mode instead of fs (change pin 7 from 0 to 1) and to use mmc instead of sd card (change pin 9 from 1 to 0 i.e. Reserved to MMCSD port 0 mode).
    10. Boot after this change.