Discussion:
[gem5-users] Autostart programms on Gem5 linux 16.04.1 OS
Yunxia Zhu
2018-08-28 13:08:58 UTC
Permalink
Hi everyone,

I have some doubts about how to create an autostart programms on gem5 linux
16.04.1 OS.
1. Automatic login
When I start the linux by QEMU, it can automatically login without user
name and password on tty1. But when I start it by Gem5 simulatior, it
failed and it login on ttyS0. Why does it happen and how can I login
automatically?
2. Autostart program
I want to write a script which can be automatically started when we login
into the OS by gem5. Because I want to check if the script works or not, I
wish the function of this script is to create a folder when OS is
running. Could anyone give me an idea? Thank you


with best regards
Yunxia Zhu
Ciro Santilli
2018-08-28 14:24:16 UTC
Permalink
Post by Yunxia Zhu
Hi everyone,
I have some doubts about how to create an autostart programms on gem5
linux 16.04.1 OS.
1. Automatic login
When I start the linux by QEMU, it can automatically login without user
name and password on tty1. But when I start it by Gem5 simulatior, it
failed and it login on ttyS0. Why does it happen and how can I login
automatically?
Are you using the same image for both? This should work the same on both.

I'm guessing you are using a different gem5 image, check your inittab:
https://unix.stackexchange.com/questions/299408/how-to-login-automatically-without-typing-the-root-username-or-password-in-build/300152#300152
You can experiment with it as shown at:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/9010e094d66809c5c9e364954d42d41436302f29#tty

Or just to /bin/sh directly from the init=

This setup just logs in automatically for both QEMU and gem5 if you give up
on yours:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/9010e094d66809c5c9e364954d42d41436302f29#gem5-getting-started
Post by Yunxia Zhu
2. Autostart program
I want to write a script which can be automatically started when we login
into the OS by gem5. Because I want to check if the script works or not, I
wish the function of this script is to create a folder when OS is
running. Could anyone give me an idea? Thank you
Learn about the Linux init=/path/to/my/executable command line parameter.
Then if you want to restore a checkpoint after boot, use m5 readfile. This
can be done with the trivial: configs/boot/hack_back_ckpt.rcS

Minimal fully automated example at:
https://github.com/cirosantilli/linux-kernel-module-cheat/tree/9010e094d66809c5c9e364954d42d41436302f29#gem5-run-benchmark
Post by Yunxia Zhu
with best regards
Yunxia Zhu
_______________________________________________
gem5-users mailing list
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
Loading...