forked from Archive/PX4-Autopilot
Makefile: add all_olddefconfig and all_px4_savedefconfig helpers for updating all boards
This commit is contained in:
parent
f37eb55e19
commit
0204a55354
8
Makefile
8
Makefile
|
@ -554,6 +554,14 @@ check_px4: $(call make_list,nuttx,"px4") \
|
|||
check_nxp: $(call make_list,nuttx,"nxp") \
|
||||
sizes
|
||||
|
||||
# helpers for running olddefconfig (nuttx) and px4_savedefconfig on all boards
|
||||
.PHONY: all_oldconfig all_px4_savedefconfig
|
||||
all_oldconfig:
|
||||
@for targ in $(ALL_CONFIG_TARGETS); do $(MAKE) $$targ oldconfig; done
|
||||
|
||||
all_px4_savedefconfig:
|
||||
@for targ in $(ALL_CONFIG_TARGETS); do $(MAKE) $$targ px4_savedefconfig; done
|
||||
|
||||
.PHONY: failsafe_web run_failsafe_web_server
|
||||
failsafe_web:
|
||||
@if ! command -v emcc; then echo -e "Install emscripten first: https://emscripten.org/docs/getting_started/downloads.html\nAnd source the env: source <path>/emsdk_env.sh"; exit 1; fi
|
||||
|
|
|
@ -417,6 +417,17 @@ if(${LABEL} MATCHES "default" OR ${LABEL} MATCHES "bootloader" OR ${LABEL} MATCH
|
|||
USES_TERMINAL
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
|
||||
add_custom_target(px4_savedefconfig
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${COMMON_KCONFIG_ENV_SETTINGS} ${SAVEDEFCONFIG_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy defconfig ${BOARD_DEFCONFIG}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove defconfig
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${PX4_BINARY_DIR}/NuttX/apps_copy.stamp
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
USES_TERMINAL
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
|
||||
else()
|
||||
add_custom_target(boardconfig
|
||||
${CMAKE_COMMAND} -E env
|
||||
|
@ -443,4 +454,15 @@ else()
|
|||
USES_TERMINAL
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
|
||||
add_custom_target(px4_savedefconfig
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${COMMON_KCONFIG_ENV_SETTINGS} ${SAVEDEFCONFIG_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${COMMON_KCONFIG_ENV_SETTINGS} ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/kconfig/diffconfig.py -m ${PX4_BOARD_DIR}/default.px4board defconfig > ${BOARD_DEFCONFIG}
|
||||
COMMAND ${CMAKE_COMMAND} -E remove defconfig
|
||||
COMMAND ${CMAKE_COMMAND} -E remove ${PX4_BINARY_DIR}/NuttX/apps_copy.stamp
|
||||
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
|
||||
USES_TERMINAL
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue