RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

native: improve make targets flash and term

Open LudwigKnuepfer opened this issue 13 years ago • 8 comments

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)

LudwigKnuepfer avatar Nov 09 '13 08:11 LudwigKnuepfer

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.

LudwigKnuepfer avatar Nov 09 '13 08:11 LudwigKnuepfer

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.

LudwigKnuepfer avatar Nov 22 '13 22:11 LudwigKnuepfer

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

LudwigKnuepfer avatar Jan 09 '14 12:01 LudwigKnuepfer

Any plans to work on this?

OlegHahm avatar Jul 16 '14 21:07 OlegHahm

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.

LudwigKnuepfer avatar Jul 17 '14 05:07 LudwigKnuepfer

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).

N8Fear avatar Jul 17 '14 09:07 N8Fear

I'm not going to work on this anytime soon.

LudwigKnuepfer avatar Jan 23 '16 17:01 LudwigKnuepfer

If there are no other volunteers, I'd like to close this.

OlegHahm avatar Jan 23 '16 17:01 OlegHahm