Tool/software:
My main question is: why "rpmsg_client_sample.ko" and "rpmsg_char_simple" can't run normally as described in Foundational_Components_IPC_J721E
(1) The board is booted with SD card with prebuilt images.
Linux kernel version '6.6.44-ti-01478-g541c20281af7-dirty SMP"
(2) /opt/vision_apps/vx_app_arm_ipc.out
can run normally
...... 136.207200 s: IPC: RX: mcu2_0 -> mpu1_0 (port 13) msg = 0xdead000e 136.207208 s: IPC: RX: mcu2_1 -> mpu1_0 (port 13) msg = 0xdead000e 136.207216 s: IPC: RX: c6x_1 -> mpu1_0 (port 13) msg = 0xdead000e 136.207224 s: IPC: RX: c6x_2 -> mpu1_0 (port 13) msg = 0xdead000e 136.207232 s: IPC: RX: c7x_1 -> mpu1_0 (port 13) msg = 0xdead000e
(3)Only two files are compiled on Host and copied onto the J721e_evm board:
rpmsg_client_sample.ko, rpmsg_char_simple. They are built according to Foundational_Components_IPC_J721E.
(4)Backup /lib/firmware/j7*
soft links and create new soft links as follows:
root@j721e-evm:~# ls /lib/firmware/j7* -l lrwxrwxrwx 1 root root 69 Oct 9 19:08 /lib/firmware/j7-c66_0-fw -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_c66xdsp_1_release_strip.xe66 lrwxrwxrwx 1 root root 76 Oct 9 19:08 /lib/firmware/j7-c66_0-fw-sec -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_c66xdsp_1_release_strip.xe66.signed lrwxrwxrwx 1 root root 69 Oct 9 19:08 /lib/firmware/j7-c66_1-fw -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_c66xdsp_2_release_strip.xe66 lrwxrwxrwx 1 root root 76 Oct 9 19:08 /lib/firmware/j7-c66_1-fw-sec -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_c66xdsp_2_release_strip.xe66.signed lrwxrwxrwx 1 root root 65 Oct 9 19:05 /lib/firmware/j7-c71_0-fw -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_c7x_1_release_strip.xe71 lrwxrwxrwx 1 root root 72 Oct 9 19:05 /lib/firmware/j7-c71_0-fw-sec -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_c7x_1_release_strip.xe71.signed lrwxrwxrwx 1 root root 67 Oct 9 19:05 /lib/firmware/j7-main-r5f0_0-fw -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu2_0_release_strip.xer5f lrwxrwxrwx 1 root root 74 Oct 9 19:05 /lib/firmware/j7-main-r5f0_0-fw-sec -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu2_0_release_strip.xer5f.signed lrwxrwxrwx 1 root root 67 Oct 9 19:05 /lib/firmware/j7-main-r5f0_1-fw -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu2_1_release_strip.xer5f lrwxrwxrwx 1 root root 74 Oct 9 19:05 /lib/firmware/j7-main-r5f0_1-fw-sec -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu2_1_release_strip.xer5f.signed lrwxrwxrwx 1 root root 67 Oct 9 19:05 /lib/firmware/j7-main-r5f1_0-fw -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu3_0_release_strip.xer5f lrwxrwxrwx 1 root root 74 Oct 9 19:05 /lib/firmware/j7-main-r5f1_0-fw-sec -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu3_0_release_strip.xer5f.signed lrwxrwxrwx 1 root root 67 Oct 9 19:05 /lib/firmware/j7-main-r5f1_1-fw -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu3_1_release_strip.xer5f lrwxrwxrwx 1 root root 74 Oct 9 19:05 /lib/firmware/j7-main-r5f1_1-fw-sec -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu3_1_release_strip.xer5f.signed lrwxrwxrwx 1 root root 67 Oct 9 19:05 /lib/firmware/j7-mcu-r5f0_1-fw -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu1_1_release_strip.xer5f lrwxrwxrwx 1 root root 74 Oct 9 19:05 /lib/firmware/j7-mcu-r5f0_1-fw-sec -> /lib/firmware/ti-ipc/j721e/ipc_echo_test_mcu1_1_release_strip.xer5f.signed
(5)rpmsg_client_sample.ko
fails. It outputs nothing !
root@j721e-evm:~# modprobe ./rpmsg_client_sample.ko count=100
root@j721e-evm:~#
=> env print
addr_fit=0x90000000
arch=arm
args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
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 boot1
baudrate=115200
board=j721e
board_name=j721e
board_rev=A
board_serial=0367
board_software_revision=01
boot=mmc
boot_fdt=try
boot_fit=0
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}"e
boot_targets=mmc1 mmc0 usb pxe dhcp
bootcmd=run envboot; run bootcmd_ti_mmc; bootflow scan -lb
bootcmd_ti_mmc=run init_${boot}; run update_do_main_cpsw0_qsgmii_phyinit; 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;
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootm_size=0x10000000
bootpart=1:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyS2,115200n8
cpu=armv8
dfu_alt_info_emmc=rawemmc raw 0 0x800000 mmcpart 1; rootfs part 0 1; tiboot3.bin.raw raw 0x0 0x400 mmcpart 1; tispl.bin.raw raw 0x400 0x1000 mmcpart 1; u-boot.img.raw raw 0x1400 0x2000 mmcpart 1; u-env.r1
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 00
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
dorprocboot=1
dtboaddr=0x89000000
envboot=if mmc dev ${mmcdev}; then if mmc rescan; then echo SD/MMC found on device ${mmcdev}; if test -n "${loadbootscript}" && run loadbootscript; then run bootscript; else if run loadbootenv; then echo;
eth1addr=70:ff:76:1e:48:38
eth2addr=70:ff:76:1e:48:39
eth3addr=70:ff:76:1e:48:3a
eth4addr=70:ff:76:1e:48:3b
ethaddr=24:76:25:a2:5f:82
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=fde79760
fdtfile=ti/k3-j721e-common-proc-board.dtb
fdtoverlay_addr_r=0x89500000
findfdt=echo WARN: fdtfile already set. Stop using findfdt in script
finduuid=part uuid ${boot} ${bootpart} uuid
get_fdt_mmc=load mmc ${bootpart} ${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_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_ufs=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${name_kern}
get_overlay_mmc=fdt address ${fdtaddr}; fdt resize 0x100000; for overlay in $name_overlays; do; load mmc ${bootpart} ${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 -t ${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_ufs=ufs init; scsi scan; run args_ufs
kernel_addr_r=0x82000000
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
main_cpsw0_qsgmii_phyinit=if test ${do_main_cpsw0_qsgmii_phyinit} -eq 1 && test ${dorprocboot} -eq 1 && test ${boot} = mmc; then run init_main_cpsw0_qsgmii_phy; fi;
mmcboot=if mmc dev ${mmcdev}; then 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_f;
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;
mmcrootfstype=ext4 rootwait
name_fdt=ti/k3-j721e-common-proc-board.dtb
name_fit=fitImage
name_kern=Image
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=2 /lib/firmware/j7-main-r5f0_0-fw 3 /lib/firmware/j7-main-r5f0_1-fw 4 /lib/firmware/j7-main-r5f1_0-fw 5 /lib/firmware/j7-main-r5f1_1-fw 6 /lib/firmware/j7-c66_0-fw 7 /lib/firmware/j7-c6w
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}
scriptaddr=0x80000000
scsirootfstype=ext4 rootwait
secure_rprocs=0
serial#=0000000000000367
soc=k3
stderr=serial@2800000
stdin=serial@2800000
stdout=serial@2800000
ufs_finduuid=part uuid scsi ${bootpart} uuid
update_do_main_cpsw0_qsgmii_phyinit=if test $board_name = J721EX-PM1-SOM || test $board_name = J721EX-PM2-SOM || test $board_name = j721e; then setenv do_main_cpsw0_qsgmii_phyinit 1; else setenv do_main_;
update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${name_fit}
vendor=ti
Environment size: 6963/131067 bytes