We have a MIPS (ar71xx) based device which is similar in architecture to a TP-LINK MR3020 router, but has enlarged RAM (64MB) and FLASH (16MB). It's used to monitor energy meters and solar inverters. We have been successfully using OpenWrt 14 (Barrier Breaker) for some years on this device and now want to get OpenWrt 18 running on it. Most of the work is done; we can build and install firmware with the required packages (including our own "solarmon" package which implements our monitoring software) and the device boots and runs.
The issue is Bluetooth, caused by the way the Bluez package is structured and built. One of the functions of our device is to monitor SMA solar inverters via their Bluetooth interface. For that, we need
bluez-lib and the
hcitool utilities provided by Bluez.
If I configure the firmware build (via Menuconfig) to include
bluez-utils, the resulting firmware image is huge (about 8MB) due to
bluez-utils requiring GLib2. But the Bluetooth kernel modules, runtime library (libbluetooth) and hcitool/hciconfig utilities don't require the Glib2 runtime; I can delete that from the running system without causing any problems.
So I'm looking for any suggestions as to how I can include
hciconfig in our firmware image without having to also include Glib2. I noticed that the Bluez package builds
hciconfig even if
bluez-utils is not selected in Menuconfig, and I can copy those two programs to our device and they work, without the GLib2 runtime being present.
Is there some way the Makefile for my own "solarmon" package to reference those files?