All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4] Update i.MX manufacturing tools
@ 2016-10-19 14:23 Gary Bisson
  2016-10-19 14:23 ` [Buildroot] [PATCH 1/4] imx-kobs: switch to open source version Gary Bisson
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Gary Bisson @ 2016-10-19 14:23 UTC (permalink / raw)
  To: buildroot

Hi,

This series updates several components necessary during the manufacturing
process:
- imx-kobs: used to flash U-Boot to Nand, now open-source
- imx-uuc: used to communicate using Freescale UTP protocol, now open-source
- imx-usb-loader: used to boot i.MX devices using the SDP protocol
- mfgtools: now open-source and working on Linux

Note that it is nice that many projects are now open-source. Also, NXP has
proven to be very responsive and quickly merges pull-requests.

Let me know if you have any question.

Regards,
Gary

Gary Bisson (4):
  imx-kobs: switch to open source version
  imx-uuc: switch to open source version
  imx-usb-loader: bump version
  mfgtools: new package

 package/Config.in.host                       |  1 +
 package/freescale-imx/imx-kobs/imx-kobs.hash |  2 +-
 package/freescale-imx/imx-kobs/imx-kobs.mk   |  4 ++--
 package/freescale-imx/imx-uuc/imx-uuc.hash   |  2 +-
 package/freescale-imx/imx-uuc/imx-uuc.mk     |  4 ++--
 package/imx-usb-loader/imx-usb-loader.hash   |  2 +-
 package/imx-usb-loader/imx-usb-loader.mk     |  2 +-
 package/mfgtools/Config.in.host              | 10 ++++++++
 package/mfgtools/mfgtools.hash               |  2 ++
 package/mfgtools/mfgtools.mk                 | 34 ++++++++++++++++++++++++++++
 10 files changed, 55 insertions(+), 8 deletions(-)
 create mode 100644 package/mfgtools/Config.in.host
 create mode 100644 package/mfgtools/mfgtools.hash
 create mode 100644 package/mfgtools/mfgtools.mk

-- 
2.9.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 1/4] imx-kobs: switch to open source version
  2016-10-19 14:23 [Buildroot] [PATCH 0/4] Update i.MX manufacturing tools Gary Bisson
@ 2016-10-19 14:23 ` Gary Bisson
  2016-10-19 15:58   ` Thomas Petazzoni
  2016-10-19 14:23 ` [Buildroot] [PATCH 2/4] imx-uuc: " Gary Bisson
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Gary Bisson @ 2016-10-19 14:23 UTC (permalink / raw)
  To: buildroot

The tools "kobs-ng" will be maintained as a open source project.
The repository location is https://github.com/NXPmicro/imx-kobs

This patch is based on the Yocto equivalent:
https://github.com/Freescale/meta-freescale/commit/c23736b3

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
 package/freescale-imx/imx-kobs/imx-kobs.hash | 2 +-
 package/freescale-imx/imx-kobs/imx-kobs.mk   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/freescale-imx/imx-kobs/imx-kobs.hash b/package/freescale-imx/imx-kobs/imx-kobs.hash
index b942bd3..258d08c 100644
--- a/package/freescale-imx/imx-kobs/imx-kobs.hash
+++ b/package/freescale-imx/imx-kobs/imx-kobs.hash
@@ -1 +1 @@
-sha256	85171b46068ac47c42fedb8104167bf9afd33dd9527ed127e1ca2eb29d7a86bf  imx-kobs-5.4.tar.gz
+sha256	5b040de6e3db5d47371b311e7068380926827a7a6ef02e45fb2ba08b680d0ec5  imx-kobs-b402243a04e5a6760a860445e5ff6a931d86f794.tar.gz
diff --git a/package/freescale-imx/imx-kobs/imx-kobs.mk b/package/freescale-imx/imx-kobs/imx-kobs.mk
index b80d5bd..8f490c2 100644
--- a/package/freescale-imx/imx-kobs/imx-kobs.mk
+++ b/package/freescale-imx/imx-kobs/imx-kobs.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-IMX_KOBS_VERSION = 5.4
-IMX_KOBS_SITE = $(FREESCALE_IMX_SITE)
+IMX_KOBS_VERSION = b402243a04e5a6760a860445e5ff6a931d86f794
+IMX_KOBS_SITE = $(call github,NXPmicro,imx-kobs,$(IMX_KOBS_VERSION))
 IMX_KOBS_LICENSE = GPLv2+
 IMX_KOBS_LICENSE_FILES = COPYING
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 2/4] imx-uuc: switch to open source version
  2016-10-19 14:23 [Buildroot] [PATCH 0/4] Update i.MX manufacturing tools Gary Bisson
  2016-10-19 14:23 ` [Buildroot] [PATCH 1/4] imx-kobs: switch to open source version Gary Bisson
@ 2016-10-19 14:23 ` Gary Bisson
  2016-10-19 14:23 ` [Buildroot] [PATCH 3/4] imx-usb-loader: bump version Gary Bisson
  2016-10-19 14:23 ` [Buildroot] [PATCH 4/4] mfgtools: new package Gary Bisson
  3 siblings, 0 replies; 13+ messages in thread
From: Gary Bisson @ 2016-10-19 14:23 UTC (permalink / raw)
  To: buildroot

The tool will be maintained as an open source project.
The repository can be found at:
https://github.com/NXPmicro/imx-uuc

This patch is based on the Yocto equivalent:
https://github.com/Freescale/meta-freescale/commit/9b56bf13

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
 package/freescale-imx/imx-uuc/imx-uuc.hash | 2 +-
 package/freescale-imx/imx-uuc/imx-uuc.mk   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/freescale-imx/imx-uuc/imx-uuc.hash b/package/freescale-imx/imx-uuc/imx-uuc.hash
index 05501c8..d6e4d97 100644
--- a/package/freescale-imx/imx-uuc/imx-uuc.hash
+++ b/package/freescale-imx/imx-uuc/imx-uuc.hash
@@ -1,2 +1,2 @@
 # Locally computed
-sha256 95d7f7b075f58fedc07602fbc0e5bf5212d28deea3d09cdbcbd80992dcd18482  imx-uuc-0.5.1.tar.gz
+sha256 eac0c3e288c845cd9b82d02993f8358731a7a03e51591b27feeb453b143beb73  imx-uuc-3440b1108373e79669cc17ba1d2be91a123a2053.tar.gz
diff --git a/package/freescale-imx/imx-uuc/imx-uuc.mk b/package/freescale-imx/imx-uuc/imx-uuc.mk
index 58e749e..12d9312 100644
--- a/package/freescale-imx/imx-uuc/imx-uuc.mk
+++ b/package/freescale-imx/imx-uuc/imx-uuc.mk
@@ -4,8 +4,8 @@
 #
 ################################################################################
 
-IMX_UUC_VERSION = 0.5.1
-IMX_UUC_SITE = $(FREESCALE_IMX_SITE)
+IMX_UUC_VERSION = 3440b1108373e79669cc17ba1d2be91a123a2053
+IMX_UUC_SITE = $(call github,NXPmicro,imx-uuc,$(IMX_UUC_VERSION))
 IMX_UUC_LICENSE = GPLv2+
 IMX_UUC_LICENSE_FILES = COPYING
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 3/4] imx-usb-loader: bump version
  2016-10-19 14:23 [Buildroot] [PATCH 0/4] Update i.MX manufacturing tools Gary Bisson
  2016-10-19 14:23 ` [Buildroot] [PATCH 1/4] imx-kobs: switch to open source version Gary Bisson
  2016-10-19 14:23 ` [Buildroot] [PATCH 2/4] imx-uuc: " Gary Bisson
@ 2016-10-19 14:23 ` Gary Bisson
  2016-10-19 14:23 ` [Buildroot] [PATCH 4/4] mfgtools: new package Gary Bisson
  3 siblings, 0 replies; 13+ messages in thread
From: Gary Bisson @ 2016-10-19 14:23 UTC (permalink / raw)
  To: buildroot

Main additions are:
- Support for i.MX6SX, i.MX6UL and i.MX7
- Support for secure booting on i.MX6/i.MX7
- Various bug fixes

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
 package/imx-usb-loader/imx-usb-loader.hash | 2 +-
 package/imx-usb-loader/imx-usb-loader.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/imx-usb-loader/imx-usb-loader.hash b/package/imx-usb-loader/imx-usb-loader.hash
index aa8ff49..3e02038 100644
--- a/package/imx-usb-loader/imx-usb-loader.hash
+++ b/package/imx-usb-loader/imx-usb-loader.hash
@@ -1,2 +1,2 @@
 # locally computed
-sha256  1e7ee8af34e7d0a3b9761c25a4edfc7140d23132129818d288c74fc0d58796e5  imx-usb-loader-f96aee286ea17c832b7ec922dd76842deb5ce299.tar.gz
+sha256  40e1e36791e91366b13f57b16b32e75cf05e7177b2813f1bf2446419d0ed44eb  imx-usb-loader-9b0e81cf9511c3a27cf635407714caa2793b570c.tar.gz
diff --git a/package/imx-usb-loader/imx-usb-loader.mk b/package/imx-usb-loader/imx-usb-loader.mk
index c855625..0cd9637 100644
--- a/package/imx-usb-loader/imx-usb-loader.mk
+++ b/package/imx-usb-loader/imx-usb-loader.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299
+IMX_USB_LOADER_VERSION = 9b0e81cf9511c3a27cf635407714caa2793b570c
 IMX_USB_LOADER_SITE = $(call github,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION))
 IMX_USB_LOADER_LICENSE = LGPLv2.1+
 IMX_USB_LOADER_LICENSE_FILES = COPYING
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] mfgtools: new package
  2016-10-19 14:23 [Buildroot] [PATCH 0/4] Update i.MX manufacturing tools Gary Bisson
                   ` (2 preceding siblings ...)
  2016-10-19 14:23 ` [Buildroot] [PATCH 3/4] imx-usb-loader: bump version Gary Bisson
@ 2016-10-19 14:23 ` Gary Bisson
  2016-10-19 15:29   ` Thomas Petazzoni
  2016-10-20 15:43   ` Frank Hunleth
  3 siblings, 2 replies; 13+ messages in thread
From: Gary Bisson @ 2016-10-19 14:23 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---
Hi,

A couple of remarks. First here is the procedure I followed to test it:
$ cd output
$ mkdir -p "Profiles/Linux/OS Firmware/firmware"
$ wget https://storage.googleapis.com/boundarydevices.com/ucl2.xml \
  -O Profiles/Linux/OS\ Firmware/ucl2.xml
$ cp images/u-boot.imx images/zImage images/imx6q-sabrelite.dtb \
  images/rootfs.cpio.uboot Profiles/Linux/OS\ Firmware/firmware/
$ ./host/usr/bin/mfgtoolcli -l mmc -s uboot_defconfig=imx \
  -s dtbname=imx6q-sabrelite.dtb -s initramfs=rootfs.cpio.uboot \
  -s mmc=2 -p 1

Note sure if you want this to be in the commit log.

Also, not sure if the DEVELOPERS file should be updated within this
patch or if it should be part of a follow-up patch.

Regards,
Gary
---
 package/Config.in.host          |  1 +
 package/mfgtools/Config.in.host | 10 ++++++++++
 package/mfgtools/mfgtools.hash  |  2 ++
 package/mfgtools/mfgtools.mk    | 34 ++++++++++++++++++++++++++++++++++
 4 files changed, 47 insertions(+)
 create mode 100644 package/mfgtools/Config.in.host
 create mode 100644 package/mfgtools/mfgtools.hash
 create mode 100644 package/mfgtools/mfgtools.mk

diff --git a/package/Config.in.host b/package/Config.in.host
index 1140c70..e33cbb5 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -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"
diff --git a/package/mfgtools/Config.in.host b/package/mfgtools/Config.in.host
new file mode 100644
index 0000000..8bba9e2
--- /dev/null
+++ b/package/mfgtools/Config.in.host
@@ -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
diff --git a/package/mfgtools/mfgtools.hash b/package/mfgtools/mfgtools.hash
new file mode 100644
index 0000000..e73a7fa
--- /dev/null
+++ b/package/mfgtools/mfgtools.hash
@@ -0,0 +1,2 @@
+# locally computed
+sha256  6ce93a33c269282df305cf7e517d2d14fde78203537d8ea75b064966afe48464  mfgtools-b219fc219a35c365010897ed093c40750f8cdac6.tar.gz
diff --git a/package/mfgtools/mfgtools.mk b/package/mfgtools/mfgtools.mk
new file mode 100644
index 0000000..c5f9ad0
--- /dev/null
+++ b/package/mfgtools/mfgtools.mk
@@ -0,0 +1,34 @@
+################################################################################
+#
+# mfgtools
+#
+################################################################################
+
+MFGTOOLS_VERSION = b219fc219a35c365010897ed093c40750f8cdac6
+MFGTOOLS_SITE = $(call github,NXPmicro,mfgtools,$(MFGTOOLS_VERSION))
+MFGTOOLS_LICENSE = Freescale Proprietary License
+MFGTOOLS_LICENSE_FILES = LICENSE
+HOST_MFGTOOLS_DEPENDENCIES = host-cmake host-libusb
+
+MFGTOOLS_CFLAGS = $(HOST_CFLAGS)
+MFGTOOLS_CFLAGS += -l pthread -Wl,-rpath=$(HOST_DIR)/usr/lib
+MFGTOOLS_CFLAGS += -l usb-1.0 -I$(HOST_DIR)/usr/include/libusb-1.0
+MFGTOOLS_CFLAGS += -L . -l MfgToolLib -I$(@D)/MfgToolLib
+MFGTOOLS_CFLAGS += -fpermissive -Wno-write-strings
+
+define HOST_MFGTOOLS_CONFIGURE_CMDS
+	$(HOST_CONFIGURE_OPTS) $(MAKE) CMAKE=$(HOST_DIR)/usr/bin/cmake \
+		-C $(@D)/TestPrgm cmake
+endef
+
+define HOST_MFGTOOLS_BUILD_CMDS
+	$(HOST_CONFIGURE_OPTS) $(MAKE) CC=$(HOSTCXX) CFLAGS="$(MFGTOOLS_CFLAGS)" \
+		-C $(@D)/TestPrgm
+endef
+
+define HOST_MFGTOOLS_INSTALL_CMDS
+	$(INSTALL) -D -m 755 $(@D)/TestPrgm/libMfgToolLib.so $(HOST_DIR)/usr/lib
+	$(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli $(HOST_DIR)/usr/bin
+endef
+
+$(eval $(host-generic-package))
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] mfgtools: new package
  2016-10-19 14:23 ` [Buildroot] [PATCH 4/4] mfgtools: new package Gary Bisson
@ 2016-10-19 15:29   ` Thomas Petazzoni
  2016-10-22 14:09     ` Gary Bisson
  2016-10-20 15:43   ` Frank Hunleth
  1 sibling, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2016-10-19 15:29 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 19 Oct 2016 16:23:09 +0200, Gary Bisson wrote:
> 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
> 
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>

Thanks for this package.

> A couple of remarks. First here is the procedure I followed to test it:
> $ cd output
> $ mkdir -p "Profiles/Linux/OS Firmware/firmware"
> $ wget https://storage.googleapis.com/boundarydevices.com/ucl2.xml \
>   -O Profiles/Linux/OS\ Firmware/ucl2.xml
> $ cp images/u-boot.imx images/zImage images/imx6q-sabrelite.dtb \
>   images/rootfs.cpio.uboot Profiles/Linux/OS\ Firmware/firmware/
> $ ./host/usr/bin/mfgtoolcli -l mmc -s uboot_defconfig=imx \
>   -s dtbname=imx6q-sabrelite.dtb -s initramfs=rootfs.cpio.uboot \
>   -s mmc=2 -p 1
> 
> Note sure if you want this to be in the commit log.

Either in the Config.in help text, or in package/mfgtools/readme.txt.
We have already mentioned such a possibility for another package, and I
think we should start doing it.

> Also, not sure if the DEVELOPERS file should be updated within this
> patch or if it should be part of a follow-up patch.

As a follow-up patch.

> +MFGTOOLS_CFLAGS = $(HOST_CFLAGS)
> +MFGTOOLS_CFLAGS += -l pthread -Wl,-rpath=$(HOST_DIR)/usr/lib
> +MFGTOOLS_CFLAGS += -l usb-1.0 -I$(HOST_DIR)/usr/include/libusb-1.0
> +MFGTOOLS_CFLAGS += -L . -l MfgToolLib -I$(@D)/MfgToolLib
> +MFGTOOLS_CFLAGS += -fpermissive -Wno-write-strings

Please use:

MFGTOOLS_CFLAGS = \
	... \
	... \
	...

Please remove the space between -l and the library name. Also
-Wl,-rpath=$(HOST_DIR)/usr/lib is already part of $(HOST_CFLAGS), so
you can get rid of this part.

> +define HOST_MFGTOOLS_CONFIGURE_CMDS
> +	$(HOST_CONFIGURE_OPTS) $(MAKE) CMAKE=$(HOST_DIR)/usr/bin/cmake \
> +		-C $(@D)/TestPrgm cmake
> +endef

This build system is really completely brain-damaged. I would suggest
to instead use the host-cmake-package infrastructure with a proper
_SUBDIR so that it builds the library, and then a simple post-build
hook to build the CLI tool.

And of course, submit a bug report upstream to tell them to use CMake
for the whole thing rather than doing this crap.

> +define HOST_MFGTOOLS_INSTALL_CMDS
> +	$(INSTALL) -D -m 755 $(@D)/TestPrgm/libMfgToolLib.so $(HOST_DIR)/usr/lib
> +	$(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli $(HOST_DIR)/usr/bin

Full destination path needed when using $(INSTALL) -D.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 1/4] imx-kobs: switch to open source version
  2016-10-19 14:23 ` [Buildroot] [PATCH 1/4] imx-kobs: switch to open source version Gary Bisson
@ 2016-10-19 15:58   ` Thomas Petazzoni
  0 siblings, 0 replies; 13+ messages in thread
From: Thomas Petazzoni @ 2016-10-19 15:58 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 19 Oct 2016 16:23:06 +0200, Gary Bisson wrote:
> The tools "kobs-ng" will be maintained as a open source project.
> The repository location is https://github.com/NXPmicro/imx-kobs
> 
> This patch is based on the Yocto equivalent:
> https://github.com/Freescale/meta-freescale/commit/c23736b3
> 
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> ---
>  package/freescale-imx/imx-kobs/imx-kobs.hash | 2 +-
>  package/freescale-imx/imx-kobs/imx-kobs.mk   | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)

Patches 1 to 3 applied. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] mfgtools: new package
  2016-10-19 14:23 ` [Buildroot] [PATCH 4/4] mfgtools: new package Gary Bisson
  2016-10-19 15:29   ` Thomas Petazzoni
@ 2016-10-20 15:43   ` Frank Hunleth
  2016-10-22 14:15     ` Gary Bisson
  1 sibling, 1 reply; 13+ messages in thread
From: Frank Hunleth @ 2016-10-20 15:43 UTC (permalink / raw)
  To: buildroot

Hi Gary,

Thanks - your timing on submitting the mfgtools was really good. Some
comments below:

On Wed, Oct 19, 2016 at 10:23 AM, Gary Bisson
<gary.bisson@boundarydevices.com> wrote:
> 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
>
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> ---
> Hi,
>
> A couple of remarks. First here is the procedure I followed to test it:
> $ cd output
> $ mkdir -p "Profiles/Linux/OS Firmware/firmware"
> $ wget https://storage.googleapis.com/boundarydevices.com/ucl2.xml \
>   -O Profiles/Linux/OS\ Firmware/ucl2.xml
> $ cp images/u-boot.imx images/zImage images/imx6q-sabrelite.dtb \
>   images/rootfs.cpio.uboot Profiles/Linux/OS\ Firmware/firmware/
> $ ./host/usr/bin/mfgtoolcli -l mmc -s uboot_defconfig=imx \
>   -s dtbname=imx6q-sabrelite.dtb -s initramfs=rootfs.cpio.uboot \
>   -s mmc=2 -p 1
>
> Note sure if you want this to be in the commit log.
>
> Also, not sure if the DEVELOPERS file should be updated within this
> patch or if it should be part of a follow-up patch.
>
> Regards,
> Gary
> ---
>  package/Config.in.host          |  1 +
>  package/mfgtools/Config.in.host | 10 ++++++++++
>  package/mfgtools/mfgtools.hash  |  2 ++
>  package/mfgtools/mfgtools.mk    | 34 ++++++++++++++++++++++++++++++++++
>  4 files changed, 47 insertions(+)
>  create mode 100644 package/mfgtools/Config.in.host
>  create mode 100644 package/mfgtools/mfgtools.hash
>  create mode 100644 package/mfgtools/mfgtools.mk
>
> diff --git a/package/Config.in.host b/package/Config.in.host
> index 1140c70..e33cbb5 100644
> --- a/package/Config.in.host
> +++ b/package/Config.in.host
> @@ -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"
> diff --git a/package/mfgtools/Config.in.host b/package/mfgtools/Config.in.host
> new file mode 100644
> index 0000000..8bba9e2
> --- /dev/null
> +++ b/package/mfgtools/Config.in.host
> @@ -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
> diff --git a/package/mfgtools/mfgtools.hash b/package/mfgtools/mfgtools.hash
> new file mode 100644
> index 0000000..e73a7fa
> --- /dev/null
> +++ b/package/mfgtools/mfgtools.hash
> @@ -0,0 +1,2 @@
> +# locally computed
> +sha256  6ce93a33c269282df305cf7e517d2d14fde78203537d8ea75b064966afe48464  mfgtools-b219fc219a35c365010897ed093c40750f8cdac6.tar.gz
> diff --git a/package/mfgtools/mfgtools.mk b/package/mfgtools/mfgtools.mk
> new file mode 100644
> index 0000000..c5f9ad0
> --- /dev/null
> +++ b/package/mfgtools/mfgtools.mk
> @@ -0,0 +1,34 @@
> +################################################################################
> +#
> +# mfgtools
> +#
> +################################################################################
> +
> +MFGTOOLS_VERSION = b219fc219a35c365010897ed093c40750f8cdac6
> +MFGTOOLS_SITE = $(call github,NXPmicro,mfgtools,$(MFGTOOLS_VERSION))
> +MFGTOOLS_LICENSE = Freescale Proprietary License

The license is BSD-3c with a couple files covered by the Code Project License.

> +MFGTOOLS_LICENSE_FILES = LICENSE
> +HOST_MFGTOOLS_DEPENDENCIES = host-cmake host-libusb
> +
> +MFGTOOLS_CFLAGS = $(HOST_CFLAGS)
> +MFGTOOLS_CFLAGS += -l pthread -Wl,-rpath=$(HOST_DIR)/usr/lib
> +MFGTOOLS_CFLAGS += -l usb-1.0 -I$(HOST_DIR)/usr/include/libusb-1.0
> +MFGTOOLS_CFLAGS += -L . -l MfgToolLib -I$(@D)/MfgToolLib
> +MFGTOOLS_CFLAGS += -fpermissive -Wno-write-strings

I had to add "-std=c++11" to get it to compile on my system. If I
didn't do this, I'd get errors from std:stoi not being defined. Their
Makefile added this as well.

I would add a "TestedBy", but the tool is so flaky for me that I'm not
sure if I really tested it. It did upload u-boot and Linux to my board
(custom iMX6) and rebooted to run the programming script, but I never
could get it to get all the way through the programming script. I
don't think that's your issue, though.

Frank

> +
> +define HOST_MFGTOOLS_CONFIGURE_CMDS
> +       $(HOST_CONFIGURE_OPTS) $(MAKE) CMAKE=$(HOST_DIR)/usr/bin/cmake \
> +               -C $(@D)/TestPrgm cmake
> +endef
> +
> +define HOST_MFGTOOLS_BUILD_CMDS
> +       $(HOST_CONFIGURE_OPTS) $(MAKE) CC=$(HOSTCXX) CFLAGS="$(MFGTOOLS_CFLAGS)" \
> +               -C $(@D)/TestPrgm
> +endef
> +
> +define HOST_MFGTOOLS_INSTALL_CMDS
> +       $(INSTALL) -D -m 755 $(@D)/TestPrgm/libMfgToolLib.so $(HOST_DIR)/usr/lib
> +       $(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli $(HOST_DIR)/usr/bin
> +endef
> +
> +$(eval $(host-generic-package))
> --
> 2.9.3
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] mfgtools: new package
  2016-10-19 15:29   ` Thomas Petazzoni
@ 2016-10-22 14:09     ` Gary Bisson
  0 siblings, 0 replies; 13+ messages in thread
From: Gary Bisson @ 2016-10-22 14:09 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Wed, Oct 19, 2016 at 5:29 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Wed, 19 Oct 2016 16:23:09 +0200, Gary Bisson wrote:
>> 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
>>
>> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
>
> Thanks for this package.
>
>> A couple of remarks. First here is the procedure I followed to test it:
>> $ cd output
>> $ mkdir -p "Profiles/Linux/OS Firmware/firmware"
>> $ wget https://storage.googleapis.com/boundarydevices.com/ucl2.xml \
>>   -O Profiles/Linux/OS\ Firmware/ucl2.xml
>> $ cp images/u-boot.imx images/zImage images/imx6q-sabrelite.dtb \
>>   images/rootfs.cpio.uboot Profiles/Linux/OS\ Firmware/firmware/
>> $ ./host/usr/bin/mfgtoolcli -l mmc -s uboot_defconfig=imx \
>>   -s dtbname=imx6q-sabrelite.dtb -s initramfs=rootfs.cpio.uboot \
>>   -s mmc=2 -p 1
>>
>> Note sure if you want this to be in the commit log.
>
> Either in the Config.in help text, or in package/mfgtools/readme.txt.
> We have already mentioned such a possibility for another package, and I
> think we should start doing it.

Ok, that sounds like a good idea.

>> Also, not sure if the DEVELOPERS file should be updated within this
>> patch or if it should be part of a follow-up patch.
>
> As a follow-up patch.

Ok.

>> +MFGTOOLS_CFLAGS = $(HOST_CFLAGS)
>> +MFGTOOLS_CFLAGS += -l pthread -Wl,-rpath=$(HOST_DIR)/usr/lib
>> +MFGTOOLS_CFLAGS += -l usb-1.0 -I$(HOST_DIR)/usr/include/libusb-1.0
>> +MFGTOOLS_CFLAGS += -L . -l MfgToolLib -I$(@D)/MfgToolLib
>> +MFGTOOLS_CFLAGS += -fpermissive -Wno-write-strings
>
> Please use:
>
> MFGTOOLS_CFLAGS = \
>         ... \
>         ... \
>         ...

Ok

> Please remove the space between -l and the library name. Also
> -Wl,-rpath=$(HOST_DIR)/usr/lib is already part of $(HOST_CFLAGS), so
> you can get rid of this part.
>
>> +define HOST_MFGTOOLS_CONFIGURE_CMDS
>> +     $(HOST_CONFIGURE_OPTS) $(MAKE) CMAKE=$(HOST_DIR)/usr/bin/cmake \
>> +             -C $(@D)/TestPrgm cmake
>> +endef
>
> This build system is really completely brain-damaged. I would suggest
> to instead use the host-cmake-package infrastructure with a proper
> _SUBDIR so that it builds the library, and then a simple post-build
> hook to build the CLI tool.
>
> And of course, submit a bug report upstream to tell them to use CMake
> for the whole thing rather than doing this crap.

Will look into this. For the upstream report, I guess the best would
be to offer a patch directly.

>> +define HOST_MFGTOOLS_INSTALL_CMDS
>> +     $(INSTALL) -D -m 755 $(@D)/TestPrgm/libMfgToolLib.so $(HOST_DIR)/usr/lib
>> +     $(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli $(HOST_DIR)/usr/bin
>
> Full destination path needed when using $(INSTALL) -D.

Ok, will try to send my v2 next week.

Thanks,
Gary

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] mfgtools: new package
  2016-10-20 15:43   ` Frank Hunleth
@ 2016-10-22 14:15     ` Gary Bisson
  2016-10-24 15:58       ` Frank Hunleth
  0 siblings, 1 reply; 13+ messages in thread
From: Gary Bisson @ 2016-10-22 14:15 UTC (permalink / raw)
  To: buildroot

Hi Frank,

On Thu, Oct 20, 2016 at 5:43 PM, Frank Hunleth
<fhunleth@troodon-software.com> wrote:
> Hi Gary,
>
> Thanks - your timing on submitting the mfgtools was really good. Some
> comments below:

Good to hear someone is already using it.

> On Wed, Oct 19, 2016 at 10:23 AM, Gary Bisson
> <gary.bisson@boundarydevices.com> wrote:
>> 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
>>
>> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
>> ---
>> Hi,
>>
>> A couple of remarks. First here is the procedure I followed to test it:
>> $ cd output
>> $ mkdir -p "Profiles/Linux/OS Firmware/firmware"
>> $ wget https://storage.googleapis.com/boundarydevices.com/ucl2.xml \
>>   -O Profiles/Linux/OS\ Firmware/ucl2.xml
>> $ cp images/u-boot.imx images/zImage images/imx6q-sabrelite.dtb \
>>   images/rootfs.cpio.uboot Profiles/Linux/OS\ Firmware/firmware/
>> $ ./host/usr/bin/mfgtoolcli -l mmc -s uboot_defconfig=imx \
>>   -s dtbname=imx6q-sabrelite.dtb -s initramfs=rootfs.cpio.uboot \
>>   -s mmc=2 -p 1
>>
>> Note sure if you want this to be in the commit log.
>>
>> Also, not sure if the DEVELOPERS file should be updated within this
>> patch or if it should be part of a follow-up patch.
>>
>> Regards,
>> Gary
>> ---
>>  package/Config.in.host          |  1 +
>>  package/mfgtools/Config.in.host | 10 ++++++++++
>>  package/mfgtools/mfgtools.hash  |  2 ++
>>  package/mfgtools/mfgtools.mk    | 34 ++++++++++++++++++++++++++++++++++
>>  4 files changed, 47 insertions(+)
>>  create mode 100644 package/mfgtools/Config.in.host
>>  create mode 100644 package/mfgtools/mfgtools.hash
>>  create mode 100644 package/mfgtools/mfgtools.mk
>>
>> diff --git a/package/Config.in.host b/package/Config.in.host
>> index 1140c70..e33cbb5 100644
>> --- a/package/Config.in.host
>> +++ b/package/Config.in.host
>> @@ -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"
>> diff --git a/package/mfgtools/Config.in.host b/package/mfgtools/Config.in.host
>> new file mode 100644
>> index 0000000..8bba9e2
>> --- /dev/null
>> +++ b/package/mfgtools/Config.in.host
>> @@ -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
>> diff --git a/package/mfgtools/mfgtools.hash b/package/mfgtools/mfgtools.hash
>> new file mode 100644
>> index 0000000..e73a7fa
>> --- /dev/null
>> +++ b/package/mfgtools/mfgtools.hash
>> @@ -0,0 +1,2 @@
>> +# locally computed
>> +sha256  6ce93a33c269282df305cf7e517d2d14fde78203537d8ea75b064966afe48464  mfgtools-b219fc219a35c365010897ed093c40750f8cdac6.tar.gz
>> diff --git a/package/mfgtools/mfgtools.mk b/package/mfgtools/mfgtools.mk
>> new file mode 100644
>> index 0000000..c5f9ad0
>> --- /dev/null
>> +++ b/package/mfgtools/mfgtools.mk
>> @@ -0,0 +1,34 @@
>> +################################################################################
>> +#
>> +# mfgtools
>> +#
>> +################################################################################
>> +
>> +MFGTOOLS_VERSION = b219fc219a35c365010897ed093c40750f8cdac6
>> +MFGTOOLS_SITE = $(call github,NXPmicro,mfgtools,$(MFGTOOLS_VERSION))
>> +MFGTOOLS_LICENSE = Freescale Proprietary License
>
> The license is BSD-3c with a couple files covered by the Code Project License.

I'm no good with licenses, indeed I just checked the BSD-3C and it
looks like it, I expected the license name to be in the header text
(like the GPL or Apache).

>> +MFGTOOLS_LICENSE_FILES = LICENSE
>> +HOST_MFGTOOLS_DEPENDENCIES = host-cmake host-libusb
>> +
>> +MFGTOOLS_CFLAGS = $(HOST_CFLAGS)
>> +MFGTOOLS_CFLAGS += -l pthread -Wl,-rpath=$(HOST_DIR)/usr/lib
>> +MFGTOOLS_CFLAGS += -l usb-1.0 -I$(HOST_DIR)/usr/include/libusb-1.0
>> +MFGTOOLS_CFLAGS += -L . -l MfgToolLib -I$(@D)/MfgToolLib
>> +MFGTOOLS_CFLAGS += -fpermissive -Wno-write-strings
>
> I had to add "-std=c++11" to get it to compile on my system. If I
> didn't do this, I'd get errors from std:stoi not being defined. Their
> Makefile added this as well.

hmm, that is in their Makefile indeed, which GCC version are you using?

> I would add a "TestedBy", but the tool is so flaky for me that I'm not
> sure if I really tested it. It did upload u-boot and Linux to my board
> (custom iMX6) and rebooted to run the programming script, but I never
> could get it to get all the way through the programming script. I
> don't think that's your issue, though.

What happens exactly? I've generated an initramfs for the target that
includes uuc and it was ok. Actually I had to do one thing manually
which was to modprobe the g_mass_storage module manually. I need to
add it to the init scripts but I'm not sure how to do that in the
systemd service file, I need to look at it.

Regards,
Gary

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] mfgtools: new package
  2016-10-22 14:15     ` Gary Bisson
@ 2016-10-24 15:58       ` Frank Hunleth
  2016-10-26  8:56         ` Gary Bisson
  0 siblings, 1 reply; 13+ messages in thread
From: Frank Hunleth @ 2016-10-24 15:58 UTC (permalink / raw)
  To: buildroot

Hi Gary,

On Sat, Oct 22, 2016 at 10:15 AM, Gary Bisson
<gary.bisson@boundarydevices.com> wrote:
> Hi Frank,
>
> On Thu, Oct 20, 2016 at 5:43 PM, Frank Hunleth
> <fhunleth@troodon-software.com> wrote:
>> Hi Gary,
>>
>> Thanks - your timing on submitting the mfgtools was really good. Some
>> comments below:
>
> Good to hear someone is already using it.

Well, I was hopeful to not have to run an existing manufacturing
script in the Windows version of mfgtools. Until I saw your patch, I
didn't even know that a Linux version of mfgtools existed.

>
>> On Wed, Oct 19, 2016 at 10:23 AM, Gary Bisson
>> <gary.bisson@boundarydevices.com> wrote:
>>> 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
>>>
>>> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
>>> ---
>>> Hi,
>>>
>>> A couple of remarks. First here is the procedure I followed to test it:
>>> $ cd output
>>> $ mkdir -p "Profiles/Linux/OS Firmware/firmware"
>>> $ wget https://storage.googleapis.com/boundarydevices.com/ucl2.xml \
>>>   -O Profiles/Linux/OS\ Firmware/ucl2.xml
>>> $ cp images/u-boot.imx images/zImage images/imx6q-sabrelite.dtb \
>>>   images/rootfs.cpio.uboot Profiles/Linux/OS\ Firmware/firmware/
>>> $ ./host/usr/bin/mfgtoolcli -l mmc -s uboot_defconfig=imx \
>>>   -s dtbname=imx6q-sabrelite.dtb -s initramfs=rootfs.cpio.uboot \
>>>   -s mmc=2 -p 1
>>>
>>> Note sure if you want this to be in the commit log.
>>>
>>> Also, not sure if the DEVELOPERS file should be updated within this
>>> patch or if it should be part of a follow-up patch.
>>>
>>> Regards,
>>> Gary
>>> ---
>>>  package/Config.in.host          |  1 +
>>>  package/mfgtools/Config.in.host | 10 ++++++++++
>>>  package/mfgtools/mfgtools.hash  |  2 ++
>>>  package/mfgtools/mfgtools.mk    | 34 ++++++++++++++++++++++++++++++++++
>>>  4 files changed, 47 insertions(+)
>>>  create mode 100644 package/mfgtools/Config.in.host
>>>  create mode 100644 package/mfgtools/mfgtools.hash
>>>  create mode 100644 package/mfgtools/mfgtools.mk
>>>
>>> diff --git a/package/Config.in.host b/package/Config.in.host
>>> index 1140c70..e33cbb5 100644
>>> --- a/package/Config.in.host
>>> +++ b/package/Config.in.host
>>> @@ -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"
>>> diff --git a/package/mfgtools/Config.in.host b/package/mfgtools/Config.in.host
>>> new file mode 100644
>>> index 0000000..8bba9e2
>>> --- /dev/null
>>> +++ b/package/mfgtools/Config.in.host
>>> @@ -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
>>> diff --git a/package/mfgtools/mfgtools.hash b/package/mfgtools/mfgtools.hash
>>> new file mode 100644
>>> index 0000000..e73a7fa
>>> --- /dev/null
>>> +++ b/package/mfgtools/mfgtools.hash
>>> @@ -0,0 +1,2 @@
>>> +# locally computed
>>> +sha256  6ce93a33c269282df305cf7e517d2d14fde78203537d8ea75b064966afe48464  mfgtools-b219fc219a35c365010897ed093c40750f8cdac6.tar.gz
>>> diff --git a/package/mfgtools/mfgtools.mk b/package/mfgtools/mfgtools.mk
>>> new file mode 100644
>>> index 0000000..c5f9ad0
>>> --- /dev/null
>>> +++ b/package/mfgtools/mfgtools.mk
>>> @@ -0,0 +1,34 @@
>>> +################################################################################
>>> +#
>>> +# mfgtools
>>> +#
>>> +################################################################################
>>> +
>>> +MFGTOOLS_VERSION = b219fc219a35c365010897ed093c40750f8cdac6
>>> +MFGTOOLS_SITE = $(call github,NXPmicro,mfgtools,$(MFGTOOLS_VERSION))
>>> +MFGTOOLS_LICENSE = Freescale Proprietary License
>>
>> The license is BSD-3c with a couple files covered by the Code Project License.
>
> I'm no good with licenses, indeed I just checked the BSD-3C and it
> looks like it, I expected the license name to be in the header text
> (like the GPL or Apache).

Upstream actually wasn't very good with their license documentation.
Before I wrote you, I confirmed the license with them since there were
several inconsistencies.

>
>>> +MFGTOOLS_LICENSE_FILES = LICENSE
>>> +HOST_MFGTOOLS_DEPENDENCIES = host-cmake host-libusb
>>> +
>>> +MFGTOOLS_CFLAGS = $(HOST_CFLAGS)
>>> +MFGTOOLS_CFLAGS += -l pthread -Wl,-rpath=$(HOST_DIR)/usr/lib
>>> +MFGTOOLS_CFLAGS += -l usb-1.0 -I$(HOST_DIR)/usr/include/libusb-1.0
>>> +MFGTOOLS_CFLAGS += -L . -l MfgToolLib -I$(@D)/MfgToolLib
>>> +MFGTOOLS_CFLAGS += -fpermissive -Wno-write-strings
>>
>> I had to add "-std=c++11" to get it to compile on my system. If I
>> didn't do this, I'd get errors from std:stoi not being defined. Their
>> Makefile added this as well.
>
> hmm, that is in their Makefile indeed, which GCC version are you using?

gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)

>
>> I would add a "TestedBy", but the tool is so flaky for me that I'm not
>> sure if I really tested it. It did upload u-boot and Linux to my board
>> (custom iMX6) and rebooted to run the programming script, but I never
>> could get it to get all the way through the programming script. I
>> don't think that's your issue, though.
>
> What happens exactly? I've generated an initramfs for the target that
> includes uuc and it was ok. Actually I had to do one thing manually
> which was to modprobe the g_mass_storage module manually. I need to
> add it to the init scripts but I'm not sure how to do that in the
> systemd service file, I need to look at it.

I'm using a pre-existing 'ucl2.xml' that came with binaries for the
loader versions of U-Boot and Linux. I'm including it below since it's
not too long. The "BootStrap" stsps appeared to work. The "Updater"
steps hung at the "Sending U-Boot" command. I'm not convinced that the
other steps really worked, though, since it took them quite a while to
run like they may have just timed out. Since I rarely need to run this
script, I wasn't planning on debugging it. Maybe this will give you
some hints, though?

<UCL>
  <CFG>
    <STATE name="BootStrap" dev="MX6D" vid="15A2" pid="0061"/>
    <STATE name="Updater"   dev="MSC" vid="066F" pid="37FF"/>
  </CFG>
<!--
  The following Lists are for i.MX6Solo/DualLite chips
-->
<LIST name="i.MX6DL-ubuntu-SabreSD-eMMC-uImage" desc="Choose eMMC
android as media">
    <CMD state="BootStrap" type="boot" body="BootStrap" file
="u-boot-mx6dl-sabresd.bin" >Loading U-boot</CMD>
    <CMD state="BootStrap" type="load" file="uImage" address="0x10800000"
        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE"
>Loading Kernel.</CMD>
    <CMD state="BootStrap" type="load" file="initramfs.cpio.gz.uboot"
address="0x10C00000"
        loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE"
>Loading Initramfs.</CMD>
    <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

    <CMD state="Updater" type="push" body="$ ls /dev/*"/>
        <CMD state="Updater" type="push" body="$ dd if=/dev/zero
of=/dev/mmcblk0 bs=512 seek=1536 count=16">clean up u-boot
parameter</CMD>
        <!--
    <CMD state="Updater" type="push" body="$ echo 1 >
/sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access
boot partition 1</CMD>
    <CMD state="Updater" type="push" body="send"
file="files/u-boot-dyn.bin">Sending U-Boot</CMD>
    <CMD state="Updater" type="push" body="$ dd if=$FILE
of=/dev/mmcblk0 bs=512 seek=2 skip=2">write U-Boot to sd card</CMD>
    <CMD state="Updater" type="push" body="$ echo 8 >
/sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config">access
user partition and enable boot partion 1 to boot</CMD>
-->
    <CMD state="Updater" type="push" body="send"
file="files/uImage-ecol">Sending kernel uImage</CMD>
    <CMD state="Updater" type="push" body="$ dd if=$FILE
of=/dev/mmcblk0 bs=1M seek=1 conv=fsync">write kernel image to sd
card</CMD>

    <CMD state="Updater" type="push" body="$ echo Update Complete!">Done</CMD>
</LIST>
</UCL>

Thanks,
Frank

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] mfgtools: new package
  2016-10-24 15:58       ` Frank Hunleth
@ 2016-10-26  8:56         ` Gary Bisson
  2016-10-26 17:35           ` Frank Hunleth
  0 siblings, 1 reply; 13+ messages in thread
From: Gary Bisson @ 2016-10-26  8:56 UTC (permalink / raw)
  To: buildroot

Hi Frank,

On Mon, Oct 24, 2016 at 5:58 PM, Frank Hunleth
<fhunleth@troodon-software.com> wrote:
> <snip>
>> What happens exactly? I've generated an initramfs for the target that
>> includes uuc and it was ok. Actually I had to do one thing manually
>> which was to modprobe the g_mass_storage module manually. I need to
>> add it to the init scripts but I'm not sure how to do that in the
>> systemd service file, I need to look at it.
>
> I'm using a pre-existing 'ucl2.xml' that came with binaries for the
> loader versions of U-Boot and Linux. I'm including it below since it's
> not too long. The "BootStrap" stsps appeared to work. The "Updater"
> steps hung at the "Sending U-Boot" command. I'm not convinced that the
> other steps really worked, though, since it took them quite a while to
> run like they may have just timed out. Since I rarely need to run this
> script, I wasn't planning on debugging it. Maybe this will give you
> some hints, though?

When you say the bootstrap steps are working, do you mean that you can
see on the serial console that U-Boot, Kernel and initramfs are
properly loaded and booted from?

Then the tool is actually going back to the "Sending U-Boot" state as
long as it doesn't recognize a UTP linux image booted up. If you're
system properly booted (1st question), it is most likely due to bad
permissions. Are you sure you have a udev rule for the UTP VID/PID? If
not, please add it (or use sudo, but it's evil).

Regards,
Gary

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Buildroot] [PATCH 4/4] mfgtools: new package
  2016-10-26  8:56         ` Gary Bisson
@ 2016-10-26 17:35           ` Frank Hunleth
  0 siblings, 0 replies; 13+ messages in thread
From: Frank Hunleth @ 2016-10-26 17:35 UTC (permalink / raw)
  To: buildroot

Hi Gary,

On Wed, Oct 26, 2016 at 4:56 AM, Gary Bisson
<gary.bisson@boundarydevices.com> wrote:
> Hi Frank,
>
> On Mon, Oct 24, 2016 at 5:58 PM, Frank Hunleth
> <fhunleth@troodon-software.com> wrote:
>> <snip>
>>> What happens exactly? I've generated an initramfs for the target that
>>> includes uuc and it was ok. Actually I had to do one thing manually
>>> which was to modprobe the g_mass_storage module manually. I need to
>>> add it to the init scripts but I'm not sure how to do that in the
>>> systemd service file, I need to look at it.
>>
>> I'm using a pre-existing 'ucl2.xml' that came with binaries for the
>> loader versions of U-Boot and Linux. I'm including it below since it's
>> not too long. The "BootStrap" stsps appeared to work. The "Updater"
>> steps hung at the "Sending U-Boot" command. I'm not convinced that the
>> other steps really worked, though, since it took them quite a while to
>> run like they may have just timed out. Since I rarely need to run this
>> script, I wasn't planning on debugging it. Maybe this will give you
>> some hints, though?
>
> When you say the bootstrap steps are working, do you mean that you can
> see on the serial console that U-Boot, Kernel and initramfs are
> properly loaded and booted from?
>
> Then the tool is actually going back to the "Sending U-Boot" state as
> long as it doesn't recognize a UTP linux image booted up. If you're
> system properly booted (1st question), it is most likely due to bad
> permissions. Are you sure you have a udev rule for the UTP VID/PID? If
> not, please add it (or use sudo, but it's evil).

I actually ran it as sudo out of desperation when it wasn't working,
and now due to unrelated issues, that particular board is no longer of
interest. Sorry that I can't be of more help. If I get back to it in
the future, I'll try some more. I don't think my experience should
hold up your patch, since it clearly builds and runs (at least a
little). I really appreciate you trying to help figure out what went
wrong for me.

Thanks,
Frank

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-10-26 17:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 14:23 [Buildroot] [PATCH 0/4] Update i.MX manufacturing tools Gary Bisson
2016-10-19 14:23 ` [Buildroot] [PATCH 1/4] imx-kobs: switch to open source version Gary Bisson
2016-10-19 15:58   ` Thomas Petazzoni
2016-10-19 14:23 ` [Buildroot] [PATCH 2/4] imx-uuc: " Gary Bisson
2016-10-19 14:23 ` [Buildroot] [PATCH 3/4] imx-usb-loader: bump version Gary Bisson
2016-10-19 14:23 ` [Buildroot] [PATCH 4/4] mfgtools: new package Gary Bisson
2016-10-19 15:29   ` Thomas Petazzoni
2016-10-22 14:09     ` Gary Bisson
2016-10-20 15:43   ` Frank Hunleth
2016-10-22 14:15     ` Gary Bisson
2016-10-24 15:58       ` Frank Hunleth
2016-10-26  8:56         ` Gary Bisson
2016-10-26 17:35           ` Frank Hunleth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.