-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f61af1c
commit 255df7e
Showing
4 changed files
with
76 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,38 @@ | ||
CC=gcc | ||
|
||
TARGETS=test \ | ||
test.o | ||
|
||
all: $(TARGETS) | ||
|
||
.PHONY: lpd8806 clean | ||
|
||
kernel: | ||
cp -f ./lpd8806.c ~/BeagleBoard/linux-dev/KERNEL/drivers/char | ||
./buildKernel.sh | ||
scp ~/BeagleBoard/linux-dev/KERNEL/drivers/char/lpd8806.ko root@yoder-white-bone.dhcp.rose-hulman.edu:. | ||
|
||
lpd8806: | ||
cp -f ./lpd8806.c ~/BeagleBoard/linux-dev/KERNEL/drivers/char | ||
./buildKernel.sh | ||
scp ~/BeagleBoard/linux-dev/KERNEL/drivers/char/lpd8806.ko root@192.168.7.2:/lib/modules/3.2.25+/kernel/drivers/char | ||
|
||
dt: # Set up device tree for SPI | ||
# SPI1 | ||
# dtc -O dtb -o BB-SPI1-01-00A0.dtbo -b 0 -@ BB-SPI1-01-00A0.dts | ||
# cp BB-SPI1-01-00A0.dtbo /lib/firmware/ | ||
# echo BB-SPI1-01 > /sys/devices/bone_capemgr.*/slots | ||
# Makefile for compiling out-of-tree | ||
# From Free Electrons | ||
# If $ARCH is arm, then we are cross compiling, use the kernel sources | ||
# If on the Bone run apt-get install linux-headers-`uname -r` | ||
|
||
ifeq ($(ARCH),arm) | ||
KDIR := ~/BeagleBoard/bb-kernel/KERNEL | ||
else | ||
KDIR := /lib/modules/$(shell uname -r)/build | ||
endif | ||
|
||
ifeq ($(KERNELRELEASE),) | ||
obj-$(CONFIG_EXAMPLES) += lpd8806.o | ||
else | ||
obj-m += lpd8806.o | ||
endif | ||
|
||
all: | ||
$(MAKE) -C $(KDIR) M=$$PWD | ||
|
||
dt: | ||
# Set up device tree for SPI | ||
# SPI0 | ||
dtc -O dtb -o BB-SPI0-01-00A0.dtbo -b 0 -@ BB-SPI0-01-00A0.dts | ||
cp BB-SPI0-01-00A0.dtbo /lib/firmware/ | ||
|
||
clean: | ||
clear | ||
rm -f $(TARGETS) | ||
|
||
test: test.o | ||
$(CC) $^ -o $@ | ||
|
||
%.o: %.c | ||
$(CC) -c $< -o $@ | ||
|
||
|
||
echo ADAFRUIT-SPI0 > /sys/devices/bone_capemgr.*/slots | ||
# SPI1 | ||
# echo ADAFRUIT-SPI1 > /sys/devices/bone_capemgr.*/slots | ||
|
||
install: | ||
scp hello*.ko bone:. | ||
|
||
print: | ||
@echo KERNELRELEASE= $(KERNELRELEASE) | ||
@echo CONFIG_EXAMPLES= $(CONFIG_EXAMPLES) | ||
@echo obj-m= $(obj-m) | ||
|
||
clean: | ||
rm -rf .tmp_versions .lpd8806* lpd8806*.mod.c *.o | ||
rm Module.symvers modules.order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
CC=gcc | ||
|
||
TARGETS=test \ | ||
test.o | ||
|
||
all: $(TARGETS) | ||
|
||
.PHONY: lpd8806 clean | ||
|
||
kernel: | ||
cp -f ./lpd8806.c ~/BeagleBoard/linux-dev/KERNEL/drivers/char | ||
./buildKernel.sh | ||
scp ~/BeagleBoard/linux-dev/KERNEL/drivers/char/lpd8806.ko root@yoder-white-bone.dhcp.rose-hulman.edu:. | ||
|
||
lpd8806: | ||
cp -f ./lpd8806.c ~/BeagleBoard/linux-dev/KERNEL/drivers/char | ||
./buildKernel.sh | ||
scp ~/BeagleBoard/linux-dev/KERNEL/drivers/char/lpd8806.ko root@192.168.7.2:/lib/modules/3.2.25+/kernel/drivers/char | ||
|
||
dt: # Set up device tree for SPI | ||
# SPI1 | ||
# dtc -O dtb -o BB-SPI1-01-00A0.dtbo -b 0 -@ BB-SPI1-01-00A0.dts | ||
# cp BB-SPI1-01-00A0.dtbo /lib/firmware/ | ||
# echo BB-SPI1-01 > /sys/devices/bone_capemgr.*/slots | ||
# SPI0 | ||
dtc -O dtb -o BB-SPI0-01-00A0.dtbo -b 0 -@ BB-SPI0-01-00A0.dts | ||
cp BB-SPI0-01-00A0.dtbo /lib/firmware/ | ||
|
||
clean: | ||
clear | ||
rm -f $(TARGETS) | ||
|
||
test: test.o | ||
$(CC) $^ -o $@ | ||
|
||
%.o: %.c | ||
$(CC) -c $< -o $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
apt-get install linux-headers-`uname -r` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters