forked from radxa-pkg/radxa-overlays
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (29 loc) · 899 Bytes
/
Makefile
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
27
28
29
30
31
32
33
34
35
36
KERNEL_HEADER_VERSION ?= $(shell uname -r)
CONFIG_CLK_RK3308 ?= rockchip
CONFIG_CLK_RK3399 ?= rockchip
CONFIG_CLK_RK3568 ?= rockchip
CONFIG_CLK_RK3588 ?= rockchip
CONFIG_ARCH_MESON ?= amlogic
include $(wildcard arch/arm64/boot/dts/*/overlays/Makefile)
DTBO-AMLOGIC := $(addprefix arch/arm64/boot/dts/amlogic/overlays/,$(dtb-amlogic))
DTBO-ROCKCHIP := $(addprefix arch/arm64/boot/dts/rockchip/overlays/,$(dtb-rockchip))
DTBO := $(DTBO-AMLOGIC) $(DTBO-ROCKCHIP)
TMP := $(addsuffix .tmp,$(DTBO))
.PHONY: all
all: build
#
# Build
#
.PHONY: build
build: $(DTBO)
%.dtbo: %.dts
cpp -nostdinc -undef -x assembler-with-cpp -E -I "/usr/src/linux-headers-$(KERNEL_HEADER_VERSION)/include" -I "/usr/lib/modules/$(KERNEL_HEADER_VERSION)/build/include" "$<" "[email protected]"
dtc -q -@ -I dts -O dtb -o "$@" "[email protected]"
#
# Clean
#
.PHONY: distclean
distclean: clean
.PHONY: clean
clean:
rm -rf $(DTBO) $(TMP)