Hello Eugene Myers,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/44687
to review the following change.
Change subject: payloads/external: Add STM build as a payload ......................................................................
payloads/external: Add STM build as a payload
The patch incorporate the STM build as a part of the coreboot build. A separate patch lists and documents the options that the developer can use. In most cases the default options will suffice.
Change-Id: I8c6e0c85edd4e2b0658791553bd9947656e8c796 Signed-off-by: Eugene D Myers cedarhouse@comcast.net --- M payloads/external/Makefile.inc A payloads/external/stm/Makefile 2 files changed, 59 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/44687/1
diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index ef0990c..6389ca8 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -303,3 +303,17 @@ CONFIG_YABITS_MASTER=$(CONFIG_YABITS_MASTER) \ CONFIG_YABITS_STABLE=$(CONFIG_YABITS_STABLE) \ MFLAGS= MAKEFLAGS= + +# STM + +payloads/external/stm/STM/Stm/build/StmPkg/Core/stm.bin stm: + $(MAKE) -C payloads/external/stm \ + CONFIG_STM_UART=$(CONFIG_STM_UART) \ + CONFIG_STM_HEAPSIZE=$(CONFIG_STM_HEAPSIZE) \ + CONFIG_STM_BUILD=$(CONFIG_STM_BUILD) \ + CONFIG_STM_GIT_REPO=$(CONFIG_STM_GIT_REPO) \ + CONFIG_STM_GIT_BRANCH=$(CONFIG_STM_GIT_BRANCH) \ + CONFIG_STM_STMPE_ENABLED=$(CONFIG_STM_STMPE_ENABLED) \ + CONFIG_STM_CBMEM_CONSOLE=$(CONFIG_STM_CBMEM_CONSOLE) + +.PHONY: stm payloads/external/stm/STM/Stm/build/StmPkg/Core/stm.bin diff --git a/payloads/external/stm/Makefile b/payloads/external/stm/Makefile new file mode 100644 index 0000000..072d91b --- /dev/null +++ b/payloads/external/stm/Makefile @@ -0,0 +1,45 @@ + +project_name=STM +project_dir=$(CURDIR)/$(project_name) +build_dir=$(CURDIR)/$(project_name)/Stm/build +project_git_repo=$(CONFIG_STM_GIT_REPO) +project_git_branch=$(CONFIG_STM_GIT_BRANCH) + + +all: build + +$(project_dir): + echo " Cloning $(project_name) from $(project_git_repo)" + git clone $(project_git_repo) $(project_name) + +fetch: $(project_dir) + echo " Fetching new commits"; + cd $(project_dir); \ + echo " Fetching new commits from the $(project_name) branch $(project_git_branch) git repo"; \ + git pull; + +checkout: fetch + echo " Checking out STM - $(project_git_branch)" + cd $(project_name); git checkout $(project_git_branch); git pull + +build: checkout + echo " Build STM" + cd STM/Stm; \ + rm -rf build; \ + mkdir -p build; \ + cd build; \ + cmake .. -DBIOS=coreboot \ + -DUART=$(CONFIG_STM_UART) \ + -DHEAPSIZE=$(CONFIG_STM_HEAPSIZE) \ + -DCBMEM_ENABLE=$(CONFIG_STM_CBMEM_CONSOLE) \ + -DSTMPE_ENABLED=$(CONFIG_STM_STMPE_ENABLED) \ + -DBUILD=$(CONFIG_STM_BUILD); \ + $(MAKE); + +clean: + rm -rf $(build_dir) + +distclean: + rm -rf $(project_dir) + +.PHONY: checkout build clean distclean fetch