Skip to contentSkip to conversation

fwts: new package

PATCH New Erico Nunes 2 participants 4 messages Oct 4, 2016 – Oct 7, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 fwts: new package

Firmware Test Suite (FWTS) is a test suite that performs sanity checks on firmware. It is intended to identify BIOS and ACPI errors and if appropriate it will try to explain the errors and give advice to help workaround or fix firmware bugs.

libfdt (dtc) is an optional dependency as fwts checks for it during configure, but will only disable a few tests (dt_base, dt_sysinfo) if it is not available.

This has been build-tested in x86, x86_64 and aarch64 and run-tested in x86_64 and aarch64 with EFI firmware.

This package has been limited to x86, x86_64 and aarch64 architectures as it fails to build with linking errors related to ACPI functions when building for other architectures. As it is less likely that this will be used for the other architectures, they are disabled for now.

---
 package/Config.in                               |  1 +
 package/fwts/0001-build-do-not-use-Werror.patch | 69 +++++++++++++++++++++++++
 package/fwts/Config.in                          | 26 ++++++++++
 package/fwts/fwts.hash                          |  2 +
 package/fwts/fwts.mk                            | 16 ++++++
 5 files changed, 114 insertions(+)
 create mode 100644 package/fwts/0001-build-do-not-use-Werror.patch
 create mode 100644 package/fwts/Config.in
 create mode 100644 package/fwts/fwts.hash
 create mode 100644 package/fwts/fwts.mk
package/Config.in +1 -0
index ef82b2e..333bec5 100644
@@ -76,6 +76,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/dt/Config.in"
 	source "package/duma/Config.in"
 	source "package/fio/Config.in"
+	source "package/fwts/Config.in"
 	source "package/gdb/Config.in"
 	source "package/google-breakpad/Config.in"
 	source "package/iozone/Config.in"
package/fwts/0001-build-do-not-use-Werror.patch new file +69 -0

69 lines not on this page · raw message

package/fwts/Config.in new file +26 -0
new file mode 100644
index 0000000..4e77d67
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_FWTS
+	bool "fwts"
+	depends on BR2_i386 || BR2_x86_64 || BR2_aarch64
+	depends on BR2_USE_WCHAR # libglib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	depends on BR2_USE_MMU # libglib2
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
+	depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_JSON_C
+	help
+	  Firmware Test Suite (FWTS) is a test suite that performs
+	  sanity checks on firmware. It is intended to identify BIOS and
+	  ACPI errors and if appropriate it will try to explain the
+	  errors and give advice to help workaround or fix firmware
+	  bugs.
+
+	  dtc (libfdt) is an optional dependency for fdt related tests.
+
+	  https://wiki.ubuntu.com/FirmwareTestSuite
+
+comment "fwts needs a glibc toolchain w/ wchar, threads"
+	depends on BR2_i386 || BR2_x86_64 || BR2_aarch64
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_USES_GLIBC
package/fwts/fwts.hash new file +2 -0
new file mode 100644
index 0000000..a3e5758
@@ -0,0 +1,2 @@
+# Hash from: http://fwts.ubuntu.com/release/SHA256SUMS
+sha256 4bab7a9daa6def8951b160e9f2c14b203459881d0a1279cb19329bec727c9f2d fwts-V16.09.00.tar.gz
package/fwts/fwts.mk new file +16 -0
new file mode 100644
index 0000000..7e548f1
@@ -0,0 +1,16 @@
+################################################################################
+#
+# fwts
+#
+################################################################################
+
+FWTS_VERSION = V16.09.00
+FWTS_SITE = http://fwts.ubuntu.com/release
+FWTS_STRIP_COMPONENTS = 0
+FWTS_LICENSE = GPLv2, LGPL, Custom
+FWTS_LICENSE_FILES = debian/copyright
+FWTS_AUTORECONF = YES
+FWTS_DEPENDENCIES = host-pkgconf json-c libglib2 \
+	$(if $(BR2_PACKAGE_DTC),dtc)
+
+$(eval $(autotools-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 DEVELOPERS: add entry for fwts

---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)
DEVELOPERS +1 -0
index 0315338..5840c08 100644
@@ -418,6 +418,7 @@ F:	package/acpica/
 F:	package/acpitool/
 F:	package/efibootmgr/
 F:	package/efivar/
+F:	package/fwts/
 F:	package/spi-tools/
 F:	package/xdotool/
 
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 DEVELOPERS: add entry for fwts

Hello,

Quoted 4 lines · Erico Nunes
---
 DEVELOPERS | 1 +
 1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 fwts: new package

In reply to Erico Nunes

Hello,

package/fwts/Config.in line 7

Quoted 9 lines · Erico Nunes

+++ b/package/fwts/Config.in

package/fwts/Config.in new file +7 -0
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_FWTS
+	bool "fwts"
+	depends on BR2_i386 || BR2_x86_64 || BR2_aarch64
+	depends on BR2_USE_WCHAR # libglib2
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	depends on BR2_USE_MMU # libglib2
+	depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c

You forgot to propagate this dependency...

Quoted 7 lines
package/fwts/Config.in new file +7 -0
+	depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_JSON_C
+	help
+	  Firmware Test Suite (FWTS) is a test suite that performs
+	  sanity checks on firmware. It is intended to identify BIOS and
+	  ACPI errors and if appropriate it will try to explain the

package/fwts/Config.in line 24

Quoted 10 lines
package/fwts/Config.in new file +10 -0
+	  errors and give advice to help workaround or fix firmware
+	  bugs.
+
+	  dtc (libfdt) is an optional dependency for fdt related tests.
+
+	  https://wiki.ubuntu.com/FirmwareTestSuite
+
+comment "fwts needs a glibc toolchain w/ wchar, threads"
+	depends on BR2_i386 || BR2_x86_64 || BR2_aarch64
+	depends on BR2_USE_MMU

... here.

So I've added that.

package/fwts/fwts.mk line 10

Quoted 6 lines
package/fwts/fwts.mk new file +6 -0
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_TOOLCHAIN_USES_GLIBC
+FWTS_VERSION = V16.09.00
+FWTS_SITE = http://fwts.ubuntu.com/release
+FWTS_STRIP_COMPONENTS = 0
+FWTS_LICENSE = GPLv2, LGPL, Custom

The LGPL version is 2.1, so I've changed LGPL to LGPLv2.1.

Committed with those issues fixed. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com