From patchwork Wed Oct 19 14:23:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 684139 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3szZ7W4PzCz9vF9 for ; Thu, 20 Oct 2016 01:28:55 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.b=RLzNyvSW; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CAD768A451; Wed, 19 Oct 2016 14:28:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p+dLTmOSDHTv; Wed, 19 Oct 2016 14:28:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id BDEE68A40C; Wed, 19 Oct 2016 14:28:52 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id AB4C81CF3FB for ; Wed, 19 Oct 2016 14:28:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A48BF91EE5 for ; Wed, 19 Oct 2016 14:28:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id al8-I5q5Ab81 for ; Wed, 19 Oct 2016 14:28:50 +0000 (UTC) X-Greylist: delayed 00:05:29 by SQLgrey-1.7.6 Received: from mail-lf0-f48.google.com (mail-lf0-f48.google.com [209.85.215.48]) by whitealder.osuosl.org (Postfix) with ESMTPS id 9AA7991EDB for ; Wed, 19 Oct 2016 14:28:49 +0000 (UTC) Received: by mail-lf0-f48.google.com with SMTP id x79so28535623lff.0 for ; Wed, 19 Oct 2016 07:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=x4jQaQsbe3rxQbBMS3KOiu29GwWPzFsOijcVGZ2KVLo=; b=RLzNyvSW4X2OkGJR2XOhiowQv6mXAopR5Wahi9oBtejUWNANCz2XGv5mJaNDJmINxo 2KJI7/rY7rtqX46MyinLbShCyyH0VUrG+Mk6sAsLIjyHHpDntWWCtYKQOqn7vVzfpyxM GJkMP4gEivspjxWH+ldxGHtWugn4BBbhoMh508N6kLOAb6HssqjZEWPwvHiNeBuzMd0h EAOvxdEN1HGMqkDX5U5Fw+5Zh0YVoMCJwWFQ3wkZl/3A8tjG8Z/YMD28MqvdFlj3rgdD gIcnNWghil00Wg/tRCqLs0ULiG24YS0hZd0EaivttzOMjF8k1TX+DuREq0vL3gbJs0vI T3tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=x4jQaQsbe3rxQbBMS3KOiu29GwWPzFsOijcVGZ2KVLo=; b=FCpx4YE9TdZ/gj12Pp5LKzrXlVlYBWFqVDmWOI/e0XdAn35aDCfWU57Lqx29ip47gr Ls0jFSpaWTjbZXRhG4NaVjLUwh2Xd/+ixRC714EMZ2uP5hOFSykZbGFcYNA0RaD7j/lP 2/nBIk9uNqzmWWL2aI0xk1orGKXjmt3D2p0di3uvw6jggXnM0I3Nnacevl4J4KYpnwhc 4KFbWqrokK3PTbX2pQW/5muEbZoPmeXTz3h+YAokiykHaNZFaUPuYhoTQqxLSynhfGIX fe3JiUQ9JuDFqKL+BZ7M/eiEwcR5XRMqUdMM+AtPPScapaqH62O9GJbwAQslKmCJS+kw 14+A== X-Gm-Message-State: AA6/9RmqmaiuOOJ9Ct2NLvmSCRakpo+y980VqjGY5tjszkSwh1gl5iCbnW11Pm7UNLoNDQ== X-Received: by 10.25.66.72 with SMTP id p69mr5637196lfa.82.1476887000791; Wed, 19 Oct 2016 07:23:20 -0700 (PDT) Received: from t450s.lan (89-92-98-28.hfc.dyn.abo.bbox.fr. [89.92.98.28]) by smtp.googlemail.com with ESMTPSA id f65sm10755535lji.19.2016.10.19.07.23.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 07:23:20 -0700 (PDT) From: Gary Bisson To: buildroot@busybox.net Date: Wed, 19 Oct 2016 16:23:09 +0200 Message-Id: <20161019142309.15628-5-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161019142309.15628-1-gary.bisson@boundarydevices.com> References: <20161019142309.15628-1-gary.bisson@boundarydevices.com> Cc: thomas.petazzoni@free-electrons.com Subject: [Buildroot] [PATCH 4/4] mfgtools: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "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 --- 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))