From 9a691aa515ba55c228098ca318a9b550ba293689 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Tue, 4 Jun 2024 14:40:23 +0100 Subject: [PATCH] kernel: Move boot_banner under lib Moves the boot banner functionality from the kernel directory to the lib directory Signed-off-by: Jamie McCrae --- CMakeLists.txt | 1 - CODEOWNERS | 2 +- Kconfig.nrf | 1 - lib/CMakeLists.txt | 1 + lib/Kconfig | 1 + {kernel => lib/boot_banner}/CMakeLists.txt | 4 +--- {kernel => lib/boot_banner}/Kconfig | 4 ---- {kernel => lib/boot_banner}/banner.c | 0 8 files changed, 4 insertions(+), 10 deletions(-) rename {kernel => lib/boot_banner}/CMakeLists.txt (63%) rename {kernel => lib/boot_banner}/Kconfig (95%) rename {kernel => lib/boot_banner}/banner.c (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index afb77b67ed04..f33de378c70d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,4 +35,3 @@ add_subdirectory(subsys) add_subdirectory(modules) add_subdirectory(drivers) add_subdirectory(tests) -add_subdirectory(kernel) diff --git a/CODEOWNERS b/CODEOWNERS index 8b4abd9e6a50..075077eb8dc6 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -104,8 +104,8 @@ Kconfig* @tejlmand /include/nfc/ @anangl @grochu /include/sdfw/ @anhmolt @hakonfam @jonathannilsen /include/shell/ @nordic-krch -/kernel/ @nordicjm /lib/bin/ @rlubos @lemrey +/lib/boot_banner/ @nordicjm /lib/adp536x/ @nrfconnect/ncs-cia /lib/at_cmd_parser/ @rlubos /lib/at_cmd_custom/ @eivindj-nordic diff --git a/Kconfig.nrf b/Kconfig.nrf index 4ac903f2b32d..25262d781610 100644 --- a/Kconfig.nrf +++ b/Kconfig.nrf @@ -109,7 +109,6 @@ config NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE config GETOPT default n -rsource "kernel/Kconfig" rsource "samples/Kconfig" rsource "subsys/Kconfig" rsource "modules/Kconfig" diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e749660522e5..2ea0e7adb2e7 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -48,3 +48,4 @@ add_subdirectory_ifdef(CONFIG_PSCM pcm_stream_channel_modifier) add_subdirectory_ifdef(CONFIG_DATA_FIFO data_fifo) add_subdirectory_ifdef(CONFIG_FEM_AL_LIB fem_al) add_subdirectory_ifdef(CONFIG_SAMPLE_RATE_CONVERTER sample_rate_converter) +add_subdirectory_ifdef(CONFIG_NCS_BOOT_BANNER boot_banner) diff --git a/lib/Kconfig b/lib/Kconfig index 8786c8c114cc..fb040d9a64f5 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -49,5 +49,6 @@ rsource "pcm_stream_channel_modifier/Kconfig" rsource "data_fifo/Kconfig" rsource "fem_al/Kconfig" rsource "sample_rate_converter/Kconfig" +rsource "boot_banner/Kconfig" endmenu diff --git a/kernel/CMakeLists.txt b/lib/boot_banner/CMakeLists.txt similarity index 63% rename from kernel/CMakeLists.txt rename to lib/boot_banner/CMakeLists.txt index af84108810ef..950c0658cea0 100644 --- a/kernel/CMakeLists.txt +++ b/lib/boot_banner/CMakeLists.txt @@ -4,6 +4,4 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -if(CONFIG_NCS_BOOT_BANNER) - zephyr_sources(banner.c) -endif() +zephyr_sources(banner.c) diff --git a/kernel/Kconfig b/lib/boot_banner/Kconfig similarity index 95% rename from kernel/Kconfig rename to lib/boot_banner/Kconfig index 77ed341666f1..c868405ddc5c 100644 --- a/kernel/Kconfig +++ b/lib/boot_banner/Kconfig @@ -4,8 +4,6 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # -menu "General Kernel Options" - menuconfig NCS_BOOT_BANNER bool "NCS boot banner" default y @@ -32,5 +30,3 @@ config NCS_ZEPHYR_BOOT_BANNER_STRING default "Zephyr OS" endif # NCS_BOOT_BANNER - -endmenu diff --git a/kernel/banner.c b/lib/boot_banner/banner.c similarity index 100% rename from kernel/banner.c rename to lib/boot_banner/banner.c