diff options
author | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-09-02 16:04:29 -0400 |
---|---|---|
committer | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-09-13 17:12:55 -0400 |
commit | d4006c9ad48cbdb1fb34573bcb3c867ef7d8c56d (patch) | |
tree | 7c0af13fbc35c9d2f9278d53ab454c4540615bcc /Kbuild | |
parent | a8a830b5db54da6fdbfcfdd6b1250d78c51c333c (diff) |
unified/build: adapt Kbuild for unified kernel
Changes needed to build system to build a unified kernel:
- NUM_COMMAND_PACKETS, NUM_TIMER_PACKETS, NUM_TASK_PRIRITIES must be
passed to sysgen to avoid modifying it. Simply set them to 0. The
unified build does not need them.
- Pass a different kernel type to sysgen if building for a unified
kernel.
- Build kernel_main.c if building an MDEF file (micro/unified).
- The location of the include files for building offsets.h is different
for unified kernels and nano/micro kernels.
Change-Id: I46b30a2b5ffc3ca675b3413150643b92c117c2c8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Diffstat (limited to 'Kbuild')
-rw-r--r-- | Kbuild | 27 |
1 files changed, 24 insertions, 3 deletions
@@ -8,6 +8,16 @@ MDEF_FILE_PATH=$(strip $(PROJECT_BASE)/$(MDEF_FILE)) endif endif +ifeq (${CONFIG_NUM_COMMAND_PACKETS},) +CONFIG_NUM_COMMAND_PACKETS=0 +endif +ifeq (${CONFIG_NUM_TIMER_PACKETS},) +CONFIG_NUM_TIMER_PACKETS=0 +endif +ifeq (${CONFIG_NUM_TASK_PRIORITIES},) +CONFIG_NUM_TASK_PRIORITIES=$(CONFIG_NUM_PREEMPT_PRIORITIES) +endif + ifeq ($(ARCH),x86) TASKGROUP_SSE=" TASKGROUP SSE" endif @@ -39,6 +49,7 @@ sysgen_cmd=$(strip \ $(PYTHON) $(srctree)/scripts/sysgen \ -i $(CURDIR)/misc/generated/sysgen/prj.mdef \ -o $(CURDIR)/misc/generated/sysgen/ \ + -k $(if $(CONFIG_KERNEL_V2),unified,micro) \ ) misc/generated/sysgen/kernel_main.c: misc/generated/sysgen/prj.mdef \ @@ -70,7 +81,7 @@ targets += include/generated/offsets.h always := misc/generated/configs.c always += include/generated/offsets.h -ifeq ($(CONFIG_MICROKERNEL),y) +ifeq ($(CONFIG_MDEF),y) targets += misc/generated/sysgen/kernel_main.c always += misc/generated/sysgen/kernel_main.c endif @@ -79,12 +90,22 @@ define rule_cc_o_c_1 $(call echo-cmd,cc_o_c_1) $(cmd_cc_o_c_1); endef +ifeq ($(CONFIG_KERNEL_V2),y) +OFFSETS_INCLUDE_KERNEL_LOCATION=$(strip \ + -I $(srctree)/kernel/unified/include \ +) +else +OFFSETS_INCLUDE_KERNEL_LOCATION=$(strip \ + -I $(srctree)/kernel/microkernel/include \ + -I $(srctree)/kernel/nanokernel/include \ +) +endif + OFFSETS_INCLUDE = $(strip \ -include $(CURDIR)/include/generated/autoconf.h \ -I $(srctree)/include \ -I $(CURDIR)/include/generated \ - -I $(srctree)/kernel/microkernel/include \ - -I $(srctree)/kernel/nanokernel/include \ + $(OFFSETS_INCLUDE_KERNEL_LOCATION) \ -I $(srctree)/lib/libc/minimal/include \ -I $(srctree)/arch/${ARCH}/include ) |