added my Recipes
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
From ee787b53d734cd952c170c9303d213d3dd18a86f Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 8 Jun 2017 16:49:50 -0700
|
||||
Subject: [PATCH 1/6] Add correct printf qualifier for off_t
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/bios/ebda_region/ebda_region.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/bios/ebda_region/ebda_region.c b/src/bios/ebda_region/ebda_region.c
|
||||
index b70ced10..947a24bd 100644
|
||||
--- a/src/bios/ebda_region/ebda_region.c
|
||||
+++ b/src/bios/ebda_region/ebda_region.c
|
||||
@@ -83,9 +83,9 @@ static int ebda_test1(fwts_framework *fw)
|
||||
if ((entry != NULL) &&
|
||||
(entry->type == FWTS_MEMORY_MAP_RESERVED ||
|
||||
entry->type == FWTS_MEMORY_MAP_ACPI)) {
|
||||
- fwts_passed(fw, "EBDA region mapped at 0x%lx and reserved as a %" PRId64
|
||||
+ fwts_passed(fw, "EBDA region mapped at 0x%jdx and reserved as a %" PRId64
|
||||
"K region in the %s table at 0x%" PRIx64 "..0x%" PRIx64 ".",
|
||||
- ebda_addr,
|
||||
+ (intmax_t)ebda_addr,
|
||||
(entry->end_address - entry->start_address) / 1024,
|
||||
memory_map_name,
|
||||
entry->start_address,
|
||||
@@ -93,9 +93,9 @@ static int ebda_test1(fwts_framework *fw)
|
||||
} else
|
||||
fwts_failed(fw, LOG_LEVEL_MEDIUM,
|
||||
"EBDAMappedNotReserved",
|
||||
- "EBDA region mapped at 0x%lx but not reserved in the %s table.",
|
||||
- ebda_addr, memory_map_name);
|
||||
-
|
||||
+ "EBDA region mapped at 0x%jdx but not reserved in the %s table.",
|
||||
+ (intmax_t)ebda_addr, memory_map_name);
|
||||
+
|
||||
return FWTS_OK;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
From 6135a318dd48787f1b6e1296c755d67575f44dc1 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 1 Dec 2022 15:18:55 -0800
|
||||
Subject: [PATCH] libfwtsiasl: Disable parallel builds of lex/bison files
|
||||
|
||||
Since they are using mv cmds they maybe conflicting with each other in
|
||||
highly parallelized build resulting in errors like
|
||||
|
||||
| mv dtcompilerparser.tab.c dtcompilerparser.c
|
||||
| mv dtcompilerparser.tab.c dtcompilerparser.c
|
||||
| cp dtcompilerparser.tab.h dtcompilerparser.y.h
|
||||
| mv dtcompilerparser.tab.c dtcompilerparser.c
|
||||
| mv: cannot stat 'dtcompilerparser.tab.c': No such file or directory
|
||||
| make[3]: *** [Makefile:4196: dtcompilerparser.c] Error 1
|
||||
| make[3]: *** Waiting for unfinished jobs....
|
||||
| mv: cannot stat 'dtcompilerparser.tab.c': No such file or directory
|
||||
| make[3]: *** [Makefile:4194: dtcompilerparser.y.h] Error 1
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/libfwtsiasl/Makefile.am | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/src/libfwtsiasl/Makefile.am
|
||||
+++ b/src/libfwtsiasl/Makefile.am
|
||||
@@ -58,32 +58,24 @@ aslcompiler.y: $(ASL_PARSER)
|
||||
aslcompilerlex.c: $(ASL_LEXER)
|
||||
${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(top_srcdir)/src/acpica/source/compiler/aslcompiler.l
|
||||
|
||||
-.NOTPARALLEL: aslcompiler.c
|
||||
+.NOTPARALLEL: aslcompiler.c aslcompiler.y.h
|
||||
aslcompiler.c aslcompiler.y.h: aslcompiler.y
|
||||
- ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^
|
||||
- mv aslcompiler.tab.c aslcompiler.c
|
||||
- cp aslcompiler.tab.h aslcompiler.y.h
|
||||
+ ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler --header=aslcompiler.y.h --output=aslcompiler.c $^
|
||||
|
||||
-.NOTPARALLEL: dtcompilerparserlex.c
|
||||
+.NOTPARALLEL: dtcompilerparserlex.c dtcompilerparser.c dtcompilerparser.y.h
|
||||
dtcompilerparserlex.c dtcompilerparser.c dtcompilerparser.y.h: $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.l $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y
|
||||
${LEX} ${AM_LFLAGS} -PDtCompilerParser -odtcompilerparserlex.c $<
|
||||
- ${YACC} ${AM_YFLAGS} -bdtcompilerparser -pDtCompilerParser $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y
|
||||
- mv dtcompilerparser.tab.c dtcompilerparser.c
|
||||
- cp dtcompilerparser.tab.h dtcompilerparser.y.h
|
||||
+ ${YACC} ${AM_YFLAGS} -bdtcompilerparser -pDtCompilerParser --header=dtcompilerparser.y.h --output=dtcompilerparser.c $(top_srcdir)/src/acpica/source/compiler/dtcompilerparser.y
|
||||
|
||||
-.NOTPARALLEL: dtparserlex.c
|
||||
+.NOTPARALLEL: dtparserlex.c dtparser.c dtparser.y.h
|
||||
dtparserlex.c dtparser.c dtparser.y.h: $(top_srcdir)/src/acpica/source/compiler/dtparser.l $(top_srcdir)/src/acpica/source/compiler/dtparser.y
|
||||
${LEX} ${AM_LFLAGS} -PDtParser -odtparserlex.c $<
|
||||
- ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(top_srcdir)/src/acpica/source/compiler/dtparser.y
|
||||
- mv dtparser.tab.c dtparser.c
|
||||
- cp dtparser.tab.h dtparser.y.h
|
||||
+ ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser --header=dtparser.y.h --output=dtparser.c $(top_srcdir)/src/acpica/source/compiler/dtparser.y
|
||||
|
||||
-.NOTPARALLEL: prparserlex.c
|
||||
+.NOTPARALLEL: prparserlex.c prparser.c prparser.y.h
|
||||
prparserlex.c prparser.c prparser.y.h: $(top_srcdir)/src/acpica/source/compiler/prparser.l $(top_srcdir)/src/acpica/source/compiler/prparser.y
|
||||
${LEX} ${AM_LFLAGS} -PPrParser -oprparserlex.c $<
|
||||
- ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(top_srcdir)/src/acpica/source/compiler/prparser.y
|
||||
- mv prparser.tab.c prparser.c
|
||||
- cp prparser.tab.h prparser.y.h
|
||||
+ ${YACC} ${AM_YFLAGS} -bprparser -pPrParser --header=prparser.y.h --output=prparser.c $(top_srcdir)/src/acpica/source/compiler/prparser.y
|
||||
|
||||
pkglib_LTLIBRARIES = libfwtsiasl.la
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
From 7317aba872f2bcf052a7db9fa3c7a7ce3c55dc6b Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Berg <bberg@redhat.com>
|
||||
Date: Mon, 21 Aug 2017 10:34:40 +0200
|
||||
Subject: [PATCH 3/6] Remove -Werror from build
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
src/Makefile.am | 2 +-
|
||||
src/lib/src/Makefile.am | 2 +-
|
||||
src/utilities/Makefile.am | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -13,7 +13,7 @@ AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/efi_runtime \
|
||||
-I$(top_srcdir)/smccc_test \
|
||||
-pthread \
|
||||
- -Wall -Werror -Wextra \
|
||||
+ -Wall -Wextra \
|
||||
-Wno-address-of-packed-member \
|
||||
-Wfloat-equal -Wmissing-declarations \
|
||||
-Wno-long-long -Wredundant-decls -Wshadow \
|
||||
--- a/src/lib/src/Makefile.am
|
||||
+++ b/src/lib/src/Makefile.am
|
||||
@@ -22,7 +22,7 @@ AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/src/acpica/source/include \
|
||||
-I$(top_srcdir)/src/acpica/source/compiler \
|
||||
-DDATAROOTDIR=\"$(datarootdir)\" \
|
||||
- -Wall -Werror -Wextra \
|
||||
+ -Wall -Wextra \
|
||||
-Wno-address-of-packed-member
|
||||
|
||||
pkglib_LTLIBRARIES = libfwts.la
|
||||
--- a/src/utilities/Makefile.am
|
||||
+++ b/src/utilities/Makefile.am
|
||||
@@ -16,7 +16,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
-AM_CPPFLAGS = -Wall -Werror -Wextra -DDATAROOTDIR=\"$(datarootdir)\" \
|
||||
+AM_CPPFLAGS = -Wall -Wextra -DDATAROOTDIR=\"$(datarootdir)\" \
|
||||
-I$(srcdir)/../lib/include
|
||||
|
||||
bin_PROGRAMS = kernelscan
|
||||
@@ -0,0 +1,28 @@
|
||||
From 9456f2f779d3ed4a134d55571d8bec78ad3b28c1 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 6 Jun 2017 07:37:20 -0700
|
||||
Subject: [PATCH 4/6] Define __SWORD_TYPE if not defined by libc
|
||||
|
||||
__SWORD_TYPE is internal to glibc, therefore
|
||||
check and define it if needed e.g. on musl
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/lib/src/fwts_uefi.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
--- a/src/lib/src/fwts_uefi.c
|
||||
+++ b/src/lib/src/fwts_uefi.c
|
||||
@@ -63,6 +63,10 @@ typedef struct {
|
||||
#define UEFI_IFACE_SYSFS (2) /* sysfs */
|
||||
#define UEFI_IFACE_EFIVARS (3) /* efivar fs */
|
||||
|
||||
+#ifndef __SWORD_TYPE
|
||||
+typedef __typeof__( ((struct statfs *)0)->f_type ) __SWORD_TYPE;
|
||||
+#endif
|
||||
+
|
||||
/* File system magic numbers */
|
||||
#define PSTOREFS_MAGIC ((__SWORD_TYPE)0x6165676C)
|
||||
#define EFIVARFS_MAGIC ((__SWORD_TYPE)0xde5e81e4)
|
||||
@@ -0,0 +1,25 @@
|
||||
From 53b9f97fb7faed043134f2ab738347b20379d32f Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 6 Jun 2017 07:39:28 -0700
|
||||
Subject: [PATCH 5/6] Undefine PAGE_SIZE
|
||||
|
||||
musl defines PAGE_SIZE and build complains
|
||||
of multiple definitions
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/lib/src/fwts_acpi_tables.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/src/lib/src/fwts_acpi_tables.c
|
||||
+++ b/src/lib/src/fwts_acpi_tables.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#define BIOS_START (0x000e0000) /* Start of BIOS memory */
|
||||
#define BIOS_END (0x000fffff) /* End of BIOS memory */
|
||||
#define BIOS_LENGTH (BIOS_END - BIOS_START) /* Length of BIOS memory */
|
||||
+#undef PAGE_SIZE
|
||||
#define PAGE_SIZE (4096)
|
||||
|
||||
static fwts_acpi_table_info tables[ACPI_MAX_TABLES];
|
||||
@@ -0,0 +1,58 @@
|
||||
From f723458eb649a9ad1d5d0e3dd6e801b284680fa7 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 8 Jun 2017 16:50:59 -0700
|
||||
Subject: [PATCH 6/6] use intptr_t to fix pointer-to-int-cast issues
|
||||
|
||||
uintptr_t is guaranteed to be wide enough that
|
||||
converting a void* to uintptr_t and back again
|
||||
will yield the original pointer value
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/lib/src/fwts_acpi_tables.c | 4 ++--
|
||||
src/lib/src/fwts_mmap.c | 2 +-
|
||||
src/lib/src/fwts_smbios.c | 2 +-
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
--- a/src/lib/src/fwts_acpi_tables.c
|
||||
+++ b/src/lib/src/fwts_acpi_tables.c
|
||||
@@ -171,7 +171,7 @@ static fwts_acpi_table_rsdp *fwts_acpi_g
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- if ((mem = fwts_mmap((off_t)addr, sizeof(fwts_acpi_table_rsdp))) == FWTS_MAP_FAILED)
|
||||
+ if ((mem = fwts_mmap((uintptr_t)addr, sizeof(fwts_acpi_table_rsdp))) == FWTS_MAP_FAILED)
|
||||
return NULL;
|
||||
|
||||
if (fwts_safe_memcpy(rsdp, mem, sizeof(fwts_acpi_table_rsdp)) != FWTS_OK) {
|
||||
@@ -484,7 +484,7 @@ static int fwts_acpi_load_tables_from_fi
|
||||
if ((rsdp = fwts_acpi_get_rsdp(fw, rsdp_addr, &rsdp_len)) == NULL)
|
||||
return FWTS_ERROR;
|
||||
|
||||
- fwts_acpi_add_table("RSDP", rsdp, (uint64_t)(off_t)rsdp_addr, rsdp_len, FWTS_ACPI_TABLE_FROM_FIRMWARE);
|
||||
+ fwts_acpi_add_table("RSDP", rsdp, (uint64_t)(uintptr_t)rsdp_addr, rsdp_len, FWTS_ACPI_TABLE_FROM_FIRMWARE);
|
||||
|
||||
/* Load any tables from XSDT if it's valid */
|
||||
if (rsdp->xsdt_address) {
|
||||
--- a/src/lib/src/fwts_mmap.c
|
||||
+++ b/src/lib/src/fwts_mmap.c
|
||||
@@ -82,7 +82,7 @@ int fwts_munmap(void *mem, const size_t
|
||||
off_t offset;
|
||||
|
||||
page_size = fwts_page_size();
|
||||
- offset = ((off_t)(mem)) & (page_size - 1);
|
||||
+ offset = ((uintptr_t)(mem)) & (page_size - 1);
|
||||
|
||||
if (munmap((void *)((uint8_t *)mem - offset), size + offset) < 0)
|
||||
return FWTS_ERROR;
|
||||
--- a/src/lib/src/fwts_smbios.c
|
||||
+++ b/src/lib/src/fwts_smbios.c
|
||||
@@ -78,7 +78,7 @@ static void *fwts_smbios_find_entry_uefi
|
||||
if ((addr = fwts_scan_efi_systab(smbios)) != NULL) {
|
||||
fwts_smbios_entry *mapped_entry;
|
||||
|
||||
- if ((mapped_entry = fwts_mmap((off_t)addr, size)) != FWTS_MAP_FAILED) {
|
||||
+ if ((mapped_entry = fwts_mmap((uintptr_t)addr, size)) != FWTS_MAP_FAILED) {
|
||||
if (fwts_safe_memcpy(entry, mapped_entry, size) == FWTS_OK) {
|
||||
(void)fwts_munmap(mapped_entry, size);
|
||||
*type = FWTS_SMBIOS;
|
||||
35
meta-openembedded/meta-oe/recipes-test/fwts/fwts_22.11.00.bb
Normal file
35
meta-openembedded/meta-oe/recipes-test/fwts/fwts_22.11.00.bb
Normal file
@@ -0,0 +1,35 @@
|
||||
SUMMARY = "Firmware testsuite"
|
||||
DESCRIPTION = "The tool fwts comprises of over fifty tests that are designed to exercise and test different aspects of a machine's firmware. Many of these tests need super user access to read BIOS data and ACPI tables, so the tool requires running with super user privileges (e.g. with sudo)."
|
||||
HOMEPAGE = "https://wiki.ubuntu.com/Kernel/Reference/fwts"
|
||||
|
||||
LICENSE = "GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=16;md5=31da590f3e9f3bd34dcdb9e4db568519"
|
||||
|
||||
SRC_URI = "http://fwts.ubuntu.com/release/fwts-V${PV}.tar.gz;subdir=${BP} \
|
||||
file://0001-Add-correct-printf-qualifier-for-off_t.patch \
|
||||
file://0003-Remove-Werror-from-build.patch \
|
||||
file://0004-Define-__SWORD_TYPE-if-not-defined-by-libc.patch \
|
||||
file://0005-Undefine-PAGE_SIZE.patch \
|
||||
file://0006-use-intptr_t-to-fix-pointer-to-int-cast-issues.patch \
|
||||
file://0001-libfwtsiasl-Disable-parallel-builds-of-lex-bison-fil.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "4af4e1e0f1ae9313297af722d744ba47a81c81bc5bdeab3f4f40837a39e4b808"
|
||||
|
||||
COMPATIBLE_HOST = "(i.86|x86_64|aarch64|powerpc64).*-linux"
|
||||
|
||||
DEPENDS = "libpcre glib-2.0 dtc bison-native flex-native libbsd"
|
||||
DEPENDS:append:libc-musl = " libexecinfo"
|
||||
|
||||
inherit autotools bash-completion pkgconfig
|
||||
|
||||
LDFLAGS:append:libc-musl = " -lexecinfo"
|
||||
|
||||
# We end up linker barfing with undefined symbols on ppc64 but not on other arches
|
||||
# surprisingly
|
||||
ASNEEDED:powerpc64le = ""
|
||||
|
||||
FILES:${PN} += "${libdir}/fwts/lib*${SOLIBS}"
|
||||
FILES:${PN}-dev += "${libdir}/fwts/lib*${SOLIBSDEV} ${libdir}/fwts/lib*.la"
|
||||
FILES:${PN}-staticdev += "${libdir}/fwts/lib*a"
|
||||
|
||||
RDEPENDS:${PN} += "dtc"
|
||||
Reference in New Issue
Block a user