From a4ea62756cdfaefe27521cdcd748092bb2d18cbb Mon Sep 17 00:00:00 2001 From: Vincent Prince Date: Tue, 22 May 2018 13:45:08 +0200 Subject: utp-com: Add recipe This utility is used to send commands to the device using the NXP's UTP protocol. Signed-off-by: Vincent Prince --- .../0001-Fix-Makefile-for-crosscompilation.patch | 19 +++++++++++++++ recipes-devtools/utp-com/utp-com_git.bb | 28 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 recipes-devtools/utp-com/utp-com/0001-Fix-Makefile-for-crosscompilation.patch create mode 100644 recipes-devtools/utp-com/utp-com_git.bb (limited to 'recipes-devtools/utp-com') diff --git a/recipes-devtools/utp-com/utp-com/0001-Fix-Makefile-for-crosscompilation.patch b/recipes-devtools/utp-com/utp-com/0001-Fix-Makefile-for-crosscompilation.patch new file mode 100644 index 00000000..5db050c1 --- /dev/null +++ b/recipes-devtools/utp-com/utp-com/0001-Fix-Makefile-for-crosscompilation.patch @@ -0,0 +1,19 @@ +--- a/makefile ++++ b/makefile +@@ -1,10 +1,12 @@ +-CC=gcc +-CFLAGS=-I. -Wall -O2 +-DEPS= ++CC ?= gcc ++CFLAGS ?= -I. -Wall -O2 ++LDFLAGS ?= ++DEPS ?= ++ + OBJ=utp_com.o + + %.o: %.c $(DEPS) + $(CC) -c -o $@ $< $(CFLAGS) + + utp_com: $(OBJ) +- gcc -o $@ $^ $(CFLAGS) ++ $(CC) -o $@ $^ $(LDFLAGS) diff --git a/recipes-devtools/utp-com/utp-com_git.bb b/recipes-devtools/utp-com/utp-com_git.bb new file mode 100644 index 00000000..163f5852 --- /dev/null +++ b/recipes-devtools/utp-com/utp-com_git.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Tool used to send commands to hardware via NXP's UTP protocol" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8264535c0c4e9c6c335635c4026a8022" + +DEPENDS = "sg3-utils" + +SRCREV = "7fe590fef812561cceb08aaa10b64e9bac8f542f" +SRC_URI = " \ + git://github.com/ixonos/utp_com;protocol=https \ + file://0001-Fix-Makefile-for-crosscompilation.patch \ +" + +PV = "1.0+git${SRCPV}" + +S = "${WORKDIR}/git" + +do_configure[noexec] = "1" + +do_compile () { + oe_runmake +} + +do_install () { + install -d -m 0755 ${D}${bindir} + install -m 0755 ${S}/utp_com ${D}${bindir}/utp_com +} + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf