-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrules.dt.mk
49 lines (30 loc) · 1.2 KB
/
rules.dt.mk
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
37
38
39
40
41
42
43
44
45
46
47
48
#---------------------------------------------------------------------------
# Linux Device Tree Overlays
#---------------------------------------------------------------------------
define gen-overlay
@echo "Making $@ ... " $(TEE)
@-$(COMPILE.dt) $< -o $@ $(OUT)
endef
$(strip $(BINDIR))/%-$(VERSION.dt).dtbo : %.dts
$(gen-overlay)
#---
NAME.dt ?= $(notdir $(ALLSRC.dt:%.dts=%))
.PHONY: installudev.dt installbin.dt install.dt
# install overlay binaries (in /lib/firmware)
installbin.dt: $(INST_TARGETS_BIN.dt)
$(INST_TARGETS_BIN.dt):
@echo "Installing $(NAME.dt) .."
@echo " ..install overlay binary.."
@$(MKDIR_P) $(INST_DIR_BIN.dt)
@$(INSTALL) $(INST_FILES_BIN.dt) $(INST_DIR_BIN.dt)
# install udev rules (in /etc/udev/rules.d)
installudev.dt: $(INST_TARGETS_UDEV.dt)
$(INST_TARGETS_UDEV.dt):
@echo " ..install udev rules.."
@$(MKDIR_P) $(INST_DIR_UDEV.dt)
@$(INSTALL) $(INST_FILES_UDEV.dt) $(INST_DIR_UDEV.dt)
install.dt: $(TARGETS.dt) installbin.dt installudev.dt
# TODO: handle post-install along example in Makefile.i2c1
# see: https://github.com/IlikePepsi/dt-overlays
# The scripts from there are in tools subdir in LaMake.
# Could be a "make load" and "make unload"