Development flow

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
heavyweight87
Posts: 22
Joined: Sun Apr 28, 2019 7:39 am

Development flow

Post by heavyweight87 »

Hi,

I've taken off past the meaty skeleton and am making good progress.
The main thing slowing me down however is the development flow of making a change, building and restarting my emulator.

I am using vscode to debug, which is great, but every time I do I change I need to rebuild my source, and restart qemu.

Is there a better way of reloading changes?
I couldn't find anything on the wiki about this.

Thanks
User avatar
thomtl
Member
Member
Posts: 66
Joined: Mon Sep 03, 2018 2:25 am

Re: Development flow

Post by thomtl »

I don't think you can get any faster, you can't skip compilation and if you are already using the meaty skeleton system you shouldn't compile the full kernel each time but only the changed parts. And booting QEMU is really fast, on my laptop from 2013 it takes under a second. I don't know how long the VScode debugger takes to initialize so you could try to remove that part for normal testing and only initialize it when you use "make debug" or something
heavyweight87
Posts: 22
Joined: Sun Apr 28, 2019 7:39 am

Re: Development flow

Post by heavyweight87 »

yeh all in all its not so bad, I just thought there might be a way to load the changed binary without having to close qemu.

I guess the annoying part is having to close qemu and load it up again. Im pretty sure everything can be automated with vscode anyway
User avatar
eekee
Member
Member
Posts: 892
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Development flow

Post by eekee »

I think you can avoid closing qemu if you set up for network boot. It falls back to that if it can't find a bootable partition. The kernel file could be served straight from the compilation directory. I'm not sure of what all is involved in network boot though. As standard, you need a specially configured DHCP server. Qemu might make it easy with its internal DHCP server.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Twicetimes
Posts: 13
Joined: Sun May 29, 2016 10:53 am

Re: Development flow

Post by Twicetimes »

I don't know if qemu is a must-have for you, but I've using VirtualBox and have a short script that my Makefile runs on each rebuild that starts/reboots the appropriate VM as part of the build sequence.

(The odd mix of bash and windows .exe's is because I'm running under WSL, but if you're on linux ofc you would just invoke whatever VM's manage executable is called there)

Code: Select all

#!/bin/sh

VBoxManage.exe list runningvms | grep '"myos"'
if [ ! $? -eq 0 ]; then
	VBoxManage.exe startvm myos
else
	VBoxManage.exe controlvm myos reset
fi
Post Reply