Skip to contentSkip to conversation

libhugetlbfs: Uprev to v2.19 from v2.18

PATCH New [email protected] 1 participant 2 messages Jul 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libhugetlbfs: Uprev to v2.19 from v2.18

From: Jianchuan Wang <[email protected]>

The 5 patches which are deleted have been in the v2.19

---
 ...tend-arm32-support-to-include-BE-variants.patch | 38 ---------------
 .../0001-Makefile-Recognize-all-ix86-arches.patch  | 32 ------------
 .../files/0001-aarch64-fix-cross-compilation.patch | 34 -------------
 ...s-arm-arches-fix-page-size-and-text-offse.patch | 57 ----------------------
 ...-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch | 29 -----------
 .../libhugetlbfs/libhugetlbfs_git.bb               |  9 +---
 6 files changed, 2 insertions(+), 197 deletions(-)
 delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Extend-arm32-support-to-include-BE-variants.patch
 delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Makefile-Recognize-all-ix86-arches.patch
 delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch
 delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch
 delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Extend-arm32-support-to-include-BE-variants.patch deleted +0 -38
deleted file mode 100644
index f6147cb..0000000
@@ -1,38 +0,0 @@
-From 5af6dec8764375ca4f13bd9fed96af090228351a Mon Sep 17 00:00:00 2001
-From: "Gary S. Robertson" <[email protected]>
-Date: Mon, 11 Aug 2014 11:06:04 -0500
-Subject: [libhugetlbfs][PATCH] Extend arm32 support to include BE variants
-    
-This patch applies the same technique used by Koen Kool in the following patch
-which was accepted by the libhugetlbfs project:
-    
-[0a4f6] Add aarch64_be_support 2014-03-31 10:52:37
-    
-It modifies the libhugetlbfs Makefile to mark all 32-bit arm architectures
-as supported by the libhugetlbfs build.  Builds and successful functional
-tests have been performed for armv7a LE and BE runtime platforms.
-    
-This patch replaces and renders obsolete the following patch:
-arm32-support.patch submitted by: Chunrong Guo <[email protected]>
-
-Signed-off-by: Gary S. Robertson <[email protected]>
----
- Makefile |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 91502e1..ba79607 100644
---- a/Makefile
-+++ b/Makefile
-@@ -59,7 +59,7 @@ ELF32 = elf32ppclinux
- TMPLIB32 = lib
- CPPFLAGS += -DPPC_NO_SEGMENTS
- else
--ifeq ($(ARCH),armv7l)
-+ifneq (,$(findstring arm,$(ARCH)))
- CC32 = $(CC)
- TMPLIB32 = lib
- ELF32 += armelf_linux_eabi
--- 
-1.7.9.5
-
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-Makefile-Recognize-all-ix86-arches.patch deleted +0 -32
deleted file mode 100644
index 2718275..0000000
@@ -1,32 +0,0 @@
-From a0166583ba5f7b6a6d2de434f633126fb12c9d29 Mon Sep 17 00:00:00 2001
-From: "Gary S. Robertson" <[email protected]>
-Date: Wed, 24 Sep 2014 15:27:31 -0500
-Subject: [PATCH] Makefile: Recognize all ix86 arches
-
-In a non-native build scenario, the makefile
-only recognized i386 or x86_64 arches.  Added support
-to recognize i486, i586, i686.
-
-Upstream Status: Accepted by libhugetlbfs project
-
-Signed-off-by: Gary S. Robertson <[email protected]>
----
- Makefile |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 91502e1..0bfaee8 100644
---- a/Makefile
-+++ b/Makefile
-@@ -71,7 +71,7 @@ ELF64 = aarch64elf
- TMPLIB64 = lib64
- CUSTOM_LDSCRIPTS = no
- else
--ifeq ($(ARCH),i386)
-+ifneq (,$(filter i386 i486 i586 i686,$(ARCH)))
- CC32 = $(CC)
- ELF32 = elf_i386
- TMPLIB32 = lib
--- 
-1.7.9.5
-
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-cross-compilation.patch deleted +0 -34
deleted file mode 100644
index 215ae72..0000000
@@ -1,34 +0,0 @@
-Subject: [PATCH] aarch64: fix cross compilation
-
-This patch allow to override CC and use it for aarch64 case like
-the other architectures.
-
-Signed-off-by: Fathi Boudra <[email protected]>
-
-Upstream-Status: Submitted
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 91502e1..5aa1e12 100644
---- a/Makefile
-+++ b/Makefile
-@@ -33,7 +33,7 @@ CFLAGS += -Wall -fPIC
- CPPFLAGS += -D__LIBHUGETLBFS__
- 
- ARCH = $(shell uname -m | sed -e s/i.86/i386/)
--CC = gcc
-+CC ?= gcc
- 
- CUSTOM_LDSCRIPTS = yes
- 
-@@ -66,7 +66,7 @@ ELF32 += armelf_linux_eabi
- CUSTOM_LDSCRIPTS = no
- else
- ifneq (,$(findstring aarch64,$(ARCH)))
--CC64 = gcc
-+CC64 = $(CC)
- ELF64 = aarch64elf
- TMPLIB64 = lib64
- CUSTOM_LDSCRIPTS = no
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch deleted +0 -57

57 lines not on this page · raw message

meta-oe/recipes-benchmark/libhugetlbfs/files/0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch deleted +0 -29
deleted file mode 100644
index 9e2a5e5..0000000
@@ -1,29 +0,0 @@
-Subject: [PATCH 1/1] Replace lib/lib64 hardcoded values by LIBDIR32/LIBDIR64
- variables
-
-Signed-off-by: Fathi Boudra <[email protected]>
-
-Upstream-Status: Submitted
----
- Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 91502e1..682c0db 100644
---- a/Makefile
-+++ b/Makefile
-@@ -181,9 +181,9 @@ BINDIR = $(PREFIX)/share/libhugetlbfs
- EXEDIR = $(PREFIX)/bin
- DOCDIR = $(PREFIX)/share/doc/libhugetlbfs
- ifdef CC32
--PMDIR = $(PREFIX)/lib/perl5/TLBC
-+PMDIR = $(LIBDIR32)/perl5/TLBC
- else
--PMDIR = $(PREFIX)/lib64/perl5/TLBC
-+PMDIR = $(LIBDIR64)/perl5/TLBC
- endif
- MANDIR1 = $(PREFIX)/share/man/man1
- MANDIR3 = $(PREFIX)/share/man/man3
--- 
-1.9.2
-
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +2 -7
index ce0c6af..a2d3922 100644
@@ -7,21 +7,16 @@ DEPENDS = "sysfsutils perl"
 RDEPENDS_${PN} += "bash perl python python-io python-lang python-subprocess python-resource"
 RDEPENDS_${PN}-tests += "bash"
 
-PV = "2.18"
+PV = "2.19"
 PE = "1"
 
-SRCREV = "ea3f6b273f535aab38cefae30030774457bbbfe6"
+SRCREV = "426c22d65415fcb8927f68fbc5887e075a8dc40a"
 SRC_URI = " \
     git://github.com/libhugetlbfs/libhugetlbfs.git;protocol=https \
     file://skip-checking-LIB32-and-LIB64-if-they-point-to-the-s.patch \
     file://libhugetlbfs-avoid-search-host-library-path-for-cros.patch \
     file://tests-Makefile-install-static-4G-edge-testcases.patch \
     file://0001-run_test.py-not-use-hard-coded-path-.-obj-hugeadm.patch \
-    file://0001-aarch64-fix-cross-compilation.patch \
-    file://0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch \
-    file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \
-    file://0001-Extend-arm32-support-to-include-BE-variants.patch \
-    file://0001-Makefile-Recognize-all-ix86-arches.patch \
 "
 
 S = "${WORKDIR}/git"
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 xfsprogs: Uprev to 3.2.3 version

From: Jianchuan Wang <[email protected]>

In the v3.2.3, the libhandle.so/libhandle.a paths have changed so that We need not rm them in the install processing.

---
 ...nerate-crctable-which-is-moved-into-runti.patch | 170 +++++++++++++++++++++
 .../recipes-utils/xfsprogs/xfsprogs_3.1.11.bb      |  56 -------
 .../recipes-utils/xfsprogs/xfsprogs_3.2.3.bb       |  52 +++++++
 3 files changed, 222 insertions(+), 56 deletions(-)
 create mode 100644 meta-filesystems/recipes-utils/xfsprogs/files/xfsprogs-generate-crctable-which-is-moved-into-runti.patch
 delete mode 100644 meta-filesystems/recipes-utils/xfsprogs/xfsprogs_3.1.11.bb
 create mode 100644 meta-filesystems/recipes-utils/xfsprogs/xfsprogs_3.2.3.bb
meta-filesystems/recipes-utils/xfsprogs/files/xfsprogs-generate-crctable-which-is-moved-into-runti.patch new file +170 -0
new file mode 100644
index 0000000..b204195
@@ -0,0 +1,170 @@
+From e58cb210a7c15352040a411d11a8383eac0defda Mon Sep 17 00:00:00 2001
+From: Jianchuan Wang <[email protected]>
+Date: Tue, 30 Sep 2014 12:16:17 +0800
+Subject: [PATCH] xfsprogs: generate crctable which is moved into runtime from
+ compile
+
+After upgraded, There is a compile error except x86,
+Because crc32.c need two arraies crc32table_le and crc32ctable_le from crc32table.h,
+which are generated by gen_crc32table.c relative to different platforms.
+For this, move the function implementation from gen_crc32table.c to crc.c
+
+Upstream-Status: Pending
+
+Signed-off-by: Jianchuan Wang <[email protected]>
+---
+ libxfs/Makefile | 23 ++----------------
+ libxfs/crc32.c  | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ 2 files changed, 75 insertions(+), 23 deletions(-)
+
+diff --git a/libxfs/Makefile b/libxfs/Makefile
+index ae15a5d..7670159 100644
+--- a/libxfs/Makefile
++++ b/libxfs/Makefile
+@@ -10,7 +10,7 @@ LT_CURRENT = 0
+ LT_REVISION = 0
+ LT_AGE = 0
+ 
+-HFILES = xfs.h init.h xfs_dir2_priv.h crc32defs.h crc32table.h
++HFILES = xfs.h init.h xfs_dir2_priv.h crc32defs.h
+ CFILES = cache.c \
+ 	crc32.c \
+ 	init.c kmem.c logitem.c radix-tree.c rdwr.c trans.c util.c \
+@@ -43,7 +43,6 @@ CFILES = cache.c \
+ CFILES += $(PKG_PLATFORM).c
+ PCFILES = darwin.c freebsd.c irix.c linux.c
+ LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g")
+-LSRCFILES += gen_crc32table.c
+ 
+ #
+ # Tracing flags:
+@@ -61,25 +60,7 @@ LTLIBS = $(LIBPTHREAD) $(LIBRT)
+ # don't try linking xfs_repair with a debug libxfs.
+ DEBUG = -DNDEBUG
+ 
+-LDIRT = gen_crc32table crc32table.h crc32selftest
+-
+-default: crc32selftest ltdepend $(LTLIBRARY)
+-
+-crc32table.h: gen_crc32table.c
+-	@echo "    [CC]     gen_crc32table"
+-	$(Q) $(CC) $(CFLAGS) -o gen_crc32table $<
+-	@echo "    [GENERATE] $@"
+-	$(Q) ./gen_crc32table > crc32table.h
+-
+-# The selftest binary will return an error if it fails. This is made a
+-# dependency of the build process so that we refuse to build the tools on broken
+-# systems/architectures. Hence we make sure that xfsprogs will never use a
+-# busted CRC calculation at build time and hence avoid putting bad CRCs down on
+-# disk.
+-crc32selftest: gen_crc32table.c crc32table.h crc32.c
+-	@echo "    [TEST]    CRC32"
+-	$(Q) $(CC) $(CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
+-	$(Q) ./$@
++default: ltdepend $(LTLIBRARY)
+ 
+ include $(BUILDRULES)
+ 
+diff --git a/libxfs/crc32.c b/libxfs/crc32.c
+index 0f847d2..be5fbc3 100644
+--- a/libxfs/crc32.c
++++ b/libxfs/crc32.c
+@@ -55,8 +55,6 @@ typedef __u32	u64;
+ # define tobe(x) (x)
+ #endif
+ 
+-#include "crc32table.h"
+-
+ #if CRC_LE_BITS > 8 || CRC_BE_BITS > 8
+ 
+ /* implements slicing-by-4 or slicing-by-8 algorithm */
+@@ -183,13 +181,86 @@ u32 __pure crc32c_le(u32 crc, unsigned char const *p, size_t len)
+ 	return crc32_le_generic(crc, p, len, NULL, CRC32C_POLY_LE);
+ }
+ #else
++
++#include <stdio.h>
++#include "crc32defs.h"
++#include <inttypes.h>
++
++#define ENTRIES_PER_LINE 4
++
++#if CRC_LE_BITS > 8
++# define LE_TABLE_ROWS (CRC_LE_BITS/8)
++# define LE_TABLE_SIZE 256
++#else
++# define LE_TABLE_ROWS 1
++# define LE_TABLE_SIZE (1 << CRC_LE_BITS)
++#endif
++
++#if CRC_BE_BITS > 8
++# define BE_TABLE_ROWS (CRC_BE_BITS/8)
++# define BE_TABLE_SIZE 256
++#else
++# define BE_TABLE_ROWS 1
++# define BE_TABLE_SIZE (1 << CRC_BE_BITS)
++#endif
++
++static uint32_t crc32table_le[LE_TABLE_ROWS][256];
++static uint32_t crc32ctable_le[LE_TABLE_ROWS][256];
++
++static uint32_t crc32table_le_init = 0;
++static uint32_t crc32ctable_le_init = 0;
++
++/*
++ * big endian ordered CRC not used by XFS.
++static uint32_t crc32table_be[BE_TABLE_ROWS][256];
++ */
++
++/**
++ * crc32init_le() - allocate and initialize LE table data
++ *
++ * crc is the crc of the byte i; other entries are filled in based on the
++ * fact that crctable[i^j] = crctable[i] ^ crctable[j].
++ *
++ */
++static void crc32init_le_generic(const uint32_t polynomial,
++				 uint32_t (*tab)[256])
++{
++	unsigned i, j;
++	uint32_t crc = 1;
++
++	tab[0][0] = 0;
++
++	for (i = LE_TABLE_SIZE >> 1; i; i >>= 1) {
++		crc = (crc >> 1) ^ ((crc & 1) ? polynomial : 0);
++		for (j = 0; j < LE_TABLE_SIZE; j += 2 * i)
++			tab[0][i + j] = crc ^ tab[0][j];
++	}
++	for (i = 0; i < LE_TABLE_SIZE; i++) {
++		crc = tab[0][i];
++		for (j = 1; j < LE_TABLE_ROWS; j++) {
++			crc = tab[0][crc & 0xff] ^ (crc >> 8);
++			tab[j][i] = crc;
++		}
++	}
++}
++
+ u32 __pure crc32_le(u32 crc, unsigned char const *p, size_t len)
+ {
++	if (crc32table_le_init == 0) {
++		crc32init_le_generic(CRCPOLY_LE, crc32table_le);
++		crc32table_le_init == 1;
++	}	
++
+ 	return crc32_le_generic(crc, p, len,
+ 			(const u32 (*)[256])crc32table_le, CRCPOLY_LE);
+ }
+ u32 __pure crc32c_le(u32 crc, unsigned char const *p, size_t len)
+ {
++	if (crc32ctable_le_init == 0) {
++		crc32init_le_generic(CRC32C_POLY_LE, crc32ctable_le);
++		crc32ctable_le_init == 1;
++	}
++
+ 	return crc32_le_generic(crc, p, len,
+ 			(const u32 (*)[256])crc32ctable_le, CRC32C_POLY_LE);
+ }
+-- 
+1.9.1
+
meta-filesystems/recipes-utils/xfsprogs/xfsprogs_3.1.11.bb deleted +0 -56

56 lines not on this page · raw message

meta-filesystems/recipes-utils/xfsprogs/xfsprogs_3.2.3.bb new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
1.9.1