[1/3] package/uuu: new package

Message ID 20220604114155.1647777-1-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [1/3] package/uuu: new package
Related show

Commit Message

Dario Binacchi June 4, 2022, 11:41 a.m. UTC
UUU (Universal Update Utility) is a Freescale/NXP I.MX Chip image deploy
tools. It is an evolution of MFGTools (aka MFGTools v3). For this and
for backward compatibility we have created a new package instead of
updating the mfgtools package.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 DEVELOPERS                 |  3 +++
 package/Config.in.host     |  1 +
 package/uuu/Config.in.host | 18 ++++++++++++++++++
 package/uuu/readme.txt     | 13 +++++++++++++
 package/uuu/uuu.hash       |  4 ++++
 package/uuu/uuu.mk         | 19 +++++++++++++++++++
 6 files changed, 58 insertions(+)
 create mode 100644 package/uuu/Config.in.host
 create mode 100644 package/uuu/readme.txt
 create mode 100644 package/uuu/uuu.hash
 create mode 100644 package/uuu/uuu.mk

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 71cc3da6d70b..191acbd97333 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -650,6 +650,9 @@  F:	package/lua-cjson/
 F:	package/luaexpat/
 F:	package/xinetd/
 
+N:	Dario Binacchi <dario.binacchi@amarula.solutions.com>
+F:	package/uuu/
+
 N:	Dario Binacchi <dariobin@libero.it>
 F:	package/davinci-bootcount/
 F:	package/libmnl/
diff --git a/package/Config.in.host b/package/Config.in.host
index cd1c34b5a3d9..d00547d324a5 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -96,6 +96,7 @@  menu "Host utilities"
 	source "package/uboot-tools/Config.in.host"
 	source "package/util-linux/Config.in.host"
 	source "package/utp_com/Config.in.host"
+	source "package/uuu/Config.in.host"
 	source "package/vboot-utils/Config.in.host"
 	source "package/xorriso/Config.in.host"
 	source "package/zip/Config.in.host"
diff --git a/package/uuu/Config.in.host b/package/uuu/Config.in.host
new file mode 100644
index 000000000000..017e37517d0e
--- /dev/null
+++ b/package/uuu/Config.in.host
@@ -0,0 +1,18 @@ 
+config BR2_PACKAGE_HOST_UUU
+	bool "host uuu"
+	depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-libusb
+	help
+	  UUU (Universal Update Utility) is Freescale/NXP I.MX Chip
+	  image deploy tool. UUU is an evolution of MFGTools
+	  (aka MFGTools v3).
+
+	  To be able to run uuu without root privileges, execute the
+	  following steps:
+
+            sudo sh -c "uuu -udev >> /etc/udev/rules.d/70-uuu.rules"
+            sudo udevadm control --reload
+
+	  https://github.com/NXPmicro/mfgtools
+
+comment "host uuu needs a toolchain w/ host gcc >= 4.9"
+	depends on !BR2_HOST_GCC_AT_LEAST_4_9
diff --git a/package/uuu/readme.txt b/package/uuu/readme.txt
new file mode 100644
index 000000000000..80dd90b93384
--- /dev/null
+++ b/package/uuu/readme.txt
@@ -0,0 +1,13 @@ 
+uuu Howto
+=========
+
+Running uuu without root privileges
+-----------------------------------
+
+Accessing USB devices on Linux requires root privileges by default.
+To be able to run uuu without root priviles, execute the following
+steps:
+
+  sudo sh -c "uuu -udev >> /etc/udev/rules.d/70-uuu.rules"
+  sudo udevadm control --reload
+
diff --git a/package/uuu/uuu.hash b/package/uuu/uuu.hash
new file mode 100644
index 000000000000..10efff0337a1
--- /dev/null
+++ b/package/uuu/uuu.hash
@@ -0,0 +1,4 @@ 
+# locally computed
+sha256  4fda8db488c4d3a98c2480c47b41907ad26b714c6400dd0a202baab4c17b0a9b  uuu-1.4.193.tar.gz
+sha256  cc8d47f7b9260f6669ecd41c24554c552f17581d81ee8fc602c6d23edb8bf495  LICENSE
+sha256  77b90738ae98b7958d34d9f96caf2671210a133427f8f6b784914b54f406c29b  README.md
diff --git a/package/uuu/uuu.mk b/package/uuu/uuu.mk
new file mode 100644
index 000000000000..550c42af8d86
--- /dev/null
+++ b/package/uuu/uuu.mk
@@ -0,0 +1,19 @@ 
+################################################################################
+#
+# uuu
+#
+################################################################################
+
+UUU_VERSION = 1.4.193
+UUU_SITE = $(call github,NXPmicro,mfgtools,uuu_$(UUU_VERSION))
+UUU_LICENSE = BSD 3-Clause "New" or "Revised" License
+UUU_LICENSE_FILES = LICENSE README.md
+HOST_UUU_DEPENDENCIES = host-bzip2 host-zlib host-libusb
+
+define SET_VERSION
+	echo $(UUU_VERSION) > $(@D)/.tarball-version
+endef
+
+HOST_UUU_POST_EXTRACT_HOOKS += SET_VERSION
+
+$(eval $(host-cmake-package))