ccn-lite: introduce feature and use in examples#12423
ccn-lite: introduce feature and use in examples#12423smlng wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
Introducing a new feature for ccn-lite compatibility and append this to Makefile.features for supported boards.
This adds required feature `ccn-lite`, making the BOARDS_WITHLIST obsolete.
|
what do you think about this approach to get rid of some boards list? |
|
I think the approach is not good (I have a PR that can do it in a nicer way, e.g. without having to modify all boards). I'll comment why later (I'm AFK for the moment). |
|
@aabadie take your time. If you're referring to your PR #11676 then this looks very similar to my approach taken here, just What can be improved here is, to link the feature But before adding this I would like to get opinions if this is the way to go at all. |
|
This somehow seems to me a reverse logic. Why is a network stack a feature provided by a board? |
|
mhm, yeah the naming ... but we use the same mechanism for feature |
|
For C++ it somewhat makes sense, as architectural requirements need to be fullfilled by the MCU to run C++. But for CCN-lite it isn't an archictectural requirement that adds the board to the whitelist, isn't it? If it is, maybe this should be a dependency of CCN-lite, which in turn is provided by the board. E.g. (I don't know if this is actually the case here: |
It would indeed be better to have the network stack provide that feature. But currently the build system is not up to the task. (@cladmi: Maybe you have an idea how modules could provide features? So that checking if required features are indeed provide takes places after the dependencies of used modules have resolved.) Back to topic: This is not be the ultimate and final solution. But boards are pretty static, while applications are moving targets. Also, out of tree applications could also use the features, while they would have to manually keep up with the black and white lists. |
|
@miri64 I agree this is not optimal, but to reiterate: the feature mechanism is ready-to-use and can immediately help to get rid of the For instance, we have 2 LUA examples with BOARD_BLACKLIST using the feature concept we can remove this lists and add This helps to remove clutter from the app Makefile and keeping the lists up to date in all applications. This makes it also easier when adding a new board, instead of updating numerous lists in many applications and tests, we just add the feature to the board (or not, if not supported). So its basically one-line per board in its |
|
I think you misunderstood me. I did not say using features is a bad idea nor that the naming is misplaced. I just think, we should rather name the features the board provides that others don't so that compilation or a working application are ensured instead of using the brute force approach of just putting the module there. Just one example: Most applications involving ethos don't work on some boards because they use Segger RTT rather than UART to communicate with the host machine and this is why they are blacklisted. So the |
|
I think #9081 is a good example of what I was talking about. |
|
@miri64 ah okay, now I get what you mean. It might be sometimes difficult to find the features that cover all boards in a whitelist (or blacklist). Anyway, I'll look into that and add changes here. |
In that case we can discuss this, but for |
This is what I think I should do with #12304. Regarding providing ccn-lite as a feature, this is totally non sense to me. In fact, any board with a radio should be able to run ccn-lite. ccn-lite is not a feature, it's a library, a module. To knowi if ccn-lite can be built for a given board, the main criteria is rather: does the board provide an interface (e.g. netif) or not ? This was the initial goal of #11676, where the first versions were providing the netif feature at the board level. But after some thoughts, I realized it was a lot of code duplication for something that is, in fact, provided by the radio drivers implementing the netif/netdev interface. |
|
closing this needs a different approach |
Contribution description
This introduces a new feature
ccn-litewhich is added to board that are currently whitelisted inexamples/ccn-lite-relay. Also this removes the whitelist from the said examples and usesFEATURES_REQUIRED += ccn-liteinstead.This PR should only serve as an example on how to get rid of the boards whitelists and blacklists we currently use, and use features mechanism instead. Applied throughout the build system this should remove the hassle of updating board lists - at least white and black lists.
Testing procedure
Build
examples/ccn-lite-relayfor e.g.samr21-xproandnucleo-f411rewith this PR and on master it should work without warning for the former and should give a warning for the latter board.Though the warnings will differ, the outcome is the same.
Also verify that
make -C examples/ccn-lite-relay info-boards-supportedhas the same output onthis PR and master.
Issues/PRs references
partly replaces #12406