Skip to contentSkip to conversation

mfgtools: new package

PATCH New Gary Bisson 2 participants 5 messages Oct 26, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover mfgtools: new package

Hi,

Here is the v2 with the following modifications:
- Use host-cmake-package and build the CLI as a post build hook
- Fix licenses: now BSD-3c and CPOL
- Fix MFGTOOLS_CFLAGS and rename it HOST_MFGTOOLS_CFLAGS
- Use HOST_LDFLAGS instead of specifyin the rpath manually
- Fix install commands to have the full destination path
- Add readme.txt file
- Add a follow-up patch to add the package to DEVELOPERS

Thomas, I will send a cmake patch upstream later, hope that's ok.

Frank, I did try both the mfgtools files from NXP on a SabreSD and my own sample file on a SabreLite, it worked on both. Hope you'll be able to try it.

Note that I've put some effort into the readme.txt not to forget the steps ;)

Regards,
Gary

Gary Bisson (2):
mfgtools: new package
DEVELOPERS: add entry for mfgtools

 DEVELOPERS                      |  1 +
 package/Config.in.host          |  1 +
 package/mfgtools/Config.in.host | 10 ++++++++
 package/mfgtools/mfgtools.hash  |  2 ++
 package/mfgtools/mfgtools.mk    | 34 +++++++++++++++++++++++++
 package/mfgtools/readme.txt     | 56 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 104 insertions(+)
 create mode 100644 package/mfgtools/Config.in.host
 create mode 100644 package/mfgtools/mfgtools.hash
 create mode 100644 package/mfgtools/mfgtools.mk
 create mode 100644 package/mfgtools/readme.txt
Signature · 1 line
2.9.3
#1 lore raw

PATCH v2 1/2 mfgtools: new package

This package contains the Freescale manufacturing tool. It is designed to program firmware to i.MX boards during production. The communication is done over USB using the Freescale UTP protocol.

The project is maintained on NXPMicro Github repository:
https://github.com/NXPmicro/mfgtools

---
Changelog v1 -> v2:
- Use host-cmake-package and build the CLI as a post build hook
- Fix licenses: now BSD-3c and CPOL
- Fix MFGTOOLS_CFLAGS and rename it HOST_MFGTOOLS_CFLAGS
- Use HOST_LDFLAGS instead of specifyin the rpath manually
- Fix install commands to have the full destination path
- Add readme.txt file

---
 package/Config.in.host          |  1 +
 package/mfgtools/Config.in.host | 10 ++++++++
 package/mfgtools/mfgtools.hash  |  2 ++
 package/mfgtools/mfgtools.mk    | 34 +++++++++++++++++++++++++
 package/mfgtools/readme.txt     | 56 +++++++++++++++++++++++++++++++++++++++++
 5 files changed, 103 insertions(+)
 create mode 100644 package/mfgtools/Config.in.host
 create mode 100644 package/mfgtools/mfgtools.hash
 create mode 100644 package/mfgtools/mfgtools.mk
 create mode 100644 package/mfgtools/readme.txt
package/Config.in.host +1 -0
index 1140c70..e33cbb5 100644
@@ -22,6 +22,7 @@ menu "Host utilities"
 	source "package/jq/Config.in.host"
 	source "package/jsmin/Config.in.host"
 	source "package/lpc3250loader/Config.in.host"
+	source "package/mfgtools/Config.in.host"
 	source "package/mke2img/Config.in.host"
 	source "package/mkpasswd/Config.in.host"
 	source "package/mtd/Config.in.host"
package/mfgtools/Config.in.host new file +10 -0
new file mode 100644
index 0000000..8bba9e2
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_HOST_MFGTOOLS
+	bool "host mfgtools"
+	depends on BR2_arm
+	help
+	  This package contains the Freescale manufacturing tool.
+	  It is designed to program firmware to i.MX boards during
+	  production. The communication is done over USB using the
+	  Freescale UTP protocol.
+
+	  https://github.com/NXPmicro/mfgtools
package/mfgtools/mfgtools.hash new file +2 -0
new file mode 100644
index 0000000..e73a7fa
@@ -0,0 +1,2 @@
+# locally computed
+sha256  6ce93a33c269282df305cf7e517d2d14fde78203537d8ea75b064966afe48464  mfgtools-b219fc219a35c365010897ed093c40750f8cdac6.tar.gz
package/mfgtools/mfgtools.mk new file +34 -0
new file mode 100644
index 0000000..fcc28ab
@@ -0,0 +1,34 @@
+################################################################################
+#
+# mfgtools
+#
+################################################################################
+
+MFGTOOLS_VERSION = b219fc219a35c365010897ed093c40750f8cdac6
+MFGTOOLS_SITE = $(call github,NXPmicro,mfgtools,$(MFGTOOLS_VERSION))
+MFGTOOLS_SUBDIR = MfgToolLib
+MFGTOOLS_LICENSE = BSD-3c or CPOL
+MFGTOOLS_LICENSE_FILES = LICENSE
+HOST_MFGTOOLS_DEPENDENCIES = host-cmake host-libusb
+
+HOST_MFGTOOLS_CFLAGS = \
+	$(HOST_CFLAGS) $(HOST_LDFLAGS) -std=c++11 -lpthread \
+	-L$(@D)/MfgToolLib -lMfgToolLib -I$(@D)/MfgToolLib \
+	-lusb-1.0 -I$(HOST_DIR)/usr/include/libusb-1.0 \
+	-fpermissive -Wno-write-strings
+
+define HOST_MFGTOOLS_CLI_BUILD
+	$(HOST_CONFIGURE_OPTS) $(MAKE) CC=$(HOSTCXX) \
+		CFLAGS="$(HOST_MFGTOOLS_CFLAGS)" -C $(@D)/TestPrgm
+endef
+
+HOST_MFGTOOLS_POST_BUILD_HOOKS += HOST_MFGTOOLS_CLI_BUILD
+
+define HOST_MFGTOOLS_INSTALL_CMDS
+	$(INSTALL) -D -m 755 $(@D)/MfgToolLib/libMfgToolLib.so \
+		$(HOST_DIR)/usr/lib/libMfgToolLib.so
+	$(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli \
+		$(HOST_DIR)/usr/bin/mfgtoolcli
+endef
+
+$(eval $(host-cmake-package))
package/mfgtools/readme.txt new file +56 -0

56 lines not on this page · raw message

Signature · 1 line
2.9.3
#2 lore raw

PATCH v2 1/2 mfgtools: new package

Hello,

Quoted 8 lines · Gary Bisson

This package contains the Freescale manufacturing tool. It is designed to program firmware to i.MX boards during production. The communication is done over USB using the Freescale UTP protocol.

The project is maintained on NXPMicro Github repository:
https://github.com/NXPmicro/mfgtools

I've applied, with the following changes:

[Thomas:
- remove dependency on host-cmake, this is handled by the host-cmake-package infrastructure
- add quotes around $(HOSTCXX)
- add CPOL.htm to <pkg>_LICENSE_FILES.
- tweaks to the readme.txt file.]

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#3 lore raw

PATCH v2 2/2 DEVELOPERS: add entry for mfgtools

In reply to Gary Bisson
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
index ed89b09..bd791cc 100644
@@ -531,6 +531,7 @@ F:	configs/nitrogen*
 F:	package/freescale-imx/
 F:	package/gstreamer1/gst1-imx/
 F:	package/libimxvpuapi/
+F:	package/mfgtools/
 F:	package/sshpass/
 
 N:	Geoff Levand <[email protected]>
Signature · 1 line
2.9.3
#4 lore raw

PATCH v2 2/2 DEVELOPERS: add entry for mfgtools

Hello,

Quoted 4 lines · Gary Bisson
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com