summaryrefslogtreecommitdiff
path: root/Makefile
blob: 8cefc6a895e272a5ace61cc54ea5be075428877a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CC?=$(CROSS_COMPILE)gcc
KERNEL_DIR?=../linux
KERNEL_BUILD_DIR?=$(KERNEL_DIR)
# Need a dtc new enough to handle the DTC options.
DTC?=/usr/bin/dtc

MTCDT_DTBO_OBJECTS:= $(patsubst %.dtso,%.dtbo,$(wildcard mtcdt/*.dtso))
MTRV1_DTBO_OBJECTS:= $(patsubst %.dtso,%.dtbo,$(wildcard mtrv1/*.dtso))
MTCAP_DTBO_OBJECTS:= $(patsubst %.dtso,%.dtbo,$(wildcard mtcap/*.dtso))

%.pre.dtso: %.dtso
	$(CC) -E -nostdinc -I$(KERNEL_DIR)/include -I$(KERNEL_DIR)/arch/arm/boot/dts -x assembler-with-cpp -undef -o $@ $^

%.dtbo: %.pre.dtso
	$(DTC) $(DTC_OPTIONS) -I dts -O dtb -o $@ $^

%.itb: %.its %_dtbos
	mkimage -D "-i$(KERNEL_BUILD_DIR)/arch/arm/boot/ -i$(KERNEL_BUILD_DIR)/arch/arm/boot/dts -p 1000 $(DTC_OPTIONS)" -f $< $@

mtcdt_dtbos: $(MTCDT_DTBO_OBJECTS)
mtrv1_dtbos: $(MTRV1_DTBO_OBJECTS)
mtcap_dtbos: $(MTCAP_DTBO_OBJECTS)

.PHONY: clean
clean:
	rm -f */*.dtbo *.itb