Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

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-AM62X: AM62x : eMMC partition Switching Mechanism

Part Number: PROCESSOR-SDK-AM62X

Hi Team,

We are planning to have two user partition for Linux image. One partition for primary image and second for backup image(for Image upgrade). 

As per https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1307234/processor-sdk-am62x-am62x-backup-image-switching-mechanism/4965533?tisearch=e2e-sitesearch&keymatch=%2525252520user%252525253A585208#4965533 we can switch the user partition as shown below

We are using python script available bin/DFU_flash/dfu_flash.py to flash eMMC and also by building the code we can boot from one partition by changing  "am62x/am62x.env" file but if we want to switch the partition we have to rebuild the code. Is there any way i can control partition switching  as mentioned in above link externally without building the code for each partition. 

Hope my query is clear. Do let me know if you need more information.

Kindly let me know if any mechanism we have in SDK configuration to switch between partitions whenever it required.

Regards,

Kumar Ashutosh

  • Hi Kumar,

    Like mentioned in the e2e thread you referred, you can add a logic in the U-Boot ENV to decide which partition to boot from, then you don't have to modify/rebuild U-Boot.

  • Hi Bin,

    Thankyou for your response.

    I tried the same approach mentioned in above mentioned e2e thread but still same issue persists. 

    1. We used the "/dfu_flash.py" script which will generate on uEnv.txt file with user command as shown below. We modified it and added two command highlighted in yellow.

        

    2. Once flash of  rootfs image(tisdk_base.ext4) image successful, device is trying to boot from "mmcdev 1" (attached image below) with which we have build the image instead of "mmcdev 0" which we have flashed  with uEnv.txt.

    Kindly let me know the if I missed any step or do we need to flash the uEnv.txt again after rootfs image flash is done. Kindly confirm?

    Do let me know if you need more information.

    Regards,

    Kumar Ashutosh

  • Hi Kumar,

    Is "mmcdev=1" and "bootpart=1:2" set in your U-Boot build, but "mmcdev=0" and "bootpart 0:1" set in uEnv.txt during DFU flashing? If so, the settings in uEnv.txt won't be read in after the 'reset' command, and the builtin settings will take affect.

  • HI Bin,

    Thankyou for your response.

    As mentioned in above e2e thread that using uEnv.txt we can switch boot partition without rebuilding U-Boot. Could you please let  me know the process to do the same?

    Regards,

    Kumar Ashutosh  

  • Hi Kumar,

    I think the idea of adding logic in U-Boot ENV as mentioned in your referred thread is to customize the U-Boot code am62x/am62x.env with something like:

    if (some conditions) {mmcdev=1; bootpart=1:2; } else if (other conditions) {mmcdev=0; bootpart=0:1; }

    the (conditions) here are some flags which you would use to determine which rootfs to boot to.

  • Hi Kumar,

    basically this dual partition boot feature is not something supported in the SDK out of the box, so you would have to be creative to make it work.

  • Hi Bin,

    Thankyou for your support.

    Let me try it out above steps you mentioned. Will let you know if any further clarification required.

    Regards,

    Kumar Ashutosh