Skip to content

2.6 Autostart

nongiach edited this page Jun 7, 2018 · 3 revisions

Autostart

With the --autostart option you can tell arm_now to execute a script inside the guest once the vm is started.

$ cat test.sh
echo Hey :D
uname -a
df -h
poweroff
$ arm_now start armv5-eabi --autostart test.sh
Hey :D
Linux buildroot 4.11.3 #1 SMP Sun Mar 4 00:49:28 UTC 2018 armv7l GNU/Linux
Filesystem                Size      Used Available Use% Mounted on
/dev/root                96.9M     22.6M     69.4M  25% /
devtmpfs                122.5M         0    122.5M   0% /dev
tmpfs                   123.0M         0    123.0M   0% /dev/shm
tmpfs                   123.0M     24.0K    123.0M   0% /tmp
tmpfs                   123.0M      8.0K    123.0M   0% /run
$ arm_now start mips32el --autostart test.sh
(use --clean next time) An armv5-eabi image exists, delete ? (y/n) y
Hey :D
Linux buildroot 4.11.3 #1 SMP Sun Mar 4 04:00:34 UTC 2018 mips GNU/Linux
Filesystem                Size      Used Available Use% Mounted on
/dev/root                96.9M     16.1M     75.8M  18% /
devtmpfs                123.4M         0    123.4M   0% /dev
tmpfs                   123.5M         0    123.5M   0% /dev/shm
tmpfs                   123.5M     24.0K    123.5M   0% /tmp
tmpfs                   123.5M      8.0K    123.5M   0% /run