aboutsummaryrefslogtreecommitdiff
path: root/util/uio_usbdebug/Makefile
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2014-01-01 20:47:55 +0100
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-03-19 19:19:42 +0100
commitb0f8326ac264a9eee748623720dacda0def9cceb (patch)
tree63e0834c9f8b83336f182ab49b1e94f1e1d89870 /util/uio_usbdebug/Makefile
parent86f4ca5b4b99a799b403e61a90aa24d103fb7f2f (diff)
uio_usbdebug: User-space-i/o framework for usbdebug
uio_usbdebug enables you to debug coreboot's usbdebug driver inside a running operating system (only Linux at this time). This comes very handy if you're hacking the usbdebug driver and don't have any other debug output from coreboot itself. Currently, only Intel chipsets are supported. Change-Id: Iaf0bcd4b4c01ae0b099d1206d553344054a62f31 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: http://review.coreboot.org/4695 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/uio_usbdebug/Makefile')
-rw-r--r--util/uio_usbdebug/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/util/uio_usbdebug/Makefile b/util/uio_usbdebug/Makefile
new file mode 100644
index 0000000000..74bc80e2e6
--- /dev/null
+++ b/util/uio_usbdebug/Makefile
@@ -0,0 +1,54 @@
+include ../../.config
+
+ARCHDIR-$(CONFIG_ARCH_ARMV7) := armv7
+ARCHDIR-$(CONFIG_ARCH_X86) := x86
+
+# Only Intel chipsets supported, currently.
+OBJ-$(CONFIG_SOUTHBRIDGE_INTEL_COMMON) += uio_usbdebug_intel.o
+
+PROGRAM := uio_usbdebug
+
+CB_SRC := $(shell realpath ../../src)
+CB_SOURCES := drivers/usb/ehci_debug.c
+CB_INCLUDES := \
+ drivers/usb/ehci.h \
+ drivers/usb/ehci_debug.h \
+ drivers/usb/usb_ch9.h
+INCLUDES := \
+ include/device/device.h
+OBJECTS := \
+ uio_usbdebug.o \
+ drivers/usb/pci_ehci.o \
+ console/printk.o \
+ lib/cbmem.o \
+ $(OBJ-y) \
+ $(patsubst %.c,%.o,$(CB_SOURCES))
+
+KCONFIG_H := ../../src/include/kconfig.h
+
+CFLAGS += \
+ -m32 -g \
+ -Wall -Wextra -Werror \
+ -Wno-unused-parameter -Wno-error=sign-compare
+CPPFLAGS += \
+ -Iinclude/ \
+ -I../../src/include/ -I../../src/arch/$(ARCHDIR-y)/include/ \
+ -I../../build/ -include$(KCONFIG_H)
+
+LIBS := -lpci -lz
+
+all: $(PROGRAM)
+
+$(PROGRAM): $(OBJECTS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
+
+$(CB_SOURCES) $(CB_INCLUDES):
+ @mkdir -p $(dir $@)
+ @ln -sf $(CB_SRC)/$@ $@
+
+$(OBJECTS): $(CONFIG_H) $(CB_INCLUDES) $(INCLUDES)
+
+clean:
+ -@rm -rf $(CB_SOURCES) $(CB_INCLUDES) $(OBJECTS) $(PROGRAM)
+
+.PHONY: all clean