forked from julbouln/tinydrm_it8951
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
46 lines (31 loc) · 949 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
37
38
39
40
41
42
43
44
45
46
obj-m += it8951.o
KDIR ?= /lib/modules/`uname -r`/build
PICONFIG = /boot/config.txt
MODULECONFIG = /etc/modules
XCONFIG = /usr/share/X11/xorg.conf.d
default:
$(MAKE) -C $(KDIR) M=$$PWD
install: install_module set_config set_modules set_layout rpi_overlay
uninstall: unset_config unset_modules unset_layout remove_artifacts
clean:
$(MAKE) -C $(KDIR) M=$$PWD clean
install_module:
$(MAKE) -C $(KDIR) M=$$PWD modules_install
depmod -A
set_config:
printf "dtoverlay=it8951\n" >> $(PICONFIG)
unset_config:
sed $(PICONFIG) -i -e "/^dtoverlay=it8951/d"
set_modules:
printf "it8951\n" >> $(MODULECONFIG)
unset_modules:
sed $(MODULECONFIG) -i -e "/^it8951/d"
set_layout:
cp 990-dualmonitor.conf $(XCONFIG)
unset_layout:
rm $(XCONFIG)/990-dualmonitor.conf
rpi_overlay:
dtc -I dts -O dtb -o /boot/overlays/it8951.dtbo rpi-it8951-overlay.dts
remove_artifacts:
rm /boot/overlays/it8951.dtbo
rm /lib/modules/`uname -r`/extra/it8951.ko