From c175273e368f2400c0a95a97c32e4fbc676ce3d3 Mon Sep 17 00:00:00 2001 From: Ahmad Syarif <31882477+asyarifstudio@users.noreply.github.com> Date: Thu, 30 May 2024 01:08:05 +0800 Subject: [PATCH] Bugfix/cva6 support (#447) This Pull request is to fix wrong platform.h path for cva6 target and also align 32 and 64 bit buildroot configuration --- overlays/keystone/configs/riscv32_cva6_defconfig | 1 + sm/src/objects.mk | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/overlays/keystone/configs/riscv32_cva6_defconfig b/overlays/keystone/configs/riscv32_cva6_defconfig index adfbf74e3..e1efc7206 100644 --- a/overlays/keystone/configs/riscv32_cva6_defconfig +++ b/overlays/keystone/configs/riscv32_cva6_defconfig @@ -12,6 +12,7 @@ BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_KEYSTONE_PATH)/patches $(BR2_EXTERNAL_KEYST BR2_PER_PACKAGE_DIRECTORIES=y BR2_SSP_NONE=y BR2_TARGET_GENERIC_ROOT_PASSWD="sifive" +BR2_SYSTEM_BIN_SH_BASH=y BR2_SYSTEM_DHCP="eth0" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_KEYSTONE_PATH)/board/cva6/post-build.sh" BR2_LINUX_KERNEL=y diff --git a/sm/src/objects.mk b/sm/src/objects.mk index 6fa93c52c..ba86bc184 100644 --- a/sm/src/objects.mk +++ b/sm/src/objects.mk @@ -15,7 +15,12 @@ keystone-sm-headers += crypto.h ed25519/ed25519.h ed25519/fe.h ed25519/fixedint. endif # Platform headers -keystone-sm-headers += platform/$(KEYSTONE_PLATFORM)/platform.h +ifeq ($(KEYSTONE_PLATFORM),cva6) + #for CVA6, the actual target platform is fpga/ariane, so PLATFORM variable is used + keystone-sm-headers += platform/$(PLATFORM)/platform.h +else + keystone-sm-headers += platform/$(KEYSTONE_PLATFORM)/platform.h +endif ifeq ($(KEYSTONE_PLATFORM),sifive/fu540) keystone-sm-headers += platform/sifive/fu540/waymasks.h