Relocate boot banner and kernel build timestamp handling
Moves boot banner and kernel build timestamp code to the kernel's main initialization routine, since it doesn't really belong in a generic fiber-processing file. Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
parent
68637b0fdc
commit
5555bcff31
2 changed files with 25 additions and 16 deletions
|
@ -62,6 +62,27 @@ extern char *__argv[], *__env[];
|
||||||
|
|
||||||
extern void _Ctors(void);
|
extern void _Ctors(void);
|
||||||
|
|
||||||
|
/* kernel build timestamp items */
|
||||||
|
|
||||||
|
#define BUILD_TIMESTAMP "BUILD: " __DATE__ " " __TIME__
|
||||||
|
|
||||||
|
#ifdef CONFIG_BUILD_TIMESTAMP
|
||||||
|
const char * const build_timestamp = BUILD_TIMESTAMP;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* boot banner items */
|
||||||
|
|
||||||
|
#define BOOT_BANNER "****** BOOTING VXMICRO ******"
|
||||||
|
|
||||||
|
#if !defined(CONFIG_BOOT_BANNER)
|
||||||
|
#define PRINT_BOOT_BANNER() do { } while (0)
|
||||||
|
#elif !defined(CONFIG_BUILD_TIMESTAMP)
|
||||||
|
#define PRINT_BOOT_BANNER() printk(BOOT_BANNER "\n")
|
||||||
|
#else
|
||||||
|
#define PRINT_BOOT_BANNER() printk(BOOT_BANNER " %s\n", build_timestamp)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_STACK_CANARIES
|
#ifdef CONFIG_STACK_CANARIES
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
|
@ -143,6 +164,10 @@ FUNC_NORETURN void _Cstart(void)
|
||||||
/* invoke C++ constructors */
|
/* invoke C++ constructors */
|
||||||
_Ctors();
|
_Ctors();
|
||||||
|
|
||||||
|
/* display boot banner */
|
||||||
|
|
||||||
|
PRINT_BOOT_BANNER();
|
||||||
|
|
||||||
/* context switch into the background context (entry function is main())
|
/* context switch into the background context (entry function is main())
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -44,21 +44,6 @@ either in the form of an actual function or an alias to a function.
|
||||||
#include <nanok.h>
|
#include <nanok.h>
|
||||||
#include <toolchain.h>
|
#include <toolchain.h>
|
||||||
#include <sections.h>
|
#include <sections.h>
|
||||||
#include <misc/printk.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define BUILD_TIMESTAMP "BUILD: " __DATE__ " " __TIME__
|
|
||||||
#define BOOT_BANNER "****** BOOTING VXMICRO ******"
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_BUILD_TIMESTAMP
|
|
||||||
/* Embed build timestamp into kernel image & boot banner */
|
|
||||||
const char * const build_timestamp = BUILD_TIMESTAMP;
|
|
||||||
#define PRINT_BOOT_BANNER() printk(BOOT_BANNER " %s\n", build_timestamp)
|
|
||||||
#else
|
|
||||||
/* Omit build timestamp from kernel image & boot banner */
|
|
||||||
#define PRINT_BOOT_BANNER() printk(BOOT_BANNER "\n")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
|
@ -335,7 +320,6 @@ FUNC_NORETURN void fiber_abort(void)
|
||||||
#ifdef CONFIG_BOOT_BANNER
|
#ifdef CONFIG_BOOT_BANNER
|
||||||
void _nano_start(void)
|
void _nano_start(void)
|
||||||
{
|
{
|
||||||
PRINT_BOOT_BANNER();
|
|
||||||
_nano_fiber_swap();
|
_nano_fiber_swap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue