From patchwork Mon Apr 13 21:42:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Krause?= X-Patchwork-Id: 1269963 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embedded.rocks Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" header.d=embedded.rocks header.i=@embedded.rocks header.a=rsa-sha256 header.s=default header.b=CbzCm2vs; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 491MYV1Lhhz9sSM for ; Tue, 14 Apr 2020 07:43:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C235086E5C; Mon, 13 Apr 2020 21:43:06 +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 tjXkmZjfZYmj; Mon, 13 Apr 2020 21:43:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 9987687B3E; Mon, 13 Apr 2020 21:43:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id C0EED1BF3CE for ; Mon, 13 Apr 2020 21:43:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id B7DD886E1D for ; Mon, 13 Apr 2020 21:43:02 +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 Qaq10ZIVfXlS for ; Mon, 13 Apr 2020 21:43:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.141]) by hemlock.osuosl.org (Postfix) with ESMTPS id 0E4B286DF1 for ; Mon, 13 Apr 2020 21:43:01 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 34D9416005C for ; Mon, 13 Apr 2020 23:42:58 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 491MYF5Kq3z9rxK; Mon, 13 Apr 2020 23:42:57 +0200 (CEST) Authentication-Results: mail.embedded.rocks (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=embedded.rocks DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embedded.rocks; h=content-transfer-encoding:content-type:content-type :mime-version:x-mailer:message-id:date:date:subject:subject:from :from:received:received; s=default; t=1586814175; x=1587418976; bh=vOsq51IFt02S3vay4nvR+ECd1tLTXkK4tlxtn5BVajE=; b=CbzCm2vscETi 9vf7Lc02IexYXNj6NRRjmUjCGsUvHeX0yGxTTzBOMkJXsFBGosZ1CPWXagL0tPgB KbP+Ha+vXKXCQD7zHHm7dHJYL1yxUObOONOILqCJ9otJBTp+mh/6dKvJWDgbPbTQ OfeGeAneHxecWw06zMS8fkiNvg/bJxgXJBWkS0J/Mpty53lsL5g7H/CrNPCH4FAP bvo3UejwbwekAGq2pBHhGTsM3skPwwRu3cTucZTf0Q7ac9Qm52ldu+FbKOg8a3Qt vjK1tKa4qp6nPBaUGlAHIj6J+yKud0n8Dx64nf3pI/URJIfePD1J+9zZjxcdyKMa BVkYFxm2dQ== Received: from mail.embedded.rocks ([127.0.0.1]) by localhost (mail.embedded.rocks [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id pkUiV5O_62rS; Mon, 13 Apr 2020 23:42:55 +0200 (CEST) Received: from nzxt.fritz.box (unknown [83.236.24.225]) (Authenticated sender: joerg.krause@embedded.rocks) by mail.embedded.rocks (Postfix) with ESMTPSA; Mon, 13 Apr 2020 23:42:55 +0200 (CEST) From: =?utf-8?q?J=C3=B6rg_Krause?= To: buildroot@buildroot.org Date: Mon, 13 Apr 2020 23:42:49 +0200 Message-Id: <20200413214249.206017-1-joerg.krause@embedded.rocks> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v3 1/1] package/mfgtools: bump to version 1.3.154 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gary Bisson Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The version 0.02 was a pre-release and is dated from Nov 20, 2017. Meanwhile: * the repo owner switch to NXPmicro * latest version is 1.3.154 * the build system is CMake * the license is BSD-3 only * update the license hash as the copyright year and the owner has changed * drop the readme.txt file as is outdated * drop patch, which is not needed with the new version * update dependencies Note, that mfgtools uses git to define a version string `GIT_VERSION`. It does so even when building from a source tarball (automatically generated by github). The problem is, that git provides the version information of Buildroot and mfgtools uses this version information to do a runtime check to detect outdated command list scripts. We use a hook which the version generation script provides to write the correct version string. Signed-off-by: Jörg Krause --- v3: * bump to latest version 1.3.154 * adapt version string hook to changes done upstream * add optional host OpenSSL dependency to add support for https download (introduced in 1.3.102) v2: * fix URL in Config.in.host * overwrite gen_ver.sh instead of patching it and creating gitversion.h [suggested by Arnout] --- ...onflicting-declaration-of-__time64_t.patch | 27 -------- package/mfgtools/Config.in.host | 17 +++-- package/mfgtools/mfgtools.hash | 5 +- package/mfgtools/mfgtools.mk | 40 +++++------ package/mfgtools/readme.txt | 69 ------------------- 5 files changed, 31 insertions(+), 127 deletions(-) delete mode 100644 package/mfgtools/0001-lnx_def.h-fix-conflicting-declaration-of-__time64_t.patch delete mode 100644 package/mfgtools/readme.txt diff --git a/package/mfgtools/0001-lnx_def.h-fix-conflicting-declaration-of-__time64_t.patch b/package/mfgtools/0001-lnx_def.h-fix-conflicting-declaration-of-__time64_t.patch deleted file mode 100644 index 7d0d3974a2..0000000000 --- a/package/mfgtools/0001-lnx_def.h-fix-conflicting-declaration-of-__time64_t.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1af7bc09451e0b779f7bfb0dcc58ffb3abe9c584 Mon Sep 17 00:00:00 2001 -From: Gary Bisson -Date: Tue, 11 Feb 2020 15:30:12 +0100 -Subject: [PATCH] lnx_def.h: fix conflicting declaration of __time64_t - -Signed-off-by: Gary Bisson ---- - MfgToolLib/lnx_def.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/MfgToolLib/lnx_def.h b/MfgToolLib/lnx_def.h -index c6869dd..a38bb99 100644 ---- a/MfgToolLib/lnx_def.h -+++ b/MfgToolLib/lnx_def.h -@@ -124,7 +124,9 @@ typedef unsigned long * ULONG_PTR; - typedef char * LPOLESTR; - typedef void * HDEVINFO; - typedef unsigned long long ULONGLONG; -+#ifndef __time64_t - typedef long long __time64_t; -+#endif - typedef long long __int64; - typedef unsigned long DWORD_PTR; - typedef unsigned int UINT; --- -2.25.0 - diff --git a/package/mfgtools/Config.in.host b/package/mfgtools/Config.in.host index 6f2f3a3268..061a2f5238 100644 --- a/package/mfgtools/Config.in.host +++ b/package/mfgtools/Config.in.host @@ -2,9 +2,16 @@ 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. + Freescale/NXP i.MX Chip image deploy tools. - https://github.com/codeauroraforum/mfgtools + https://github.com/NXPmicro/mfgtools + +if BR2_PACKAGE_HOST_MFGTOOLS + +config BR2_PACKAGE_HOST_MFGTOOLS_SSL + bool "https support" + select BR2_PACKAGE_HOST_OPENSSL + help + Enable https support. + +endif diff --git a/package/mfgtools/mfgtools.hash b/package/mfgtools/mfgtools.hash index 0b215f5295..754a5782da 100644 --- a/package/mfgtools/mfgtools.hash +++ b/package/mfgtools/mfgtools.hash @@ -1,4 +1,3 @@ # locally computed -sha256 055d71227d18883d6e8bc9e854c076015f9a7749820a94272e19071bf0b25c89 mfgtools-0.02.tar.gz -sha256 2655559a6bb1179eae514f5c7166f4ede4f2453efa9cf4dc3c045cab5d57dede LICENSE -sha256 0963b6e5086bf454265b0f57821a02b681d1211e40ad74c310231cb4d94815c9 README.txt +sha256 19f34b6152786b662c7ba755ad1b05421803ebb4d87b2aaccde8e1cf25efd987 mfgtools-1.3.154.tar.gz +sha256 cc8d47f7b9260f6669ecd41c24554c552f17581d81ee8fc602c6d23edb8bf495 LICENSE diff --git a/package/mfgtools/mfgtools.mk b/package/mfgtools/mfgtools.mk index 48ce5dda28..04165c35da 100644 --- a/package/mfgtools/mfgtools.mk +++ b/package/mfgtools/mfgtools.mk @@ -4,31 +4,25 @@ # ################################################################################ -MFGTOOLS_VERSION = 0.02 -MFGTOOLS_SITE = $(call github,codeauroraforum,mfgtools,v$(MFGTOOLS_VERSION)) -MFGTOOLS_SUBDIR = MfgToolLib -MFGTOOLS_LICENSE = BSD-3-Clause or CPOL -MFGTOOLS_LICENSE_FILES = LICENSE README.txt -HOST_MFGTOOLS_DEPENDENCIES = host-libusb +MFGTOOLS_VERSION = 1.3.154 +MFGTOOLS_SITE = $(call github,NXPmicro,mfgtools,uuu_$(MFGTOOLS_VERSION)) +MFGTOOLS_LICENSE = BSD-3-Clause +MFGTOOLS_LICENSE_FILES = LICENSE +HOST_MFGTOOLS_DEPENDENCIES = host-libusb host-libzip host-zlib -HOST_MFGTOOLS_CFLAGS = \ - $(HOST_CFLAGS) $(HOST_LDFLAGS) -std=c++11 -lpthread \ - -L$(@D)/MfgToolLib -lMfgToolLib -I$(@D)/MfgToolLib \ - -lusb-1.0 -I$(HOST_DIR)/include/libusb-1.0 \ - -fpermissive -Wno-write-strings +ifeq ($(BR2_PACKAGE_HOST_MFGTOOLS_SSL),y) +HOST_MFGTOOLS_DEPENDENCIES += host-openssl +endif -define HOST_MFGTOOLS_CLI_BUILD - $(HOST_CONFIGURE_OPTS) $(MAKE) CC="$(HOSTCXX)" \ - CFLAGS="$(HOST_MFGTOOLS_CFLAGS)" -C $(@D)/TestPrgm -endef - -HOST_MFGTOOLS_POST_BUILD_HOOKS += HOST_MFGTOOLS_CLI_BUILD - -define HOST_MFGTOOLS_INSTALL_CMDS - $(INSTALL) -D -m 755 $(@D)/MfgToolLib/libMfgToolLib.so \ - $(HOST_DIR)/lib/libMfgToolLib.so - $(INSTALL) -D -m 755 $(@D)/TestPrgm/mfgtoolcli \ - $(HOST_DIR)/bin/mfgtoolcli +# Version string generation is broken in mfgtools as it relies on git, even when +# building from a source tarball. The version string is used by mfgtools to do a +# runtime check to detect outdated command list scripts. The script used to +# create the version string allows to set a custom version string by creating a +# file named `.tarball-version`. Use this hook to create this file, so mfgtools +# runs with the correct version string (preceeded by `uuu_` as done by default). +define HOST_MFGTOOLS_CREATE_VERSION_FILE + echo "uuu_$(MFGTOOLS_VERSION)" > $(@D)/.tarball-version endef +HOST_MFGTOOLS_POST_PATCH_HOOKS += HOST_MFGTOOLS_CREATE_VERSION_FILE $(eval $(host-cmake-package)) diff --git a/package/mfgtools/readme.txt b/package/mfgtools/readme.txt deleted file mode 100644 index 320e6ec493..0000000000 --- a/package/mfgtools/readme.txt +++ /dev/null @@ -1,69 +0,0 @@ -MfgTools Howto -============== - -1. Build your mfgtool image - -Make sure to enable the following Buildroot options: - -BR2_PACKAGE_FREESCALE_IMX=y -BR2_PACKAGE_IMX_UUC=y -BR2_TARGET_ROOTFS_CPIO=y -BR2_TARGET_ROOTFS_CPIO_GZIP=y -BR2_TARGET_ROOTFS_CPIO_UIMAGE=y - -Also modify your kernel configuration to have: - -CONFIG_USB_GADGET=y -CONFIG_USB_MASS_STORAGE=y -CONFIG_FSL_UTP=y -CONFIG_MMC_BLOCK_MINORS=16 - -2. Go into the output and create the necessary folders - -$ cd output -$ mkdir -p "Profiles/Linux/OS Firmware/firmware" - -3. Create your XML update script named ucl2.xml - -You can find a sample XML at: - -$ wget https://storage.googleapis.com/boundarydevices.com/ucl2.xml \ - -O Profiles/Linux/OS\ Firmware/ucl2.xml - -4. Copy the U-Boot, Kernel and initramfs images to the appropriate -folder - -$ cp images/u-boot.imx images/zImage images/imx6q-sabrelite.dtb \ - images/rootfs.cpio.uboot Profiles/Linux/OS\ Firmware/firmware/ - -5. Copy the prebuilt binaries to be flashed - -Depending on your ucl2.xml file, the sample doesn't flash anything. - -6. Run the MfgTools client: - -$ ./host/bin/mfgtoolcli -l mmc -s uboot_defconfig=imx \ - -s dtbname=imx6q-sabrelite.dtb -s initramfs=rootfs.cpio.uboot \ - -s mmc=1 -p 1 - -For more information about the tools options, please read the -"Manufacturing Tool V2 Quick Start Guide.docx" documentation contained -in every mfgtools package from NXP website[1]. - -Note: All the above commands require your Linux host user to have -permissions to access the USB devices. Please make sure to have udev -rules that allow the user to communicate with the BootROM IDs -(Freescale USB recovery) as well as the one used for the UTP Linux -image (0x066F:0x37FF). Using 'sudo' in front of the mfgtoolcli -command would also grant you the necessary permission but it is *not* -recommended. - -Also, if your U-Boot environment doesn't include mfgtools bootargs, -make sure to set the following: - -setenv bootargs "console=${console},${baudrate} g_mass_storage.stall=0 \ - g_mass_storage.removable=1 g_mass_storage.idVendor=0x066F \ - g_mass_storage.idProduct=0x37FF g_mass_storage.iSerialNumber=\"\" \ - g_mass_storage.file=/fat" - -[1] http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i.mx-6-series-software-and-development-tool-resources:IMX6_SW