cant execute commands on running linux

Harald Seiler hws at
Tue Aug 30 13:06:35 CEST 2022

Hi Maik,

On Tue, 2022-08-30 at 12:57 +0200, Maik Nassauer wrote:
> Thank you very much for the help. It works now. Sadly i am not able to 
> control the power of the board. It hardly depends on the hardware i get 
> from my customers. I ordered a usb hid relais board for integrating it 
> independently in tbot.

Yeah, this is a good idea.  I know how it is, you can't rely on much
with customer hardware.  Our approach is to use switchable 230V outlets,
either USB-controlled (like or
WiFi-controlled ones using the Tasmota firmware.  You can get them quite
cheap these days due to all the smart-home craze.

Relay boards also work, but require a bit more tinkering to integrate.
Especially when hardware comes with an integrated power-supply or
pre-made cables...

One nice advantage of relay boards is: You can also automatically toggle
a jumper on a board with them.  For example, to switch the bootsource.


> Greetings
> Maik
> On 30.08.22 12:46, Harald Seiler wrote:
> > Hi Maik,
> > 
> > On Tue, 2022-08-30 at 12:12 +0200, Maik Nassauer wrote:
> > > Hey all :)
> > > 
> > > Thank you very much for tbot, its a realy nice tool <3
> > 
> > Glad you like it :)
> > 
> > > I cant figure out how to execute commands on the running linux system. I
> > > have to powercycle/reboot the system to get my commands running, because
> > > the LinuxBootLogin is checking for a complete bootup?
> > 
> > This is correct, `LinuxBootLogin` waits for the board to boot and then
> > logs in once the login prompt shows up.  In general, tbot is usually
> > used in such a setup where the board is freshly booted at the start of a
> > test-run.  Ideally, your board config (`MyBoard` class) should use the
> > `board.PowerControl` initializer to automatically control board power.
> > 
> > That said, you can also use tbot in an environment where the board is
> > always running.  In that case, you should leave the board at the shell
> > prompt and use a Linux configuration like this:
> > 
> > 	class MyBoardLinux(board.Connector, linux.Bash):
> > 	    pass
> > 
> > With this config, tbot will assume that the board is already running and
> > waiting at a shell prompt.  Of course this means you have to prepare the
> > board beforehand if it wasn't already on.
> > 
> > While this is possible, in most cases, I have found it to be better to
> > stick to the powercycling approach.  The reason is that little
> > inconsistencies caused by the board staying on will be a pain when
> > debugging hard problems.  If you automate powercontrol with a switchable
> > power outlet, the entire test-run is hands-off.  Then you can focus on
> > doing something else while tbot is running, which makes it much less
> > annoying to have to wait for the board to boot each time.
> > 
> > But I know this heavily depends on the kind of work you do.  If you are
> > mostly working on userspace applications, I understand that it might be
> > much more favorable to keep the board powered on at all times. If that's
> > your usecase, I can prepare a full config with a testcase to
> > automatically boot once and then keeping the board powered on for you.
> > I have some scripts locally which do this but I'll have to clean them
> > first before I can show them here...
> > 


DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-62  Fax: +49-8142-66989-80   Email: hws at

More information about the tbot mailing list