native: improve make targets flash and term
Maybe make flash could create the tap interface (if it does not already exist) and make term could start the elf file?
(migrated from https://github.com/RIOT-OS/boards/issues/33)
In the light of https://github.com/RIOT-OS/RIOT/issues/161 make flash could start an instance and make term connect to it as well... I'm not sure what's best yet.
On the other hand, tap interfaces can be created and added to a bridge ad-hoc .. so make flash could do both. Maybe creation of the tap interface can be moved into the native startup process altogether. Bridge setup could probably be implemented as a dependency in the native Makefile as well.
Possible resolution:
- make tap command line argument optional so it can be set by the process but it's still possible to have e.g. desvirt set it up
- implement reset command in a sensible manner - whatever that means .. maybe exec?
- add native support to one of the existing riot terminals (pyterm/pseudoterm)
- write some script that acts as a FLASHER for the flash target and takes care of bridge setup
Any plans to work on this?
Reset is more or less implemented (see #787), so it would be possible to start the process on flash and reset on terminal connect (which I personally find strange and would like to have an option for in pyterm).
Regarding tap setup I am not so sure this is a good idea to automate because of the permissions (need sudo/root..). Maybe there's a way around this with some advanced permission manager?
I'd say it's not completely off the radar, but it's probably not going to happen in the next 4 weeks either.
Regarding tap setup I am not so sure this is a good idea to automate because of the permissions (need sudo/root..). Maybe there's a way around this with some advanced permission manager?
Unless you want to require some form of MAC-system that's hard to achive. You could grant the process CAP_NET_ADMIN but that would still compromise security (see man 7 capabilities).
I'm not going to work on this anytime soon.
If there are no other volunteers, I'd like to close this.