Openvswitch(ovs) build issues on aarch64

hi,
for a specific need, I try to install ovs_2.13.0 on openwrt.21-stable, however this version of ovs is not placed on packages. so I try to buil it from source, but dependcies need to be installed first ans I even stuck at building dependcies due to they are not in the package list also.
anyway my question is, is there any other way to achieve installing ovs.2.13.0 without building every packet from scratch. Im not an software-eng/coder/scripter..
thanks.

Is there a reason why you want an earlier version?

I just built it on aarch64 on OpenWrt master. What dependencies are you missing on OpenWrt 21?

hello VA1DER,
there will be a SDN controller that support specific ovs release as 2.13.0.
unfourtanetly, I need to built it on openwrt machine. I dont try to build an image with ovs2.13.0, but I want to try. but this is not my case.

by the way, Im getting following lines inluding errors.
thanks.

root@OpenWrt-21:/openvswitch-2.13.0# make
sed -f ./build-aux/extract-odp-netlink-h < datapath/linux/compat/include/linux/openvswitch.h > include/odp-netlink.h
sh -f ./build-aux/extract-odp-netlink-macros-h include/odp-netlink.h > include/odp-netlink-macros.h
tail: write error: Broken pipe
tail: write error: Broken pipe
tail: write error: Broken pipe
tail: write error: Broken pipe
tail: write error: Broken pipe
tail: write error: Broken pipe
PYTHONPATH=./python":"$PYTHONPATH PYTHONDONTWRITEBYTECODE=yes /usr/bin/python3 ./ovsdb/ovsdb-idlc.in annotate ./vswitchd/vswitch.ovsschema ./lib/vswitch-idl.ann > lib/vswitch-idl.ovsidl.tmp && mv lib/vswitch-idl.ovsidl.tmp lib/vswitch-idl.ovsidl
.
.
.
make  all-recursive
make[1]: Entering directory '/openvswitch-2.13.0'
Making all in datapath
make[2]: Entering directory '/openvswitch-2.13.0/datapath'
/bin/sh: rev: not found
/bin/sh: rev: not found
cut: standard output: Broken pipe
make[3]: Entering directory '/openvswitch-2.13.0/datapath'
/bin/sh: rev: not found
/bin/sh: rev: not found
cut: standard output: Broken pipe
make[3]: Leaving directory '/openvswitch-2.13.0/datapath'
make[2]: Leaving directory '/openvswitch-2.13.0/datapath'
make[2]: Entering directory '/openvswitch-2.13.0'

EDIT: The following only addresses the later issue. The earlier write error, I don't know. I suspect it's likely another missing tool. I would suggest you look at the link in option three below to the wiki page I wrote, and follow its instructions for setting up your device to build OpenWrt on - specifically on installing all the coreutils and other build tools.

Oh, yes, rev is a util-linux tool that OpenWrt is missing. You can do one of three things:

  1. Use a pre-built rev binary:
    https://va1der.ca/~public/openwrt/bin/aarch64/rev

  2. Build the rev tool, which is one of the tools in util-linux, inside OpenWrt - inside your devel folder do the following (you might need xz and full version of tar for this)
    The patch is just a quick and dirty one to allow you to disable all the other utils and enable only rev (the configure for util-linux doesn't otherwise let you enable rev by itself)

wget https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.39/util-linux-2.39.tar.xz
tar -xaf util-linux-2.39.tar.xz
cd util-linux-2.39
wget -O - -o /dev/null https://va1der.ca/~public/openwrt/patches/util-linux/util_linux_enable_rev.patch | patch -p0
./configure --prefix=/usr --without-systemd --without-btrfs --without-econf --without-util --without-tinfo --disable-all-programs
make rev
  1. Follow these instructions for building OpenWrt ON OpenWrt, which builds rev as part of that procedure.