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>
This commit is contained in:
parent
a8a830b5db
commit
d4006c9ad4
1 changed files with 24 additions and 3 deletions
27
Kbuild
27
Kbuild
|
@ -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 )
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue