[oe] [PATCH v2] phytool: Add recipe

Mike Looijmans mike.looijmans at topic.nl
Wed Sep 28 07:53:27 UTC 2016


A nice tool to directly read, write and interpret ethernet PHY data.
Very useful when debugging PHY or MDIO problems, which ethtool does
not do.

Signed-off-by: Mike Looijmans <mike.looijmans at topic.nl>
---
v2:
  Add $bindir comment
  Add patch (pending upstream) to fix LDFLAGS warning
  Fix license filename

 meta-networking/recipes-support/phytool/phytool.bb | 17 ++++++++++++
 .../0001-Makefile-Honor-LDFLAGS-variable.patch     | 31 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 meta-networking/recipes-support/phytool/phytool.bb
 create mode 100644 meta-networking/recipes-support/phytool/phytool/0001-Makefile-Honor-LDFLAGS-variable.patch

diff --git a/meta-networking/recipes-support/phytool/phytool.bb b/meta-networking/recipes-support/phytool/phytool.bb
new file mode 100644
index 0000000..e95b035
--- /dev/null
+++ b/meta-networking/recipes-support/phytool/phytool.bb
@@ -0,0 +1,17 @@
+SUMMARY = "PHY interface tool for Linux"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"
+
+PV = "1.0.1"
+SRCREV = "1a3ea62a218206e9faf3b27fb5d01c85692024c8"
+SRC_URI = "git://github.com/wkz/phytool.git \
+	file://0001-Makefile-Honor-LDFLAGS-variable.patch"
+
+S = "${WORKDIR}/git"
+
+# Intentionally not using $bindir here because the Makefile is hard-coded to
+# install into $PREFIX/bin
+do_install() {
+	install -d ${D}${prefix}/bin
+	oe_runmake 'DESTDIR=${D}' 'PREFIX=${prefix}' install
+}
diff --git a/meta-networking/recipes-support/phytool/phytool/0001-Makefile-Honor-LDFLAGS-variable.patch b/meta-networking/recipes-support/phytool/phytool/0001-Makefile-Honor-LDFLAGS-variable.patch
new file mode 100644
index 0000000..8b99d09
--- /dev/null
+++ b/meta-networking/recipes-support/phytool/phytool/0001-Makefile-Honor-LDFLAGS-variable.patch
@@ -0,0 +1,31 @@
+From 8b75a5e6238fe30661b672743560fe4d357237fd Mon Sep 17 00:00:00 2001
+From: Mike Looijmans <mike.looijmans at topic.nl>
+Date: Wed, 28 Sep 2016 09:42:45 +0200
+Subject: [PATCH] Makefile: Honor LDFLAGS variable
+
+Passing $(LDFLAGS) to the linker is important for cross-compile environments.
+OpenEmbedded builds will display QA errors like this:
+... QA Issue: No GNU_HASH in the elf binary ... [ldflags]
+
+Upstream-Status: Pending
+Signed-off-by: Mike Looijmans <mike.looijmans at topic.nl>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b52843b..70bb414 100644
+--- a/Makefile
++++ b/Makefile
+@@ -22,7 +22,7 @@ hdrs = $(wildcard *.h)
+ 
+ phytool: $(objs)
+ 	@printf "  CC      $(subst $(ROOTDIR)/,,$(shell pwd)/$@)\n"
+-	@$(CC) $(LDLIBS) -o $@ $^
++	@$(CC) $(LDFLAGS) $(LDLIBS) -o $@ $^
+ 
+ all: phytool
+ 
+-- 
+1.9.1
+
-- 
1.9.1




More information about the Openembedded-devel mailing list