...
Code Block | ||
---|---|---|
| ||
# You should still be ssh'd into the box
# Check with whoami - it should say "vagrant"
whoami
# Access the shared folder - found at box/shared
cd ~/shared
# Clone the firmware repo
git clone https://github.com/uw-midsun/firmware.git && cd firmware
# Try to build the firmware
make build_all |
...
You're done! From now on, we'll assume you're using our development environment.
FAQ
Q: I've cloned the firmware repo and I'm in the directory, but I can't build it.
A: Are you sure you've actually entered Vagrant's virtual machine? Running whoami
should print vagrant
if you're in our development environment. Remember that all Vagrant just provisions a virtual machine, and you still need to ssh into it to actually access it! Treat it like another computer on the network.
Q: How do I use vagrant? When do I use it?
A: Since vagrant is actually just a virtual machine (in this case, running Ubuntu), it's no different than sshing into a Linux computer on the network. vagrant up
just launches the VM and vagrant ssh
just connects you to it. Whenever you're developing firmware, you should be sshed into the vagrant box.
Q: What is make
? Is it related to vagrant?
A: Make is actually a standard GNU tool for designing build systems! It parses our Makefile so it knows what to do when you run commands such as make build_all
or make lint
. Vagrant just allows us to provide a pre-configured virtual machine with all the dependencies our build system needs, Make included.