[Buildroot] [git commit] package/firmware-utils: add package

Arnout Vandecappelle (Essensium/Mind) arnout at mind.be
Fri Oct 15 20:45:21 UTC 2021


commit: https://git.buildroot.net/buildroot/commit/?id=21d2a0c2ecfdddb250007ce75d1839ba81278e5b
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

This package provides a set of tools originally developed for the
OpenWrt project. They allow working with various firmware formats that
are required for flashing new images on embedded devices.

One of tools (mkhilinkfw) depends on OpenSSL and doesn't support any
other SSL library (like wolfSSL) directly. It can be used with wolfSSL
using its compatibility layer though.

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
[Arnout: add comment about missing license files]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout at mind.be>
---
 DEVELOPERS                                 |  3 +++
 package/Config.in                          |  1 +
 package/Config.in.host                     |  1 +
 package/firmware-utils/Config.in           | 15 ++++++++++++
 package/firmware-utils/Config.in.host      | 12 +++++++++
 package/firmware-utils/firmware-utils.hash |  2 ++
 package/firmware-utils/firmware-utils.mk   | 39 ++++++++++++++++++++++++++++++
 7 files changed, 73 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index f6c39516b5..19f6d95270 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2260,6 +2260,9 @@ N:	Rafal Susz <rafal.susz at gmail.com>
 F:	board/avnet/s6lx9_microboard/
 F:	configs/s6lx9_microboard_defconfig
 
+N:	Rafał Miłecki <rafal at milecki.pl>
+F:	package/firmware-utils/
+
 N:	Rahul Bedarkar <rahulbedarkar89 at gmail.com>
 F:	package/cxxtest/
 F:	package/gflags/
diff --git a/package/Config.in b/package/Config.in
index 7971726875..48f365d773 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -213,6 +213,7 @@ menu "Filesystem and flash utilities"
 	source "package/exfat-utils/Config.in"
 	source "package/exfatprogs/Config.in"
 	source "package/f2fs-tools/Config.in"
+	source "package/firmware-utils/Config.in"
 	source "package/flashbench/Config.in"
 	source "package/fscryptctl/Config.in"
 	source "package/fuse-overlayfs/Config.in"
diff --git a/package/Config.in.host b/package/Config.in.host
index a0ec9bc1ab..6e5a5c5fc5 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -28,6 +28,7 @@ menu "Host utilities"
 	source "package/f2fs-tools/Config.in.host"
 	source "package/faketime/Config.in.host"
 	source "package/fatcat/Config.in.host"
+	source "package/firmware-utils/Config.in.host"
 	source "package/fwup/Config.in.host"
 	source "package/genext2fs/Config.in.host"
 	source "package/genimage/Config.in.host"
diff --git a/package/firmware-utils/Config.in b/package/firmware-utils/Config.in
new file mode 100644
index 0000000000..9e47263d73
--- /dev/null
+++ b/package/firmware-utils/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_FIRMWARE_UTILS
+	bool "firmware-utils"
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_ZLIB
+	help
+	  Firmware utils are tools that can be used for managing
+	  platform / device / vendor specific firmware images. Depending
+	  on a specific tool it may be possible to read information,
+	  extract data, modify or build an image from a scratch.
+
+	  A common target usage of firmware utils is to upgrade kernel
+	  and / or rootfs. Depending on device it may be required to
+	  extract a part of firmware image and flash it.
+
+	  https://git.openwrt.org/?p=project/firmware-utils.git;a=summary
diff --git a/package/firmware-utils/Config.in.host b/package/firmware-utils/Config.in.host
new file mode 100644
index 0000000000..4aaec05001
--- /dev/null
+++ b/package/firmware-utils/Config.in.host
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_HOST_FIRMWARE_UTILS
+	bool "host firmware-utils"
+	help
+	  Firmware utils are tools that can be used for managing
+	  platform / device / vendor specific firmware images. Depending
+	  on a specific tool it may be possible to read information,
+	  extract data, modify or build an image from a scratch.
+
+	  A common host usage of firmware utils is to build a bootloader
+	  supported image.
+
+	  https://git.openwrt.org/?p=project/firmware-utils.git;a=summary
diff --git a/package/firmware-utils/firmware-utils.hash b/package/firmware-utils/firmware-utils.hash
new file mode 100644
index 0000000000..152b0753c1
--- /dev/null
+++ b/package/firmware-utils/firmware-utils.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  57b95dac6b011f4c773d6e661f7eb5b2c992079901f87610d1ed16aaacb22542  firmware-utils-2f70fedc92bd08f9e182fcc388688f36310a597d-br1.tar.gz
diff --git a/package/firmware-utils/firmware-utils.mk b/package/firmware-utils/firmware-utils.mk
new file mode 100644
index 0000000000..93f56dbb36
--- /dev/null
+++ b/package/firmware-utils/firmware-utils.mk
@@ -0,0 +1,39 @@
+################################################################################
+#
+# firmware-utils
+#
+################################################################################
+
+FIRMWARE_UTILS_VERSION = 2f70fedc92bd08f9e182fcc388688f36310a597d
+FIRMWARE_UTILS_SITE = git://git.openwrt.org/project/firmware-utils.git
+FIRMWARE_UTILS_LICENSE = \
+	BSD-2-Clause (tplink-safeloader), \
+	BSD-3-Clause (seama), \
+	GPL-2.0 (add_header, bcmalgo, buffalo-enc, buffalo-lib, buffalo-tag, \
+		 buffalo-tftp, dgfirmware, dns313-header, edimax_fw_header, \
+		 fix-u-media-header, hcsmakeimage, mkbrncmdline, mkbrnimg, \
+		 mkbuffaloimg, mkcameofw, mkcasfw, mkdapimg, mkdapimg2, \
+		 mkdhpimg, mkdniimg, mkhilinkfw, mkmerakifw-old, mkmerakifw, \
+		 mkplanexfw, mkporayfw, mkrasimage, mkrtn56uimg, mksenaofw, \
+		 mksercommfw, mktitanimg, mktplinkfw-lib, mktplinkfw, \
+		 mktplinkfw2, mkwrggimg, mkwrgimg, mkzcfw, mkzynfw, \
+		 mkzyxelzldfw osbridge-crc, pc1crypt, srec2bin, trx2edips, \
+		 uimage_padhdr, wrt400n, zyimage, zytrx), \
+	GPL-2.0+ (addpattern, asustrx, bcm4908asus, bcm4908kernel, dgn3500sum, \
+		  encode_crc, jcgimage, lzma2eva, makeamitbin, mkchkimg, \
+		  mkcsysimg, mkdlinkfw-lib, mkdlinkfw, mkedimaximg, mkfwimage, \
+		  mkfwimage2, mkheader_gemtek, mkmylofw, motorola-bin, \
+		  nec-enc, oseama, otrx, ptgen, sign_dlink_ru, spw303v, trx, \
+		  uimage_sgehdr, xiaomifw, xorimage, zyxbcm), \
+	GPL-2.0 OR GPL-3.0 (nand_ecc), \
+	GPL-2.0+ OR MIT (lxlfw), \
+	UNKNOWN (imagetag, trx2usr)
+# No explicit license file. We could use the source files, but that would mean
+# we need to use all of them. If we need to do that, we can just as well leave
+# it to the integrator to get them from the sources
+
+FIRMWARE_UTILS_DEPENDENCIES = openssl zlib
+HOST_FIRMWARE_UTILS_DEPENDENCIES = host-openssl host-zlib
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))


More information about the buildroot mailing list