kernel: banner: Allow for customising version
This allows for further (out of tree) customisation of the boot banner version string when devices boot. Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no> Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
67ca6e5f01
commit
77a00f1352
3 changed files with 5 additions and 0 deletions
|
@ -557,6 +557,7 @@ add_custom_command(
|
||||||
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/version.h
|
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/version.h
|
||||||
-DVERSION_TYPE=KERNEL
|
-DVERSION_TYPE=KERNEL
|
||||||
-DVERSION_FILE=${ZEPHYR_BASE}/VERSION
|
-DVERSION_FILE=${ZEPHYR_BASE}/VERSION
|
||||||
|
-DKERNEL_VERSION_CUSTOMIZATION="${KERNEL_VERSION_CUSTOMIZATION}"
|
||||||
${build_version_argument}
|
${build_version_argument}
|
||||||
-P ${ZEPHYR_BASE}/cmake/gen_version_h.cmake
|
-P ${ZEPHYR_BASE}/cmake/gen_version_h.cmake
|
||||||
DEPENDS ${ZEPHYR_BASE}/VERSION ${git_dependency}
|
DEPENDS ${ZEPHYR_BASE}/VERSION ${git_dependency}
|
||||||
|
@ -570,6 +571,7 @@ if(EXISTS ${APPLICATION_SOURCE_DIR}/VERSION)
|
||||||
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/app_version.h
|
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/app_version.h
|
||||||
-DVERSION_TYPE=APP
|
-DVERSION_TYPE=APP
|
||||||
-DVERSION_FILE=${APPLICATION_SOURCE_DIR}/VERSION
|
-DVERSION_FILE=${APPLICATION_SOURCE_DIR}/VERSION
|
||||||
|
-DAPP_VERSION_CUSTOMIZATION="${APP_VERSION_CUSTOMIZATION}"
|
||||||
${build_version_argument}
|
${build_version_argument}
|
||||||
-P ${ZEPHYR_BASE}/cmake/gen_version_h.cmake
|
-P ${ZEPHYR_BASE}/cmake/gen_version_h.cmake
|
||||||
DEPENDS ${APPLICATION_SOURCE_DIR}/VERSION ${git_dependency}
|
DEPENDS ${APPLICATION_SOURCE_DIR}/VERSION ${git_dependency}
|
||||||
|
|
|
@ -16,11 +16,13 @@
|
||||||
#define BANNER_POSTFIX ""
|
#define BANNER_POSTFIX ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef BANNER_VERSION
|
||||||
#ifdef BUILD_VERSION
|
#ifdef BUILD_VERSION
|
||||||
#define BANNER_VERSION STRINGIFY(BUILD_VERSION)
|
#define BANNER_VERSION STRINGIFY(BUILD_VERSION)
|
||||||
#else
|
#else
|
||||||
#define BANNER_VERSION KERNEL_VERSION_STRING
|
#define BANNER_VERSION KERNEL_VERSION_STRING
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
void boot_banner(void)
|
void boot_banner(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,5 +17,6 @@
|
||||||
#define @VERSION_TYPE@_VERSION_STRING "@@VERSION_TYPE@_VERSION_STRING@"
|
#define @VERSION_TYPE@_VERSION_STRING "@@VERSION_TYPE@_VERSION_STRING@"
|
||||||
|
|
||||||
#define @BUILD_VERSION_NAME@ @@BUILD_VERSION_NAME@@
|
#define @BUILD_VERSION_NAME@ @@BUILD_VERSION_NAME@@
|
||||||
|
@@VERSION_TYPE@_VERSION_CUSTOMIZATION@
|
||||||
|
|
||||||
#endif /* _@VERSION_TYPE@_VERSION_H_ */
|
#endif /* _@VERSION_TYPE@_VERSION_H_ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue