base-hw: simplify board support in external repo

Avoid use of REP_DIR in *.mk files to simplify the use of these files as
templates for a board hosted in a separate repository.

Use REP_INC_DIR for searching headers, thereby considering headers
hosted in an external repository.

Issue #3168
This commit is contained in:
Norman Feske 2021-01-18 17:55:51 +01:00
parent f034f560be
commit 1ccf8a280c
52 changed files with 130 additions and 150 deletions

View File

@ -1,7 +1,4 @@
TMP := $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/bootstrap-hw.inc=%)
LIBS = cxx
LIBS = cxx
SRC_CC += bootstrap/env.cc
SRC_CC += bootstrap/init.cc
@ -24,15 +21,17 @@ SRC_CC += lib/base/sleep.cc
SRC_CC += lib/base/sliced_heap.cc
SRC_CC += lib/startup/_main.cc
INC_DIR += $(BASE_HW_DIR)/src/bootstrap
INC_DIR += $(BASE_HW_DIR)/src/include
INC_DIR += $(BASE_DIR)/src/include
INC_DIR += $(BASE_DIR)/src/core/include # for boot_modules.h only
REP_INC_DIR += src/bootstrap
REP_INC_DIR += src/include
REP_INC_DIR += src/core/include # for boot_modules.h only
# configure multiprocessor mode
NR_OF_CPUS ?= 1
CC_OPT += -Wa,--defsym -Wa,NR_OF_CPUS=$(NR_OF_CPUS) -DNR_OF_CPUS=$(NR_OF_CPUS)
TMP := $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/bootstrap-hw.inc=%)
vpath base/% $(BASE_HW_DIR)/src
vpath bootstrap/% $(BASE_HW_DIR)/src
vpath hw/% $(BASE_HW_DIR)/src/lib

View File

@ -4,16 +4,12 @@
# \date 2011-12-16
#
TMP := $(call select_from_repositories,lib/mk/core-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/core-hw.inc=%)
LIBS += base-hw-common cxx
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core
INC_DIR += $(BASE_DIR)/src/core/include
INC_DIR += $(BASE_HW_DIR)/src/include
INC_DIR += $(BASE_DIR)/src/include
REP_INC_DIR += src/core
REP_INC_DIR += src/core/include
REP_INC_DIR += src/include
# add C++ sources
SRC_CC += cpu_session_component.cc
@ -75,6 +71,9 @@ include $(BASE_DIR)/src/core/version.inc
NR_OF_CPUS ?= 1
CC_OPT += -Wa,--defsym -Wa,NR_OF_CPUS=$(NR_OF_CPUS) -DNR_OF_CPUS=$(NR_OF_CPUS)
TMP := $(call select_from_repositories,lib/mk/core-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/core-hw.inc=%)
# declare source locations
vpath % $(BASE_HW_DIR)/src/core
vpath % $(BASE_DIR)/src/core

View File

@ -4,11 +4,8 @@
# \date 2011-12-16
#
TMP := $(call select_from_repositories,lib/mk/core-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/core-hw.inc=%)
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/spec/arm
REP_INC_DIR += src/core/spec/arm
# add C++ sources
SRC_CC += spec/32bit/memory_map.cc
@ -22,7 +19,7 @@ SRC_CC += spec/arm/platform_support.cc
SRC_S += spec/arm/crt0.s
SRC_S += spec/arm/exception_vector.S
vpath spec/32bit/memory_map.cc $(BASE_HW_DIR)/src/lib/hw
vpath spec/32bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/core-hw.inc
include $(call select_from_repositories,lib/mk/core-hw.inc)

View File

@ -1,3 +1,3 @@
SRC_CC += kernel/interface.cc
vpath kernel/interface.cc $(REP_DIR)/src/lib/base/arm
vpath kernel/interface.cc $(call select_from_repositories,src/lib/base/arm)

View File

@ -1,3 +1,3 @@
SRC_CC += kernel/interface.cc
vpath kernel/interface.cc $(REP_DIR)/src/lib/base/arm_64
vpath kernel/interface.cc $(call select_from_repositories,src/lib/base/arm_64)

View File

@ -1,8 +1,8 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/rpi
REP_INC_DIR += src/bootstrap/board/rpi
SRC_CC += bootstrap/board/rpi/platform.cc
SRC_CC += bootstrap/spec/arm/arm_v6_cpu.cc
SRC_CC += hw/spec/32bit/memory_map.cc
SRC_S += bootstrap/spec/arm/crt0.s
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -5,7 +5,7 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/rpi
REP_INC_DIR += src/core/board/rpi
# add C++ sources
SRC_CC += platform_services.cc
@ -13,4 +13,4 @@ SRC_CC += spec/arm/bcm2835_pic.cc
SRC_CC += spec/arm/bcm2835_system_timer.cc
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/arm_v6/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/arm_v6/core-hw.inc)

View File

@ -5,11 +5,8 @@
# \date 2012-10-04
#
TMP := $(call select_from_repositories,lib/mk/core-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/core-hw.inc=%)
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/spec/arm_v6
REP_INC_DIR += src/core/spec/arm_v6
# add C++ sources
SRC_CC += spec/arm_v6/perf_counter.cc
@ -20,4 +17,4 @@ SRC_CC += kernel/lock.cc
SRC_S += spec/arm/vfpv2.s
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/arm/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/arm/core-hw.inc)

View File

@ -1,7 +1,4 @@
TMP := $(call select_from_repositories,lib/mk/core-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/core-hw.inc=%)
INC_DIR += $(BASE_HW_DIR)/src/bootstrap/board/imx53_qsb
REP_INC_DIR += src/bootstrap/board/imx53_qsb
SRC_S += bootstrap/spec/arm/crt0.s
@ -11,4 +8,4 @@ SRC_CC += bootstrap/spec/arm/imx_tzic.cc
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
SRC_CC += hw/spec/32bit/memory_map.cc
include $(BASE_HW_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,3 +1,3 @@
SRC_CC += bootstrap/board/imx53_qsb/platform.cc
include $(REP_DIR)/lib/mk/spec/arm_v7/bootstrap-hw-imx53_qsb.inc
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw-imx53_qsb.inc)

View File

@ -1,3 +1,3 @@
SRC_CC += bootstrap/board/imx53_qsb/platform_trustzone.cc
SRC_CC += bootstrap/board/imx53_qsb/platform_trustzone.cc
include $(REP_DIR)/lib/mk/spec/arm_v7/bootstrap-hw-imx53_qsb.inc
include $(call select_from_repositories,lib/mk/spec/arm_v7/bootstrap-hw-imx53_qsb.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/imx6q_sabrelite
REP_INC_DIR += src/bootstrap/board/imx6q_sabrelite
SRC_S += bootstrap/spec/arm/crt0.s
@ -11,4 +11,4 @@ SRC_CC += hw/spec/32bit/memory_map.cc
NR_OF_CPUS = 4
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/imx7d_sabre
REP_INC_DIR += src/bootstrap/board/imx7d_sabre
SRC_CC += bootstrap/spec/arm/cortex_a15_cpu.cc
SRC_CC += bootstrap/spec/arm/gicv2.cc
@ -15,4 +15,4 @@ NR_OF_CPUS = 2
#
CC_MARCH = -mcpu=cortex-a7 -mfpu=vfpv3 -mfloat-abi=softfp
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/nit6_solox
REP_INC_DIR += src/bootstrap/board/nit6_solox
SRC_S += bootstrap/spec/arm/crt0.s
@ -11,4 +11,4 @@ SRC_CC += hw/spec/32bit/memory_map.cc
NR_OF_CPUS = 1
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/pbxa9
REP_INC_DIR += src/bootstrap/board/pbxa9
SRC_S += bootstrap/spec/arm/crt0.s
@ -9,4 +9,4 @@ SRC_CC += bootstrap/board/pbxa9/platform.cc
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
SRC_CC += hw/spec/32bit/memory_map.cc
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/usb_armory
REP_INC_DIR += src/bootstrap/board/usb_armory
SRC_S += bootstrap/spec/arm/crt0.s
@ -9,4 +9,4 @@ SRC_CC += bootstrap/spec/arm/imx_tzic.cc
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
SRC_CC += hw/spec/32bit/memory_map.cc
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/virt_qemu
REP_INC_DIR += src/bootstrap/board/virt_qemu
SRC_CC += bootstrap/board/virt_qemu/platform.cc
SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc
@ -11,4 +11,4 @@ NR_OF_CPUS = 2
CC_MARCH = -march=armv7ve -mtune=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/wand_quad
REP_INC_DIR += src/bootstrap/board/wand_quad
SRC_S += bootstrap/spec/arm/crt0.s
@ -11,4 +11,4 @@ SRC_CC += hw/spec/32bit/memory_map.cc
NR_OF_CPUS = 4
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/zynq_qemu
REP_INC_DIR += src/bootstrap/board/zynq_qemu
SRC_S += bootstrap/spec/arm/crt0.s
@ -11,4 +11,4 @@ SRC_CC += hw/spec/32bit/memory_map.cc
NR_OF_CPUS = 1
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -6,11 +6,11 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/imx53_qsb
REP_INC_DIR += src/core/board/imx53_qsb
SRC_CC += spec/arm/imx_epit.cc
SRC_CC += spec/arm/imx_tzic.cc
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a8/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a8/core-hw.inc)

View File

@ -2,4 +2,4 @@ SRC_CC += kernel/vm_thread_off.cc
SRC_CC += platform_services.cc
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc
include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/core/spec/arm_v7/trustzone
REP_INC_DIR += src/core/spec/arm_v7/trustzone
SRC_CC += kernel/vm_thread_on.cc
SRC_CC += spec/arm_v7/trustzone/kernel/vm.cc
@ -10,5 +10,5 @@ SRC_CC += vm_session_component.cc
SRC_S += spec/arm_v7/trustzone/exception_vector.s
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc
include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc)

View File

@ -7,7 +7,7 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/imx6q_sabrelite
REP_INC_DIR += src/core/board/imx6q_sabrelite
# add C++ sources
SRC_CC += platform_services.cc
@ -15,4 +15,4 @@ SRC_CC += platform_services.cc
NR_OF_CPUS = 4
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a9/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc)

View File

@ -5,8 +5,8 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/imx7d_sabre
INC_DIR += $(REP_DIR)/src/core/spec/arm/virtualization
REP_INC_DIR += src/core/board/imx7d_sabre
REP_INC_DIR += src/core/spec/arm/virtualization
# add C++ sources
SRC_CC += kernel/vm_thread_on.cc
@ -31,4 +31,4 @@ NR_OF_CPUS = 2
CC_MARCH = -mcpu=cortex-a7 -mfpu=vfpv3 -mfloat-abi=softfp
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a15/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a15/core-hw.inc)

View File

@ -7,7 +7,7 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/nit6_solox
REP_INC_DIR += src/core/board/nit6_solox
# add C++ sources
SRC_CC += platform_services.cc
@ -15,4 +15,4 @@ SRC_CC += platform_services.cc
NR_OF_CPUS = 1
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a9/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc)

View File

@ -6,7 +6,7 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/pbxa9
REP_INC_DIR += src/core/board/pbxa9
# add C++ sources
SRC_CC += platform_services.cc
@ -14,4 +14,4 @@ SRC_CC += platform_services.cc
NR_OF_CPUS = 1
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a9/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc)

View File

@ -5,8 +5,8 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/usb_armory
INC_DIR += $(REP_DIR)/src/core/spec/arm_v7/trustzone
REP_INC_DIR += src/core/board/usb_armory
REP_INC_DIR += src/core/spec/arm_v7/trustzone
# add C++ sources
SRC_CC += kernel/vm_thread_on.cc
@ -22,4 +22,4 @@ SRC_CC += vm_session_component.cc
SRC_S += spec/arm_v7/trustzone/exception_vector.s
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a8/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a8/core-hw.inc)

View File

@ -1,5 +1,5 @@
INC_DIR += $(REP_DIR)/src/core/board/virt_qemu
INC_DIR += $(REP_DIR)/src/core/spec/arm/virtualization
REP_INC_DIR += src/core/board/virt_qemu
REP_INC_DIR += src/core/spec/arm/virtualization
# add C++ sources
SRC_CC += kernel/vm_thread_on.cc
@ -18,4 +18,4 @@ NR_OF_CPUS = 2
CC_MARCH = -march=armv7ve -mtune=cortex-a15 -mfpu=vfpv3 -mfloat-abi=soft
include $(REP_DIR)/lib/mk/spec/cortex_a15/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a15/core-hw.inc)

View File

@ -7,7 +7,7 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/wand_quad
REP_INC_DIR += src/core/board/wand_quad
# add C++ sources
SRC_CC += platform_services.cc
@ -15,4 +15,4 @@ SRC_CC += platform_services.cc
NR_OF_CPUS = 4
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/cortex_a9/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc)

View File

@ -4,14 +4,11 @@
# \date 2014-12-15
#
TMP := $(call select_from_repositories,lib/mk/core-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/core-hw.inc=%)
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/spec/zynq
REP_INC_DIR += src/core/spec/zynq
# add C++ sources
SRC_CC += platform_services.cc
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/cortex_a9/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc)

View File

@ -5,9 +5,9 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/board/zynq_qemu
REP_INC_DIR += src/core/board/zynq_qemu
NR_OF_CPUS = 1
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/arm_v7/core-hw-zynq.inc
include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw-zynq.inc)

View File

@ -4,11 +4,8 @@
# \date 2011-12-16
#
TMP := $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/bootstrap-hw.inc=%)
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/spec/arm_v7
REP_INC_DIR += src/core/spec/arm_v7
# add C++ sources
SRC_CC += spec/arm_v7/perf_counter.cc
@ -16,4 +13,4 @@ SRC_CC += spec/arm_v7/perf_counter.cc
SRC_S += spec/arm/vfpv3-d32.s
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/arm/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/arm/core-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/imx8q_evk
REP_INC_DIR += src/bootstrap/board/imx8q_evk
SRC_CC += bootstrap/board/imx8q_evk/platform.cc
SRC_CC += bootstrap/spec/arm/gicv3.cc
@ -9,6 +9,6 @@ SRC_S += bootstrap/spec/arm_64/crt0.s
NR_OF_CPUS = 4
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/rpi3
REP_INC_DIR += src/bootstrap/board/rpi3
SRC_CC += bootstrap/spec/arm_64/cortex_a53_mmu.cc
SRC_CC += bootstrap/board/rpi3/platform.cc
@ -6,8 +6,8 @@ SRC_CC += lib/base/arm_64/kernel/interface.cc
SRC_CC += spec/64bit/memory_map.cc
SRC_S += bootstrap/spec/arm_64/crt0.s
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
NR_OF_CPUS = 4
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/board/virt_qemu_64
REP_INC_DIR += src/bootstrap/board/virt_qemu_64
SRC_CC += bootstrap/spec/arm/gicv3.cc
SRC_CC += bootstrap/spec/arm_64/cortex_a53_mmu.cc
@ -7,8 +7,8 @@ SRC_CC += lib/base/arm_64/kernel/interface.cc
SRC_CC += spec/64bit/memory_map.cc
SRC_S += bootstrap/spec/arm_64/crt0.s
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
NR_OF_CPUS = 4
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,5 +1,5 @@
INC_DIR += $(REP_DIR)/src/core/board/imx8q_evk
INC_DIR += $(REP_DIR)/src/core/spec/arm/virtualization
REP_INC_DIR += src/core/board/imx8q_evk
REP_INC_DIR += src/core/spec/arm/virtualization
# add C++ sources
SRC_CC += kernel/vm_thread_on.cc

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/core/board/rpi3
REP_INC_DIR += src/core/board/rpi3
# add C++ sources
SRC_CC += kernel/vm_thread_off.cc
@ -8,4 +8,4 @@ SRC_CC += spec/arm/bcm2837_pic.cc
NR_OF_CPUS = 4
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/arm_v8/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/arm_v8/core-hw.inc)

View File

@ -1,5 +1,5 @@
INC_DIR += $(REP_DIR)/src/core/board/virt_qemu_64
INC_DIR += $(REP_DIR)/src/core/spec/arm/virtualization
REP_INC_DIR += src/core/board/virt_qemu_64
REP_INC_DIR += src/core/spec/arm/virtualization
# add C++ sources
SRC_CC += kernel/vm_thread_on.cc
@ -16,4 +16,4 @@ SRC_S += spec/arm_v8/virtualization/exception_vector.s
NR_OF_CPUS = 4
# include less specific configuration
include $(REP_DIR)/lib/mk/spec/arm_v8/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/arm_v8/core-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/core/spec/arm_v8
REP_INC_DIR += src/core/spec/arm_v8
# add C++ sources
SRC_CC += kernel/cpu_mp.cc
@ -14,7 +14,10 @@ SRC_CC += spec/arm_v8/kernel/thread.cc
SRC_S += spec/arm_v8/exception_vector.s
SRC_S += spec/arm_v8/crt0.s
vpath pd_session_support.cc $(REP_DIR)/src/core/spec/arm_v8
PD_SESSION_SUPPORT_CC_PATH := \
$(call select_from_repositories,src/core/spec/arm_v8/pd_session_support.cc)
vpath pd_session_support.cc $(dir $(PD_SESSION_SUPPORT_CC_PATH))
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
# include less specific configuration

View File

@ -4,11 +4,8 @@
# \date 2014-09-02
#
TMP := $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/bootstrap-hw.inc=%)
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/spec/cortex_a15
REP_INC_DIR += src/core/spec/cortex_a15
# add C++ sources
SRC_CC += spec/cortex_a15/cpu.cc
@ -16,4 +13,4 @@ SRC_CC += kernel/cpu_mp.cc
SRC_CC += spec/arm/kernel/lock.cc
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/arm_v7/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw.inc)

View File

@ -4,11 +4,8 @@
# \date 2014-09-02
#
TMP := $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/bootstrap-hw.inc=%)
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/spec/cortex_a8
REP_INC_DIR += src/core/spec/cortex_a8
# add C++ sources
SRC_CC += kernel/cpu_up.cc
@ -17,4 +14,4 @@ SRC_CC += kernel/lock.cc
NR_OF_CPUS = 1
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/arm_v7/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw.inc)

View File

@ -4,11 +4,8 @@
# \date 2014-09-02
#
TMP := $(call select_from_repositories,lib/mk/bootstrap-hw.inc)
BASE_HW_DIR := $(TMP:%lib/mk/bootstrap-hw.inc=%)
# add include paths
INC_DIR += $(BASE_HW_DIR)/src/core/spec/cortex_a9
REP_INC_DIR += src/core/spec/cortex_a9
# add C++ sources
SRC_CC += spec/cortex_a9/board.cc
@ -19,4 +16,4 @@ SRC_CC += kernel/vm_thread_off.cc
SRC_CC += kernel/cpu_mp.cc
# include less specific configuration
include $(BASE_HW_DIR)/lib/mk/spec/arm_v7/core-hw.inc
include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw.inc)

View File

@ -2,15 +2,16 @@
# evaluate bbl_dir immediately, otherwise it won't recognize
# missing ports when checking library dependencies
#
BBL_DIR := $(call select_from_ports,bbl)/src/lib/bbl
INC_DIR += $(REP_DIR)/src/bootstrap/spec/riscv $(BBL_DIR)
REP_INC_DIR += src/bootstrap/spec/riscv
INC_DIR += $(call select_from_ports,bbl)/src/lib/bbl
SRC_CC += bootstrap/spec/riscv/platform.cc
SRC_CC += lib/base/riscv/kernel/interface.cc
SRC_CC += spec/64bit/memory_map.cc
SRC_S += bootstrap/spec/riscv/crt0.s
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -2,9 +2,10 @@
# evaluate bbl_dir immediately, otherwise it won't recognize
# missing ports when checking library dependencies
#
BBL_DIR := $(call select_from_ports,bbl)/src/lib/bbl
INC_DIR += $(REP_DIR)/src/core/spec/riscv $(BBL_DIR)
REP_INC_DIR += src/core/spec/riscv
INC_DIR += $(call select_from_ports,bbl)/src/lib/bbl
CC_OPT += -fno-delete-null-pointer-checks
@ -25,7 +26,7 @@ SRC_CC += spec/64bit/memory_map.cc
SRC_S += spec/riscv/exception_vector.s
SRC_S += spec/riscv/crt0.s
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
# include less specific configuration
include $(REP_DIR)/lib/mk/core-hw.inc
include $(call select_from_repositories,lib/mk/core-hw.inc)

View File

@ -1,3 +1,3 @@
include $(call select_from_repositories,lib/mk/startup.inc)
vpath crt0.s $(REP_DIR)/src/lib/startup/spec/riscv
vpath crt0.s $(call select_from_repositories,src/lib/startup/spec/riscv)

View File

@ -1,3 +1,3 @@
SRC_CC += kernel/interface.cc
vpath kernel/interface.cc $(REP_DIR)/src/lib/base/riscv
vpath kernel/interface.cc $(call select_from_repositories,src/lib/base/riscv)

View File

@ -1,6 +1,6 @@
REQUIRES = x86_64
INC_DIR += $(REP_DIR)/src/bootstrap/spec/x86_64
REP_INC_DIR += src/bootstrap/spec/x86_64
SRC_CC += bootstrap/spec/x86_64/platform_muen.cc
SRC_CC += lib/muen/sinfo.cc
@ -9,4 +9,4 @@ SRC_CC += hw/spec/64bit/memory_map.cc
SRC_S += bootstrap/spec/x86_64/crt0.s
SRC_S += bootstrap/spec/x86_64/crt0_translation_table_muen.s
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -1,4 +1,4 @@
INC_DIR += $(REP_DIR)/src/bootstrap/spec/x86_64
REP_INC_DIR += src/bootstrap/spec/x86_64
SRC_S += bootstrap/spec/x86_64/crt0.s
SRC_CC += bootstrap/spec/x86_64/platform.cc
@ -8,4 +8,4 @@ SRC_CC += hw/spec/64bit/memory_map.cc
NR_OF_CPUS = 32
include $(REP_DIR)/lib/mk/bootstrap-hw.inc
include $(call select_from_repositories,lib/mk/bootstrap-hw.inc)

View File

@ -10,8 +10,8 @@ REQUIRES = x86_64
LIBS += sinfo-muen
# add include paths
INC_DIR += $(REP_DIR)/src/core/spec/x86_64/muen
INC_DIR += $(REP_DIR)/src/core/spec/x86_64
REP_INC_DIR += src/core/spec/x86_64/muen
REP_INC_DIR += src/core/spec/x86_64
# add assembly sources
SRC_S += spec/x86_64/crt0.s
@ -42,7 +42,7 @@ SRC_CC += vm_session_component.cc
SRC_CC += spec/64bit/memory_map.cc
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
# include less specific configuration
include $(REP_DIR)/lib/mk/core-hw.inc
include $(call select_from_repositories,lib/mk/core-hw.inc)

View File

@ -6,7 +6,7 @@
#
# add include paths
INC_DIR += $(REP_DIR)/src/core/spec/x86_64
REP_INC_DIR += src/core/spec/x86_64
# add assembly sources
SRC_S += spec/x86_64/crt0.s
@ -34,9 +34,9 @@ SRC_CC += spec/x86_64/platform_support_common.cc
SRC_CC += spec/64bit/memory_map.cc
vpath spec/64bit/memory_map.cc $(REP_DIR)/src/lib/hw
vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw)
NR_OF_CPUS = 32
# include less specific configuration
include $(REP_DIR)/lib/mk/core-hw.inc
include $(call select_from_repositories,lib/mk/core-hw.inc)

View File

@ -1,4 +1,5 @@
SRC_CC = sinfo.cc
INC_DIR += $(REP_DIR)/include/spec/x86_64/muen
SRC_CC = sinfo.cc
vpath sinfo.cc $(REP_DIR)/src/lib/muen
REP_INC_DIR += include/spec/x86_64/muen
vpath sinfo.cc $(call select_from_repositories,src/lib/muen)

View File

@ -1,3 +1,3 @@
SRC_CC += kernel/interface.cc
vpath kernel/interface.cc $(REP_DIR)/src/lib/base/x86_64
vpath kernel/interface.cc $(call select_from_repositories,src/lib/base/x86_64)