base-hw: tighten src-archive content of lib/mk/

This patch refines the rules for generating a base-hw src archive
for a given board by enumerating the content of the lib/mk/spec/*
directories instead of including entire directories. This avoids
the inclusion of lib.mk files found in SoC-specific repositories
(like genode-allwinner) in the kernel source archives.

When building a binary archive from such a src archive with the changes
of issue #4599, the build system would otherwise try (and fail) to build
the libraries for the accidentally included lib.mk files.
This commit is contained in:
Norman Feske 2022-09-06 17:01:45 +02:00
parent 4c1ec0404a
commit 7c3b9c843f
2 changed files with 14 additions and 4 deletions

View File

@ -1,4 +1,6 @@
CONTENT += src/core/board/imx53_qsb \
src/bootstrap/board/imx53_qsb
src/bootstrap/board/imx53_qsb \
lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc \
lib/mk/spec/arm_v7/bootstrap-hw-imx53_qsb.inc
include $(GENODE_DIR)/repos/base-hw/recipes/src/base-hw_content.inc

View File

@ -125,9 +125,17 @@ SRC_CORE += $(notdir $(wildcard $(BASE_HW_DIR)/src/core/*.cc)) \
$(addprefix board/,$(BOARD)) \
version.inc target.inc include hw kernel
LIB_MK := base-hw-common.mk base-hw.mk bootstrap-hw.inc core-hw.inc \
timeout-hw.mk cxx.mk base.inc base-common.inc startup.inc \
$(addprefix spec/,${call selected_content,LIB_MK_SPECS})
# names of the lib/mk/ files to consider for inclusion in the src archive
LIB_MK_FILES := base-common.inc base-hw-common.mk \
base.inc base-hw.mk \
bootstrap-hw.inc bootstrap-hw-$(BOARD).inc bootstrap-hw-$(BOARD).mk \
core-hw.inc core-hw-$(BOARD).inc core-hw-$(BOARD).mk \
startup.inc startup-hw.mk \
timeout-hw.mk cxx.mk ld-hw.mk syscall-hw.mk
LIB_MK_DIRS := lib/mk $(addprefix lib/mk/spec/,${call selected_content,LIB_MK_SPECS})
CONTENT += $(foreach D,$(LIB_MK_DIRS),$(addprefix $D/,$(LIB_MK_FILES)))
CONTENT += $(addprefix src/timer/,$(SRC_TIMER)) \
$(addprefix src/include/hw/,$(SRC_INCLUDE_HW)) \