Skip to content

Instantly share code, notes, and snippets.

@klange
Created May 9, 2014 03:59
Show Gist options
  • Save klange/0a32f03a262269741c99 to your computer and use it in GitHub Desktop.
Save klange/0a32f03a262269741c99 to your computer and use it in GitHub Desktop.
# Start qemu
spawn qemu-system-i386 -kernel toaruos-kernel -m 512 -serial stdio -hda toaruos-disk.img -k en-us -rtc base=localtime -net nic,model=rtl8139 -net user --initrd "hdd/mod/zero.ko,hdd/mod/random.ko,hdd/mod/serial.ko,hdd/mod/procfs.ko,hdd/mod/tmpfs.ko,hdd/mod/ata.ko,hdd/mod/ext2.ko,hdd/mod/debug_shell.ko,hdd/mod/ps2mouse.ko,hdd/mod/ps2kbd.ko,hdd/mod/lfbvideo.ko,hdd/mod/packetfs.ko" -display none -append "start=--vga root=/dev/hda" -no-reboot
expect "toaru-"
send "shell\n"
expect "toaru-test"
send "export PATH=/bin:/usr/bin\n"
expect "toaru-test"
send "uname -a\n"
expect "strawberry"
expect "toaru-test"
send "ls /dev\n"
expect "mouse"
expect "toaru-test"
send "cat /proc/meminfo\n"
expect "MemTotal"
expect "toaru-test"
send "cd /tmp\n"
expect "toaru-test"
send "test-write test.c \"#include <stdio.h>\nint main(int argc, char * argv[]) {\n printf(\\\"Hello world!\\n\\\");\n return 0;\n}\n\"\n"
expect "wrote 99 bytes"
expect "toaru-test"
send "cat test.c\n"
expect "Hello"
expect "toaru-test"
send "gcc -o test test.c\n"
expect "toaru-test"
send "./test\n"
expect "toaru-test"
# And halt
send "reboot\n"
expect "eof"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment