infra: check Kconfig prerequirements

This commit is contained in:
Thomas Schoebel-Theuer 2013-07-10 08:30:35 +02:00
parent 5103e7b46c
commit ea42d36a15
4 changed files with 29 additions and 6 deletions

View File

@ -95,11 +95,12 @@ $(obj)/buildtag.h: $(patsubst $(obj)/buildtag.h,,$(wildcard $(obj)/*.[ch])) $(ob
/bin/echo -e "#define BUILDHOST \"$$USER@$$HOSTNAME\"";\
/bin/echo -e "#define BUILDDATE \"$$(date '+%F %T')\""
#
ifndef CONFIG_MARS
# mars_config.h is generated by a simple Kconfig parser (gen_config.pl)
# at build time.
# It is used for out-of-tree builds.
# In-tree builds should not be disturbed due to #ifndef safeguarding.
# It does not respect any Kconfig dependencies.
# Therefore, it is unsafe. Use at your own risk!
# It is ONLY used for out-of-tree builds.
#
extra-y += mars_config.h
GEN_CONFIG_SCRIPT := $(src)/../scripts/gen_config.pl
@ -111,3 +112,4 @@ $(obj)/mars_config.h: $(src)/Kconfig $(GEN_CONFIG_SCRIPT)
/bin/false; \
fi; \
cat $< | $(GEN_CONFIG_SCRIPT) > $@;
endif

View File

@ -9,8 +9,10 @@
#include <asm/atomic.h>
// include default config
#ifndef CONFIG_MARS_MODULE
// when unsure, include faked config file
#include "mars_config.h"
#endif
#include "brick_locks.h"
#include "meta.h"

View File

@ -2,8 +2,10 @@
#ifndef BRICK_SAY_H
#define BRICK_SAY_H
// include default config
#ifndef CONFIG_MARS_MODULE
// when unsure, include faked config file
#include "mars_config.h"
#endif
/////////////////////////////////////////////////////////////////////////

View File

@ -7,8 +7,25 @@
//#define MARS_TRACING // write runtime trace data to /mars/trace.csv
// include default config
// check the Kconfig environment
#ifndef CONFIG_MARS_MODULE
// when unsure, include faked config file
#include "mars_config.h"
#endif
#ifndef CONFIG_64BIT
#error MARS is only tested under 64bit
#endif
#ifndef CONFIG_BLOCK
#error CONFIG_BLOCK must be set
#endif
#ifndef CONFIG_PROC_SYSCTL
#error CONFIG_PROC_SYSCTL must be set
#endif
#ifndef CONFIG_HIGH_RES_TIMERS
#error CONFIG_HIGH_RES_TIMERS must be set
#endif
/////////////////////////////////////////////////////////////////////////