OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 12:25 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Vagrant Development Environment
PostPosted: Sun Apr 05, 2015 1:06 pm 
Offline
User avatar

Joined: Wed May 22, 2013 12:02 am
Posts: 20
Location: The Netherlands
Today I found this. I got really excited and made a Vagrantfile which installs everything you need for os development in an ubuntu 14.04 LTS server instance. I also made a little bash script that downloads, builds and installs a gcc cross compiler to /opt/cross. To start using this create a folder and download the Vagrantfile and installcross.sh files to it. Make sure you have VirtualBox and Vagrant installed on your system. Open a command prompt(bash, cmd, etc.) in the folder you created and run: vagrant up. After it is done run vagrant ssh to ssh into you newly generated development box. When you are done just exit out of ssh and run vagrant halt. Whenever you want to start developing again just run vagrant up and vagrant ssh again. All files in the folder that contains your Vagrantfile will be mounted in the box on /vagrant. So to install the cross compiler just run /vagrant/installcross.sh. You only have to add /opt/cross/bin to your $PATH to be able to use the i686-elf-* programs.

Vagrantfile: here
installcross.sh has been merged into Vagrantfile so that when you run vagrant up for the first time(or vagrant provision if you used this before the merge) it even installs the cross compiler into /opt/cross. I might make it so that it automatically changes the .bashrc file for the vagrant user to add /opt/cross/bin to the path automatically too.
zipfile with the file: here

Hope you find this useful,
Alexander


Last edited by alexander on Fri Apr 10, 2015 12:23 pm, edited 3 times in total.

Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Mon Apr 06, 2015 1:25 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 10:35 pm
Posts: 39
Location: Eagle, ID (USA)
Wow that's pretty interesting, thanks for the info. When I have some time, I may resurrect one of my older computers for this.

_________________
"I think it may be time for some guru meditation"
"Barbarians don't do advanced wizardry"


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Mon Apr 06, 2015 1:34 am 
Offline
User avatar

Joined: Wed May 22, 2013 12:02 am
Posts: 20
Location: The Netherlands
Yeah and the fun thing is that I could've put the installcross.sh script inside Vagrantfile and with that everyone would get the same dev environment when you share the Vagrantfile in a repository.


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Mon Apr 06, 2015 10:27 am 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 10:35 pm
Posts: 39
Location: Eagle, ID (USA)
I had a chance to read through the documentation and I noticed the repo option which is a nice feature to have. I've been wanting to setup a build server for quite a while but never got around to it, this makes it a lot easier to get something up and running. The list of pre-built os images and options for other emulators is also nice.

_________________
"I think it may be time for some guru meditation"
"Barbarians don't do advanced wizardry"


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Mon Apr 06, 2015 12:01 pm 
Offline
User avatar

Joined: Wed May 22, 2013 12:02 am
Posts: 20
Location: The Netherlands
I just merged the installcross.sh script into Vagrantfile. So when you run vagrant up for the first time it will install the cross compiler too!


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Thu Apr 09, 2015 9:08 pm 
Offline
Member
Member
User avatar

Joined: Fri Sep 16, 2011 10:00 am
Posts: 49
Location: Finland
Make sure you mount the folder with the source from your host machine. Vagrant sometimes reinstalls the virtual machine when booting it up.

_________________
I'm Eino Tuominen from Finland, a web software dev learning low level stuff and reading / trying out kernel dev


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Fri Apr 10, 2015 3:26 am 
Offline
Member
Member
User avatar

Joined: Mon Jun 16, 2014 5:59 am
Posts: 543
Location: Shahpur, Layyah, Pakistan
alexander wrote:
[..]
Vragrantfile
[..]

*Vagrantfile. Please correct it.


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Fri Apr 10, 2015 4:23 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
muazzam wrote:
alexander wrote:
[..]
Vragrantfile
[..]

*Vagrantfile. Please correct it.

This post has a lot to correct.

_________________
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Fri Apr 10, 2015 9:33 am 
Offline
User avatar

Joined: Wed May 22, 2013 12:02 am
Posts: 20
Location: The Netherlands
Roman wrote:
muazzam wrote:
alexander wrote:
[..]
Vragrantfile
[..]

*Vagrantfile. Please correct it.

This post has a lot to correct.

Ok I had that wrong all over the place(the github repo was even called VragrantOSSetup). I think I fixed it now. If you seen any more please notify me.

Thanks in advance,
Alexander


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Fri Apr 10, 2015 11:04 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
The topic title is incorrect. "enviroNMent" is correct.

_________________
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environiment
PostPosted: Fri Apr 10, 2015 12:23 pm 
Offline
User avatar

Joined: Wed May 22, 2013 12:02 am
Posts: 20
Location: The Netherlands
Roman wrote:
The topic title is incorrect. "enviroNMent" is correct.

Fixed thank you.


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environment
PostPosted: Fri Apr 10, 2015 2:10 pm 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
Quote:
All files in the folder that contains

Files contain, not containS.

_________________
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environment
PostPosted: Fri Apr 10, 2015 3:31 pm 
Offline
Member
Member

Joined: Thu Mar 25, 2010 11:26 pm
Posts: 1801
Location: Melbourne, Australia
Roman wrote:
Quote:
All files in the folder that contains

Files contain, not containS.
No...

Actually the post says
Quote:
All files in the folder that contains your Vagrantfile will be mounted in the box on /vagrant.
This is correct English. Hmm, perhaps the OP has already fixed the post.

_________________
If a trainstation is where trains stop, what is a workstation ?


Top
 Profile  
 
 Post subject: Re: Vagrant Development Environment
PostPosted: Fri Apr 10, 2015 4:19 pm 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
gerryg400 wrote:
Roman wrote:
Quote:
All files in the folder that contains

Files contain, not containS.
No...

Actually the post says
Quote:
All files in the folder that contains your Vagrantfile will be mounted in the box on /vagrant.
This is correct English. Hmm, perhaps the OP has already fixed the post.

Oops! I misread it, sorry.

_________________
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], FrankRay78, Google [Bot] and 17 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