[OpenWrt-Devel] Some questions - help needed

mans0n mans0n at gorani.run
Sat Feb 22 10:28:58 EST 2020


On 20. 2. 22. 9:48 PM, mail at adrianschmutzler.de wrote:
> to make a variable "per-device", you have to add it to DEVICE_VARS, e.g.
> DEVICE_VARS += DEVICE_TYPE

I've tried it, but it did not work. DEVICE_VARS is used in include/image.mk but
DEVICE_TYPE is used in include/target.mk, I guess that is the cause.

It seems "DEVICE_TYPE:=nas" does two things:
1. add more packages to DEFAULT_PACKAGES
2. add hdparm in busybox
The first one might be done in a device-specific way, but I'm not sure about the
second one...

> I've once tried to solve this for the same problem but with kmod-i2c-core IIRC,
> and then quit at some point because I couldn't find the initial source of the problem.

I found it: i2c-gpio-custom. If I remove the package directory, all i2c packages
are nested now. Maybe scripts/package-metadata.pl has some bugs? But it's not the
main topic here.

I replaced all "DEPENDS:=kmod-i2c-core" with "DEPENDS:=+kmod-i2c-core", and removed
unnecessary kmod-i2c-core in DEVICE_PACKAGES. And build test (on ramips) was successful.
So I think I can provide a patch for it (though it needs more build tests).

But what I'm wondering is, how far will we go? Can we add "+" to all kernel
packages (unless it leads to a dependency error)? If "select" alone is enough,
then why do we also use "depends on"?

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list