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 : Backup Image 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). 

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

Below is my Environment:

Evaluation Board:- AM62B-P1

SDK:- PROCESSOR-SDK-LINUX-RT-AM62X — Processor SDK RT-Linux for AM62x  Version: 09.00.00.03

Build Environment:- yocto build environment'

Regards,

Kumar Ashutosh

  • Hi Prashant,

    Thankyou for your response.

    Above link resolve my issue. But is there any way I can automate the process instead of of manually entering the command from u-boot prompt. Can we change "uEnv.txt"  to automate the same. Kindly confirm.  

    Regards,

    Kumar Ashutosh

  • Hi Ashutosh,

    Can we change "uEnv.txt"  to automate the same. Kindly confirm.

    I believe yes this can be automated through uEnv.txt. For example, we can have the following uEnv.txt file

    # This uEnv.txt file can contain additional environment settings that you
    # want to set in U-Boot at boot time.  This can be simple variables such
    # as the serverip or custom variables.  The format of this file is:
    #    variable=value
    # NOTE: This file will be evaluated after the bootcmd is run and the
    #       bootcmd must be set to load this file if it exists (this is the
    #       default on all newer U-Boot images.  This also means that some
    #       variables such as bootdelay cannot be changed by this file since
    #       it is not evaluated until the bootcmd is run.
    
    uenvcmd=setenv bootpart 1:3

    Once U-Boot boots, it loads the uEnv.txt file & runs the uenvcmd if available. So, with the above uEnv.txt, the U-Boot runs the uenvcmd & sets the bootpart to 1:3 which is to boot from 3rd partition of SD card. This is shown below

    U-Boot 2023.04-g24098ea90d (Jul 06 2023 - 12:59:40 +0000)
    
    SoC:   AM62X SR1.0 HS-FS
    Model: Texas Instruments AM625 SK
    EEPROM not available at 80, trying to read at 81
    Board: AM62B-SKEVM rev A
    DRAM:  2 GiB
    Core:  71 devices, 31 uclasses, devicetree: separate
    MMC:   mmc@fa10000: 0, mmc@fa00000: 1
    Loading Environment from nowhere... OK
    In:    serial
    Out:   serial
    Err:   serial
    Net:   eth0: ethernet@8000000port@1
    Hit any key to stop autoboot:  0
    => run envboot
    switch to partitions #0, OK
    mmc1 is current device
    SD/MMC found on device 1
    Failed to load 'boot.scr'
    604 bytes read in 16 ms (36.1 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc1 ...
    Running uenvcmd ...
    => printenv bootpart
    bootpart=1:3
    =>

    Ofcourse, you can add more logic in the uenvcmd to make it more flexible according to your needs.

    Regards,

    Prashant