Hi, This is great. Thanks a lot. Let me try that.
Hrishikesh On Mon, Nov 8, 2021 at 8:00 PM Damjan Marion <dmar...@me.com> wrote: > I compiled directly on the Unmatched board. I also submitted series of > patches which are fixing all > issues you are referring to. > > you can use both clang and gcc, problem with clang is that some parts of > VPP unconditionally turn address sanitiser on and there is no ASAN shared > libraries available for risc-v. > You can bypass this temporarely by commenting out test_pnat, test_vat and > test_vat2 targets. > > I also managed to cross-compile vpp on ubuntu system by using debian > multiarch libs. > > # dpkg --add-architecture riscv64 > > Update sources.list: > > deb [arch=arm64,armhf,riscv64] http://ports.ubuntu.com/ubuntu-ports/ > impish main restricted universe multiverse > deb [arch=arm64,armhf,riscv64] http://ports.ubuntu.com/ubuntu-ports/ > impish-updates main restricted universe multiverse > deb [arch=arm64,armhf,riscv64] http://ports.ubuntu.com/ubuntu-ports/ > impish-backports main restricted universe multiverse > > # apt update > > # apt install crossbuild-essential-riscv64 libssl-dev:riscv64 > uuid-dev:riscv64 libnl-3-dev:riscv6 libnl-route-3-dev:riscv64 > libbpf-dev:riscv64 > > > $ cmake \ > -DCMAKE_SYSTEM_NAME=Linux \ > -DCMAKE_SYSTEM_PROCESSOR=riscv64 \ > -DCMAKE_C_COMPILER=riscv64-linux-gnu-gcc \ > -DCMAKE_CXX_COMPILER=riscv64-linux-gnu-gcc \ > -DCMAKE_C_COMPILER_TARGET=riscv64-linux-gnu \ > -DCMAKE_CXX_COMPILER_TARGET=riscv64-linux-gnu \ > -DCMAKE_ASM_COMPILER_TARGET=riscv64-linux-gnu \ > -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \ > -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \ > -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \ > -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \ > -DCMAKE_FIND_ROOT_PATH=/usr/riscv64-linux-gnu \ > -DCMAKE_INSTALL_PREFIX=/usr/local \ > -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \ > -DCMAKE_BUILD_TYPE:STRING=debug \ > -G Ninja \ > -S src \ > -B . > > $ ninja > > $ file bin/vpp > bin/vpp: ELF 64-bit LSB executable, UCB RISC-V, version 1 (SYSV), > dynamically linked, interpreter /lib/ld-linux-riscv64-lp64d.so.1, > BuildID[sha1]=51ac741e44727379a0fbb5936acea4d7b8bdd624, for GNU/Linux > 4.15.0, with debug_info, not stripped > > And run with qemu: > > $ qemu-riscv64-static ./bin/vpp unix interactive > buffer [warn ]: numa[0] falling back to non-hugepage backed buffer > pool (vlib_physmem_shared_map_create: pmalloc_map_pages: failed to mmap 19 > pages at 0x404fc00000 fd 4 numa 0 flags 0x11: Invalid argument) > buffer [warn ]: numa[1] falling back to non-hugepage backed buffer > pool (vlib_physmem_shared_map_create: pmalloc_map_pages: failed to set > mempolicy for numa node 1: Function not implemented) > vlib_physmem_shared_map_create: pmalloc_map_pages: failed to set mempolicy > for numa node 1: Function not implementedsvm_queue_init:57: mutex_init: No > such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > svm_queue_init:57: mutex_init: No such file or directory (errno 2) > vat-plug/load [error ]: vat_plugin_register: oddbuf plugin not > loaded... > _______ _ _ _____ ___ > __/ __/ _ \ (_)__ | | / / _ \/ _ \ > _/ _// // / / / _ \ | |/ / ___/ ___/ > /_/ /____(_)_/\___/ |___/_/ /_/ > > DBGvpp# > > > — > Damjan > > > > > On 08.11.2021., at 14:59, Hrishikesh Karanjikar < > hrishikesh.karanji...@gmail.com> wrote: > > > > Hi, > > > > Thanks for this patch. I will check it out. Which compile did you use? > Did you cross compile or locally compiled it on Qemu or any other platform? > > I was able to compile VPP using GCC10 locally on Qemu but I had to do > other modifications. > > At many places I was able to put RiscV specific code but vector support > for RiscV is still not available so I had to use stubs for compilation to > work. > > > > Thanks, > > Hrishikesh > > > > On Mon, Nov 1, 2021 at 1:53 AM Damjan Marion <dmar...@me.com> wrote: > > > > Here it is: > > > > https://gerrit.fd.io/r/c/vpp/+/34298 > > > > It is early but works for me. > > > > — > > Damjan > > > > > >> On 25.10.2021., at 18:36, Hrishikesh Karanjikar < > hrishikesh.karanji...@gmail.com> wrote: > >> > >> Hi, > >> > >> Yes. SiFive HiFive boards are available. But they do not support Vector > Extension yet. > >> Also Qemu is ready for RiscV. Ubuntu images are available for RIscV. > >> > >> Thanks, > >> Hrishikesh > >> > >> > >> On Mon, Oct 25, 2021 at 9:56 PM Damjan Marion <dmar...@me.com> wrote: > >> > >> > >> > >> > On 14.10.2021., at 15:43, Hrishikesh Karanjikar < > hrishikesh.karanji...@gmail.com> wrote: > >> > > >> > > >> > Hi, > >> > > >> > Is VPP ported for the Risc-V processor? > >> > Is there any project going for the same? > >> > > >> > >> I was looking at that a year ago but I was not able to find any > suitable dev board. > >> > >> Is there anything new on the market? > >> > >> — > >> Damjan > >> > >> > >> > >> -- > >> > >> Regards, > >> Hrishikesh Karanjikar > >> > >> > >> > > > > > > > > -- > > > > Regards, > > Hrishikesh Karanjikar > > -- Regards, Hrishikesh Karanjikar
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20449): https://lists.fd.io/g/vpp-dev/message/20449 Mute This Topic: https://lists.fd.io/mt/86312689/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-