forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request qmk#73 from dragon788/dragon_mod
Requesting some comments and review on my changes
- Loading branch information
Showing
8 changed files
with
645 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ tags | |
*~ | ||
build/ | ||
*.bak | ||
.vagrant/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Quick Start Directions | ||
|
||
This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter. | ||
|
||
## Requirements | ||
|
||
Using the Vagrantfile in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion). | ||
|
||
*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. | ||
|
||
Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below. | ||
|
||
Build Firmware and Program Controller | ||
------------------------------------- | ||
See [doc/build.md](tmk_core/doc/build.md), or the README in the particular keyboard/* folder. | ||
|
||
Change your keymap | ||
------------------ | ||
See [doc/keymap.md](tmk_core/doc/keymap.md). | ||
|
||
## Flashing the firmware | ||
|
||
The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](keyboard/ergodox_ez/README.md) gives a great example. | ||
|
||
If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
Vagrant.configure(2) do |config| | ||
# You can only have one config.vm.box uncommented at a time | ||
|
||
# Comment this and uncomment another if you don't want to use the minimal Arch box | ||
config.vm.box = "dragon788/arch-ala-elasticdog" | ||
|
||
# VMware/Virtualbox 64 bit | ||
# config.vm.box = "phusion/ubuntu-14.04-amd64" | ||
# | ||
# VMware/Virtualbox 64 bit | ||
#config.vm.box = "puphpet/centos65-x64" | ||
# | ||
# The opensuse boxes don't have dfu-util in their default repositories | ||
# | ||
# The virtualbox version has tools issues | ||
# VMware/Virtualbox 64 bit | ||
#config.vm.box = "bento/opensuse-13.2-x86_64" | ||
# | ||
# Virtualbox only | ||
#config.vm.box = "bento/opensuse-13.2-i386" | ||
# config.vm.box = "" | ||
# config.vm.box = "" | ||
|
||
# This section allows you to customize the Virtualbox VM | ||
# settings, ie showing the GUI or upping the memory | ||
# or cores if desired | ||
config.vm.provider "virtualbox" do |vb| | ||
# Hide the VirtualBox GUI when booting the machine | ||
vb.gui = false | ||
# Uncomment the below lines if you want to program | ||
# your Teensy via the VM rather than your host OS | ||
#vb.customize ['modifyvm', :id, '--usb', 'on'] | ||
#vb.customize ['usbfilter', 'add', '0', | ||
# '--target', :id, | ||
# '--name', 'teensy', | ||
# '--vendorid', '0x16c0', | ||
# '--productid','0x0478' | ||
# ] | ||
# Customize the amount of memory on the VM: | ||
vb.memory = "512" | ||
end | ||
|
||
# This section allows you to customize the VMware VM | ||
# settings, ie showing the GUI or upping the memory | ||
# or cores if desired | ||
config.vm.provider "vmware_workstation" do |vmw| | ||
# Hide the VMware GUI when booting the machine | ||
vmw.gui = false | ||
|
||
# Customize the amount of memory on the VM: | ||
vmw.memory = "512" | ||
end | ||
|
||
config.vm.provider "vmware_fusion" do |vmf| | ||
# Hide the vmfare GUI when booting the machine | ||
vmf.gui = false | ||
|
||
# Customize the amount of memory on the VM: | ||
vmf.memory = "512" | ||
end | ||
|
||
# This script ensures the required packages for AVR programming are installed | ||
# It also ensures the system always gets the latest updates when powered on | ||
# If this causes issues you can run a 'vagrant destroy' and then | ||
# add a # before ,args: and run 'vagrant up' to get a working | ||
# non-updated box and then attempt to troubleshoot or open a Github issue | ||
|
||
config.vm.provision "shell", run: "always", path: "avr_setup.sh", args: "-update" | ||
|
||
config.vm.post_up_message = """ | ||
Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win) | ||
or 'vagrant ssh-config' and Putty or Bitvise SSH or another SSH tool | ||
Change directory (cd) to the keyboard you wish to program | ||
(Optionally) modify your layout, | ||
then run 'make clean' | ||
and then 'make' to compile the .eep and .hex files. | ||
Or you can copy and paste the example line below. | ||
cd /vagrant; cd keyboard; cd ergodox_ez; make clean; make | ||
""" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/usr/bin/env bash | ||
# This script will attempt to setup the Linux dependencies for compiling QMK/TMK | ||
|
||
# This could probably go much lower, but since we are including an Arch vagrant, | ||
# making it the first match makes sense | ||
|
||
if [[ -n "$(type -P pacman )" ]]; then | ||
# Arch linux and derivatives like Apricity | ||
# Future improvements: | ||
# Allow user to speed up package installs using powerpill/wget tweaks | ||
# Always run the pacman mirror update script if possible when vagrant comes up | ||
# This will ensure that users never get stalled on a horribly slow mirror | ||
pacman -Syyu --needed --noconfirm | ||
pacman -S --needed --noconfirm \ | ||
base-devel \ | ||
avr-gcc \ | ||
avr-binutils \ | ||
avr-libc \ | ||
dfu-util | ||
|
||
elif [[ -n "$(type -P apt-get)" ]]; then | ||
# Debian and derivatives | ||
# This block performs completely non-interactive updates {{ | ||
export DEBIAN_FRONTEND=noninteractive | ||
export DEBCONF_NONINTERACTIVE_SEEN=true | ||
echo "grub-pc hold" | dpkg --set-selections | ||
apt-get -y update | ||
apt-get -y --allow-unauthenticated upgrade \ | ||
-o Dpkg::Options::="--force-confdef" \ | ||
-o Dpkg::Options::="--force-confold" | ||
# }} | ||
apt-get install -y \ | ||
build-essential \ | ||
gcc \ | ||
unzip \ | ||
wget \ | ||
zip \ | ||
gcc-avr \ | ||
binutils-avr \ | ||
avr-libc \ | ||
dfu-util | ||
|
||
elif [[ -n "$(type -P yum)" ]]; then | ||
# Fedora, CentOS or RHEL and derivatives | ||
yum -y makecache && yum -y update | ||
yum -y install \ | ||
gcc \ | ||
glibc-headers \ | ||
kernel-devel \ | ||
kernel-headers \ | ||
make \ | ||
perl \ | ||
git \ | ||
wget \ | ||
avr-binutils \ | ||
avr-gcc \ | ||
avr-libc \ | ||
dfu-util | ||
|
||
elif [[ -n "$(type -P zypper)" ]]; then | ||
# openSUSE | ||
zypper --non-interactive refresh && zypper --non-interactive update | ||
zypper --non-interactive install \ | ||
git \ | ||
make \ | ||
gcc \ | ||
kernel-devel \ | ||
patch \ | ||
wget \ | ||
dfu-programmer | ||
|
||
fi |
Oops, something went wrong.