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.

[参考译文] SK-AM62P-LP:如何从 Linux 终端将 SK-AM62P-LP 上的裸机代码刷写到 eMMC?

Guru**** 2434440 points
Other Parts Discussed in Thread: SK-AM62P-LP

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

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1542341/sk-am62p-lp-how-to-flash-baremetal-code-to-emmc-on-sk-am62p-lp-from-linux-terminal

器件型号:SK-AM62P-LP


工具/软件:

您好、

我使用以下设置:

  • PSDK 版本: ti-processor-sdk-linux-am62pxx-evm-10.01.10.04

  • MCU+ SDK 版本: mcu_plus_sdk_am62px_10_01_00_33

  • 电路板: SK-AM62P-LP

目标:

我正在尝试执行测试 FOTA(固件无线) 以及电路板上的更新。
我的目标是闪存 裸机固件 连接到 AM62x 板 Linux 终端 、具体到:

  1. OSPI  – 已经开始工作

  2. eMMC  – 还没有工作

我所做的工作:

  • 指定 OSPI ,我创建了一个基于偏移的自定义分区,并成功刷新裸机映像。 它按预期运行。

  • 文件位置:  TI-PROCESSOR-SDK-LINUX-am62pxx-evm-10.01.10.04/board-support/ti-linux-kernel-6.6.58+git-ti/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts
  • partition@0 {
    			    label = "ospi.tiboot3";
    			    reg = <0x0 0x80000>;
    			};
    
    			partition@80000 {
    			    label = "ospi.tispl";
    			    reg = <0x80000 0x200000>;
    			};
    
    			partition@280000 {
    			    label = "ospi.u-boot";
    			    reg = <0x280000 0x200000>;
    			};
    
    			partition@240000 {
    			    label = "ospi.hsm";
    			    reg = <0x240000 0x200000>;  
    			};
    
    			partition@800000 {
    			    label = "ospi.mcu-baremetal";
    			    reg = <0x800000 0x800000>;
    			};
    
    			partition@1200000 {
    			    label = "ospi.linux";
    			    reg = <0x1200000 0x1000000>;
    			    bootph-all;
    			};

问题:

  • 我想做的也是 eMMC ,但我找不到在 eMMC 中创建裸机分区的闪存布局或方法。

  • 如何在 eMMC 中为裸机创建分区并从 Linux 终端刷写映像?

是否有任何有关将裸机刷写到 eMMC 的指南或文档?


此致、
Veerapandiyan 五.

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

    您好:

    eMMC 原始引导分区没有分区布局。 您可以使用`dd`命令将映像刷写到这些原始引导分区、如下所示

    # dd if=tiboot3.bin of=/dev/mmcblk0boot0 seek=0
    # dd if=tispl.bin of=/dev/mmcblk0boot0 seek=1024
    # dd if=u-boot.img of=/dev/mmcblk0boot0 seek=5120

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

    您好、Prashant、

    我理解了上述说明、但我想知道如何从 Linux 终端将裸机刷写到 eMMC。

    此致、

    Veerapandiyan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    但我想知道如何从 Linux 终端将裸机刷写到 eMMC。

    使用`dd`命令将任何映像刷写到 eMMC 原始启动分区的偏移量中。

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

    您好、Prashant、

    请参阅下面的命令和图像。

    root@am62pxx-evm:~# echo 0 > /sys/block/mmcblk0boot0/force_ro
    root@am62pxx-evm:~# dd if=sbl_emmc_linux_stage1.release.hs_fs.tiimage of=/dev/mmcblk0boot0 bs=1K seek=0 conv=fsync
    264+1 records in
    264+1 records out
    270936 bytes (271 kB, 265 KiB) copied, 0.0273468 s, 9.9 MB/s
    root@am62pxx-evm:~# dd if=sbl_emmc_linux_stage2_am62px-sk_wkup-r5fss0-0_freertos_ti-arm-clang.appimage.hs_fs of=/dev/mmcblk0boot0 =1K seek=512 conv=fsync
    293+1 records in
    293+1 records out
    300783 bytes (301 kB, 294 KiB) copied, 0.0308154 s, 9.8 MB/s
    root@am62pxx-evm:~# dd if=hsm.appimage.hs_fs of=/dev/mmcblk0boot0 bs=1K seek=2304 conv=fsync
    9+1 records in
    9+1 records out
    9646 bytes (9.6 kB, 9.4 KiB) copied, 0.0133705 s, 721 kB/s
    root@am62pxx-evm:~# dd if=u-boot.img of=/dev/mmcblk0boot0 bs=1K seek=2560 conv=fsync
    2083+1 records in
    2083+1 records out
    2133823 bytes (2.1 MB, 2.0 MiB) copied, 0.137675 s, 15.5 MB/s
    root@am62pxx-evm:~# dd if=gpio_led_blink_am62px-sk_mcu-r5fss0-0_nortos_ti-arm-clang.appimage.hs_fs of=/dev/mmcblk0boot0 bs=1K seek192 conv=fsync
    42+1 records in
    42+1 records out
    43015 bytes (43 kB, 42 KiB) copied, 0.0166697 s, 2.6 MB/s
    root@am62pxx-evm:~# dd if=linux.appimage.hs_fs of=/dev/mmcblk0boot0 bs=1K seek=18432 conv=fsync
    853+1 records in
    853+1 records out
    874175 bytes (874 kB, 854 KiB) copied, 0.0624894 s, 14.0 MB/s
    root@am62pxx-evm:~# echo 1 > /sys/block/mmcblk0boot0/force_ro
    root@am62pxx-evm:~# 
    
    

    现在、裸机正在刷写到 eMMC、但 Linux 未引导。 请查看此内容。

    此致、

    Veerapandiyan

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

    请共享以下来自 A53 U-Boot 的命令的输出:

    => mmc dev 0
    => mmc part

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

    您好、Prashant、

    问题是 eMMC 分区意外地从我这边移除了。 我现在已经创建了分区、并且工作正常。  

    现在、OSPI 和 eMMC 都正常工作。

    感谢你的帮助。

    此致、
    维拉潘迪扬五世