OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 6:04 am

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: 22
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: 66
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: 22
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: 812
Location: Hyperspace
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


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: Bing [Bot], SemrushBot [Bot] and 64 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