I am trying to add a bridge programmatically. Will try to call brctl addbr. But there is no brctl in hikey960. Any help on this? Thanks.
IIRC from your other topics you are using AOSP?
yes, I am using AOSP androidQ
@jasmine8gu
I just checked how to cross build bridge-utils package for arm64 statically(static, to avoid dependency issue while running).
$ wget https://www.kernel.org/pub/linux/utils/net/bridge-utils/bridge-utils-1.6.tar.xz
$ sudo apt-get install autoconf
$ tar -xf bridge-utils-1.6.tar.xz
$ cd bridge-utils-1.6
$ autoconf
$ ./configure CC=aarch64-linux-gnu-gcc LDFLAGS='--static' --host=aarch64-linux-gnu --build=x86-linux-gnu
$ file brctl
brctl: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0,
This feature needs some kernel configs to be enabled. (See below link.)
http://www.linuxfromscratch.org/blfs/view/8.1/basicnet/bridge-utils.html
I think you can do adb push and execute.
1 Like
Thanks very much for your help. Will try it.
Couldn’t figure out cross-compile way. Too many issues happened. Can’t find command, no stdio.h file, etc.
Enventually got a binary compiled for arm. Works now.
Thanks for the help.
Ok.
Good to hear it worked at your side.
If everything works in one shot, there is nothing to learn new.
Regards,
Sreenad.