~/MA35D1_Buildroot$ make linux-menuconfig Device Drivers --->
Remoteproc drivers --->
Support for Remote Processor subsystem
<*> MA35D1 remoteproc support
Device Drivers --->
Rpmsg drivers --->
-*- RPMSG device interface
<*> MA35D1 Shared Memory Driver ~/MA35D1_Buildroot/output/build/linux-custom/arch/arm64/boot/dts/nuvoton/ma35d1.dtsi$ vi ma35d1.dtsi rproc { compatible = "nuvoton, ma35d1-rproc"; resets = <&reset MA35D1_RESET_CM4>; memory-region = <&rproc_buf>; status = "okay"; }; rpmsg { compatible = "nuvoton,ma35d1-rpmsg"; share-mem-addr = <0x2401ff00>; mboxes = <&wormhole 2>; tx-smem-size = <128>; rx-smem-size = <128>; status = "okay"; }; hwsem: hwspinlock@40380000 { compatible = "nuvoton,ma35d1-hwsem"; reg = <0x0 0x40380000 0x0 0x1000>; clocks = <&clk HWS_GATE>; clock-names = "hws_gate"; nuvoton,sys = <&sys>; status = "okay"; }; ~/MA35D1_Buildroot$ make linux-rebuild ~/MA35D1_Buildroot$ source output/host/environment-setup ~/MA35D1_Buildroot$ $CC rpmsg.c -o rpmsg ~/MA35D1_Buildroot$ cp -rf rpmsg out/images/target ~/MA35D1_Buildroot$ cp -rf out/images/RTP-BSP out/image/target ~/Buildroot_MA35D1$ make # echo -n 固件路径 > /sys/module/firmware_class/parameters/path # echo Share_memory_demo.elf > /sys/class/remoteproc/remoteproc0/firmware # echo start > /sys/class/remoteproc/remoteproc0/state # ./rpmsg &
|