SK-AM62P-LP: How to change the size of eMMC boot0/boot1 size?

Part Number: SK-AM62P-LP

Tool/software:

Hello team

I'm followed MCU guide, to flash the boot loader to boot0/1 partition.

but the A53 os is up to 45MB, so I cannot flash it to the boot.

From my side  1. flash it to UAC and boot. 2. extend boot partition.

Could you give me the solution to do this?

  • Hello,

    Please use the eMMC UDA partition instead of modifying the boot partition sizes.

  • Hello team

    I have 2 question about use UDA partition to boot the service.

    1. How to change the setting to boot from UDA?

    2. Did I need to change the of SBL stage1&2? How?

  • Hello,

    1. How to change the setting to boot from UDA?

    The MCU+ SDK does not have the support for booting from UDA as of now.

    How is your A53 image getting to 45MB in size? Even the Falcon one is about ~22MB only.

  • The image is QNX image, as I include the Screen WFD libs, the image increased to 45MB.....

  • We already have a requirement for supporting the booting from all eMMC partitions (Boot0/Boot1/UDA) in the MCU+ SDK. For now, the following patch should enable you to boot any image from a raw offset in the UDA partition

    diff --git a/examples/drivers/boot/common/soc/am62px/sbl_emmc_linux_stage2.c b/examples/drivers/boot/common/soc/am62px/sbl_emmc_linux_stage2.c
    index 115134010..914b28062 100644
    --- a/examples/drivers/boot/common/soc/am62px/sbl_emmc_linux_stage2.c
    +++ b/examples/drivers/boot/common/soc/am62px/sbl_emmc_linux_stage2.c
    @@ -40,7 +40,7 @@
     #include <kernel/dpl/CacheP.h>
     #include "FreeRTOS.h"
     #include "task.h"
    -
    +#include "drivers/bootloader/bootloader_mmcsd_raw.h"
     
     /* This start address and length depends upon the linker memory for second stage SBL.
      *  It is necessary to change the below start address and length if in case the linker
    @@ -242,6 +242,14 @@ void App_bootMultipleCoreEMMC()
             Bootloader_Params_init(&bootArray[inst].bootParams);
             Bootloader_BootImageInfo_init(&bootArray[inst].bootImageInfo);
             bootArray[inst].bootHandle = Bootloader_open(inst, &bootArray[inst].bootParams);
    +
    +        /* Change boot partition to UDA for A53 image */
    +        if(inst == CONFIG_BOOTLOADER_EMMC_LINUX)
    +        {
    +            Bootloader_Config *tmpConfig = (Bootloader_Config *)(bootArray[inst].bootHandle);
    +            ((Bootloader_MmcsdArgs *)(tmpConfig->args))->bootPartIndex = 0;
    +        }
    +
             if(bootArray[inst].bootHandle != NULL)
             {
                ((Bootloader_Config *)bootArray[inst].bootHandle)->scratchMemPtr = gAppimage;
    diff --git a/source/drivers/bootloader/bootloader_mmcsd_raw.c b/source/drivers/bootloader/bootloader_mmcsd_raw.c
    index d95359199..20484762a 100644
    --- a/source/drivers/bootloader/bootloader_mmcsd_raw.c
    +++ b/source/drivers/bootloader/bootloader_mmcsd_raw.c
    @@ -55,6 +55,8 @@ static int32_t MMCSDRaw_imgOpen(void *args, Bootloader_Params *params)
     {
         Bootloader_MmcsdArgs *MMCSDArgs = (Bootloader_MmcsdArgs *)args;
         MMCSDArgs->curOffset = MMCSDArgs->appImageOffset;
    +    /* Boot from eMMC Boot0 by default */
    +    MMCSDArgs->bootPartIndex = 1;
         return SystemP_SUCCESS;
     }
     
    @@ -72,7 +74,14 @@ static int32_t MMCSDRaw_imgRead(void *dst, uint32_t len, void *args)
     
         if(status == SystemP_SUCCESS)
         {
    -        status = MMCSD_enableBootPartition(handle, 1);
    +        if(MMCSDArgs->bootPartIndex == 0)
    +        {
    +            status = MMCSD_disableBootPartition(handle);
    +        }
    +        else
    +        {
    +            status = MMCSD_enableBootPartition(handle, MMCSDArgs->bootPartIndex);
    +        }
     
             if(status != SystemP_SUCCESS)
             {
    diff --git a/source/drivers/bootloader/bootloader_mmcsd_raw.h b/source/drivers/bootloader/bootloader_mmcsd_raw.h
    index 2ca361fd0..383b593d1 100644
    --- a/source/drivers/bootloader/bootloader_mmcsd_raw.h
    +++ b/source/drivers/bootloader/bootloader_mmcsd_raw.h
    @@ -50,7 +50,7 @@ typedef struct Bootloader_MmcsdArgs_s
         uint32_t MMCSDIndex;
         uint32_t curOffset;
         uint32_t appImageOffset;
    -
    +    uint32_t bootPartIndex;
     } Bootloader_MmcsdArgs;
     
     extern Bootloader_Fxns gBootloaderMmcsdFxns;