From eb03c0dc16a3fd527c673b29fc259cb4119e1e4d Mon Sep 17 00:00:00 2001 From: Gregor Haas Date: Thu, 25 Jan 2024 16:51:08 -0800 Subject: [PATCH] bugfix: previous commit broke support for CVA6 and unmatched SMs --- .../keystone/boot/keystone-sm/keystone-sm.mk | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/overlays/keystone/boot/keystone-sm/keystone-sm.mk b/overlays/keystone/boot/keystone-sm/keystone-sm.mk index 786f7c879..78538bbab 100644 --- a/overlays/keystone/boot/keystone-sm/keystone-sm.mk +++ b/overlays/keystone/boot/keystone-sm/keystone-sm.mk @@ -17,7 +17,16 @@ endif KEYSTONE_SM_DEPENDENCIES += host-keystone-sdk $(KEYSTONE_SM_CONFIGURE): host-keystone-sdk-install -ifeq ($(KEYSTONE_PLATFORM),generic) +ifeq ($(KEYSTONE_PLATFORM),mpfs) +HSS_DEPENDENCIES += keystone-sm +$(HSS_TARGET_CONFIGURE): keystone-sm-install + +# Point HSS at the SM +HSS_MAKE_OPTS += KEYSTONE_SM=$(KEYSTONE_SM_BUILDDIR) + +# Make keystone-sm dircleans also trigger hss-dircleans +keystone-sm-dirclean: hss-dirclean +else OPENSBI_DEPENDENCIES += keystone-sm $(OPENSBI_TARGET_CONFIGURE): keystone-sm-install @@ -31,16 +40,5 @@ OPENSBI_MAKE_ENV += PLATFORM_RISCV_TOOLCHAIN_DEFAULT=1 keystone-sm-dirclean: opensbi-dirclean endif -ifeq ($(KEYSTONE_PLATFORM),mpfs) -HSS_DEPENDENCIES += keystone-sm -$(HSS_TARGET_CONFIGURE): keystone-sm-install - -# Point HSS at the SM -HSS_MAKE_OPTS += KEYSTONE_SM=$(KEYSTONE_SM_BUILDDIR) - -# Make keystone-sm dircleans also trigger hss-dircleans -keystone-sm-dirclean: hss-dirclean -endif - $(eval $(keystone-package)) $(eval $(generic-package))