PROCESSOR-SDK-J784S4: R5F Graceful shutdown issue

Part Number: PROCESSOR-SDK-J784S4

Tool/software:

Hello everyone,

Using pdk_j784s4_11_00_00_21, we were unable to stop the r5fs in Jacinto. We were only able to stop the dsps.

we ran the same test on an am64x with the same version of pdk and r5f stopped successfully.


Any suggestions about why this is happening?

when i try to stop an r5f core i get this error

[  634.928644] platform 5e00000.r5f: k3_r5_rproc_stop: timeout waiting for rproc completion event
[  634.937253] remoteproc remoteproc0: can't stop rproc: -16
sh: echo: write error: Device or resource busy

the following image serves as proof of the behaviour I'm getting. in red are the r5f colours that won't stop because the resource is busy and in green are the dsps that manage to stop.

the following image lists the default applications running on each core

Thanks.

Best Regard,
Joao Lima

  • Hi Joao,

    You cannot stop core1 before stopping core0 of the dual core R5Fs. Are you stopping core1 before core0?

    - Keerthy

  • Hello Keerthy,

    I am trying to stop core0 before.

    However, I've already repeated the test where I try to stop the cores in ascending order, and the result is the same.

    In our final use case, we have only core0 running, and it fails when I try to stop it. The start works fine, but the stop doesn't work.

  • Hello Joao,

    Can you share the commands that you are trying and the corresponding logs as a text file attachment?

    11.0 has the remoteproc graceful shutdown functional. 

    Are you also using the default SDK firmware or your custom firmware for the remote cores? 

    Best Regards,

    Keerthy

  • Hello Keerthy,

    Sure. please find the following commands and logs:

    cd /lib/firmware
    
    ln -sf ~/ipc_echo_test_freertos_mcu2_0_release.xer5f j784s4-main-r5f0_0-fw
    
    echo start > /sys/class/remoteproc/remoteproc0/state
    [  171.509285] remoteproc remoteproc0: powering up 5c00000.r5f
    [  171.523182] remoteproc remoteproc0: Booting fw image j784s4-main-r5f0_0-fw, size 781652
    [  171.532213] rproc-virtio rproc-virtio.8.auto: assigned reserved memory node r5f-dma-memory@a2000000
    [  171.541889] virtio_rpmsg_bus virtio0: rpmsg host is online
    [  171.547435] rproc-virtio rproc-virtio.8.auto: registered virtio0 (type 7)
    [  171.554222] remoteproc remoteproc0: remote processor 5c00000.r5f is now up
    
    echo stop > /sys/class/remoteproc/remoteproc0/state
    [  203.310824] platform 5c00000.r5f: k3_r5_rproc_stop: timeout waiting for rproc completion event
    [  203.319444] remoteproc remoteproc0: can't stop rproc: -16
    
    sh-5.2# ls -lha
    drwxr-xr-x    5 1000     1000        4.0K May 29 18:49 .
    drwxr-xr-x   37 1000     1000       24.0K Aug 26  2025 ..
    -rw-r--r--    1 1000     1000      695.4K Mar  9  2018 bl32.bin
    -rw-r--r--    1 1000     1000        4.6M Mar  9  2018 bl32.elf
    drwxr-xr-x    2 1000     1000        4.0K Mar  9  2018 cadence
    drwxr-xr-x    2 1000     1000        4.0K Mar  9  2018 cnm
    lrwxrwxrwx    1 root     root          49 May 29 18:49 j784s4-main-r5f0_0-fw -> /root/ipc_echo_test_freertos_mcu2_0_release.xer5f
    -rw-r--r--    1 1000     1000          28 Mar  9  2018 tee-header_v2.bin
    -rw-r--r--    1 1000     1000           0 Mar  9  2018 tee-pageable_v2.bin
    -rw-r--r--    1 1000     1000      695.4K Mar  9  2018 tee-pager_v2.bin
    -rw-r--r--    1 1000     1000      695.4K Mar  9  2018 tee-raw.bin
    -rw-r--r--    1 1000     1000      695.4K Mar  9  2018 tee.bin
    -rw-r--r--    1 1000     1000        4.6M Mar  9  2018 tee.elf
    drwxr-xr-x    3 1000     1000        4.0K Mar  9  2018 ti-ipc
    lrwxrwxrwx    1 1000     1000          46 Mar  9  2018 wave521c_k3_codec_fw.bin -> /usr/lib/firmware/cnm/wave521c_k3_codec_fw.bin

    FYI, I did the tests using 11 on the am64x (which works) and on the j784s4 (which doesn't work in our side).

    11.0 has the remoteproc graceful shut

    For this elementary tests, I am using the default SDK firmware.

    Best Regards,
    Joao Lima

  • Hello Joao,

    main_r5fss0_core0: r5f@5c00000 {
    compatible = "ti,j721s2-r5f";
    reg = <0x5c00000 0x00010000>,
    <0x5c10000 0x00010000>;
    reg-names = "atcm", "btcm";
    ti,sci = <&sms>;
    ti,sci-dev-id = <339>;
    ti,sci-proc-ids = <0x06 0xff>;
    resets = <&k3_reset 339 1>;
    firmware-name = "j784s4-main-r5f0_0-fw";
    ti,atcm-enable = <1>;
    ti,btcm-enable = <1>;
    ti,loczrama = <1>;
    };

    main_r5fss0_core1: r5f@5d00000 {
    compatible = "ti,j721s2-r5f";
    reg = <0x5d00000 0x00010000>,
    <0x5d10000 0x00010000>;
    reg-names = "atcm", "btcm";
    ti,sci = <&sms>;
    ti,sci-dev-id = <340>;
    ti,sci-proc-ids = <0x07 0xff>;
    resets = <&k3_reset 340 1>;
    firmware-name = "j784s4-main-r5f0_1-fw";
    ti,atcm-enable = <1>;
    ti,btcm-enable = <1>;
    ti,loczrama = <1>;
    };

    2 cores are present in the cluster.

    Please try to stop core1  r5f@5d0000 before stopping core0 r5f@5c00000. 

    echo stop > /sys/class/remoteproc/remoteproc1/state

    - Keerthy

  • Hello Keerthy,

    Okay, I have already tested stopping core 1 before core 0 and I get the same output I shared previously:
    [ 2227.502672] platform 5d00000.r5f: k3_r5_rproc_stop: timeout waiting for rproc completion event
    [ 2227.511292] remoteproc remoteproc9: cannot stop rproc: -16

    however, I tested for an R5F MCU and was able to successfully stop core MCU1_0.

    meanwhile, I have already confirmed the dts file and I have the same configuration for the R5F mains that you shared.

    can you please check if you can reproduce this behavior on your side with a J784S4 setup and SDK 11 so we can cross information?

    Thanks for your time.

    Joao Lima

  • Hello Keerthy,

    Meanwhile, for the cores in question, I confirmed that the configuration defined in the dts are the same for both am64xx and j784s4.

    Best regards,
    Joao Lima

  • Hi Joao,

    can you please check if you can reproduce this behavior on your side with a J784S4 setup and SDK 11 so we can cross information?

    I will try the same and get back to you by tomorrow or by Monday.

    - Keerthy

  • Hi Joao,

    I was able to reproduce the issue:

    echo stop > /sys/class/remoteproc/remoteproc7/state 
    [  105.151067] platform 5d00000.r5f: k3_r5_rproc_stop: timeout waiting for rproc completion event
    [  105.159691] remoteproc remoteproc7: can't stop rproc: -16
    -sh: echo: write error: Device or resource busy
    

    Couple of changes need to be done:

    1. This is only supported in the remoteproc mode and not in the IPC only mode. If U-Boot loads firmware then the Linux will not be able to stop & start.
      So in the uEnv.txt of the boot partition of the SD card:
      1. setenv dorprocboot 0
      2. Comment the overlay lines.

        # Setting the right U-Boot environment variables
        dorprocboot=0
        #name_overlays=ti/k3-j784s4-evm-ethfw.dtbo ti/k3-j784s4-vision-apps.dtbo

    2. The default /lib/firmware point to vision_apps firmware & that is not validated with graceful shutdown. Only the ipc_echo_test firmware are validate with graceful shutdown:

      ln -sf /usr/lib/firmware/ti-ipc/j784s4/ipc_echo_test_mcu2_1_release_strip.xer5f /lib/firmware/j784s4-main-r5f0_1-fw
      ln -sf /usr/lib/firmware/ti-ipc/j784s4/ipc_echo_test_mcu2_0_release_strip.xer5f /lib/firmware/j784s4-main-r5f0_0-fw

    With the above 2 changes the stop/start works:

    echo stop > /sys/class/remoteproc/remoteproc11/state 
    [   93.650232] remoteproc remoteproc11: stopped remote processor 5d00000.r5f
    root@j784s4-evm:~# echo stop > /sys/class/remoteproc/remoteproc10/state                                                                                                                                     
    [  102.726280] remoteproc remoteproc10: stopped remote processor 5c00000.r5f
    root@j784s4-evm:~# echo start > /sys/class/remoteproc/remoteproc10/state                                                                                                                                    
    [  110.485526] remoteproc remoteproc10: powering up 5c00000.r5f
    [  110.492328] remoteproc remoteproc10: Booting fw image j784s4-main-r5f0_0-fw, size 82648
    [  110.501416] rproc-virtio rproc-virtio.9.auto: assigned reserved memory node r5f-dma-memory@a2000000
    [  110.510998] virtio_rpmsg_bus virtio1: rpmsg host is online
    [  110.516539] rproc-virtio rproc-virtio.9.auto: registered virtio1 (type 7)
    [  110.523333] remoteproc remoteproc10: remote processor 5c00000.r5f is now up
    [  110.525872] virtio_rpmsg_bus virtio1: creating channel ti.ipc4.ping-pong addr 0xd
    root@j784s4-evm:~# [  110.537862] virtio_rpmsg_bus virtio1: creating channel rpmsg_chrdev addr 0xe
    
    root@j784s4-evm:~# echo start > /sys/class/remoteproc/remoteproc11/state                                                                                                                                    
    [  118.269523] remoteproc remoteproc11: powering up 5d00000.r5f
    [  118.276294] remoteproc remoteproc11: Booting fw image j784s4-main-r5f0_1-fw, size 82648
    [  118.285340] rproc-virtio rproc-virtio.10.auto: assigned reserved memory node r5f-dma-memory@a3000000
    [  118.295083] virtio_rpmsg_bus virtio2: rpmsg host is online
    [  118.300632] rproc-virtio rproc-virtio.10.auto: registered virtio2 (type 7)
    [  118.307524] remoteproc remoteproc11: remote processor 5d00000.r5f is now up
    [  118.309780] virtio_rpmsg_bus virtio2: creating channel ti.ipc4.ping-pong addr 0xd
    root@j784s4-evm:~# [  118.322064] virtio_rpmsg_bus virtio2: creating channel rpmsg_chrdev addr 0xe
    

    Best Regards,
    Keerthy

  • Hello Keerthy,

    Thank you for your answer.

    I followed your instructions, but I still can't stop the core.

    In order to be aligned, I followed the following process:

    • During the j784s4 boot, set "setenv dorprocboot 0". I confirmed the status change by checking with printenv.
    • After boot, I confirmed the status change in dmesg with the following messages:
      [    6.975506] platform 5c00000.r5f: configured R5F for remoteproc mode  <-------
      [    6.983685] omap-mailbox 31f84000.mailbox: omap mailbox rev 0x66fca100
      [    6.984305] omap-mailbox 31f85000.mailbox: omap mailbox rev 0x66fca100
      [    6.992477] platform 41000000.r5f: configured R5F for IPC-only mode
      [    7.000871] platform 5c00000.r5f: assigned reserved memory node r5f-dma-memory@a2000000
      [    7.007193] platform 41000000.r5f: assigned reserved memory node r5f-dma-memory@a0000000
      [    7.008325] mtdblock: MTD device 'ospi_nand.u-boot' is NAND, please consider using UBI block devices instead.
      [    7.014508] remoteproc remoteproc0: 5c00000.r5f is available
      [    7.016135] m_can_platform 40528000.can mcu_mcan0: renamed from can0
      [    7.020228] cdns-ufshcd 4e84000.ufs: ufshcd_populate_vreg: Unable to find vdd-hba-supply regulator, assuming enabled
      [    7.028017] remoteproc remoteproc1: 41000000.r5f is available
      [    7.029973] remoteproc remoteproc0: powering up 5c00000.r5f  <-------
      [    7.029985] remoteproc remoteproc0: Booting fw image j784s4-main-r5f0_0-fw, size 82648
      [    7.030005] platform 5d00000.r5f: configured R5F for remoteproc mode
      [    7.031216] platform 5d00000.r5f: assigned reserved memory node r5f-dma-memory@a3000000
      

    • In the rootfs, I confirmed the core's status - it's running.
    • I ran the "echo stop" command to stop the core.
    • I only have one core running. The firmware that's running is the following:

    j784s4-main-r5f0_0-fw -> /usr/lib/firmware/ti-ipc/j784s4/ipc_echo_test_mcu2_0_release_strip.xer5f

    FYI, I don't have any environment variables in u-boot named name_overlays.

    echo start > /sys/class/remoteproc/remoteproc6/state
    [   43.848475] remoteproc remoteproc6: powering up 5c00000.r5f
    [   43.855322] remoteproc remoteproc6: Booting fw image j784s4-main-r5f0_0-fw, size 82648
    [   43.864308] rproc-virtio rproc-virtio.9.auto: assigned reserved memory node r5f-dma-memory@a2000000
    [   43.873958] virtio_rpmsg_bus virtio1: rpmsg host is online
    [   43.879545] rproc-virtio rproc-virtio.9.auto: registered virtio1 (type 7)
    [   43.886335] remoteproc remoteproc6: remote processor 5c00000.r5f is now up
    
    sh-5.2# echo stop > /sys/class/remoteproc/remoteproc6/state
    [   52.270069] platform 5c00000.r5f: k3_r5_rproc_stop: timeout waiting for rproc completion event
    [   52.278684] remoteproc remoteproc6: can't stop rproc: -16
    sh: echo: write error: Device or resource busy

    Best regards,
    Joao Lima

  • Joao,

    Can you share the uenv.txt file in the boot partition of your SD card? 

    Best Regards,

    Keerthy 

  • Hello Keerthy,

    Please find below the content of uenv.txt:

    addr_fit=0x90000000
    arch=arm
    args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02880000 ${mtdparts}
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    args_ospi_nand=setenv bootargs console=${console} ${optargs} ubi.mtd=${ospi_nand_bootpart} root=${ospi_nand_bootvolume} rootfstype=ubifs
    args_ufs=setenv devtype scsi;setenv bootpart 1:1; run ufs_finduuid; setenv bootargs console = ${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${scsirootfstype}; setenv devtype scsi; setenv bootpart 1:1
    baudrate=115200
    board=j784s4
    board_name=j784s4
    board_rev=E4
    board_serial=0062
    board_software_revision=01
    boot=mmc
    boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
    boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootaa64.efi; if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
    boot_efi_bootmgr=if fdt addr -q ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr;fi
    boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
    boot_fdt=try
    boot_fit=0
    boot_net_usb_start=usb start
    boot_prefixes=/ /boot/
    boot_rprocs=if test ${dorprocboot} -eq 1 && test ${boot} = mmc; then rproc init; run boot_rprocs_mmc; fi;
    boot_rprocs_mmc=env set rproc_id; env set rproc_fw; env set secure_suffix; if test ${secure_rprocs} -eq 1; then env set secure_suffix -sec; fi; for i in ${rproc_fw_binaries} ; do if test -z "${rproc_id}" ; then env set rproc_id $i; else env set rproc_fw $i${secure_suffix}; run rproc_load_and_boot_one; env set rproc_id; env set rproc_fw; fi; done
    boot_script_dhcp=boot.scr.uimg
    boot_scripts=boot.scr.uimg boot.scr
    boot_syslinux_conf=extlinux/extlinux.conf
    boot_targets=ti_mmc mmc0 mmc1 usb0 pxe dhcp
    bootcmd= mmc dev 0 1; mmc partconf 0 1 1 1; mmc read 0x82000000 0x3400 0x100; setexpr.b redundantA *0x82000004; mmc dev 0 2; mmc partconf 0 1 2 1; mmc read 0x82000000 0x3400 0x100; setexpr.b redundantB *0x82000004; if test $redundantB -gt $redundantA; then mmc dev 0 2; mmc partconf 0 1 2 1; mmc read 0x82000000 0x3400 0x100; env import -b 0x82000005 0x1FFFB; else mmc dev 0 1; mmc partconf 0 1 1 1; mmc read 0x82000000 0x3400 0x100; env import -b 0x82000005 0x1FFFB; fi; setexpr bootcount $bootcount + 1; env export -b 0x82000005; crc32 0x82000005 0x1FFFB 0x82000000; setexpr.b byte0 *0x82000000; setexpr.b byte1 *0x82000001; setexpr.b byte2 *0x82000002; setexpr.b byte3 *0x82000003; mw.b 0x82000000 $byte3 1; mw.b 0x82000001 $byte2 1; mw.b 0x82000002 $byte1 1; mw.b 0x82000003 $byte0 1; mmc write 0x82000000 0x3400 0x100; if test ${mmcdev} -eq 0; then run distro_bootcmd; else setenv mmcdev 0; setenv bootpart 0:1; mmc dev 0 1; mmc partconf 0 1 1 1; mmc bootbus 0 2 0 0; run bootcmd_dfu; gzwrite mmc 0 0x80000000 0x1F400000 100000 0; run bootcmd_mmc; fi;
    bootcmd_dfu=setenv dfu_alt_info ${dfu_alt_info_ram_rootfs}; dfu 0 ram 0
    bootcmd_dhcp=devtype=dhcp; run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00011:UNDI:003000;setenv bootp_arch 0xb;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr -q ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
    bootcmd_mmc=setenv dfu_alt_info ${dfu_alt_info_emmc}; dfu 0 mmc 0
    bootcmd_mmc0=devnum=0; run mmc_boot
    bootcmd_mmc1=devnum=1; run mmc_boot
    bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
    bootcmd_ti_mmc=run findfdt; run init_${boot}; if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1; then run main_cpsw0_qsgmii_phyinit; fi; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_fit_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;
    bootcmd_usb0=devnum=0; run usb_boot
    bootcount=1
    bootdelay=2
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootlimit=5
    bootm_size=0x10000000
    bootpart=1:2
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyS2,115200n8
    cpu=armv8
    default_device_tree=ti/k3-j784s4-evm.dtb
    dfu_alt_info_emmc=rawemmc raw 0 0x80000000 mmcpart 0; tiboot3.bin.raw raw 0x0 0x800 mmcpart 1; tispl.bin.raw raw 0x800 0x1800 mmcpart 1; u-boot.img.raw raw 0x1800 0x3800 mmcpart 1; uEnv.txt.raw raw 0x3400 0x100 mmcpart 1; tiboot3_2.bin.raw raw 0x0 0x800 mmcpart 2; tispl_2.bin.raw raw 0x800 0x1800 mmcpart 2; u-boot_2.img.raw raw 0x1800 0x3800 mmcpart 2; uEnv_2.txt.raw raw 0x3400 0x100 mmcpart 2
    dfu_alt_info_mmc=boot part 1 1; rootfs part 1 2; tiboot3.bin fat 1 1; tispl.bin fat 1 1; u-boot.img fat 1 1; uEnv.txt fat 1 1; sysfw.itb fat 1 1
    dfu_alt_info_nand=NAND.tiboot3 part 0 1; NAND.tispl part 0 2; NAND.tiboot3.backup part 0 3; NAND.u-boot part 0 4; NAND.u-boot-env part 0 5; NAND.u-boot-env.backup part 0 6; NAND.file-system part 0 7
    dfu_alt_info_ospi=tiboot3.bin raw 0x0 0x080000; tispl.bin raw 0x080000 0x200000; u-boot.img raw 0x280000 0x400000; u-boot-env raw 0x680000 0x020000; sysfw.itb raw 0x6c0000 0x100000; rootfs raw 0x800000 0x3800000
    dfu_alt_info_ospi_nand=ospi_nand.tiboot3 part 1; ospi_nand.tispl part 2; ospi_nand.u-boot part 3; ospi_nand.env part 4; ospi_nand.env.backup part 5; ospi_nand.rootfs part 6; ospi_nand.phypattern part 7
    dfu_alt_info_ram=tispl.bin ram 0x80080000 0x200000; u-boot.img ram 0x81000000 0x400000
    dfu_alt_info_ram_rootfs=ram ram 0x80000000 0x1F400000
    distro_bootcmd=scsi_need_init=; for target in ${boot_targets}; do run bootcmd_${target}; done
    do_main_cpsw0_qsgmii_phyinit=1
    dorprocboot=0
    dtboaddr=0x89000000
    efi_dtb_prefixes=/ /dtb/ /dtb/current/
    envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev}; if run loadbootscript; then run bootscript; else mmc dev 0 1; if run isboot1active; then mmc dev 0 2; fi; if run loadbootenv; then echo Loaded env from ${bootenvfile}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi; fi; fi;
    ethaddr=08:04:b4:2d:9d:0d
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtcontroladdr=fde8fdf0
    fdtoverlay_addr_r=0x89000000
    findfdt=setenv name_fdt ${default_device_tree}; if test $board_name = am69-sk; then setenv name_fdt ti/k3-am69-sk.dtb; fi; if test $board_name = j784s4; then setenv name_fdt ti/k3-j784s4-evm.dtb; fi; setenv fdtfile ${name_fdt}
    finduuid=part uuid ${boot} ${bootpart} uuid
    get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt}
    get_fdt_ospi_nand=ubifsload ${fdtaddr} ${bootdir}/dtb/${fdtfile};
    get_fdt_ufs=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile}
    get_fit_mmc=load mmc ${bootpart} ${addr_fit} ${bootdir}/${name_fit}
    get_fit_ospi_nand=ubifsload ${addr_fit} ${bootdir}/${name_fit}
    get_fit_overlaystring=for overlay in $name_overlays; do; setexpr name_fit_overlay gsub / _ conf-${overlay}; setenv overlaystring ${overlaystring}'#'${name_fit_overlay}; done;
    get_kern_mmc=load mmc ${bootpart} ${loadaddr} ${bootdir}/${name_kern}
    get_kern_ospi_nand=ubifsload ${loadaddr} ${bootdir}/${name_kern}
    get_kern_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}

    I tried to put the following information inside a code box but it gave an error. That's why I'm pasting it here.

    get_overlay_mmc=fdt address ${fdtaddr}; fdt resize 0x100000; for overlay in $name_overlays; do; load mmc ${bootpart} ${dtboaddr} ${bootdir}/dtb/ti/${overlay} && fdt apply ${dtboaddr}; done;
    get_overlay_ospi_nand=fdt address ${fdtaddr} fdt resize 0x100000; for overlay in $name_overlays; do; ubifsload ${dtboaddr} ${bootdir}/dtb/${overlay} && fdt apply ${dtboaddr}; done;
    get_overlay_ufs=fdt address ${fdtaddr}; fdt resize 0x100000; for overlay in $name_overlays; do; load scsi ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && fdt apply ${dtboaddr}; done;
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -b ${loadaddr} ${filesize}
    init_main_cpsw0_qsgmii_phy=gpio set gpio@22_17; gpio clear gpio@22_16
    init_mmc=run args_all args_mmc
    init_ospi_nand=run args_all args_ospi_nand ospi_nand_ubi_init
    init_ufs=ufs init; scsi scan; run args_ufs
    isboot0active=mmc partcheck-enable 0 1
    isboot1active=mmc partcheck-enable 0 2
    kernel_addr_r=0x82000000
    load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
    loadaddr=0x82000000
    loadbootenv=mmc read ${loadaddr} 0x3400 0x100
    loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    main_cpsw0_qsgmii_phyinit=if test $board_name = j784s4; then do_main_cpsw0_qsgmii_phyinit=1; else do_main_cpsw0_qsgmii_phyinit=0; fi; if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1 && test ${dorprocboot} -eq 1 && test ${boot} = mmc; then run init_main_cpsw0_qsgmii_phy; fi;
    mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi
    mmcboot=mmc dev ${mmcdev}; devnum=${mmcdev}; devtype=mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev}; if run loadimage; then run args_mmc; if test ${boot_fit} -eq 1; then run run_fit; else run mmcloados; fi; fi; fi;
    mmcdev=1
    mmcloados=if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run get_fdt_mmc; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
    mmcrootfstype=ext4 rootwait
    mtdids=nor0=47040000.spi.0,nand0=spi-nand0
    mtdparts=mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);spi-nand0:512k(ospi_nand.tiboot3),2m(ospi_nand.tispl),4m(ospi_nand.u-boot),256k(ospi_nand.env),256k(ospi_nand.env.backup),98048k@32m(ospi_nand.rootfs),256k@130816k(ospi_nand.phypattern)
    name_fit=fitImage
    name_kern=Image
    ospi_nand_bootpart=ospi_nand.rootfs
    ospi_nand_bootvolume=ubi0:rootfs
    ospi_nand_ubi_init=ubi part ${ospi_nand_bootpart}; ubifsmount ${ospi_nand_bootvolume};
    partitions=name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}
    pxefile_addr_r=0x80100000
    ramdisk_addr_r=0x88080000
    rd_spec=-
    rdaddr=0x88080000
    rproc_fw_binaries= 1 /lib/firmware/j784s4-mcu-r5f0_1-fw 2 /lib/firmware/j784s4-main-r5f0_0-fw 3 /lib/firmware/j784s4-main-r5f0_1-fw 4 /lib/firmware/j784s4-main-r5f1_0-fw 5 /lib/firmware/j784s4-main-r5f1_1-fw 6 /lib/firmware/j784s4-main-r5f2_0-fw 7 /lib/firmware/j784s4-main-r5f2_1-fw 8 /lib/firmware/j784s4-c71_0-fw 9 /lib/firmware/j784s4-c71_1-fw 10 /lib/firmware/j784s4-c71_2-fw 11 /lib/firmware/j784s4-c71_3-fw
    rproc_load_and_boot_one=if load mmc ${bootpart} $loadaddr ${rproc_fw}; then if rproc load ${rproc_id} ${loadaddr} ${filesize}; then rproc start ${rproc_id}; fi; fi
    run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring}
    run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}
    scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
    scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then part uuid ${devtype} ${devnum}:${distro_bootpart} distro_bootpart_uuid ; run scan_dev_for_boot; fi; done; setenv devplist
    scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;run boot_efi_bootmgr;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootaa64.efi; then echo Found EFI removable media binary efi/boot/bootaa64.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
    scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo EXTLINUX FAILED: continuing...; fi
    scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
    scriptaddr=0x80000000
    scsi_boot=run scsi_init; if scsi dev ${devnum}; then devtype=scsi; run scan_dev_for_boot_part; fi
    scsi_init=if ${scsi_need_init}; then scsi_need_init=false; scsi scan; fi
    scsirootfstype=ext4 rootwait
    secure_rprocs=0
    serial#=0000000000000062
    soc=k3
    splashfile=ti.gz
    splashimage=0x82000000
    splashpos=m,m
    splashsource=mmc
    stderr=serial@2880000
    stdin=serial@2880000
    stdout=serial@2880000
    ubifs_boot=if ubi part ${bootubipart} ${bootubioff} && ubifsmount ubi0:${bootubivol}; then devtype=ubi; devnum=ubi0; bootfstype=ubifs; distro_bootpart=${bootubivol}; run scan_dev_for_boot; ubifsumount; fi
    ufs_finduuid=part uuid scsi ${bootpart} uuid
    update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit}
    usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi
    vendor=ti

    Best regards,
    Joao Lima

  • Hello Joao,

    FYI, I don't have any environment variables in u-boot named name_overlays.

    There is definitely a difference due to different uEnv.txt. Can you look at the default uEnv.txt in tar file below:

    https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-lOshtRwR8P/11.00.00.08/boot-adas-j784s4-evm.tar.gz

    The uEnv.txt that I am using:

    # 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.
    
    # Update the Linux hostname based on board_name
    # The SK also requires an additional dtbo to boot. Prepend it to name_overlays depending on board_name
    uenvcmd=if test "$board_name" = "am69-sk"; then ; setenv args_all $args_all systemd.hostname=am69a-sk ; fi
    
    # Setting the right U-Boot environment variables
    dorprocboot=0
    #name_overlays=ti/k3-j784s4-evm-ethfw.dtbo ti/k3-j784s4-vision-apps.dtbo

    Try with the above & let me know.

    BTW this is not supported by vision Apps firmware as shutdown is complex with camera pipeline running. This graceful shutdown is just a proof of concept with simpler ipc echo test binaries.

    Thanks,
    Keerthy

  • Hello Keerthy,

    Good news.

    We discovered that the bootloader version we were using was not the most update. We are now updating the version.

    Thanks for your help and time.

    Best regards,
    Joao Lima