diff --git a/bootloader.mk b/bootloader.mk
new file mode 100644
index 000000000000..29d7333f7126
--- /dev/null
+++ b/bootloader.mk
@@ -0,0 +1,62 @@
+# Copyright 2017 Jack Humbert
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+# If it's possible that multiple bootloaders can be used for one project,
+# you can leave this unset, and the correct size will be selected
+# automatically.
+#
+# Sets the bootloader defined in the keyboard's/keymap's rules.mk
+# Current options:
+# atmel-dfu
+# lufa-dfu
+# qmk-dfu
+# halfkay
+# caterina
+# bootloadHID
+#
+# BOOTLOADER_SIZE can still be defined manually, but it's recommended
+# you add any possible configuration to this list
+
+ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
+ OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
+ OPT_DEFS += -DBOOTLOADER_DFU
+ BOOTLOADER_SIZE = 2048
+endif
+ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
+ OPT_DEFS += -DBOOTLOADER_LUFA_DFU
+ OPT_DEFS += -DBOOTLOADER_DFU
+ BOOTLOADER_SIZE = 2048
+endif
+ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
+ OPT_DEFS += -DBOOTLOADER_QMK_DFU
+ OPT_DEFS += -DBOOTLOADER_DFU
+ BOOTLOADER_SIZE = 2048
+endif
+ifeq ($(strip $(BOOTLOADER)), halfkay)
+ OPT_DEFS += -DBOOTLOADER_HALFKAY
+ BOOTLOADER_SIZE = 512
+endif
+ifeq ($(strip $(BOOTLOADER)), caterina)
+ OPT_DEFS += -DBOOTLOADER_CATERINA
+ BOOTLOADER_SIZE = 2048
+endif
+ifeq ($(strip $(BOOTLOADER)), bootloadHID)
+ OPT_DEFS += -DBOOTLOADER_BOOTLOADHID
+ BOOTLOADER_SIZE = 2048
+endif
+
+ifdef BOOTLOADER_SIZE
+ OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
+endif
\ No newline at end of file
diff --git a/build_keyboard.mk b/build_keyboard.mk
index df025714dbaf..787e8b3fb2ec 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -230,6 +230,7 @@ VPATH += $(USER_PATH)
include common_features.mk
include $(TMK_PATH)/protocol.mk
include $(TMK_PATH)/common.mk
+include bootloader.mk
SRC += $(TMK_COMMON_SRC)
OPT_DEFS += $(TMK_COMMON_DEFS)
diff --git a/docs/flashing.md b/docs/flashing.md
index a61634d21540..38ba1872123b 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -32,7 +32,7 @@ Arduino boards and their clones use the [Caterina bootloader](https://github.com
This block of code allows for Caterina compatibility in QMK:
- #define CATERINA_BOOTLOADER
+ #define BOOTLOADER_CATERINA
These bootloaders are usually 4096 bytes for the atmega32u4 chip.
diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk
index 0a254d0e7962..239b5717b1a5 100644
--- a/keyboards/atreus/rules.mk
+++ b/keyboards/atreus/rules.mk
@@ -5,7 +5,7 @@ ifdef TEENSY2
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
else
OPT_DEFS += -DATREUS_ASTAR
- OPT_DEFS += -DCATERINA_BOOTLOADER
+ OPT_DEFS += -DBOOTLOADER_CATERINA
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
endif
diff --git a/keyboards/atreus62/config.h b/keyboards/atreus62/config.h
index 90a4aa05a6bd..fe7aaf3a8c23 100644
--- a/keyboards/atreus62/config.h
+++ b/keyboards/atreus62/config.h
@@ -38,7 +38,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { D2, D3, D1, D0, D4 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, B5, B4, E6, D7, C6 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h
index c52d9175b881..f535dd3a6196 100644
--- a/keyboards/bfake/config.h
+++ b/keyboards/bfake/config.h
@@ -41,7 +41,7 @@ along with this program. If not, see .
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
+#define BOOTLOADER_BOOTLOADHID 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/bmini/config.h b/keyboards/bmini/config.h
index 90b315b7c5d3..ea65647efa07 100644
--- a/keyboards/bmini/config.h
+++ b/keyboards/bmini/config.h
@@ -34,7 +34,7 @@ along with this program. If not, see .
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
+#define BOOTLOADER_BOOTLOADHID 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/chimera_ortho/rules.mk b/keyboards/chimera_ortho/rules.mk
index 098bf28fa5c6..81aac0e6f85a 100644
--- a/keyboards/chimera_ortho/rules.mk
+++ b/keyboards/chimera_ortho/rules.mk
@@ -1,6 +1,6 @@
OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO
-OPT_DEFS += -DCATERINA_BOOTLOADER
+OPT_DEFS += -DBOOTLOADER_CATERINA
CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk
index c951780e2092..a6770e06dd9b 100644
--- a/keyboards/converter/usb_usb/ble/rules.mk
+++ b/keyboards/converter/usb_usb/ble/rules.mk
@@ -1,4 +1,4 @@
BLUETOOTH = AdafruitBLE
ADAFRUIT_BLE_ENABLE = yes
-OPT_DEFS += -DCATERINA_BOOTLOADER
+OPT_DEFS += -DBOOTLOADER_CATERINA
F_CPU = 8000000
diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h
index b677d09aa952..14b1f17a2508 100644
--- a/keyboards/deltasplit75/v2/config.h
+++ b/keyboards/deltasplit75/v2/config.h
@@ -37,7 +37,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { F4, F5, F6, F7, B1, B3, B2 }
#define MATRIX_COL_PINS { B6, B5, B4, E6, D7, C6, D4, D1}
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/dichotemy/rules.mk b/keyboards/dichotemy/rules.mk
index c8a316f84324..1c01e038d464 100644
--- a/keyboards/dichotemy/rules.mk
+++ b/keyboards/dichotemy/rules.mk
@@ -1,6 +1,6 @@
OPT_DEFS += -DDICHOTEMY_PROMICRO
-OPT_DEFS += -DCATERINA_BOOTLOADER
+OPT_DEFS += -DBOOTLOADER_CATERINA
DICHOTEMY_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h
index 99b057496fcb..397b32a1a964 100644
--- a/keyboards/eco/config.h
+++ b/keyboards/eco/config.h
@@ -31,7 +31,7 @@ along with this program. If not, see .
#define MATRIX_ROWS 4
#define MATRIX_COLS 14
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk
index a9978ef1a30f..a10a94b3d848 100644
--- a/keyboards/ergodox_ez/rules.mk
+++ b/keyboards/ergodox_ez/rules.mk
@@ -54,6 +54,12 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, leave this blank, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = halfkay
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
diff --git a/keyboards/gherkin/keymaps/mjt/config.h b/keyboards/gherkin/keymaps/mjt/config.h
index 9c9f0383897a..70de6e5251fb 100644
--- a/keyboards/gherkin/keymaps/mjt/config.h
+++ b/keyboards/gherkin/keymaps/mjt/config.h
@@ -52,7 +52,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 }
#define MATRIX_COL_PINS { B4, E6, D7, F6, D4, D0 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
#define UNUSED_PINS
diff --git a/keyboards/handwired/MS_sculpt_mobile/rules.mk b/keyboards/handwired/MS_sculpt_mobile/rules.mk
index 622b87626700..a631d2708d45 100644
--- a/keyboards/handwired/MS_sculpt_mobile/rules.mk
+++ b/keyboards/handwired/MS_sculpt_mobile/rules.mk
@@ -6,7 +6,7 @@ SRC= babblePaste.c
ifdef ASTAR
CFLAGS=-D ASTAR
MCU = atmega32u4
- OPT_DEFS += -DCATERINA_BOOTLOADER
+ OPT_DEFS += -DBOOTLOADER_CATERINA
SCULPT_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done ; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
diff --git a/keyboards/handwired/reddot/rules.mk b/keyboards/handwired/reddot/rules.mk
index 492996841031..0e24ca9719cc 100755
--- a/keyboards/handwired/reddot/rules.mk
+++ b/keyboards/handwired/reddot/rules.mk
@@ -42,7 +42,7 @@ ifdef TEENSY2
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
else
OPT_DEFS += -DATREUS_ASTAR
- OPT_DEFS += -DCATERINA_BOOTLOADER
+ OPT_DEFS += -DBOOTLOADER_CATERINA
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
endif
diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h
index 88cc5ad00e95..a00cfd72dc5f 100644
--- a/keyboards/handwired/space_oddity/config.h
+++ b/keyboards/handwired/space_oddity/config.h
@@ -11,7 +11,7 @@
#define PRODUCT Space Odyssey
#define DESCRIPTION Keyboard
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
#define MOUSEKEY_INTERVAL 16
#define MOUSEKEY_DELAY 0
diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk
index 62f94b945219..832bbd026aef 100644
--- a/keyboards/handwired/traveller/rules.mk
+++ b/keyboards/handwired/traveller/rules.mk
@@ -42,7 +42,7 @@ ifdef TEENSY2
ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
else
OPT_DEFS += -DATREUS_ASTAR
- OPT_DEFS += -DCATERINA_BOOTLOADER
+ OPT_DEFS += -DBOOTLOADER_CATERINA
ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
endif
diff --git a/keyboards/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h
index 39a466850e9c..2927371d689e 100644
--- a/keyboards/handwired/woodpad/config.h
+++ b/keyboards/handwired/woodpad/config.h
@@ -53,7 +53,7 @@ along with this program. If not, see .
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
diff --git a/keyboards/iris/rev1/config.h b/keyboards/iris/rev1/config.h
index 10f435a4fc9f..6051a6b6b8a5 100644
--- a/keyboards/iris/rev1/config.h
+++ b/keyboards/iris/rev1/config.h
@@ -37,7 +37,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { D7, E6, B4, B5, D4 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, F4 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/iris/rev2/config.h b/keyboards/iris/rev2/config.h
index 4ba21a58a6dd..ceeae81bff80 100644
--- a/keyboards/iris/rev2/config.h
+++ b/keyboards/iris/rev2/config.h
@@ -37,7 +37,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { D7, E6, B4, D2, D4 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h
index fdea4a0425dc..0b4cf0c8a5f9 100644
--- a/keyboards/jj40/config.h
+++ b/keyboards/jj40/config.h
@@ -32,7 +32,7 @@ along with this program. If not, see .
#define TAPPING_TOGGLE 3
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
+#define BOOTLOADER_BOOTLOADHID 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h
index 7c128421dd81..9a4649fd2f07 100644
--- a/keyboards/lets_split/rev1/config.h
+++ b/keyboards/lets_split/rev1/config.h
@@ -40,7 +40,7 @@ along with this program. If not, see .
// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h
index 1f0603d501e7..722ce1cb5716 100644
--- a/keyboards/lets_split/rev2/config.h
+++ b/keyboards/lets_split/rev2/config.h
@@ -39,7 +39,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h
index 0543e8930d29..c173a84c36f8 100644
--- a/keyboards/lets_split/sockets/config.h
+++ b/keyboards/lets_split/sockets/config.h
@@ -39,7 +39,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { F4, F7, D7, B3, B2, B6}
// #define MATRIX_COL_PINS { B6, B2, B3, C6, F7, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/levinson/rev1/config.h b/keyboards/levinson/rev1/config.h
index 7c8b9b0b92d5..d5da18ffe2fc 100644
--- a/keyboards/levinson/rev1/config.h
+++ b/keyboards/levinson/rev1/config.h
@@ -38,7 +38,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, F4 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/levinson/rev2/config.h b/keyboards/levinson/rev2/config.h
index 27d451a3b285..edf050f63533 100644
--- a/keyboards/levinson/rev2/config.h
+++ b/keyboards/levinson/rev2/config.h
@@ -39,7 +39,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
diff --git a/keyboards/mechmini/config.h b/keyboards/mechmini/config.h
index 96f4bb51e436..00aa174b741f 100644
--- a/keyboards/mechmini/config.h
+++ b/keyboards/mechmini/config.h
@@ -35,7 +35,7 @@ along with this program. If not, see .
#define RGB_DI_PIN E2
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
+#define BOOTLOADER_BOOTLOADHID 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/minidox/rev1/config.h b/keyboards/minidox/rev1/config.h
index 9799c41994a0..600ea27f204e 100644
--- a/keyboards/minidox/rev1/config.h
+++ b/keyboards/minidox/rev1/config.h
@@ -26,7 +26,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { B2, B6, B4, B5 }
#define MATRIX_COL_PINS { F4, D3, D2, D1, D4 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
#define USE_SERIAL
diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk
index 903edb10929e..e5d7ccef0f12 100644
--- a/keyboards/mitosis/rules.mk
+++ b/keyboards/mitosis/rules.mk
@@ -1,6 +1,6 @@
OPT_DEFS += -DMITOSIS_PROMICRO
-OPT_DEFS += -DCATERINA_BOOTLOADER
+OPT_DEFS += -DBOOTLOADER_CATERINA
MITOSIS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h
index 394cc789810c..d9cc74b4bbda 100644
--- a/keyboards/mt40/config.h
+++ b/keyboards/mt40/config.h
@@ -44,7 +44,7 @@ along with this program. If not, see .
#define RGBLIGHT_VAL_STEP 18
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
+#define BOOTLOADER_BOOTLOADHID 1
#define TAPPING_TERM 200
diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/nyquist/rev1/config.h
index 361576887138..2c57df8007ab 100644
--- a/keyboards/nyquist/rev1/config.h
+++ b/keyboards/nyquist/rev1/config.h
@@ -37,7 +37,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h
index 26715f409639..d7d717a518c2 100644
--- a/keyboards/orthodox/rev1/config.h
+++ b/keyboards/orthodox/rev1/config.h
@@ -51,7 +51,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { D2, F5, F6, F7, B6, B5, B4, D7, D6 }
/*/
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h
index 99a93ee79813..ea2dcebfd67e 100644
--- a/keyboards/pearl/config.h
+++ b/keyboards/pearl/config.h
@@ -27,7 +27,7 @@ along with this program. If not, see .
#define DESCRIPTION 40% keyboard
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
+#define BOOTLOADER_BOOTLOADHID 1
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk
index 1fed5fa58a96..2e71bd818f4c 100644
--- a/keyboards/planck/rules.mk
+++ b/keyboards/planck/rules.mk
@@ -34,6 +34,12 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, leave this blank, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = qmk-dfu
+
# Interrupt driven control endpoint task(+60)
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk
index 967c0f2e9096..cc54f189ea55 100644
--- a/keyboards/preonic/rules.mk
+++ b/keyboards/preonic/rules.mk
@@ -37,17 +37,9 @@ ARCH = AVR8
F_USB = $(F_CPU)
# Bootloader
-# This definition is option, and if you keyboard supports multiple bootloaders of
-# different sizes, leave this blank, and your the correct address will be loaded
-# automatically.
-#
-# Options are:
-# * atmel-dfu (default)
-# * lufa-dfu
-# * qmk-dfu (what's generated via the :bootloader target)
-# * halfkay
-# * caterina
-# * bootloadHID
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, leave this blank, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
BOOTLOADER = qmk-dfu
# Interrupt driven control endpoint task(+60)
@@ -63,7 +55,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = yes # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h
index 57ec98519342..b55f8c3a565b 100644
--- a/keyboards/ps2avrGB/config.h
+++ b/keyboards/ps2avrGB/config.h
@@ -27,7 +27,7 @@ along with this program. If not, see .
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
+#define BOOTLOADER_BOOTLOADHID 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/keyboards/viterbi/rev1/config.h b/keyboards/viterbi/rev1/config.h
index 68ca5f362625..b07a3ff87190 100644
--- a/keyboards/viterbi/rev1/config.h
+++ b/keyboards/viterbi/rev1/config.h
@@ -37,7 +37,7 @@ along with this program. If not, see .
#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 }
#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 }
-#define CATERINA_BOOTLOADER
+#define BOOTLOADER_CATERINA
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h
index cdc403d5e2b5..46f29779150e 100644
--- a/keyboards/ymd96/config.h
+++ b/keyboards/ymd96/config.h
@@ -35,7 +35,7 @@ along with this program. If not, see .
#define RGBLIGHT_ANIMATIONS
#define NO_UART 1
-#define BOOTLOADHID_BOOTLOADER 1
+#define BOOTLOADER_BOOTLOADHID 1
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
diff --git a/layouts/community/ergodox/jackhumbert/keymap.c b/layouts/community/ergodox/jackhumbert/keymap.c
index 6a00ffa29334..634e4a0ceea4 100644
--- a/layouts/community/ergodox/jackhumbert/keymap.c
+++ b/layouts/community/ergodox/jackhumbert/keymap.c
@@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_HOME,
KC_SPC,KC_SPC,KC_END,
// right hand
- KC_NO, M(1), KC_7, KC_8, KC_9, KC_0, KC_NO,
+ KC_NO, M(1), RESET, KC_8, KC_9, KC_0, KC_NO,
KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, KC_P, KC_BSPC,
RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_SCLN, KC_QUOT,
KC_NO, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_ENT,
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 09920159660f..9ebaec037420 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -143,7 +143,7 @@ void reset_keyboard(void) {
#else
wait_ms(250);
#endif
-#ifdef CATERINA_BOOTLOADER
+#ifdef BOOTLOADER_CATERINA
*(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
#endif
bootloader_jump();
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk
index 0f18b982a46b..94e9a7bdbb06 100644
--- a/tmk_core/avr.mk
+++ b/tmk_core/avr.mk
@@ -96,37 +96,6 @@ ifndef TEENSY_LOADER_CLI
endif
endif
-# Detect Bootloader
-ifeq ($(strip $(BOOTLOADER)), atmel-dfu)
- OPT_DEFS += -DBOOTLOADER_ATMEL_DFU
- OPT_DEFS += -DBOOTLOADER_DFU
- BOOTLOADER_SIZE = 2048
-endif
-ifeq ($(strip $(BOOTLOADER)), lufa-dfu)
- OPT_DEFS += -DBOOTLOADER_LUFA_DFU
- OPT_DEFS += -DBOOTLOADER_DFU
- BOOTLOADER_SIZE = 2048
-endif
-ifeq ($(strip $(BOOTLOADER)), qmk-dfu)
- OPT_DEFS += -DBOOTLOADER_QMK_DFU
- OPT_DEFS += -DBOOTLOADER_DFU
- BOOTLOADER_SIZE = 2048
-endif
-ifeq ($(strip $(BOOTLOADER)), halfkay)
- OPT_DEFS += -DBOOTLOADER_HALFKAY
- BOOTLOADER_SIZE = 512
-endif
-ifeq ($(strip $(BOOTLOADER)), caterina)
- OPT_DEFS += -DBOOTLOADER_CATERINA
- BOOTLOADER_SIZE = 2048
-endif
-ifeq ($(strip $(BOOTLOADER)), bootloadHID)
- OPT_DEFS += -DBOOTLOADER_BOOTLOADHID
- BOOTLOADER_SIZE = 2048
-endif
-
-OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE))
-
# Generate a .qmk for the QMK-FF
qmk: $(BUILD_DIR)/$(TARGET).hex
zip $(TARGET).qmk -FSrj $(KEYMAP_PATH)/*
diff --git a/tmk_core/common/avr/bootloader.c b/tmk_core/common/avr/bootloader.c
index 96413b0c483a..ba01492d85d1 100644
--- a/tmk_core/common/avr/bootloader.c
+++ b/tmk_core/common/avr/bootloader.c
@@ -85,13 +85,13 @@ uint32_t reset_key __attribute__ ((section (".noinit")));
void bootloader_jump(void) {
#if !defined(BOOTLOADER_SIZE)
- uint8_t high_fuse = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS) & 0b110;
+ uint8_t high_fuse = boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS);
- if (high_fuse == BOOT_SIZE_256) {
+ if (high_fuse & BOOT_SIZE_256) {
bootloader_start = FLASH_SIZE - 256;
- } else if (high_fuse == BOOT_SIZE_512) {
+ } else if (high_fuse & BOOT_SIZE_512) {
bootloader_start = FLASH_SIZE - 512;
- } else if (high_fuse == BOOT_SIZE_1024) {
+ } else if (high_fuse & BOOT_SIZE_1024) {
bootloader_start = FLASH_SIZE - 1024;
} else {
bootloader_start = FLASH_SIZE - 2048;
@@ -101,34 +101,44 @@ void bootloader_jump(void) {
// Something like this might work, but it compiled larger than the block above
// bootloader_start = FLASH_SIZE - (256 << (~high_fuse & 0b110 >> 1));
- #ifndef CATERINA_BOOTLOADER
- #ifdef PROTOCOL_LUFA
- USB_Disable();
- cli();
- _delay_ms(2000);
- #endif
-
- #ifdef PROTOCOL_PJRC
- cli();
- UDCON = 1;
- USBCON = (1<event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
-#ifndef CATERINA_BOOTLOADER
+#ifndef BOOTLOADER_CATERINA
SEND_STRING(":teensy ");
#else
SEND_STRING(" ");
diff --git a/users/drashna/template.c b/users/drashna/template.c
index 027c780e9561..f377d64f7a4f 100644
--- a/users/drashna/template.c
+++ b/users/drashna/template.c
@@ -43,7 +43,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
case KC_MAKE:
if (!record->event.pressed) {
SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
-#ifndef CATERINA_BOOTLOADER
+#ifndef BOOTLOADER_CATERINA
SEND_STRING(":teensy ");
#else
SEND_STRING(" ");