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/fix scp compilation #6769

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

vingu-linaro
Copy link
Contributor

This PR follows the email discussion with SCP-firmware maintainers and the agreement for option 3

The MR for SCP-firmare is availabel here:
https://gitlab.arm.com/firmware/SCP-firmware/-/merge_requests/948

Copy link
Contributor

@jforissier jforissier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • " core/scmi: fix c files list":
    s/c file list/C file list/
  • "core/scmi: sync with SCP-firmware code reorg":
    One comment below
  • " core/scmi: export sub.mk files in SCP-firmware":
    s/su directory/subdirectory/
  • The CI script needs to be update to download a suitable version of the SCP-firmware

scpfw-out-path := $(out-dir)/$(libdir)

# This script was validated against SCP-firmware 2.11.0 development branch,
# from commit f1d894921d76 ("product/optee-fvp: Add new OPTEE FVP product").
scpfw-integ-version-maj = 2
scpfw-integ-version-min = 11
scpfw-integ-version-min = 14
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update or remove the above comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@vingu-linaro
Copy link
Contributor Author

  • " core/scmi: fix c files list":
    s/c file list/C file list/
  • "core/scmi: sync with SCP-firmware code reorg":
    One comment below
  • " core/scmi: export sub.mk files in SCP-firmware":
    s/su directory/subdirectory/
  • The CI script needs to be update to download a suitable version of the SCP-firmware

yes, we will have to sync optee os manifest and scp-firmware

# a header file to be generated to describe embedded modules.
# This is done through cmake configuration of the package.
# The toolchain build directive must also match the list of
# embedded modules.

scpfw-path = $(CFG_SCP_FIRMWARE)
scpfw-product = $(CFG_SCMI_SCPFW_PRODUCT)
scpfw-product = optee/$(CFG_SCMI_SCPFW_PRODUCT)
scpfw-out-path := $(out-dir)/$(libdir)

# This script was validated against SCP-firmware 2.11.0 development branch,
# from commit f1d894921d76 ("product/optee-fvp: Add new OPTEE FVP product").
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather wait we have a SCP-firmware commit on which to sync before we merge this commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. If I have a manifest PR I can test and merge both at the same time so that CI doesn't break.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have put the MR on hold on SCP-firmware side to make sure that change in optee-os are fine too. Once everything is ok, I will ask the MR to be merged in SCP-firmware and will send a PR for the manifest to be used with this PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So to be clear the steps are:

  1. SCP-firmware needs to be updated first (add product/optee/sub.mk)
  2. Then add a temporary commit to this PR updating .github/workflows/ci.yml so that we can make sure CI passes (function download_scp_firmware(): checkout the proper SHA1).
  3. This PR will receive review tags
  4. Create a manifest PR
  5. I will merge both PRs (excluding the ci.yml hack of course)

@vingu-linaro
Copy link
Contributor Author

This is just a rebase on 4.2.0. I'm still waiting for the scp firmware MR to be merged to update ci and manifest

@etienne-lms
Copy link
Contributor

@vingu-linaro, could you consider the 3 last commits of #6789 in your SCP-firmware M-R #948. I cannot post review
comments in that M-R since I currently face troubles with my gitlab.arm account (I hope it will be resolved soon).

@vingu-linaro
Copy link
Contributor Author

@vingu-linaro, could you consider the 3 last commits of #6789 in your SCP-firmware M-R #948. I cannot post review comments in that M-R since I currently face troubles with my gitlab.arm account (I hope it will be resolved soon).

Ok, I'm going to have a look and add them the MR

SCP firmware has split some C files and reorganized its code

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
SCP-firmare has reorganized its modules. Update and sync the make files
with new code layout

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
In order to ease the update of makefile when C or Header files of
SCP-firmware project changes, we integrate them in the optee subdirectory
of SCP-firmware.

sub-optee-fvp.mk and sub-optee-stm32mp1.mk are moved unchanged in their
product directories of SCP-repository.

scmi-server/sub.mk is split:
- macro and compilation flags stay in optee-os
- srcs and incdirs are moved in product/optee directory

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
@vingu-linaro vingu-linaro force-pushed the scmi/fix-scp-compilation branch 2 times, most recently from 0968e39 to b1bc0a2 Compare April 18, 2024 16:04
vingu-linaro and others added 5 commits April 19, 2024 10:37
Now that all modules and products related to optee are located in the
product/optee directory in the SCP-firmware repository, adding an "optee-"
prefix in the product name is useless. Remove it.

Suggested-by: Etienne Carriere <etienne.carriere@foss.st.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Enable the required SCP-firmware module when using OP-TEE shared memory
or a piece of SRAM for SCMI communication which defined by the boolean
configuration switch CFG_STM32MP1_SCMI_SHM_SYSRAM.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Temporary point to the MR branch of SCP

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Enable CMake directive CMAKE_C_COMPILER_WORKS to prevent SCP-firmware
CMake configuration sequence to check the cross compilation toolchain
since it is not needed here: OP-TEE only uses CMake to configure
SCP-firmware, not to build source files. This change is required when
building OP-TEE with CFG_SCMI_SCPFW=y and using a CMake >= 3.27.0.

Suggested-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
[Fix the overwrite of others CMake options]
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Add missing inclusion of stdbool.h and stddef.h in stpmic1_regulator.h.
The issue was revealed when upgrading to latest SCP-firmware source tree.

Fixes: 9cb0d51 ("drivers: stpmic1: export regulators API in a specific header file")
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants