Adds .qmk file type as a target for QMK Toolbox (#1084)
* adds .qmk file type as a target * adds info.json with vendor and product * add files for qmk info script * add layout file for planck * ignore .qmk files * more settings * update rules for avr and chibios * update .qmk generation for info.json and inheritence
This commit is contained in:
parent
d069a42c07
commit
fe56fffe7d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,6 +4,7 @@
|
||||||
*.eep
|
*.eep
|
||||||
*.elf
|
*.elf
|
||||||
*.hex
|
*.hex
|
||||||
|
*.qmk
|
||||||
!util/bootloader.hex
|
!util/bootloader.hex
|
||||||
!quantum/tools/eeprom_reset.hex
|
!quantum/tools/eeprom_reset.hex
|
||||||
*.log
|
*.log
|
||||||
|
|
|
@ -96,6 +96,30 @@ ifndef TEENSY_LOADER_CLI
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Generate a .qmk for the QMK-FF
|
||||||
|
qmk: $(BUILD_DIR)/$(TARGET).hex
|
||||||
|
zip $(TARGET).qmk -FSrj $(KEYMAP_PATH)/*
|
||||||
|
zip $(TARGET).qmk -u $<
|
||||||
|
printf "@ $<\n@=firmware.hex\n" | zipnote -w $(TARGET).qmk
|
||||||
|
printf "{\n \"generated\": \"%s\"\n}" "$$(date)" > $(BUILD_DIR)/$(TARGET).json
|
||||||
|
if [ -f $(KEYBOARD_PATH_5)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_5)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
if [ -f $(KEYBOARD_PATH_4)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_4)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
if [ -f $(KEYBOARD_PATH_3)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_3)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
if [ -f $(KEYBOARD_PATH_2)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_2)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
if [ -f $(KEYBOARD_PATH_1)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_1)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
zip $(TARGET).qmk -urj $(BUILD_DIR)/$(TARGET).json
|
||||||
|
printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk
|
||||||
|
|
||||||
# Program the device.
|
# Program the device.
|
||||||
program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
|
program: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep
|
||||||
$(PROGRAM_CMD)
|
$(PROGRAM_CMD)
|
||||||
|
|
|
@ -180,6 +180,30 @@ EXTRALIBDIRS = $(RULESPATH)/ld
|
||||||
|
|
||||||
DFU_UTIL ?= dfu-util
|
DFU_UTIL ?= dfu-util
|
||||||
|
|
||||||
|
# Generate a .qmk for the QMK-FF
|
||||||
|
qmk: $(BUILD_DIR)/$(TARGET).bin
|
||||||
|
zip $(TARGET).qmk -FSrj $(KEYMAP_PATH)/*
|
||||||
|
zip $(TARGET).qmk -u $<
|
||||||
|
printf "@ $<\n@=firmware.bin\n" | zipnote -w $(TARGET).qmk
|
||||||
|
printf "{\n \"generated\": \"%s\"\n}" "$$(date)" > $(BUILD_DIR)/$(TARGET).json
|
||||||
|
if [ -f $(KEYBOARD_PATH_5)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_5)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
if [ -f $(KEYBOARD_PATH_4)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_4)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
if [ -f $(KEYBOARD_PATH_3)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_3)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
if [ -f $(KEYBOARD_PATH_2)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_2)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
if [ -f $(KEYBOARD_PATH_1)/info.json ]; then \
|
||||||
|
jq -s '.[0] * .[1]' $(BUILD_DIR)/$(TARGET).json $(KEYBOARD_PATH_1)/info.json | ex -sc 'wq!$(BUILD_DIR)/$(TARGET).json' /dev/stdin; \
|
||||||
|
fi
|
||||||
|
zip $(TARGET).qmk -urj $(BUILD_DIR)/$(TARGET).json
|
||||||
|
printf "@ $(TARGET).json\n@=info.json\n" | zipnote -w $(TARGET).qmk
|
||||||
|
|
||||||
dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter
|
dfu-util: $(BUILD_DIR)/$(TARGET).bin sizeafter
|
||||||
$(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
|
$(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue