Skip to content

Commit

Permalink
Added target and rules for device tree compilation. Added cape-bebopr…
Browse files Browse the repository at this point in the history
… device tree source.
  • Loading branch information
modmaker committed Aug 12, 2013
1 parent 2014df1 commit 085478c
Show file tree
Hide file tree
Showing 2 changed files with 580 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ SUBDIRS :=
OBJ := $(patsubst %.c,%.o,${SOURCES})
TS_ENV = .ts_env

DTSS := \
cape-bebopr-R2.dts \
cape-bebopr-ena-R2.dts \
cape-bebopr-brdg-R2.dts
DTBOS := $(patsubst %.dts,%.dtbo,${DTSS})

.PHONY: all program clean subdirs doc
.PRECIOUS: %.o %.elf

Expand Down Expand Up @@ -128,6 +134,17 @@ doc: Doxyfile *.c *.h
@echo " OBJDUMP $@"
@$(OBJDUMP) -h -S $< > $@

dtbos: $(DTBOS)

DTC=/usr/bin/dtc
%.dtbo: %.dts
@echo " DTC $@"
@if test -x $(DTC) ; then \
$(DTC) -O dtb -o $@ -b 0 -@ $< ; \
else \
echo "Device Tree Compiler not found!" ; \
fi

depend:
@echo " Appending dependency information to '$(MAKEFILE)'"
@if grep '^# DO NOT DELETE' $(MAKEFILE) >/dev/null; then \
Expand Down
Loading

0 comments on commit 085478c

Please sign in to comment.