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.

TDA2HG: Earlyboot:kernel load remoteproc

Part Number: TDA2HG

Hi

My software version: visionSDK3.08.

I use Early Boot and Late Attach to reduce startup time, and then load remoteproc in init-demo.sh.

Perform the following operations before starting apps.out:

modprobe remoteproc
modprobe virtio_rpmsg_bus
modprobe omap_remoteproc
modprobe rpmsg_proto
modprobe rpmsg_rpc

Seen from the kernel log:


powering up 58820000.ipu

Booting fw image dra7-ipu1-fw.xem4

These operations took 0.8s in total.

Isn't remote croe already activated in MLO?

Can these drivers be appropriately deleted or delayed to save startup time?

  • Hi,

    Yes, In early boot remote core is activated from the MLO itself & we just need to attach remote core firmware in the user-space.

    Can I know your early use-case & late use-case?

    Thanks

    Gaviraju

  • Hi,

    I first used the patch path in the SDK as follows:

    ti_vision_sdk_v3.8\ti_components\os_tools\linux\kernel\linux-kernel-addon\earlyboot-lateattach-patches

    I did not use boot_opt.cfg because this modification will affect the network functions of the system, such as eth0, eth1 and a usb network card.

    Is it because boot_opt is not used to cause remoteproc to be reloaded after the kernel is started?

    The configuration in boot_opt.cfg and ipc.cfg conflict. Will the configuration in ipc.cfg have an impact?
    # Set remoteproc into module
    CONFIG_OMAP_REMOTEPROC=y
    CONFIG_RPMSG_RPC=y

  • Hi,

    modprobe remoteproc
    modprobe virtio_rpmsg_bus
    modprobe omap_remoteproc
    modprobe rpmsg_proto
    modprobe rpmsg_rpc

    Can I know the reason for calling the above command before launching the apps.out in the init-demo.sh? because we are not using the above command in our early boot late attach use-case.

    The early use-case is : Capture -> Display_Video

    The late usecase is :  DispDistSrc_weston -> Display_m4

    In our demo, we modified the init-demo.sh script according to our requirements.

    init-demo.zip

    please use the above script & modify according to the requirements  

    Thanks

    Gaviraju

  • Hi,

    You don’t need modprobe driver over there, maybe because in the kernel configuration

    CONFIG_OMAP_REMOTEPROC=y 
    CONFIG_RPMSG_RPC=y, driver has been compiled into the kernel.

    The configuration in boot_opt.cfg and ipc.cfg conflict. 

    I tried to modify the configuration in ipc.cfg, the remoteproc was loaded when the kernel started, and an error was reported, and the IPU1 IPC could not communicate.

    [ 0.847303] remoteproc remoteproc3: 41000000.dsp is available
    [ 0.847677] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
    [ 0.847688] remoteproc remoteproc0: powering up 58820000.ipu
    [ 0.847739] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
    [ 0.847749] remoteproc remoteproc0: request_firmware failed: -2
    [ 0.847802] remoteproc remoteproc1: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
    [ 0.847811] remoteproc remoteproc1: powering up 55020000.ipu
    [ 0.847860] remoteproc remoteproc1: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
    [ 0.847869] remoteproc remoteproc1: request_firmware failed: -2
    [ 0.847919] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [ 0.847928] remoteproc remoteproc2: powering up 40800000.dsp
    [ 0.847980] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [ 0.847988] remoteproc remoteproc2: request_firmware failed: -2
    [ 0.848038] remoteproc remoteproc3: Direct firmware load for dra7-dsp2-fw.xe66 failed with error -2
    [ 0.848046] remoteproc remoteproc3: powering up 41000000.dsp
    [ 0.848096] remoteproc remoteproc3: Direct firmware load for dra7-dsp2-fw.xe66 failed with error -2
    [ 0.848105] remoteproc remoteproc3: request_firmware failed: -2

    How to read M4 firmware without mount rootfs during kernel startup?
    Are there any other configurations that need to be modified?

    boot_opt.cfgipc.cfg

  • Hi,

    Can you give more details on the early & late attach use case? I mean what is the use case?

    What you are trying to achieve?

    Based on your i/p I will discuss with the kernel team & get back.

    Thanks

    Gaviraju

  • Hi,

    Our use case is as follows:

     I want boot more fastly, But now we still need to load the remotecore to communicate normally, which will take up the startup time.

    Didn't earlyboot already start the M4 core?

    Why load the firmware and start it?

  • Hi,

    We are not able to view the image can you attach it again?

    Thanks

    Gaviraju

  • Hi,

    About Early boot & late attach refer to this link to modify https://processors.wiki.ti.com/index.php/Early_Boot_and_Late_Attach_in_Linux.

    Retransmit pictures and provide compressed package. 

     patch.rar

    Thanks

  • Hi,

    Please go through the below threads.

     

    Thanks

    Gaviraju

  • Hi,

    I try to make the remote-proc firmware built-in instead of a module.

    CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y

    CONFIG_OMAP_REMOTEPROC=y

    Kernel log:

    [ 0.760739] remoteproc remoteproc0: Direct firmware load for dra7-ipu1-fw.xem4 failed with error -2
    [ 0.760749] remoteproc remoteproc0: Falling back to syfs fallback for: dra7-ipu1-fw.xem4
    [ 0.760885] remoteproc remoteproc1: Direct firmware load for dra7-ipu2-fw.xem4 failed with error -2
    [ 0.760893] remoteproc remoteproc1: Falling back to syfs fallback for: dra7-ipu2-fw.xem4
    [ 0.761015] remoteproc remoteproc2: Direct firmware load for dra7-dsp1-fw.xe66 failed with error -2
    [ 0.761023] remoteproc remoteproc2: Falling back to syfs fallback for: dra7-dsp1-fw.xe66
    [ 0.761143] remoteproc remoteproc3: Direct firmware load for dra7-dsp2-fw.xe66 failed with error -2
    [ 0.761151] remoteproc remoteproc3: Falling back to syfs fallback for: dra7-dsp2-fw.xe66
    [ 0.761814] hctosys: unable to open rtc device (rtc0)
    [ 0.762203] clk: Not disabling unused clocks
    [ 0.762234] aic_dvdd: disabling
    [ 1.490469] EXT4-fs (mmcblk0p2): recovery complete
    [ 1.493616] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 1.493660] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [ 1.495949] devtmpfs: mounted
    [ 1.497359] Freeing unused kernel memory: 2048K
    [ 1.497507] Run /home/root/init-demo.sh as init process
    [ 1.512798] Kernel Entry time 47341 ticks
    [ 1.871776] remoteproc remoteproc1: powering up 55020000.ipu
    [ 1.871801] remoteproc remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 5404
    [ 1.876377] remoteproc remoteproc1: registered virtio0 (type 7)
    [ 1.876388] remoteproc remoteproc1: remote processor 55020000.ipu is now up
    [ 1.879229] remoteproc remoteproc2: powering up 40800000.dsp
    [ 1.879255] remoteproc remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 5764
    [ 1.879358] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    [ 1.882933] remoteproc remoteproc2: registered virtio1 (type 7)
    [ 1.882945] remoteproc remoteproc2: remote processor 40800000.dsp is now up
    [ 1.885716] remoteproc remoteproc3: powering up 41000000.dsp
    [ 1.885729] remoteproc remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 5764
    [ 1.885807] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
    [ 1.888601] remoteproc remoteproc3: registered virtio2 (type 7)
    [ 1.888609] remoteproc remoteproc3: remote processor 41000000.dsp is now up
    [ 1.901177] pvrsrvkm: loading out-of-tree module taints kernel.
    [ 1.920605] [drm] Initialized pvr 1.17.4948957 20110701 for 56000000.gpu on minor 3
    [ 1.976980] PVR_K: UM DDK-(4948957) and KM DDK-(4948957) match. [ OK ]
    [ 2.000159] virtio_rpmsg_bus virtio0: rpmsg host is online
    [ 2.000920] virtio_rpmsg_bus virtio0: creating channel rpmsg-proto addr 0x50
    [ 2.001696] virtio_rpmsg_bus virtio1: rpmsg host is online
    [ 2.002973] virtio_rpmsg_bus virtio2: rpmsg host is online
    [ 2.003597] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x65
    [ 2.006823] virtio_rpmsg_bus virtio2: creating channel rpmsg-proto addr 0x50
    [ 2.006969] virtio_rpmsg_bus virtio1: creating channel rpmsg-proto addr 0x50
    [ 2.007176] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x66
    [ 2.013530] NET: Registered protocol family 45
    [ 2.026094] rpmsg_rpc virtio0.rpmsg-rpc.-1.101: probing service dce-callback with src 1025 dst 101
    [ 2.026929] rpmsg_rpc virtio0.rpmsg-rpc.-1.101: published functions = 4
    [ 2.027009] rpmsg_rpc virtio0.rpmsg-rpc.-1.102: probing service rpmsg-dce with src 1026 dst 102
    [ 2.027836] rpmsg_rpc virtio0.rpmsg-rpc.-1.102: published functions = 9

    IPU1 and A15 rpc communication failed.

    The log looks similar to executing modprobe loading.

    Will there be a noticeable difference in startup speed?

  • Hi,

    https://processors.wiki.ti.com/index.php/Early_Boot_and_Late_Attach_in_Linux.

    The above link is generic & this is not specific to vision SDK, so we recommending to go through the Linux use-guide

    file:///C:/PROCESSOR_SDK_VISION_03_08_00_00/vision_sdk/docs/Linux/VisionSDK_Linux_UserGuide.pdf ( Chapter 3.4 Build Linux Vision SDK for fast boot (Early boot and late attach of remote cores)

    Follow the instruction provided in chapter 3.4 & make sure the default use-case is working then you can do custom changes.

    Thanks

    Gaviraju

  • Dear Sans

    as mentioned in the meeting at 10/10/2020, the time duration for remoteproc should be 200ms. right?

    Would you please let us know if we can close this ticket?

    Thanks a lot!

    yong

  • Hi Yong

    This problem is not obvious when starting with EMMC.

    Thanks.