mirror of https://github.com/zmkfirmware/zmk.git
refactor: Move to Zephyr v4.1.0
Move to Zephyr v4.1.0, with various build/compilation fixes needed for basic use.
This commit is contained in:
parent
e34793e8c7
commit
1e1d537831
|
|
@ -185,10 +185,6 @@ config BT_SMP_ALLOW_UNAUTH_OVERWRITE
|
||||||
config BT_CTLR_PHY_2M
|
config BT_CTLR_PHY_2M
|
||||||
default n if ZMK_BLE_EXPERIMENTAL_CONN
|
default n if ZMK_BLE_EXPERIMENTAL_CONN
|
||||||
|
|
||||||
# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI
|
|
||||||
config BT_TINYCRYPT_ECC
|
|
||||||
default y if BT_HCI && !BT_CTLR
|
|
||||||
|
|
||||||
config ZMK_BLE_THREAD_STACK_SIZE
|
config ZMK_BLE_THREAD_STACK_SIZE
|
||||||
int "BLE notify thread stack size"
|
int "BLE notify thread stack size"
|
||||||
default 768
|
default 768
|
||||||
|
|
@ -705,8 +701,6 @@ rsource "boards/shields/*/Kconfig.shield"
|
||||||
# Duplicated from Kconfig.zephyr
|
# Duplicated from Kconfig.zephyr
|
||||||
osource "$(KCONFIG_BINARY_DIR)/Kconfig.shield.defconfig"
|
osource "$(KCONFIG_BINARY_DIR)/Kconfig.shield.defconfig"
|
||||||
|
|
||||||
source "$(BOARD_DIR)/Kconfig.defconfig"
|
|
||||||
|
|
||||||
# This loads board and shield Kconfigs found under zmk-config/config/
|
# This loads board and shield Kconfigs found under zmk-config/config/
|
||||||
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.defconfig"
|
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.defconfig"
|
||||||
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
|
osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@ endif # LVGL
|
||||||
|
|
||||||
if ZMK_RGB_UNDERGLOW
|
if ZMK_RGB_UNDERGLOW
|
||||||
|
|
||||||
config WS2812_STRIP
|
# config WS2812_STRIP
|
||||||
default y
|
# default y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ config ZMK_SPLIT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW
|
config ZMK_RGB_UNDERGLOW
|
||||||
select WS2812_STRIP
|
# select WS2812_STRIP
|
||||||
select SPI
|
select SPI
|
||||||
|
|
||||||
config ZMK_DISPLAY
|
config ZMK_DISPLAY
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ config ZMK_SPLIT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW
|
config ZMK_RGB_UNDERGLOW
|
||||||
select WS2812_STRIP
|
# select WS2812_STRIP
|
||||||
select SPI
|
select SPI
|
||||||
|
|
||||||
if ZMK_DISPLAY
|
if ZMK_DISPLAY
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ config ZMK_SPLIT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW
|
config ZMK_RGB_UNDERGLOW
|
||||||
select WS2812_STRIP
|
# select WS2812_STRIP
|
||||||
select SPI
|
select SPI
|
||||||
|
|
||||||
config ZMK_DISPLAY
|
config ZMK_DISPLAY
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ config ZMK_SPLIT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW
|
config ZMK_RGB_UNDERGLOW
|
||||||
select WS2812_STRIP
|
# select WS2812_STRIP
|
||||||
select SPI
|
select SPI
|
||||||
|
|
||||||
if ZMK_DISPLAY
|
if ZMK_DISPLAY
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ config ZMK_SPLIT
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW
|
config ZMK_RGB_UNDERGLOW
|
||||||
select WS2812_STRIP
|
# select WS2812_STRIP
|
||||||
select SPI
|
select SPI
|
||||||
|
|
||||||
config ZMK_DISPLAY
|
config ZMK_DISPLAY
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ config SHIELD_SSD1306_128X32
|
||||||
select ZMK_DISPLAY
|
select ZMK_DISPLAY
|
||||||
|
|
||||||
config ZMK_RGB_UNDERGLOW
|
config ZMK_RGB_UNDERGLOW
|
||||||
select WS2812_STRIP
|
# select WS2812_STRIP
|
||||||
select SPI
|
select SPI
|
||||||
|
|
||||||
config ZMK_PM_SOFT_OFF
|
config ZMK_PM_SOFT_OFF
|
||||||
|
|
|
||||||
|
|
@ -65,12 +65,33 @@ if(DEFINED SHIELD)
|
||||||
string(REPLACE " " ";" SHIELD_AS_LIST "${SHIELD}")
|
string(REPLACE " " ";" SHIELD_AS_LIST "${SHIELD}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
string(FIND "${BOARD}" "@" REVISION_SEPARATOR_INDEX)
|
# Helper function for parsing a board's name, revision, and qualifiers,
|
||||||
if(NOT (REVISION_SEPARATOR_INDEX EQUAL -1))
|
# from one input variable to three separate output variables.
|
||||||
math(EXPR BOARD_REVISION_INDEX "${REVISION_SEPARATOR_INDEX} + 1")
|
function(parse_board_components board_in name_out revision_out qualifiers_out)
|
||||||
string(SUBSTRING ${BOARD} ${BOARD_REVISION_INDEX} -1 BOARD_REVISION)
|
if(NOT "${${board_in}}" MATCHES "^([^@/]+)(@[^@/]+)?(/[^@]+)?$")
|
||||||
string(SUBSTRING ${BOARD} 0 ${REVISION_SEPARATOR_INDEX} BOARD)
|
message(FATAL_ERROR
|
||||||
endif()
|
"Invalid revision / qualifiers format for ${board_in} (${${board_in}}). "
|
||||||
|
"Valid format is: <board>@<revision>/<qualifiers>"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
string(REPLACE "@" "" board_revision "${CMAKE_MATCH_2}")
|
||||||
|
|
||||||
|
set(${name_out} ${CMAKE_MATCH_1} PARENT_SCOPE)
|
||||||
|
set(${revision_out} ${board_revision} PARENT_SCOPE)
|
||||||
|
set(${qualifiers_out} ${CMAKE_MATCH_3} PARENT_SCOPE)
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
parse_board_components(
|
||||||
|
BOARD
|
||||||
|
BOARD BOARD_REVISION BOARD_QUALIFIERS
|
||||||
|
)
|
||||||
|
|
||||||
|
# string(FIND "${BOARD}" "@" REVISION_SEPARATOR_INDEX)
|
||||||
|
# if(NOT (REVISION_SEPARATOR_INDEX EQUAL -1))
|
||||||
|
# math(EXPR BOARD_REVISION_INDEX "${REVISION_SEPARATOR_INDEX} + 1")
|
||||||
|
# string(SUBSTRING ${BOARD} ${BOARD_REVISION_INDEX} -1 BOARD_REVISION)
|
||||||
|
# string(SUBSTRING ${BOARD} 0 ${REVISION_SEPARATOR_INDEX} BOARD)
|
||||||
|
# endif()
|
||||||
|
|
||||||
foreach(root ${BOARD_ROOT})
|
foreach(root ${BOARD_ROOT})
|
||||||
set(shield_dir ${root}/boards/shields)
|
set(shield_dir ${root}/boards/shields)
|
||||||
|
|
|
||||||
|
|
@ -41,13 +41,13 @@ const struct device *z_impl_behavior_get_binding(const char *name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) {
|
STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) {
|
||||||
if (z_device_is_ready(item->device) && item->device->name == name) {
|
if (device_is_ready(item->device) && item->device->name == name) {
|
||||||
return item->device;
|
return item->device;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) {
|
STRUCT_SECTION_FOREACH(zmk_behavior_ref, item) {
|
||||||
if (z_device_is_ready(item->device) && strcmp(item->device->name, name) == 0) {
|
if (device_is_ready(item->device) && strcmp(item->device->name, name) == 0) {
|
||||||
return item->device;
|
return item->device;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -267,7 +267,7 @@ zmk_behavior_local_id_t zmk_behavior_get_local_id(const char *name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
STRUCT_SECTION_FOREACH(zmk_behavior_local_id_map, item) {
|
STRUCT_SECTION_FOREACH(zmk_behavior_local_id_map, item) {
|
||||||
if (z_device_is_ready(item->device) && strcmp(item->device->name, name) == 0) {
|
if (device_is_ready(item->device) && strcmp(item->device->name, name) == 0) {
|
||||||
return item->local_id;
|
return item->local_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -277,7 +277,7 @@ zmk_behavior_local_id_t zmk_behavior_get_local_id(const char *name) {
|
||||||
|
|
||||||
const char *zmk_behavior_find_behavior_name_from_local_id(zmk_behavior_local_id_t local_id) {
|
const char *zmk_behavior_find_behavior_name_from_local_id(zmk_behavior_local_id_t local_id) {
|
||||||
STRUCT_SECTION_FOREACH(zmk_behavior_local_id_map, item) {
|
STRUCT_SECTION_FOREACH(zmk_behavior_local_id_map, item) {
|
||||||
if (z_device_is_ready(item->device) && item->local_id == local_id) {
|
if (device_is_ready(item->device) && item->local_id == local_id) {
|
||||||
return item->device->name;
|
return item->device->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,8 @@ choice LV_TXT_ENC
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config LV_MEM_CUSTOM
|
config LV_Z_MEM_POOL_SIZE
|
||||||
default y
|
default 4096 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN
|
||||||
|
|
||||||
config LV_Z_MEM_POOL_SIZE
|
|
||||||
default 4096 if ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN
|
|
||||||
|
|
||||||
choice ZMK_DISPLAY_STATUS_SCREEN
|
choice ZMK_DISPLAY_STATUS_SCREEN
|
||||||
prompt "Default status screen for displays"
|
prompt "Default status screen for displays"
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,12 @@ manifest:
|
||||||
url-base: https://github.com/zephyrproject-rtos
|
url-base: https://github.com/zephyrproject-rtos
|
||||||
- name: zmkfirmware
|
- name: zmkfirmware
|
||||||
url-base: https://github.com/zmkfirmware
|
url-base: https://github.com/zmkfirmware
|
||||||
|
- name: ajf58
|
||||||
|
url-base: https://github.com/ajf58
|
||||||
projects:
|
projects:
|
||||||
- name: zephyr
|
- name: zephyr
|
||||||
remote: zmkfirmware
|
remote: zephyrproject-rtos
|
||||||
revision: v3.5.0+zmk-fixes
|
revision: v4.1.0
|
||||||
clone-depth: 1
|
clone-depth: 1
|
||||||
import:
|
import:
|
||||||
name-blocklist:
|
name-blocklist:
|
||||||
|
|
@ -18,7 +20,6 @@ manifest:
|
||||||
- hal_microchip
|
- hal_microchip
|
||||||
- hal_nxp
|
- hal_nxp
|
||||||
- hal_openisa
|
- hal_openisa
|
||||||
- hal_silabs
|
|
||||||
- hal_xtensa
|
- hal_xtensa
|
||||||
- hal_st
|
- hal_st
|
||||||
- hal_ti
|
- hal_ti
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue