I recently added custom packages to my openwrt environment.
I noticed something i find strange.
My package compiles successfully and the install rule defined inside the cmake file seems to be use only to create the opkg package. In fact this created package works perfectly if a copy it on the target and install it.
In another side, when i build firmware image, my binary is not installed in the rootfs and to get it works, i had to define a second install rule within package makefile:
$(INSTALL_BIN) $(PKG_BUILD_DIR)/xxxx $(1)/usr/bin/
it works like a charm but i'm wondering why i had to define a second install rule to do exactlty the same thing that i defined within my cmake ...
Is it normal ? did i do something wrong ?
This is a source of error because if i want to my package works when i generate and flash the image on target and i also want to get the opkg package to upgrade for example a target without reflashing, i have to ensure both install rules are correctly defined !
Thank's for help