Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCMI-Server: Add support for multiple source files in build #6190

Merged
merged 3 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ jobs:

function _make() { make -j$(nproc) -s O=out $*; }
function download_plug_and_trust() { mkdir -p $HOME/se050 && git clone --single-branch -b v0.4.2 https://github.com/foundriesio/plug-and-trust $HOME/se050/plug-and-trust || (rm -rf $HOME/se050 ; echo Nervermind); }
function download_scp_firmware() { git clone --single-branch https://github.com/ARM-software/SCP-firmware.git $HOME/scp-firmware || echo Nervermind; }

#Temporarily disabled
function download_scp_firmware() { echo "download_scp_firmware skipped"; }

ccache -s -v
download_plug_and_trust
Expand Down
1 change: 1 addition & 0 deletions core/lib/scmi-server/conf-optee-fvp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $(call force,CFG_SCPFW_MOD_REG_SENSOR,y)
$(call force,CFG_SCPFW_MOD_SCMI,y)
$(call force,CFG_SCPFW_MOD_SCMI_CLOCK,y)
$(call force,CFG_SCPFW_MOD_SCMI_PERF,y)
$(call force,CFG_SCPFW_SCMI_PERF_PROTOCOL_OPS,y)
$(call force,CFG_SCPFW_MOD_SCMI_POWER_DOMAIN,y)
$(call force,CFG_SCPFW_MOD_SCMI_SENSOR,y)
$(call force,CFG_SCPFW_MOD_SYSTEM_PLL,y)
Expand Down
18 changes: 18 additions & 0 deletions core/lib/scmi-server/sub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ cppflags-lib-$(CFG_SCPFW_CLOCK_TREE_MGMT) += -DBUILD_HAS_CLOCK_TREE_MGMT

cppflags-lib-$(CFG_SCPFW_SCMI_PERF_FAST_CHANNELS) += -DBUILD_HAS_SCMI_PERF_FAST_CHANNELS

cppflags-lib-$(CFG_SCPFW_SCMI_PERF_PROTOCOL_OPS) \
+= -DBUILD_HAS_SCMI_PERF_PROTOCOL_OPS

cppflags-lib-$(CFG_SCPFW_SCMI_SENSOR_EVENTS) += -DBUILD_HAS_SCMI_SENSOR_EVENTS
cppflags-lib-$(CFG_SCPFW_SCMI_SENSOR_V2) += -DBUILD_HAS_SCMI_SENSOR_V2 \
-DBUILD_HAS_SENSOR_TIMESTAMP \
Expand Down Expand Up @@ -148,6 +151,21 @@ ifneq (,$$(wildcard $(scpfw-path)/$3/$2/include/*))
incdirs_ext-y += $(scpfw-path)/$3/$2/include
endif
srcs-$(CFG_SCPFW_MOD_$4) += $(scpfw-path)/$3/$2/src/mod_$1.c

# SCMI_Perf in SCP-firmware has components that can be added conditionally at
# build time.
ifeq ($(1), scmi_perf)

ifeq ($(CFG_SCPFW_SCMI_PERF_PROTOCOL_OPS),y)
srcs-$(CFG_SCPFW_MOD_SCMI_PERF) += $(scpfw-path)/$3/$2/src/scmi_perf_protocol_ops.c
endif

ifeq ($(CFG_SCPFW_SCMI_PERF_FAST_CHANNELS),y)
srcs-$(CFG_SCPFW_MOD_SCMI_PERF) += $(scpfw-path)/$3/$2/src/scmi_perf_fastchannels.c
endif

endif

cflags-lib-$(CFG_SCPFW_MOD_$4) += -DBUILD_HAS_MOD_$4
endef

Expand Down