Skip to content

Instantly share code, notes, and snippets.

@17twenty
Created May 17, 2012 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 17twenty/2719093 to your computer and use it in GitHub Desktop.
Save 17twenty/2719093 to your computer and use it in GitHub Desktop.
Makefile for Beaglebone (assuming environment already sourced from /opt/poky/<whatever>
# Architecture
ARCH := arm
# We want to use the cross-compiler
CROSS_COMPILE := arm-poky-linux-gnueabi-
# Final object file
obj-m += simple.o
# Path of the ARM compiled kernel
ROOTDIR := /home/nick/Documents/BeagleBone/git-poky/Kernel/kernel_3.2.14_patched
# Tell make to take the architecture and cross-compiler in
MAKEARCH := $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE)
all: modules
modules:
$(MAKEARCH) -C $(ROOTDIR) M=${shell pwd} modules
clean:
$(MAKEARCH) -C $(ROOTDIR) M=${shell pwd} clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment