fpga: e31x/e320/n3xx/x400: Rework device tree file generation
... to support custom image core name, example:
rfnoc_image_builder -y n310_rfnoc_image_core.yml -n my_custom_name
The device tree source files were renamed to match the target
name used in the Makefile.
example:
old: dts/usrp_n310_fpga_hg.dts
new: dts/N310_HG.dts
The source file is used to compile the final .dts file in the BUILD_DIR.
example: build-my_custom_name/N310_HG.dts
The final .dts file is copied to the BUILD_OUTPUT_DIR as part of the
post build steps and renamed to the custom image core name.
example: build/my_custom_name.dts
This completes the change that was introduced with commit 2afc66f132.
Original-commit: d40db57f2e03c322ac6b0001e0a59d4a14a5a3b9
This commit is contained in:
committed by
Wade Fife
parent
264b33a416
commit
e01ce08634
+11
-10
@@ -57,6 +57,8 @@ ifeq ($(TARGET),bin)
|
||||
cp $(BUILD_DIR)/e31x.bit $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).bit; \
|
||||
echo "Exporting build report..."; \
|
||||
cp $(BUILD_DIR)/build.rpt $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).rpt; \
|
||||
echo "Exporting devicetree file..."; \
|
||||
cp $(BUILD_DIR)/$(1).dts $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).dts; \
|
||||
echo "Build DONE ... $(1)";
|
||||
else
|
||||
post_build = @echo "Skipping bitfile export."
|
||||
@@ -91,27 +93,26 @@ ifndef BUILD_DIR
|
||||
endif
|
||||
|
||||
##E310_SG1_IDLE: Build USRP E3XX idle design (Speed Grade 1).
|
||||
E310_SG1_IDLE E3XX_idle: check-variables E310_SG1_IP $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).dts
|
||||
E310_SG1_IDLE E3XX_idle: check-variables E310_SG1_IP $(BUILD_DIR)/E310_SG1_IDLE.dts
|
||||
$(call vivado_build,E310_SG1,$(DEFS) E310_IDLE_IMAGE=1 E310_SG1=1)
|
||||
$(call post_build,$@)
|
||||
$(call post_build,E310_SG1_IDLE)
|
||||
|
||||
##E310_SG3_IDLE: Build USRP E3XX idle design (Speed Grade 3).
|
||||
E310_SG3_IDLE E3XX_idle_sg3: check-variables E310_SG3_IP $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).dts
|
||||
E310_SG3_IDLE E3XX_idle_sg3: check-variables E310_SG3_IP $(BUILD_DIR)/E310_SG3_IDLE.dts
|
||||
$(call vivado_build,E310_SG3,$(DEFS) E310_IDLE_IMAGE=1 E310_SG3=1)
|
||||
$(call post_build,$@)
|
||||
$(call post_build,E310_SG3_IDLE)
|
||||
|
||||
##E310_SG1: Build USRP E3XX (Speed Grade 1).
|
||||
E310_SG1 E310: check-variables E310_SG1_IP $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).dts
|
||||
E310_SG1 E310: check-variables E310_SG1_IP $(BUILD_DIR)/E310_SG1.dts
|
||||
$(call vivado_build,E310_SG1,$(DEFS) E310_SG1=1 $(if $(DRAM),ENABLE_DRAM=1,))
|
||||
$(call post_build,$@)
|
||||
$(call post_build,E310_SG1)
|
||||
|
||||
##E310_SG3: Build USRP E3XX (Speed Grade 3).
|
||||
E310_SG3 E310_sg3: check-variables E310_SG3_IP $(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).dts
|
||||
E310_SG3 E310_sg3: check-variables E310_SG3_IP $(BUILD_DIR)/E310_SG3.dts
|
||||
$(call vivado_build,E310_SG3,$(DEFS) E310_SG3=1 $(if $(DRAM),ENABLE_DRAM=1,))
|
||||
$(call post_build,$@)
|
||||
$(call post_build,E310_SG3)
|
||||
|
||||
$(BUILD_OUTPUT_DIR)/$(IMAGE_CORE_NAME).dts: dts/*.dts dts/*.dtsi
|
||||
-mkdir -p $(BUILD_OUTPUT_DIR)
|
||||
$(BUILD_DIR)/%.dts: dts/%.dts dts/*.dtsi
|
||||
${CC} -o $@ -E -I dts -nostdinc -undef -x assembler-with-cpp -D__DTS__ $<
|
||||
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user