Skip to content

Commit

Permalink
Kconfig.zephyr: check priorities by default
Browse files Browse the repository at this point in the history
Enable build time initialization priority by default.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
  • Loading branch information
fabiobaltieri committed Jul 21, 2023
1 parent 502ecae commit b829dbc
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,7 @@ if(CONFIG_CHECK_INIT_PRIORITIES)
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/scripts/build/check_init_priorities.py
--build-dir ${PROJECT_BINARY_DIR}/..
--edt-pickle ${EDT_PICKLE}
-vv
${fail_on_warning}
)
endif()
Expand Down
1 change: 1 addition & 0 deletions Kconfig.zephyr
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ config BUILD_OUTPUT_STRIP_PATHS

config CHECK_INIT_PRIORITIES
bool "Build time initialization priorities check"
default y
help
Check the build for initialization priority issues by comparing the
initialization priority in the build with the device dependency
Expand Down
1 change: 1 addition & 0 deletions tests/drivers/build_all/adc/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ CONFIG_TEST_USERSPACE=y
CONFIG_ADC=y
CONFIG_MAX_THREAD_BYTES=4
CONFIG_ADC_INIT_PRIORITY=80
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/counter/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_COUNTER=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/dac/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_DAC=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/eeprom/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_EEPROM=y
CONFIG_GPIO=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/ethernet/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_TEST_USERSPACE=y

CONFIG_GPIO=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/fpga/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ CONFIG_FPGA=y
# iCE40 FPGAs on a single bus to 1.
CONFIG_PINCTRL=n
CONFIG_ICE40_FPGA=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/gpio/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ CONFIG_I2C=y
CONFIG_GPIO_PCA95XX_INTERRUPT=y
CONFIG_SPI=y
CONFIG_ADC_ADS114S0X_GPIO=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/i3c/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_I3C=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/ieee802154/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ CONFIG_IEEE802154=y
CONFIG_NETWORKING=y
CONFIG_NET_L2_IEEE802154=y
CONFIG_NET_L2_IEEE802154_SECURITY=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/led/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_LED=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/led_strip/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_LED_STRIP=y
CONFIG_TLC5971_STRIP=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/modem/modem.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ CONFIG_MODEM_HL7800_SET_APN_NAME_ON_STARTUP=y
CONFIG_MODEM_HL7800_APN_NAME="internet"
CONFIG_MODEM_HL7800_RAT_M1=y
CONFIG_MODEM_WNCM14A2A=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/modem/modem_esp_at.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_IPV4=y
CONFIG_WIFI=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/modem/modem_gsm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ CONFIG_NET_PPP=y
CONFIG_NET_L2_PPP=y
CONFIG_MODEM=y
CONFIG_MODEM_GSM_PPP=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/modem/modem_quectel_bg9x.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ CONFIG_NET_SOCKETS=y
CONFIG_MODEM=y
CONFIG_MODEM_QUECTEL_BG9X=y
CONFIG_MODEM_QUECTEL_BG9X_APN="hologram"
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/modem/modem_simcom_sim7080.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_MODEM=y
CONFIG_MODEM_SIM7080=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/modem/modem_ublox_sara.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_MODEM=y
CONFIG_MODEM_UBLOX_SARA=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/modem/prj.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_TEST=y
CONFIG_TEST_USERSPACE=y
CONFIG_SERIAL=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/pwm/prj.conf
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
CONFIG_PWM=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/sensor/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ CONFIG_SPI=y
CONFIG_W1=y
CONFIG_SENSOR=y
CONFIG_ICM42605_TRIGGER_NONE=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/drivers/build_all/video/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ CONFIG_TEST_USERSPACE=y
CONFIG_GPIO=y
CONFIG_I2C=y
CONFIG_VIDEO=y
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/lib/devicetree/devices/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ CONFIG_ZTEST=y
CONFIG_I2C=n
CONFIG_ZTEST_NEW_API=y
CONFIG_DEVICE_DEPS=y
CONFIG_CHECK_INIT_PRIORITIES=n
2 changes: 1 addition & 1 deletion tests/misc/check_init_priorities/prj.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Empty
CONFIG_CHECK_INIT_PRIORITIES=n
1 change: 1 addition & 0 deletions tests/subsys/emul/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_SENSOR=y
CONFIG_BMI160_TRIGGER_NONE=y
CONFIG_CHECK_INIT_PRIORITIES=n

0 comments on commit b829dbc

Please sign in to comment.