cdsteinkuehler / beaglebone-universal-io

Device tree overlay and support scripts for using most available hardware I/O on the BeagleBone without editing dts files or rebuilding the kernel
GNU General Public License v2.0
127 stars 54 forks source link

Makefile for crosscompile environment #24

Closed MartinVoelz closed 9 years ago

MartinVoelz commented 9 years ago

Hello, I made changes to your Makefile to make it usable in a cross-compile environment for example the setup from RobertCNelson. (Using conditional variable assignment ?= )

Usage (in bb-kernel dir): git clone https://github.com/cdsteinkuehler/beaglebone-universal-io cd beaglebone-universal-io export FIRMWAREPATH="../KERNEL/lib/firmware" export PREFIX="../KERNEL/usr/bin" make make install

Patch:

diff --git a/Makefile b/Makefile index dfff72e..ca468ae 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -PREFIX := /usr/bin -FIRMWAREPATH := /lib/firmware +PREFIX ?= /usr/bin +FIRMWAREPATH ?= /lib/firmware BUILDPATH = .

SRC = cape-universal-00A0.dts @@ -10,7 +10,7 @@ SRC += cape-univ-audio-00A0.dts

TARGET = config-pin

-all: ensure_buildpath build +all: ensure_path build

install: install_overlays install_target

@@ -19,8 +19,10 @@ $(BUILDPATH)/%.dtbo : %.dts @echo "Compiling file: $<" dtc -@ -I dts -O dtb -o $@ $<

-ensure_buildpath: +ensure_path: mkdir -p $(BUILDPATH)

cdsteinkuehler commented 9 years ago

Any chance you can send this as a pull request? If not, I'll extract the patch and apply with an appropriate commit message.

MartinVoelz commented 9 years ago

I've never done a pull request before but will give it a try, let's see.

cdsteinkuehler commented 9 years ago

Looks like you managed to create the pull request. Thanks!