diff mbox

imx-usb-loader: new host package

Message ID 1430142459-9448-1-git-send-email-antoine.tenart@free-electrons.com
State Superseded
Headers show

Commit Message

Antoine Tenart April 27, 2015, 1:47 p.m. UTC
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.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
---
 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

Comments

Thomas Petazzoni April 27, 2015, 3:25 p.m. UTC | #1
Antoine,

On Mon, 27 Apr 2015 15:47:39 +0200, Antoine Tenart wrote:

> diff --git a/package/imx-usb-loader/Config.in.host b/package/imx-usb-loader/Config.in.host
> new file mode 100644
> index 000000000000..a30f20a32f81
> --- /dev/null
> +++ b/package/imx-usb-loader/Config.in.host
> @@ -0,0 +1,10 @@
> +config BR2_PACKAGE_HOST_IMX_USB_LOADER
> +	bool "host imx usb loader"

	bool "host imx-usb-loader"

> +	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.

> diff --git a/package/imx-usb-loader/imx-usb-loader.mk b/package/imx-usb-loader/imx-usb-loader.mk
> new file mode 100644
> index 000000000000..e33daac34367
> --- /dev/null
> +++ b/package/imx-usb-loader/imx-usb-loader.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# iMX USB loader

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

LGPLv2.1+

> +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)

> +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
Jérôme Pouiller April 27, 2015, 5:56 p.m. UTC | #2
Hello Antoine,

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.
> 
> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
> ---
>  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
[...]
> +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.


> +
> +$(eval $(host-generic-package))
>
Eric Nelson April 27, 2015, 8:01 p.m. UTC | #3
Hi Jérôme,

On 04/27/2015 10:56 AM, Jérôme Pouiller wrote:
> Hello Antoine,
> 
> 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.
>>
>> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
>> ---
>>  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
> [...]
>> +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.
> 

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

Regards,


Eric
Antoine Tenart April 30, 2015, 11:26 a.m. UTC | #4
Jérôme,

On Mon, Apr 27, 2015 at 07:56:38PM +0200, Jérôme Pouiller wrote:
> 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.
> > 
> > Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
> > ---
> >  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
> [...]
> > +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.

> 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
diff mbox

Patch

diff --git a/package/Config.in.host b/package/Config.in.host
index 6df627f1752f..744fd43128fa 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -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"
diff --git a/package/imx-usb-loader/Config.in.host b/package/imx-usb-loader/Config.in.host
new file mode 100644
index 000000000000..a30f20a32f81
--- /dev/null
+++ b/package/imx-usb-loader/Config.in.host
@@ -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
diff --git a/package/imx-usb-loader/imx-usb-loader.mk b/package/imx-usb-loader/imx-usb-loader.mk
new file mode 100644
index 000000000000..e33daac34367
--- /dev/null
+++ b/package/imx-usb-loader/imx-usb-loader.mk
@@ -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))