Skip to contentSkip to conversation

imx-usb-loader: new host package

PATCH New Antoine Tenart 4 participants 5 messages Apr 27, 2015 – Apr 30, 2015 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 imx-usb-loader: new host package

This host package allows to build tools to download and execute code on Freescale i.MX5/i.MX6 and Vybrid SoCs through the Serial Download Protocol.

The work behind this commit was funded by ECA Group
<http://www.ecagroup.com>. ECA Group is the copyright owner of the contributed code.

---
 package/Config.in.host                   |  1 +
 package/imx-usb-loader/Config.in.host    | 10 ++++++++++
 package/imx-usb-loader/imx-usb-loader.mk | 22 ++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 package/imx-usb-loader/Config.in.host
 create mode 100644 package/imx-usb-loader/imx-usb-loader.mk
package/Config.in.host +1 -0
index 6df627f1752f..744fd43128fa 100644
@@ -11,6 +11,7 @@ menu "Host utilities"
 	source "package/genext2fs/Config.in.host"
 	source "package/genimage/Config.in.host"
 	source "package/genpart/Config.in.host"
+	source "package/imx-usb-loader/Config.in.host"
 	source "package/lpc3250loader/Config.in.host"
 	source "package/mke2img/Config.in.host"
 	source "package/mtd/Config.in.host"
package/imx-usb-loader/Config.in.host new file +10 -0
new file mode 100644
index 000000000000..a30f20a32f81
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_HOST_IMX_USB_LOADER
+	bool "host imx usb loader"
+	select BR2_PACKAGE_LIBUSB
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  This package contains tools to download and execute code
+	  on Freescale i.MX5/i.MX6 and Vybrid SoCs through the
+	  Serial Download Protocol.
+
+	  https://github.com/boundarydevices/imx_usb_loader
package/imx-usb-loader/imx-usb-loader.mk new file +22 -0
new file mode 100644
index 000000000000..e33daac34367
@@ -0,0 +1,22 @@
+################################################################################
+#
+# iMX USB loader
+#
+################################################################################
+
+IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299
+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
+IMX_USB_LOADER_DEPENDENCIES = libusb
+
+define HOST_IMX_USB_LOADER_BUILD_CMDS
+	$(MAKE) -C $(@D)
+endef
+
+define HOST_IMX_USB_LOADER_INSTALL_CMDS
+	$(MAKE) -C $(@D)	\
+		DESTDIR=$(HOST_DIR) install
+endef
+
+$(eval $(host-generic-package))
Signature · 1 line
2.3.6
#1 lore raw

PATCH 1/1 imx-usb-loader: new host package

Antoine,

package/imx-usb-loader/Config.in.host line 2

Quoted 8 lines · Antoine Tenart
package/imx-usb-loader/Config.in.host new file +2 -0
new file mode 100644
index 000000000000..a30f20a32f81
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_HOST_IMX_USB_LOADER
+	bool "host imx usb loader"

bool "host imx-usb-loader"

package/imx-usb-loader/Config.in.host line 4

Quoted 2 lines
package/imx-usb-loader/Config.in.host new file +2 -0
+	select BR2_PACKAGE_LIBUSB
+	depends on BR2_TOOLCHAIN_HAS_THREADS

No, doesn't make sense. Your package is a host package, so it does not need libusb. It needs host-libusb, so there is no need for anything in Config.in.

package/imx-usb-loader/imx-usb-loader.mk line 3

Quoted 9 lines
package/imx-usb-loader/imx-usb-loader.mk new file +3 -0
new file mode 100644
index 000000000000..e33daac34367
@@ -0,0 +1,22 @@
+################################################################################
+#
+# iMX USB loader

imx-usb-loader

package/imx-usb-loader/imx-usb-loader.mk line 9

Quoted 6 lines
package/imx-usb-loader/imx-usb-loader.mk new file +6 -0
+#
+################################################################################
+
+IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299
+IMX_USB_LOADER_SITE = $(call github,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION))
+IMX_USB_LOADER_LICENSE = LGPLv2.1

LGPLv2.1+

package/imx-usb-loader/imx-usb-loader.mk line 14

Quoted 5 lines
package/imx-usb-loader/imx-usb-loader.mk new file +5 -0
+IMX_USB_LOADER_LICENSE_FILES = COPYING
+IMX_USB_LOADER_DEPENDENCIES = libusb
+
+define HOST_IMX_USB_LOADER_BUILD_CMDS
+	$(MAKE) -C $(@D)
	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)

package/imx-usb-loader/imx-usb-loader.mk line 19

Quoted 5 lines
package/imx-usb-loader/imx-usb-loader.mk new file +5 -0
+endef
+
+define HOST_IMX_USB_LOADER_INSTALL_CMDS
+	$(MAKE) -C $(@D)	\
+		DESTDIR=$(HOST_DIR) install
	$(HOST_MAKE_ENV) $(MAKE) -C $(@D) \
		DESTDIR=$(HOST_DIR) install

Thanks,

Thomas

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

PATCH 1/1 imx-usb-loader: new host package

In reply to Antoine Tenart

Hello Antoine,

Quoted 16 lines · On Monday 27 April 2015 15:47:39 Antoine Tenart wrote:

This host package allows to build tools to download and execute code on Freescale i.MX5/i.MX6 and Vybrid SoCs through the Serial Download Protocol.

The work behind this commit was funded by ECA Group
<http://www.ecagroup.com>. ECA Group is the copyright owner of the contributed code.

---
 package/Config.in.host                   |  1 +
 package/imx-usb-loader/Config.in.host    | 10 ++++++++++
 package/imx-usb-loader/imx-usb-loader.mk | 22 ++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 package/imx-usb-loader/Config.in.host
 create mode 100644 package/imx-usb-loader/imx-usb-loader.mk

[...]

package/imx-usb-loader/imx-usb-loader.mk line 20

Quoted 4 lines
package/imx-usb-loader/imx-usb-loader.mk new file +4 -0
+define HOST_IMX_USB_LOADER_INSTALL_CMDS
+	$(MAKE) -C $(@D)	\
+		DESTDIR=$(HOST_DIR) install
+endef

hmm... configuration files are installed in $(HOST_DIR)/usr/etc, $(HOST_DIR)/etc would be better.

More annoying, it seems installed binaries look for configuration files in /etc instead of $(HOST_DIR)/etc.

Quoted 3 lines

+
+$(eval $(host-generic-package))

Signature · 3 lines
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
#3 lore raw

PATCH 1/1 imx-usb-loader: new host package

Hi J?r?me,

Quoted 27 lines · J?r?me Pouiller

Hello Antoine,

Quoted 16 lines · On Monday 27 April 2015 15:47:39 Antoine Tenart wrote:

This host package allows to build tools to download and execute code on Freescale i.MX5/i.MX6 and Vybrid SoCs through the Serial Download Protocol.

The work behind this commit was funded by ECA Group
<http://www.ecagroup.com>. ECA Group is the copyright owner of the contributed code.

---
 package/Config.in.host                   |  1 +
 package/imx-usb-loader/Config.in.host    | 10 ++++++++++
 package/imx-usb-loader/imx-usb-loader.mk | 22 ++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 package/imx-usb-loader/Config.in.host
 create mode 100644 package/imx-usb-loader/imx-usb-loader.mk

[...]

package/imx-usb-loader/imx-usb-loader.mk line 20

Quoted 4 lines
package/imx-usb-loader/imx-usb-loader.mk new file +4 -0
+define HOST_IMX_USB_LOADER_INSTALL_CMDS
+	$(MAKE) -C $(@D)	\
+		DESTDIR=$(HOST_DIR) install
+endef

hmm... configuration files are installed in $(HOST_DIR)/usr/etc, $(HOST_DIR)/etc would be better.

Quoted 3 lines

More annoying, it seems installed binaries look for configuration files in /etc instead of $(HOST_DIR)/etc.

This can be over-ridden by setting sysconfdir=$(HOST_DIR)/etc/
https://github.com/boundarydevices/imx_usb_loader/blob/master/Makefile#L6

Regards,

Eric

#4 lore raw

PATCH 1/1 imx-usb-loader: new host package

In reply to Jérôme Pouiller

J?r?me,

Quoted 17 lines · J?r?me Pouiller
Quoted 8 lines · On Monday 27 April 2015 15:47:39 Antoine Tenart wrote:

This host package allows to build tools to download and execute code on Freescale i.MX5/i.MX6 and Vybrid SoCs through the Serial Download Protocol.

The work behind this commit was funded by ECA Group
<http://www.ecagroup.com>. ECA Group is the copyright owner of the contributed code.

Quoted 8 lines
---
 package/Config.in.host                   |  1 +
 package/imx-usb-loader/Config.in.host    | 10 ++++++++++
 package/imx-usb-loader/imx-usb-loader.mk | 22 ++++++++++++++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 package/imx-usb-loader/Config.in.host
 create mode 100644 package/imx-usb-loader/imx-usb-loader.mk
Quoted 7 lines

[...]

package/imx-usb-loader/imx-usb-loader.mk line 20

Quoted 4 lines
package/imx-usb-loader/imx-usb-loader.mk new file +4 -0
+define HOST_IMX_USB_LOADER_INSTALL_CMDS
+	$(MAKE) -C $(@D)	\
+		DESTDIR=$(HOST_DIR) install
+endef

hmm... configuration files are installed in $(HOST_DIR)/usr/etc, $(HOST_DIR)/etc would be better.

OK.

Quoted 2 lines

More annoying, it seems installed binaries look for configuration files in /etc instead of $(HOST_DIR)/etc.

You can use the -c option to specify the configuration directory path.

Antoine

Signature · 3 lines
Antoine T?nart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com