From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 4/4] mfgtools: new package
Date: Wed, 19 Oct 2016 17:29:29 +0200 [thread overview]
Message-ID: <20161019172929.511eb430@free-electrons.com> (raw)
In-Reply-To: <20161019142309.15628-5-gary.bisson@boundarydevices.com>
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
next prev parent reply other threads:[~2016-10-19 15:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161019172929.511eb430@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.