Working on a new package (luci-app), and I have added in a couple utilities that are needed. What I mean is, in the Makefile I included, LUCI_DEPENDS:=+lua +luci-compat +i2cset +i2cget
I was assuming (hoping? ) that this would trigger .config updates, to include these last two utilities. But no such luck ... when I build I get the error,
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-app-battstatus:
* i2cset
* i2cget
* opkg_install_cmd: Cannot install package luci-app-battstatus.
Of course I can manually add these dependencies in .config, but I would think this should happen automatically? Or a bad assumption on my part?
I think, but I'm not sure, but LUCI_DEPENDS are only for other LUCI components.
If you want to depend on a non-LUCI component, you need to add a normal DEPENDS line (I think, I could be wrong here, but it would be my first guess)
The other possibility might be that you didn't do a "make oldconfig", or you added those dependencies AFTER enabling the package with an older version of the Makefile
Dang it! I admit, pulling my hair out here ... . I add i2c-tools to LUCI_DEPENDS, and it wants to install it (build fails without it) ... but it's not showing up. Thoughts?
Well, I haven't yet tried compiling it to an image, but the package itself compiles ok and the .ipk file can be installed ok.
Compiling:
perus@ub1910:/Openwrt/r7800$ grep -i i2c .config
# CONFIG_BUSYBOX_DEFAULT_I2CGET is not set
# CONFIG_BUSYBOX_DEFAULT_I2CSET is not set
# CONFIG_BUSYBOX_DEFAULT_I2CDUMP is not set
# CONFIG_BUSYBOX_DEFAULT_I2CDETECT is not set
# CONFIG_BUSYBOX_DEFAULT_I2CTRANSFER is not set
# CONFIG_BUSYBOX_CONFIG_I2CGET is not set
# CONFIG_BUSYBOX_CONFIG_I2CSET is not set
# CONFIG_BUSYBOX_CONFIG_I2CDUMP is not set
# CONFIG_BUSYBOX_CONFIG_I2CDETECT is not set
# CONFIG_BUSYBOX_CONFIG_I2CTRANSFER is not set
# I2C support
# CONFIG_PACKAGE_kmod-i2c-core is not set
# CONFIG_PACKAGE_kmod-iio-bme680-i2c is not set
# CONFIG_PACKAGE_kmod-iio-bmp280-i2c is not set
# CONFIG_PACKAGE_kmod-bmp085-i2c is not set
# CONFIG_PACKAGE_kmod-tpm-i2c-atmel is not set
# CONFIG_PACKAGE_kmod-tpm-i2c-infineon is not set
# CONFIG_PACKAGE_node-cylon-i2c is not set
CONFIG_PACKAGE_libi2c=m
CONFIG_PACKAGE_i2c-tools=m
perus@ub1910:/Openwrt/r7800$ make -j 5 package/i2c-tools/compile
time: target/linux/prereq#0.09#0.00#0.11
make[1] package/i2c-tools/compile
make[2] -C package/libs/toolchain compile
make[2] -C feeds/packages/utils/i2c-tools compile
make[2] -C feeds/packages/utils/i2c-tools compile
perus@ub1910:/Openwrt/r7800$ ls -l bin/packages/arm_cortex-a15_neon-vfpv4/packages/i2c-tools_4.1-3_arm_cortex-a15_neon-vfpv4.ipk
-rw-r--r-- 1 perus perus 20134 tammi 25 10:13 bin/packages/arm_cortex-a15_neon-vfpv4/packages/i2c-tools_4.1-3_arm_cortex-a15_neon-vfpv4.ipk
Installing in live router:
root@router1:~# opkg install /tmp/libi2c_4.1-3_arm_cortex-a15_neon-vfpv4.ipk
Installing libi2c (4.1-3) to root...
Configuring libi2c.
root@router1:~# opkg install /tmp/i2c-tools_4.1-3_arm_cortex-a15_neon-vfpv4.ipk
Installing i2c-tools (4.1-3) to root...
Configuring i2c-tools.
root@router1:~# i2cget
Usage: i2cget [-f] [-y] [-a] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]
I2CBUS is an integer or an I2C bus name
ADDRESS is an integer (0x03 - 0x77, or 0x00 - 0x7f if -a is given)
MODE is one of:
b (read byte data, default)
w (read word data)
c (write byte/read byte)
Append p for SMBus PEC
That helped, thanks! I was adding i2c-tools, but not libi2c. Once I did ... my full build works now, automatically pulls in these packages. Thanks!
FYI, working on adding a battery status display on the top header, for a battery powered (travel) router. It's working now. Really appreciate all the pointers folks. Thanks!!!