Creator Ci40 Openwrt Linux Kernel Build Issue

Tagged: ,

This topic contains 4 replies, has 3 voices, and was last updated by  Amit 1 year, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #53797

    Amit
    Member

    Hi,
    I am trying to build OpenWRT Linux Kernel for Ci40 Creator board. However when I select CONFIG_VPE_LOADER support and I get the following error.
    ———————————————————————————————–
    arch/mips/built-in.o: In function `vpe_run’:
    (.text.vpe_run+0x1d0): undefined reference to `physical_memsize’
    arch/mips/built-in.o: In function `vpe_run’:
    (.text.vpe_run+0x1d4): undefined reference to `physical_memsize’
    make[5]: *** [vmlinux] Error 1
    ———————————————————————————————-
    Can somebody please let me know how to fix this error?

    Regards,
    Amit.

    #53802

    Duncan
    Moderator

    Hi. Are you pulling fresh kernel\IOpenWrt source from their respective mainlines or have you taken the Ci40 OpenWrt environment from our github account – https://github.com/IMGCreator/openwrt?

    Duncan

    #53803

    Amit
    Member

    Hi Duncan,
    I am currently using Ci40 OpenWrt from github. My aim is to build a linux application which will leverage the Multithreading capability of the InterAptive core.

    I was able to resolve the error by defining the physical_memsize variable as 0x10000000L(256MB). I got the kernel built. I notice that one dev file is created for VPE.

    Following are my questions.

    1. How do I leverage the MT capability of the InterAptive core by writing Linux user space multithreaded (POSIX thread) application?
    2. Through kernel command line option I have passed maxvpes=2 and maxtcs=2 and configured the number of CPUs to 2. However only one dev is created (/dev/vpe1). Why are not four dev files created (one for each VPE)? I am unclear of the use of /dev/vpe1.

    It would be very helpful of you if you can guide me regarding the above queries.

    Regards,
    Amit.

    #53804

    Matthew
    Member

    Hi Amit,
    Linux handles the multiple VPEs / multithreading in the Interaptiv core internally and teats them as multiple logical CPUs. Therefore if you have an Interaptiv with 2 cores, 2 threads per core – as on the Ci40 board, Linux will have 4 logical CPUs available to it. If you cat /proc/cpuinfo, you will see these 4 CPUs.
    Linux will schedule tasks across these logical CPUs, so if you write an application that uses POSIX pthreads, the threads will be scheduled across the logical CPUs, all VPEs of all physical cores.
    If you have a /dev/vpe1 node, I think you have configured the VPE loader. This is intended to allow you to run bare metal code on a VPE while at the same time having Linux running on the others. If you are just wanting to run a multithreaded Linux application, this is certainly not what you needs and you should probably disable CONFIG_MIPS_VPE_LOADER.

    I hope this helps,
    Matt

    #53805

    Amit
    Member

    Hi Matthew,
    Thank you very much for your detailed answer and clearing my misunderstanding.

    Regards,
    Amit.

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Creator Platforms’ is closed to new topics and replies.