Skip to content

Commit 83bcc49

Browse files
committed
dtsファイルもビルドするように修正した
1 parent c189354 commit 83bcc49

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

src/drivers/Makefile.header_from_apt

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
1-
MODULE:= rtmouse
2-
obj-m:= $(MODULE).o
3-
clean-files:= *.o *.ko *.mod.[co] *~
1+
MODULE := rtmouse
2+
obj-m := $(MODULE).o
3+
clean-files := *.o *.ko *.mod.[co] *~ dts/*.dtbo
44

5-
LINUX_SRC_DIR:=/usr/src/linux-headers-$(shell uname -r)
6-
VERBOSE:=0
5+
LINUX_SRC_DIR := /usr/src/linux-headers-$(shell uname -r)
6+
VERBOSE := 0
77

8-
rtmouse.ko: rtmouse.c
8+
DTS_DIR := ./dts
9+
DTS_FILE := $(DTS_DIR)/rtmouse.dts
10+
DTBO_FILE := $(DTS_DIR)/rtmouse.dtbo
11+
12+
all: rtmouse.ko $(DTBO_FILE)
13+
14+
$(DTBO_FILE): $(DTS_FILE)
15+
@echo "Building $(DTBO_FILE)..."s
16+
dtc -@ -I dts -O dtb -o $@ $<
17+
@echo "Built $(DTBO_FILE)"
18+
19+
rtmouse.ko: rtmouse.c $(DTBO_FILE)
20+
@echo "Building rtmouse.ko..."
921
make -C $(LINUX_SRC_DIR) M=$(shell pwd) V=$(VERBOSE) modules
22+
@echo "Built rtmouse.ko"
1023

1124
clean:
25+
@echo "Cleaning up..."
1226
make -C $(LINUX_SRC_DIR) M=$(shell pwd) V=$(VERBOSE) clean
1327

14-
install: rtmouse.ko
28+
install: rtmouse.ko $(DTBO_FILE)
29+
@echo "Installing..."
1530
cp ../../50-rtmouse.rules /etc/udev/rules.d/
31+
@echo "Installed."
32+
1633

1734
uninstall:
35+
@echo "Uninstalling..."
1836
rm /etc/udev/rules.d/50-rtmouse.rules
19-
20-
#Reference: http://www.devdrv.co.jp/linux/kernel26-makefile.htm
37+
@echo "Uninstalled."

src/drivers/dts/rtmouse.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
mcp3208: mcp3208@0 {
1515
compatible = "microchip,mcp3208";
1616
reg = <0>;
17-
spi-max-frequency = <62500>;
17+
spi-max-frequency = <100000>;
1818
// vref-supply = <&vref_reg>; // reference defined Vref
1919
spi-cpha;
2020
spi-cpol;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy