Restrict supported platforms

I built a custom package that should be publicly available soon. It works properly only on few selected devices. What are good ways of restricting supported platforms in a way that only those are able to install the package? Let's say the only device I'd like to support is a TP-Link TL-MR6400 v1.0.

I can think of the following ways:

  • Set a dependency on packages that (usually) only appear on supported devices. (Which packages are suited if any?)
  • Within my package, check machine in /proc/cpuinfo and die if not on a list of hardcoded supported devices

I remmber, Luci already has a method to check the new fw if it's ok for the current device, then ask you keep the settings or not. If the fw code not for this device, then ask you force to flash or not.

Or you want to set the function into mtd CLI ?