aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel-defaults.mk
Commit message (Expand)AuthorAgeFilesLines
* kernel: Revert "kernel: set root on NFS when enabled"Florian Fainelli2016-02-111-13/+0
* kernel: enable CONFIG_KALLSYMS_UNCOMPRESSED=yFelix Fietkau2016-02-081-1/+1
* kernel: set root on NFS when enabledFlorian Fainelli2016-02-011-0/+13
* include/kernel: add custom USER/DOMAIN config optionsFelix Fietkau2016-01-281-0/+2
* build: skip rebuild of kernel images if the source did not changeFelix Fietkau2016-01-061-7/+9
* build: suppress unnecessary kernel config rewrites to speed up buildFelix Fietkau2016-01-061-5/+10
* build: Allow kernel modules to set build ID debug symbolFelix Fietkau2015-10-301-1/+2
* config: add an option to enable KPROBEJohn Crispin2015-04-011-1/+0
* build: remove obsolete references to cris and avr32Felix Fietkau2015-03-241-5/+0
* include: pass kernel version when generating kconfig overridesJo-Philipp Wich2015-01-291-2/+2
* kernel: allow specifying kernel images to be copied separately from kernel ma...Felix Fietkau2014-12-111-3/+4
* build: remove useless quote stripping for KERNELNAME, add fallback for it in ...Felix Fietkau2014-10-051-9/+4
* build: make sure modules are modposted after initramfs image is builtFelix Fietkau2014-10-051-2/+2
* target/linux/*/image/Makefile: eliminate more LINUX_DIR usersJohn Crispin2014-07-211-0/+1
* include: Allow git kernel branch selectionJohn Crispin2014-06-021-0/+4
* include: Clean-up kernel git command options managementJohn Crispin2014-06-021-1/+7
* config: Remove KERNEL_GIT_LOCAL_REPOSITORY optionJohn Crispin2014-06-021-8/+2
* sparse: add as a new package selectable from the configJohn Crispin2014-04-121-0/+4
* partially revert "build: remove check for nonexistant CONFIG_TAR_VERBOSITY va...Felix Fietkau2014-03-221-1/+1
* include: r39979 broke kernel unpackingJohn Crispin2014-03-211-1/+1
* kernel: fix parallel build issues with header installFelix Fietkau2014-01-301-1/+1
* add x86_64 target supportImre Kaloz2014-01-071-0/+5
* include: handle LZ4 compression schemeFlorian Fainelli2013-10-251-0/+1
* kernel: fix remaining initramfs related breakageFelix Fietkau2013-07-231-2/+2
* include: fix path for kernel-generated cpio removalLuka Perkov2013-07-021-1/+1
* include: force a kernel-generated cpio removal and rebuildFlorian Fainelli2013-07-011-0/+1
* buildroot: filter out dtbs KERNELNAME target (#13785)Florian Fainelli2013-06-301-1/+1
* buildroot: copy KENRNELNAME files to $(KDIR)Florian Fainelli2013-06-271-0/+10
* buildroot: build a second pass kernel if initramfs is enabledFlorian Fainelli2013-06-271-6/+29
* buildroot: workaround broken syntax highlightingFlorian Fainelli2013-06-271-0/+1
* kernel: add missing CONFIG_KALLSYMS_UNCOMPRESSED symbolFlorian Fainelli2013-01-151-0/+1
* use xz compressed kernel tarballsImre Kaloz2012-11-181-1/+1
* kernel-defaults: factor common code handling initramfs optionsFlorian Fainelli2012-10-311-30/+25
* properly reindent Kernel/Prepare/DefaultFlorian Fainelli2012-10-301-6/+6
* kernel: suppress redundant calls to headers installationFelix Fietkau2012-09-151-1/+1
* kernel: remove the explicit kernel make call for "oldconfig prepare scripts",...Felix Fietkau2012-09-151-1/+0
* kernel: fix portability issues on the x86 specific relocs host tool, fixes bu...Felix Fietkau2012-07-201-0/+1
* build: allow KERNELNAME to contain multiple kernel make targetsFlorian Fainelli2012-06-181-1/+1
* include/kernel-defaults: set V='' if c is not set in OPENWRT_VERBOSEGabor Juhos2012-05-051-1/+1
* Fix iptables abuse of kernel header files. Use exported headers instead.Gabor Juhos2012-05-031-0/+1
* build: rework verbosity level selectionFelix Fietkau2012-04-261-5/+2
* enable verbose output of kernel build if V=99 is passedMirko Vogt2012-04-241-0/+4
* define external cpioJohn Crispin2012-04-051-0/+16
* include: calculate md5sum over sorted kernel config symbol list and incorpera...Jo-Philipp Wich2012-01-081-0/+1
* add a portable version of sys/sysmacros.h and and let the kernel use the host...Felix Fietkau2011-07-021-0/+2
* build: clean up handling of the kernel configFelix Fietkau2011-04-061-1/+1
* only support EABI on ARM targetsImre Kaloz2011-03-071-2/+0
* fixup board specific KERNELNAME overridesImre Kaloz2011-01-271-3/+1
* 2.6.38 supports xz ramdisks, tooImre Kaloz2011-01-241-0/+1
* make targets provide their KERNELNAMEFlorian Fainelli2010-11-081-9/+0
CRO_EEPROM_ADDR); while ( p != end ) { eeprom_update_byte(p, 0); ++p; } } #endif void eeprom_init_kb(void) { // If the EEPROM has the magic, the data is good. // OK to load from EEPROM. if (eeprom_is_valid()) { load_custom_config(); } else { #ifdef DYNAMIC_KEYMAP_ENABLE // This resets the keymaps in EEPROM to what is in flash. dynamic_keymap_reset(); // This resets the macros in EEPROM to nothing. dynamic_keymap_macro_reset(); // Reset the custom stuff dynamic_keymap_custom_reset(); #endif // Save the magic number last, in case saving was interrupted save_backlight_config_to_eeprom(); eeprom_set_valid(true); } } __attribute__ ((weak)) void matrix_init_board(void); void matrix_init_kb(void){ eeprom_init_kb(); /* MOSI pin*/ palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_ALTERNATE(0)); wait_ms(500); #ifdef RGBLIGHT_ENABLE leds_init(); #endif backlight_init_ports(); matrix_init_board(); } void matrix_scan_kb(void) { #ifdef RGBLIGHT_ENABLE rgblight_task(); #endif } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BL_INC: if (record->event.pressed) { kb_backlight_config.level = kb_backlight_config.level + 1; if(kb_backlight_config.level > BACKLIGHT_LEVELS){ kb_backlight_config.level = BACKLIGHT_LEVELS; } backlight_set(kb_backlight_config.level); save_backlight_config_to_eeprom(); } return false; case BL_TOGG: if (record->event.pressed) { kb_backlight_config.enable = !kb_backlight_config.enable; if(kb_backlight_config.enable){ backlight_set(kb_backlight_config.level); } else { backlight_set(0); } save_backlight_config_to_eeprom(); } return false; case BL_DEC: if (record->event.pressed) { if(kb_backlight_config.level <= 1){ kb_backlight_config.level = 0; } else { kb_backlight_config.level = kb_backlight_config.level - 1; } backlight_set(kb_backlight_config.level); save_backlight_config_to_eeprom(); } return false; case BL_BRTG: if (record->event.pressed) { kb_backlight_config.breathing = !kb_backlight_config.breathing; breathing_toggle(); save_backlight_config_to_eeprom(); } return false; default: break; } #ifdef DYNAMIC_KEYMAP_ENABLE // Handle macros if (record->event.pressed) { if ( keycode >= MACRO00 && keycode <= MACRO15 ) { uint8_t id = keycode - MACRO00; dynamic_keymap_macro_send(id); return false; } } #endif //DYNAMIC_KEYMAP_ENABLE return process_record_user(keycode, record);; } // Start Dynamic Keymap code #ifdef RAW_ENABLE void raw_hid_receive( uint8_t *data, uint8_t length ) { uint8_t *command_id = &(data[0]); uint8_t *command_data = &(data[1]); switch ( *command_id ) { case id_get_protocol_version: { command_data[0] = PROTOCOL_VERSION >> 8; command_data[1] = PROTOCOL_VERSION & 0xFF; break; } case id_get_keyboard_value: { switch( command_data[0]) { case id_uptime: { uint32_t value = timer_read32(); command_data[1] = (value >> 24 ) & 0xFF; command_data[2] = (value >> 16 ) & 0xFF; command_data[3] = (value >> 8 ) & 0xFF; command_data[4] = value & 0xFF; break; } default: { *command_id = id_unhandled; break; } } break; } #ifdef DYNAMIC_KEYMAP_ENABLE case id_dynamic_keymap_get_keycode: { uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); command_data[3] = keycode >> 8; command_data[4] = keycode & 0xFF; break; } case id_dynamic_keymap_set_keycode: { dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); break; } case id_dynamic_keymap_reset: { dynamic_keymap_reset(); break; } case id_dynamic_keymap_macro_get_count: { command_data[0] = dynamic_keymap_macro_get_count(); break; } case id_dynamic_keymap_macro_get_buffer_size: { uint16_t size = dynamic_keymap_macro_get_buffer_size(); command_data[0] = size >> 8; command_data[1] = size & 0xFF; break; } case id_dynamic_keymap_macro_get_buffer: { uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; uint16_t size = command_data[2]; // size <= 28 dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); break; } case id_dynamic_keymap_macro_set_buffer: { uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; uint16_t size = command_data[2]; // size <= 28 dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); break; } case id_dynamic_keymap_macro_reset: { dynamic_keymap_macro_reset(); break; } case id_dynamic_keymap_get_layer_count: { command_data[0] = dynamic_keymap_get_layer_count(); break; } case id_dynamic_keymap_get_buffer: { uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; uint16_t size = command_data[2]; // size <= 28 dynamic_keymap_get_buffer( offset, size, &command_data[3] ); break; } case id_dynamic_keymap_set_buffer: { uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; uint16_t size = command_data[2]; // size <= 28 dynamic_keymap_set_buffer( offset, size, &command_data[3] ); break; } #endif // DYNAMIC_KEYMAP_ENABLE case id_eeprom_reset: { eeprom_reset(); break; } case id_bootloader_jump: { // Need to send data back before the jump // Informs host that the command is handled raw_hid_send( data, length ); // Give host time to read it wait_ms(100); bootloader_jump(); break; } default: { // Unhandled message. *command_id = id_unhandled; break; } } // Return same buffer with values changed raw_hid_send( data, length ); } #endif