工具/软件:
您好团队
我按照 MCU 指南、将引导加载程序刷写到 boot0/1 分区。
但 A53 操作系统高达 45MB、因此无法将其刷写到引导加载程序中。
我这边的 1.将其刷新到 UAC 并引导。 2.扩展引导分区。
您能给我这个解决方案吗?
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.
工具/软件:
您好团队
我按照 MCU 指南、将引导加载程序刷写到 boot0/1 分区。
但 A53 操作系统高达 45MB、因此无法将其刷写到引导加载程序中。
我这边的 1.将其刷新到 UAC 并引导。 2.扩展引导分区。
您能给我这个解决方案吗?
您好:
[quote userid=“664967" url="“ url="~“~/support/processors-group/processors/f/processors-forum/1566593/sk-am62p-lp-how-to-change-the-size-of-emmc-boot0-boot1-size/6033309 如何更改从 UDA 引导的设置?至今为止、MCU+ SDK 不支持从 UDA 引导。
您的 A53 映像的大小如何达到 45MB? 就连猎鹰一号也只有~22MB 左右。
我们已经要求支持从 MCU+ SDK 中的所有 eMMC 分区 (Boot0/boot1/UDA) 进行引导。 现在、下面的修补程序应该使您能够从 UDA 分区中的原始偏移量引导任何映像
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;
您好团队
我更改了代码遵循你的指示,现在.. SBL1 加载成功、SBL2 启动界面运行正常、R5F 运行正常、但输出如下卡住:
[BOOTLOADER_PROFILE] Boot Media : eMMC [BOOTLOADER_PROFILE] Boot Media Clock : 200.000 MHz [BOOTLOADER_PROFILE] Boot Image Size : 3346 KB [BOOTLOADER_PROFILE] Cores present : wkup-r5f0-0 [BOOTLOADER PROFILE] System_init : 38956us [BOOTLOADER PROFILE] Board_init : 0us [BOOTLOADER PROFILE] Drivers_open : 0us [BOOTLOADER PROFILE] SBL Drivers_open : 20457us [BOOTLOADER PROFILE] Board_driversOpen : 0us [BOOTLOADER PROFILE] App_loadSelfcoreImage : 46758us [BOOTLOADER_PROFILE] SBL Total Time Taken : 106173us Image loading done, switching to application ... Starting 2nd stage bootloader
如何进行调试?
这是 MMC 映像打印如下:
=> mmc dev 0 0 switch to partitions #0, OK mmc0(part 0) is current device => mmc read 80080000 0x9000 100 MMC read: dev # 0, block # 36864, count 256 ... 256 blocks read: OK => md.b 80080000 100 80080000: 30 82 06 73 30 82 04 5b a0 03 02 01 02 02 14 05 0..s0..[........ 80080010: a7 9c b8 fd b9 09 00 9b a5 72 c9 9e 56 7a 53 18 .........r..VzS. 80080020: cd e6 e3 30 0d 06 09 2a 86 48 86 f7 0d 01 01 0d ...0...*.H...... 80080030: 05 00 30 81 90 31 0b 30 09 06 03 55 04 06 13 02 ..0..1.0...U.... 80080040: 55 53 31 0b 30 09 06 03 55 04 08 0c 02 53 43 31 US1.0...U....SC1 80080050: 11 30 0f 06 03 55 04 07 0c 08 4e 65 77 20 59 6f .0...U....New Yo 80080060: 72 6b 31 21 30 1f 06 03 55 04 0a 0c 18 54 65 78 rk1!0...U....Tex 80080070: 61 73 20 49 6e 73 74 72 75 6d 65 6e 74 73 2e 2c as Instruments., 80080080: 20 49 6e 63 2e 31 0c 30 0a 06 03 55 04 0b 0c 03 Inc.1.0...U.... 80080090: 44 53 50 31 0f 30 0d 06 03 55 04 03 0c 06 41 6c DSP1.0...U....Al 800800a0: 62 65 72 74 31 1f 30 1d 06 09 2a 86 48 86 f7 0d bert1.0...*.H... 800800b0: 01 09 01 16 10 41 6c 62 65 72 74 40 67 74 2e 74 .....Albert@gt.t 800800c0: 69 2e 63 6f 6d 30 1e 17 0d 32 35 30 39 31 38 30 i.com0...2509180 800800d0: 36 32 37 31 36 5a 17 0d 32 35 31 30 31 38 30 36 62716Z..25101806 800800e0: 32 37 31 36 5a 30 81 90 31 0b 30 09 06 03 55 04 2716Z0..1.0...U. 800800f0: 06 13 02 55 53 31 0b 30 09 06 03 55 04 08 0c 02 ...US1.0...U....
SBL1 加载成功意味着什么。 这应该之前也能成功引导、因为除 A53 映像之外的所有映像仅应为 eMMC Boot0 分区。
请告诉我您正在使用的 SDK 版本。
你好
SDK 版本为 mcu_plus_sdk_am62px_11_01_00_16。
我发现代码无法传递以下代码
是的、 这是我自定义的闪屏
Sciserver Version: v2025.04.0.0-REL.MCUSDK.K3.11.00.00.16+ RM_PM_HAL Version: v11.00.07 Starting Sciserver..... PASSED DispApp_init() - DONE !!! DSS display share application started... Display create complete!!! Starting display ... !!! Display in progress ... DO NOT HALT !!! Splash -> Start to gen 1 Frame buffer 50 ms [HIT] call#1 mcu=(0,0) mpr=120 rect=[0..15]x[0..15] row=0 col=0 dump_px=16 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 post: AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 AD3A53 hash src=8C278DC5 dst=8C278DC5 Splash -> Generation 1 frame buffer finish: 389 ms Splash -> memcpy 2 buffer time: 26 ms, dst=93DCA000, src=93500000, size=9216000 bytes Splash -> Gen 2 buffer finished: 428 ms DSS display share Passed!! [IPC RPMSG ECHO] Version: REL.MCUSDK.K3.11.00.00.16+ (Sep 19 2025 14:34:45): [HIT] call#1 mcu=(0,0) mpr=120 rect=[0..15]x[0..15] row=0 col=0 dump_px=16 FEFEFE FEFEFE FEFEFE FEFEFE FEFEFE FEFEFE FEFEFE FEFEFE DCDCDC 020202 000000 000000 000000 010101 000000 000000 post: FEFEFE FEFEFE FEFEFE FEFEFE FEFEFE FEFEFE FEFEFE FEFEFE DCDCDC 020202 000000 000000 000000 010101 000000 000000 hash src=DB114226 dst=DB114226 Underflow did not occur Sync Lost did not occur Display delete complete!! DispApp_deInit() - DONE !!!
我认为、在更改 bootloader_mmcsd_raw.c/h 后、windows 中的 CCS 并没有编译该文件
如何更改 CCS Build 设置?
MMC bootbus 0 2 0 0
MMC partconf 0 1 1.
setenv mmcdev 0
setenv bootpart 0
如何解决? 有些应用程序是否更改了寄存器?
我该如何修复它? 某些应用程序是否更改了注册表?
请应用以下补丁
diff --git a/source/drivers/mmcsd/v0/mmcsd_v0.c b/source/drivers/mmcsd/v0/mmcsd_v0.c
index b63156d4382..2eba3cef5ce 100644
--- a/source/drivers/mmcsd/v0/mmcsd_v0.c
+++ b/source/drivers/mmcsd/v0/mmcsd_v0.c
@@ -922,7 +922,7 @@ int32_t MMCSD_disableBootPartition(MMCSD_Handle handle)
if(obj->cardType == MMCSD_CARD_TYPE_EMMC)
{
/* Disable boot partition */
- uint8_t bootPartition = 0U;
+ uint8_t bootPartition = ((1U << 6U) | (1U << 3) | 0U);
uint32_t arg = (uint32_t)((bootPartition << 8) | (0xB3 << 16) | (0x03 << 24));
MMCSD_Transaction trans;
这将允许访问 UDA 分区并从 Boot0 分区引导 SBL stage1。
如何更改 CCS Build 设置?
CCS 仅编译示例。 您需要使用 CLI 手动构建库。