Hello everyone.
I have been working with and understanding Matter for while now and have become interested in the idea of a router acting as a border router. I will try to describe what I have done so far and what I hope to achieve. Thank you in advance.
To begin implementing this I have set up a Pi 4B as a basic openWrt (23.05.0) router. My next steps will be to obtain an openthread border router package and have that correctly installed and running.
OpenWrt is new territory so I may use the wrong terminology here and there.
I have found two options for obtaining an otbr package.
From openwrt/packages
https://github.com/openwrt/packages/tree/master/net/openthread-br
This is the guide / implementation I first tried to follow.
It looked promising; I was hoping that opkg would be able to discover it, install it, and everything would work happily ever after. Unfortunately I tripped on the first hurdle. opkg couldn't find the package using...
opkg update
opkg install openthread-br
After looking at the archive opkg updates from (below), I concluded that this otbr package must not be available for this openWrt version.
https://archive.openwrt.org/releases/23.05.0/packages/aarch64_cortex-a72/
Perhaps I need to point opkg to a valid source?
Perhaps I am simply using the wrong package name?
From openthread/ot-br-posix
https://github.com/openthread/ot-br-posix/tree/main/etc/openwrt/openthread-br
This solution looks a little more involved.
- I cloned both the
openwrt
andot-br-posix
git repositories locally. - Following Step 1, I ran into some warnings on the 'feeds' commands.
Here are the warnings... (I later found this comment and continued onto the next steps.)
haydningram@matter-t14:~/chip_test/otbr/openwrt$ ./scripts/feeds update openthread
Updating feed 'openthread' from '/home/haydningram/chip_test/otbr/ot-br-posix/etc/openwrt' ...
Create index file './feeds/openthread.index'
haydningram@matter-t14:~/chip_test/otbr/openwrt$ ./scripts/feeds install openthread-br
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/feeds/openthread/openthread-br/Makefile' has a dependency on 'libavahi-client', which does not exist
WARNING: Makefile 'package/feeds/openthread/openthread-br/Makefile' has a dependency on 'avahi-daemon', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
- Step 2 looked fine...
- On Step 3 I encountered errors during compilation which I cannot get around. I simply do not know enough about what is happening to try debug it.
- I went back to Step 2 and changed the Target System & Subtarget to match my Pi 4B, but the errors did not change.
This error seems to consistently occur on line 232.
haydningram@matter-t14:~/chip_test/otbr/openwrt$ make -j1 V=sc package/openthread-br/compile
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist
WARNING: Makefile 'package/feeds/openthread/openthread-br/Makefile' has a dependency on 'libavahi-client', which does not exist
WARNING: Makefile 'package/feeds/openthread/openthread-br/Makefile' has a dependency on 'avahi-daemon', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist
make[2]: Entering directory '/home/haydningram/chip_test/otbr/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/haydningram/chip_test/otbr/openwrt/scripts/config'
make[1]: Entering directory '/home/haydningram/chip_test/otbr/openwrt'
make[2]: Entering directory '/home/haydningram/chip_test/otbr/openwrt/package/libs/toolchain'
rm -rf /home/haydningram/chip_test/otbr/openwrt/build_dir/target-aarch64_cortex-a72_musl/toolchain/.pkgdir/libc.installed /home/haydningram/chip_test/otbr/openwrt/build_dir/target-aarch64_cortex-a72_musl/toolchain/.pkgdir/libc
mkdir -p /home/haydningram/chip_test/otbr/openwrt/build_dir/target-aarch64_cortex-a72_musl/toolchain/.pkgdir/libc
install -d -m0755 /home/haydningram/chip_test/otbr/openwrt/build_dir/target-aarch64_cortex-a72_musl/toolchain/.pkgdir/libc/lib /home/haydningram/chip_test/otbr/openwrt/build_dir/target-aarch64_cortex-a72_musl/toolchain/.pkgdir/libc/usr/bin
cp -fpR /home/haydningram/chip_test/otbr/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib/ld-musl-*.so* /home/haydningram/chip_test/otbr/openwrt/build_dir/target-aarch64_cortex-a72_musl/toolchain/.pkgdir/libc/lib/
cp: cannot stat '/home/haydningram/chip_test/otbr/openwrt/staging_dir/toolchain-aarch64_cortex-a72_gcc-12.3.0_musl/lib/ld-musl-*.so*': No such file or directory
make[2]: *** [Makefile:740: /home/haydningram/chip_test/otbr/openwrt/build_dir/target-aarch64_cortex-a72_musl/toolchain/.pkgdir/libc.installed] Error 1
make[2]: Leaving directory '/home/haydningram/chip_test/otbr/openwrt/package/libs/toolchain'
time: package/libs/toolchain/compile#0.09#0.02#0.11
ERROR: package/libs/toolchain failed to build.
make[1]: *** [package/Makefile:128: package/libs/toolchain/compile] Error 1
make[1]: Leaving directory '/home/haydningram/chip_test/otbr/openwrt'
make: *** [/home/haydningram/chip_test/otbr/openwrt/include/toplevel.mk:232: package/openthread-br/compile] Error 2
This has left me stuck with both options unable to progress.
If anyone can help me get one of these working then that will be fab.
Thanks again for any help.
: )