Skip to content

Commit

Permalink
fpga: Updated artifact management to take select only useful envvar
Browse files Browse the repository at this point in the history
  • Loading branch information
CyrilKoe committed Jan 26, 2024
1 parent b238548 commit 74d38fa
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion sw/deps/cva6-sdk
4 changes: 4 additions & 0 deletions sw/sw.mk
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ $(foreach link,$(patsubst $(CHS_SW_LD_DIR)/%.ld,%,$(wildcard $(CHS_SW_LD_DIR)/*.
# Images from CVA6 SDK (built externally)
CHS_CVA6_SDK_IMGS ?= $(addprefix $(CHS_SW_DIR)/deps/cva6-sdk/install64/,fw_payload.bin uImage)

$(CHS_CVA6_SDK_IMGS):
@echo "Linux images are missing, did you build the CVA6 SDK?"
exit 1

# Create full Linux disk image
$(CHS_SW_DIR)/boot/linux-%.gpt.bin: $(CHS_SW_DIR)/boot/zsl.rom.bin $(CHS_SW_DIR)/boot/cheshire_%.dtb $(CHS_CVA6_SDK_IMGS)
truncate -s $(CHS_SW_DISK_SIZE) $@
Expand Down
4 changes: 3 additions & 1 deletion target/xilinx/xilinx/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ $(PROJECT).xpr:

# Generate a sha based on env variables and artifacts_in
generate_sha256:
@echo $(VIVADOENV) $(VIVADO) $(PROJECT) $(ARTIFACTS_IN) > .generated_env
@echo $(VIVADO) $(PROJECT) > .generated_env
@echo $(VIVADOENV) | tr " " "\n" | grep $(foreach var,$(ARTIFACTS_VARS), $(addprefix -e ,$(var))) >> .generated_env
@sha256sum $(ARTIFACTS_IN) >> .generated_env
@sha256sum .generated_env | awk '{print $$1}' > .generated_sha256

Expand All @@ -46,6 +47,7 @@ load-artifacts: .generated_sha256
save-artifacts: generate_sha256 load-artifacts $(PROJECT).xpr
@if [ ! -d "$(ARTIFACTS_PATH)/`cat .generated_sha256`" ]; then \
cp -r . $(ARTIFACTS_PATH)/`cat .generated_sha256`; \
chmod -R o+rw $(ARTIFACTS_PATH)/`cat .generated_sha256`; \
fi

gui:
Expand Down
4 changes: 3 additions & 1 deletion target/xilinx/xilinx/xlnx_clk_wiz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# SPDX-License-Identifier: Apache-2.0

PROJECT:=xlnx_clk_wiz
# The files and variables on which the IP configuration depends
ARTIFACTS_IN:=Makefile tcl/run.tcl
ARTIFACTS_VARS:=XILINX_PART XILINX_BOARD BOARD

include ../common.mk
include ../common.mk
3 changes: 2 additions & 1 deletion target/xilinx/xilinx/xlnx_mig_7_ddr3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

PROJECT:=xlnx_mig_7_ddr3
ARTIFACTS_IN:=Makefile tcl/run.tcl mig_genesys2.prj mig_kc705.prj mig_vc707.prj
ARTIFACTS_VARS:=XILINX_PART XILINX_BOARD BOARD

include ../common.mk
include ../common.mk
2 changes: 2 additions & 0 deletions target/xilinx/xilinx/xlnx_mig_ddr4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# SPDX-License-Identifier: Apache-2.0

PROJECT:=xlnx_mig_ddr4
# The files and variables on which the IP configuration depends
ARTIFACTS_IN:=Makefile tcl/run.tcl
ARTIFACTS_VARS:=XILINX_PART XILINX_BOARD BOARD

include ../common.mk
2 changes: 2 additions & 0 deletions target/xilinx/xilinx/xlnx_vio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# SPDX-License-Identifier: Apache-2.0

PROJECT:=xlnx_vio
# The files and variables on which the IP configuration depends
ARTIFACTS_IN:=Makefile tcl/run.tcl
ARTIFACTS_VARS:=XILINX_PART XILINX_BOARD BOARD

include ../common.mk

0 comments on commit 74d38fa

Please sign in to comment.