2020-08-27 21:08:40 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2022-05-06 17:04:23 +08:00
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#include <zephyr/sys/util.h>
|
|
|
|
#include <zephyr/init.h>
|
|
|
|
#include <zephyr/device.h>
|
2020-08-27 21:08:40 +08:00
|
|
|
#include <version.h>
|
|
|
|
|
2022-10-22 16:41:41 +08:00
|
|
|
#if defined(CONFIG_BOOT_DELAY) && (CONFIG_BOOT_DELAY > 0)
|
|
|
|
#define DELAY_STR STRINGIFY(CONFIG_BOOT_DELAY)
|
|
|
|
#define BANNER_POSTFIX " (delayed boot " DELAY_STR "ms)"
|
2020-08-27 21:08:40 +08:00
|
|
|
#else
|
2022-10-22 16:41:41 +08:00
|
|
|
#define BANNER_POSTFIX ""
|
2020-08-27 21:08:40 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef BUILD_VERSION
|
2022-10-22 16:41:41 +08:00
|
|
|
#define BANNER_VERSION STRINGIFY(BUILD_VERSION)
|
2020-08-27 21:08:40 +08:00
|
|
|
#else
|
2022-10-22 16:41:41 +08:00
|
|
|
#define BANNER_VERSION KERNEL_VERSION_STRING
|
2020-08-27 21:08:40 +08:00
|
|
|
#endif
|
2022-10-22 16:41:41 +08:00
|
|
|
|
2020-08-27 21:08:40 +08:00
|
|
|
void boot_banner(void)
|
|
|
|
{
|
2022-10-22 16:41:41 +08:00
|
|
|
#if defined(CONFIG_BOOT_DELAY) && (CONFIG_BOOT_DELAY > 0)
|
|
|
|
printk("***** delaying boot " DELAY_STR "ms (per build configuration) *****\n");
|
|
|
|
k_busy_wait(CONFIG_BOOT_DELAY * USEC_PER_MSEC);
|
|
|
|
#endif /* defined(CONFIG_BOOT_DELAY) && (CONFIG_BOOT_DELAY > 0) */
|
|
|
|
|
|
|
|
#if CONFIG_BOOT_BANNER
|
|
|
|
printk("*** Booting Zephyr OS build " BANNER_VERSION BANNER_POSTFIX " ***\n");
|
|
|
|
#endif /* CONFIG_BOOT_BANNER */
|
2020-08-27 21:08:40 +08:00
|
|
|
}
|