00. Using QEMU
QUEMU Windows installation (in Russian)
- Using MIPS32EL ALT Wrikstation linux distro
- staring qemu:
$ qemu-system-mips64el -kernel vmlinuz -append "console=tty0 root=/dev/sda rootwait " -m 2G -serial stdio -drive file=0.img -device virtio-keyboard-pci -net nic -net user,hostfwd=tcp::2270-:22 -cpu mips64dspr2 -vga std -display gtk -device usb-mouse
- starting from windows:
C:\Program Files\qemu> qemu-system-mips64el.exe -kernel C:\Users\username\Downloads\vmlinuz -append "console=tty0 root=/dev/sda rootwait " -m 2G -serial stdio -drive file=C:\Users\username\Downloads\0.img -device virtio-keyboard-pci -net nic -net user,hostfwd=tcp::2270-:22 -cpu mips64dspr2 -vga std -display gtk -device usb-mouse
- Graphcal mode
Using geany as IDE
Compiling and running.c-file by hand from terminal command line
$ cc file.c $ ./a.out
or$ cc file.c -o prog $ ./prog
Using ssh: hostfwd=tcp::2270-:22 means that connecting to host port 2270 is redirected to 22 port of virtual machine
- Windows:
Install Git command line for windows
Clock Git bach here anywhere at file browser
ssh -oHostkeyAlias=mips user@localhost -p 2270
- answer "yes" if connecting for the first time
- password: user
- Console editors:
vim ( do not try if you don't know what it is; at least passing through https://www.openvim.com/ is previously recommended]]
mcedit
- Windows:
- Translating to MIPS assembler language
$ compile file.c
compile is a script, will be explained later
most of unknown .something strings are special GNU assembler directives, ignore it