OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Oct 20, 2019 12:57 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Development flow
PostPosted: Sun Apr 28, 2019 7:42 am 
Offline

Joined: Sun Apr 28, 2019 7:39 am
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: Development flow
PostPosted: Sun Apr 28, 2019 8:36 am 
Offline
Member
Member
User avatar

Joined: Mon Sep 03, 2018 2:25 am
Posts: 51
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


Top
 Profile  
 
 Post subject: Re: Development flow
PostPosted: Sun Apr 28, 2019 10:08 am 
Offline

Joined: Sun Apr 28, 2019 7:39 am
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: Development flow
PostPosted: Fri May 03, 2019 10:12 am 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 144
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.

_________________
Wir mussen wissen, wir werden wissen.


Top
 Profile  
 
 Post subject: Re: Development flow
PostPosted: Tue Jun 18, 2019 12:09 am 
Offline

Joined: Sun May 29, 2016 10:53 am
Posts: 13
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:
#!/bin/sh

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: 0xCC, Bing [Bot], MSN [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group