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.

[参考译文] AM6442:SBL_eMMC_Linux

Guru**** 2482105 points
Other Parts Discussed in Thread: TMDS64EVM

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1445028/am6442-sbl_emmc_linux

器件型号:AM6442
主题中讨论的其他器件:UNIFLASHTMDS64EVM

工具与软件:

您好、TI 团队:

我使用 default_sbl_emmc_linux_hs.cfg 文件在无 RTOS 的 R5F0_0中刷写简单应用、然后启动 Linux。 我使用 am64x-evm 硬件套件来执行该操作。  

在 UART 终端上,我得到了下面. 我的 R5F 应用程序不工作,我不明白为什么引导介质未定义和引导映像大小: 0KB. 仅存在 M4F 内核。 如果我使用了 OSPI 配置、引导介质正常、检测到 R5F、R5F 上的应用程序运行良好。  

有人知道为什么在我使用  default_sbl_emmc_linux_hs.cfg 时 eMMC 无法被识别吗?  

 

# First point to sbl_uart_uniflash binary, which function's as a server to flash one or more files to eMMC
--flash-writer=sbl_prebuilt/am64x-evm/sbl_uart_uniflash.debug.hs_fs.tiimage

# Now send one or more files to flash or flashverify as needed. The order of sending files does not matter

# When sending bootloader make sure to flash at offset 0x0. ROM expects bootloader at offset 0x0 of eMMC
--file=../../examples/drivers/boot/sbl_emmc_linux/am64x-evm/r5fss0-0_nortos/ti-arm-clang/sbl_emmc_linux.debug.hs_fs.tiimage --operation=flash-emmc --flash-offset=0x0

# When sending application image, make sure to flash at offset 0x800000 (default) or to whatever offset your bootloader is configured for
--file=../../examples/drivers/ipc/ipc_rpmsg_echo_linux/am64x-evm/system_freertos/ipc_rpmsg_echo_linux_system.debug.appimage.hs_fs --operation=flash-emmc --flash-offset=0x800000

# Linux image is flashed at 0xA00000 or to whatever offset your bootloader is configured for
--file=../../tools/boot/linuxAppimageGen/linux.appimage.hs_fs --operation=flash-emmc --flash-offset=0xA00000

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sebastian:

    您能否确认 u-boot.img 是否以正确的偏移量进行刷写? 我怀疑此问题可能是由于 u-boot.img 未被刷新导致的。 请注意、 u-boot.img 不是 linux.appmage 的一部分、应单独刷写、 默认偏移量等于 eMMC 块编号0x1800或 eMMC 原始地址0x300000。 您可以在 default_sbl_emmc_linux_hs.cfg 中添加命令来刷写 Uboot 映像、如下所示:

    --file= --operation=flash-eMMC --flash-offset=0x300000

    您可以参考此主题中的内容相同: PROCESSOR-SDK-AM64X:使用 Processor SDK 08.06.00 bin 生成图像时 SBL_eMMC_Linux 无法引导-处理器论坛-处理器- TI E2E 支持论坛

    此致、

    开会。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sebastian:

    您能否告诉我您是否对固件进行了任何更改、就像使用默认文件一样、我能够引导 Linux 而不会出现任何问题。 另外、请告知我您最后使用的 MCU + SDK 和 Processor SDK 版本

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、

    请参见附加的项目和 sbl_ospi_linux。 我在 TMDS64EVM 入门套件(TMDS64EVM评估板|德州仪器 TI.com)上使用了最新的 mcu_plus_sdk_am64x_10_00_00_20。    

    e2e.ti.com/.../fsi_5F00_loopback_5F00_interrupt_5F00_am64x_2D00_evm_5F00_r5fss0_2D00_0_5F00_nortos_5F00_ti_2D00_arm_2D00_clang.rare2e.ti.com/.../sbl_5F00_ospi_5F00_linux_5F00_am64x_2D00_evm_5F00_r5fss0_2D00_0_5F00_nortos_5F00_ti_2D00_arm_2D00_clang.rar

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Sebastien、您好!

    您能否说明您面临此问题的引导流程? 如前所述、我们之前讨论的是 EMMC 引导 Linux、但您所附加的文件适用于 OSPI 引导 Linux。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、

    抱歉、为了继续前进、我采用了一个新策略。 我将 R5F 映像和引导顺序放在 OSPI 闪存(包含 u-boot)中。 之后、我从 eMMC 引导 Linux。 其目的是确保 R5F 应用程序的启动安全。    

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sebastian:

    感谢您的确认。 请允许我留出一些时间在我的 EVM 上测试此代码并给您回复。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sebastian:

    如果您的目标是仅在 r5f0-0上加载应用、那么暂时您可以忽略 remotproc 错误消息、您应该仍然能够引导 Linux 内核并运行 FSI 示例、请告知我您的 Linux 内核是否无法引导或 FSI 示例是否按预期工作。

    此致、

    开会。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    大家好、

    我的目标是在 Linux 和 R5f0-0之间交换 FSI 数据。 因此、Linux 不存在内存问题非常重要、在不久的将来、我计划使用另一个内核。 就您而言、您是否注意到 EVM 上存在同样的问题?   

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Sebastien、您好!

    目前、您会看到此问题、因为您仅在引导 R5f0-0时、Linux 希望所有内核都能被引导。 如果您尝试 IPC_rpmsg_echo_Linux 系统 FreeRTOS 示例等示例、则不会出现此问题、因为它正在启动所有内核。 您可以在最后尝试此示例并加以验证。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    了解、

    好的、但是否可以在 Remoteproc 驱动程序中禁用未使用的内核? 如果是、我怎么能做到这一点? 我尝试在 DTS 中禁用邮箱、但没有成功

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Sebastien,

    您可以通过修改设备树来禁用远程内核、本指南将为您提供有关如何执行该操作的更多详细信息: 在 Linux 中禁用远程内核。 请参考这篇文章、如果您对此还有任何其他问题、请告诉我。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    了解、

    感谢您的帮助与耐心。 我已经在您的链接中阅读并应用了这些说明(这并未针对 AM64进行更新)、但在器件树中、我在下方给另一位读者分享了一个额外的操作。 现在、它运行良好。  

    在 k3-am64-main.dtsi 中、修改 ti、cluster-mode =<2>为"单 CPU 模式" 但仍然未禁用内核 r5f0_1 因为 Remoteproc 驱动程序不喜欢这个情况。  

    main_r5fss0: r5fss@78000000 {
    		compatible = "ti,am64-r5fss";
    		ti,cluster-mode = <2>;
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges = <0x78000000 0x00 0x78000000 0x10000>,
    			 <0x78100000 0x00 0x78100000 0x10000>,
    			 <0x78200000 0x00 0x78200000 0x08000>,
    			 <0x78300000 0x00 0x78300000 0x08000>;
    		power-domains = <&k3_pds 119 TI_SCI_PD_EXCLUSIVE>;
    
    		main_r5fss0_core0: r5f@78000000 {
    			compatible = "ti,am64-r5f";
    			reg = <0x78000000 0x00010000>,
    			      <0x78100000 0x00010000>;
    			reg-names = "atcm", "btcm";
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <121>;
    			ti,sci-proc-ids = <0x01 0xff>;
    			resets = <&k3_reset 121 1>;
    			firmware-name = "am64-main-r5f0_0-fw";
    			ti,atcm-enable = <1>;
    			ti,btcm-enable = <1>;
    			ti,loczrama = <1>;
    		};
    
    		main_r5fss0_core1: r5f@78200000 {
    			compatible = "ti,am64-r5f";
    			reg = <0x78200000 0x00008000>,
    			      <0x78300000 0x00008000>;
    			reg-names = "atcm", "btcm";
    			ti,sci = <&dmsc>;
    			ti,sci-dev-id = <122>;
    			ti,sci-proc-ids = <0x02 0xff>;
    			resets = <&k3_reset 122 1>;
    			firmware-name = "am64-main-r5f0_1-fw";
    			ti,atcm-enable = <1>;
    			ti,btcm-enable = <1>;
    			ti,loczrama = <1>;
    		};
    	};
    
    	main_r5fss1: r5fss@78400000 {
    		status = "disabled";
    		compatible = "ti,am64-r5fss";
    		ti,cluster-mode = <2>;
     

    结果:  

    [   13.811044] CAN device driver interface
    [  OK  ] Started Simple Network Management Protocol (SNMP) Daemon..
    [   14.124930] at24 0-0050: supply vcc not found, using dummy regulator
    [   14.238961] at24 0-0050: 131072 byte 24c1024 EEPROM, writable, 1 bytes/write
    [   14.609489] platform 78000000.r5f: R5F core may have been powered on by a different host, programmed state (0) != actual state (1)
    [   14.669314] platform 78000000.r5f: configured R5F for IPC-only mode
    [   14.696407] platform 78000000.r5f: assigned reserved memory node r5f-dma-memory@a0000000
    [   14.711177] remoteproc remoteproc0: 78000000.r5f is available
    [   14.718853] remoteproc remoteproc0: attaching to 78000000.r5f
    [   14.741362] platform 78000000.r5f: R5F core initialized in IPC-only mode
    [   14.803786] rproc-virtio rproc-virtio.0.auto: assigned reserved memory node r5f-dma-memory@a0000000
    [   14.845034] virtio_rpmsg_bus virtio0: rpmsg host is online
    [   14.913386] rproc-virtio rproc-virtio.0.auto: registered virtio0 (type 7)
    [   15.052745] remoteproc remoteproc0: remote processor 78000000.r5f is now attached
    [   15.246574] m_can_platform 20701000.can: m_can device registered (irq=520, version=32)
    [   15.268914] m_can_platform 20711000.can: m_can device registered (irq=521, version=32)
    [   15.601522] gpio-mux mux-controller: 2-way mux-controller registered
    [  OK  ] Started containerd container runtime.
    [  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
             Starting Virtual Console Setup...
    [   16.963456] m_can_platform 20711000.can main_mcan1: renamed from can1
    [   17.032744] m_can_platform 20701000.can main_mcan0: renamed from can0
    [   17.042217] am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
    [  OK  ] Finished Virtual Console Setup.