From 9d5fb35ca51b597fecab372f2e5bb9d3631f6f05 Mon Sep 17 00:00:00 2001 From: Jacob Pease Date: Wed, 2 Aug 2023 19:26:35 -0500 Subject: [PATCH] Added device tree generation to Linux directory Makefile. Exits on not finding output/images folder in buildroot directory. --- linux/Makefile | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/linux/Makefile b/linux/Makefile index 1d8107c24..41d9e00df 100644 --- a/linux/Makefile +++ b/linux/Makefile @@ -7,15 +7,29 @@ PACKAGE_SOURCE := ${WALLYLINUX}/buildroot-packages/package-source FPGA_AXI_SDC := ${WALLYLINUX}/buildroot-packages/fpga-axi-sdc DRIVER := ${PACKAGE_SOURCE}/fpga-axi-sdc.c -.PHONY: generate clean patch +DTS ?= $(shell find -type f -regex ".*\.dts" | sort) -generate: $(IMAGES) - +.PHONY: generate cleanDriver patch + +# Generate device tree binaries from device tree source files +# Currently supported fpga device tree binaries are also generated +generate: $(DTS) $(IMAGES) + dtc -I dts -O dtb devicetree/wally-virt.dts > ${IMAGES}/wally-virt.dtb + dtc -I dts -O dtb devicetree/wally-vcu108.dts > ${IMAGES}/wally-vcu108.dtb + dtc -I dts -O dtb devicetree/wally-vcu118.dts > ${IMAGES}/wally-vcu118.dtb + dtc -I dts -O dtb devicetree/wally-vcu118.dts > ${IMAGES}/wally-artya7.dtb + +disassemble: + +# Generating new Buildroot directories -------------------------------- # This directive should be run as: make patch BUILDROOT=path/to/buildroot patch: $(BUILDROOT) $(DRIVER) @ echo "Patching buildroot directory at: $<" + @ echo "Copying wally configuration files and rootfs_overlay to buildroot." cp -r $(WALLYLINUX)/buildroot-config-src/wally $