From 7c3b9c843f3d5882cfacc7c7e20af73bc8c15052 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 6 Sep 2022 17:01:45 +0200 Subject: [PATCH] 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. --- .../recipes/src/base-hw-imx53_qsb_tz/content.mk | 4 +++- repos/base-hw/recipes/src/base-hw_content.inc | 14 +++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/content.mk b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/content.mk index cf571d6154..829317888c 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/content.mk +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/content.mk @@ -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 diff --git a/repos/base-hw/recipes/src/base-hw_content.inc b/repos/base-hw/recipes/src/base-hw_content.inc index adc04050e8..f75752b537 100644 --- a/repos/base-hw/recipes/src/base-hw_content.inc +++ b/repos/base-hw/recipes/src/base-hw_content.inc @@ -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)) \