libhugetlbfs: extend x86 and arm arch compatibility
PATCH 1/1 libhugetlbfs: extend x86 and arm arch compatibility
I wish to submit the following patches for your consideration and (hopefully) approval. These patches were required in order to add libhugetlbfs and libhugetlbfs-tests packages to our OE rootfs image build for the architectures tested by the Linaro Networking Group.
Using these patches we have been successful at building libhugetlbfs for armv7a, armv7ab, armv8, armv8b, x86 (i586), and x86_64 platforms.
The patches to the libhugetlbfs Makefile and build scripts have been submitted to the libhugetlbfs project as well.
Thanks,
Gary Robertson
PATCH 1/3 libhugetlbfs: Add i*86 to list of compatible host architectures
From: "Gary S. Robertson" <[email protected]>
--- .../libhugetlbfs/libhugetlbfs_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -1
@@ -23,7 +23,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \ S = "${WORKDIR}/git" -COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" +COMPATIBLE_HOST = "(i386|i486|i586|i686|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" LIBARGS = "LIB32=${baselib} LIB64=${baselib}" LIBHUGETLBFS_ARCH = "${TARGET_ARCH}"
Signature · 1 line
1.7.9.5
Re: [PATCH 1/3] libhugetlbfs: Add i*86 to list of compatible host architectures
Well, nothing ever happens as expected... please ignore this patch for now. It looks as though the libhugetlbfs project may accept the other patches immediately and we may be better served by updating the base version of libhugetlbfs used in the recipe, rather than adding all these patches.
On Thu, Nov 6, 2014 at 1:23 PM, Gary S. Robertson <[email protected]
Quoted 28 lines
wrote:
From: "Gary S. Robertson" <[email protected]>
Signed-off-by Gary S. Robertson <[email protected]>--- .../libhugetlbfs/libhugetlbfs_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1
-1@@ -23,7 +23,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \ S = "${WORKDIR}/git" -COMPATIBLE_HOST = "(x86_64|powerpc|powerpc64|aarch64|arm).*-linux*" +COMPATIBLE_HOST ="(i386|i486|i586|i686|x86_64|powerpc|powerpc64|aarch64|arm).*-linux*"
LIBARGS = "LIB32=${baselib} LIB64=${baselib}"
LIBHUGETLBFS_ARCH= "${TARGET_ARCH}"
--
1.7.9.5
PATCH 2/3 libhugetlbfs: Recognize all ix86 arches
In reply to Gary S. RobertsonFrom: "Gary S. Robertson" <[email protected]>
The makefile for libhugetlbfs recognized only i386 or x86_64 arch designators. Extended this to also recognize i486, i586, and i686
--- ...01-libhugetlbfs-Recognize-all-ix86-arches.patch | 31 ++++++++++++++++++++ .../libhugetlbfs/libhugetlbfs_git.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-libhugetlbfs-Recognize-all-ix86-arches.patch
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-libhugetlbfs-Recognize-all-ix86-arches.patch new file +31 -0
@@ -0,0 +1,31 @@ +From fcb166479d3ccd9b79fd07e89b1ed2d8899b4391 Mon Sep 17 00:00:00 2001 +From: "Gary S. Robertson" <[email protected]> +Date: Wed, 24 Sep 2014 15:27:31 -0500 +Subject: [libhugetlbfs][PATCH] Recognize all ix86 arches + +The makefile only recognized i386 or x86_64 arches. Added support +to recognize i486, i586, i686. + +Upstream Status: Submitted + +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/libhugetlbfs_git.bb +1 -0
@@ -19,6 +19,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \ file://0001-aarch64-fix-page-size-not-properly-computed.patch \ file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ file://0001-Extend-arm32-support-to-include-BE-variants.patch \ + file://0001-libhugetlbfs-Recognize-all-ix86-arches.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
1.7.9.5
Re: [PATCH 2/3] libhugetlbfs: Recognize all ix86 arches
As per the other patches sent in this series, please ignore for now... looks like it may be better to update the version of libhugetlbfs used in the recipe after these patches are accepted there.
On Thu, Nov 6, 2014 at 1:23 PM, Gary S. Robertson <[email protected]
Quoted 75 lines
wrote:
From: "Gary S. Robertson" <[email protected]>
The makefile for libhugetlbfs recognized only i386 or
x86_64arch designators.
Extended this to also recognize i486, i586, and i686Signed-off-by Gary S. Robertson <[email protected]>--- ...01-libhugetlbfs-Recognize-all-ix86-arches.patch | 31 ++++++++++++++++++++ .../libhugetlbfs/libhugetlbfs_git.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-libhugetlbfs-Recognize-all-ix86-arches.patchdiff --git
a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-libhugetlbfs-Recognize-all-ix86-arches.patchb/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-libhugetlbfs-Recognize-all-ix86-arches.patchnew file mode 100644
index 0000000..4eade89
---/dev/null
+++b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-libhugetlbfs-Recognize-all-ix86-arches.patchmeta-oe/recipes-benchmark/libhugetlbfs/files/0001-libhugetlbfs-Recognize-all-ix86-arches.patch new file +31
-0@@ -0,0 +1,31 @@ +From fcb166479d3ccd9b79fd07e89b1ed2d8899b4391 Mon Sep 17 00:00:00 2001 +From: "Gary S. Robertson" <[email protected]> +Date: Wed, 24 Sep 2014 15:27:31 -0500 +Subject: [libhugetlbfs][PATCH] Recognize all ix86 arches + +The makefile only recognized i386 or x86_64 arches. Added support +to recognize i486, i586, i686. + +Upstream Status: Submitted + +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/libhugetlbfs_git.bb +1
-0@@ -19,6 +19,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \ file://0001-aarch64-fix-page-size-not-properly-computed.patch \ file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ file://0001-Extend-arm32-support-to-include-BE-variants.patch \ + file://0001-libhugetlbfs-Recognize-all-ix86-arches.patch \ "S = "${WORKDIR}/git"
--
1.7.9.5
PATCH 3/3 libhugetlbfs: fix page size and text offset for arm arches
In reply to Gary S. RobertsonFrom: "Gary S. Robertson" <[email protected]>
Fixed computation of page size and text segment offset for various arm architectures - including both LE and BE variants of armv7 as well as aarch64
--- ...rch64-fix-page-size-not-properly-computed.patch | 32 ----------- ...s-arm-arches-fix-page-size-and-text-offse.patch | 57 ++++++++++++++++++++ .../libhugetlbfs/libhugetlbfs_git.bb | 1 + 3 files changed, 58 insertions(+), 32 deletions(-) delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch create mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch deleted +0 -32
@@ -1,32 +0,0 @@ -Subject: [PATCH] aarch64: fix page size not properly computed - -There's 2 issues fixed: -* typo on MB variable (MB -> $MB) -* some linker variants are missing (linux and big endian) - - aarch64elfb - - aarch64linux - - aarch64linuxb - -Signed-off-by: Fathi Boudra <[email protected]> - -Upstream-Status: Submitted ---- - ld.hugetlbfs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ld.hugetlbfs b/ld.hugetlbfs -index df446dd..6553547 100755 ---- a/ld.hugetlbfs -+++ b/ld.hugetlbfs -@@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; - elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; - elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; - elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; --armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;; -+armelf_linux_eabi|aarch64elf*|aarch64linux*) HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; - esac - - if [ "$HTLB_ALIGN" == "slice" ]; then --- -1.9.2 -
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch new file +57 -0
57 lines not on this page · raw message
meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1 -0
@@ -20,6 +20,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \ file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ file://0001-Extend-arm32-support-to-include-BE-variants.patch \ file://0001-libhugetlbfs-Recognize-all-ix86-arches.patch \ + file://0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
1.7.9.5
Re: [PATCH 3/3] libhugetlbfs: fix page size and text offset for arm arches
As per the other patches sent in this series, please ignore for now... looks like it may be better to update the version of libhugetlbfs used in the recipe after these patches are accepted there.
On Thu, Nov 6, 2014 at 1:23 PM, Gary S. Robertson <[email protected]
Quoted 155 lines
wrote:
From: "Gary S. Robertson" <[email protected]>
Fixed computation of page size and text segment offset for various arm architectures - including both LE and BE variants of armv7 as well as aarch64
Signed-off-by Gary S. Robertson <[email protected]>--- ...rch64-fix-page-size-not-properly-computed.patch | 32 ----------- ...s-arm-arches-fix-page-size-and-text-offse.patch | 57 ++++++++++++++++++++ .../libhugetlbfs/libhugetlbfs_git.bb | 1 + 3 files changed, 58 insertions(+), 32 deletions(-) delete mode 100644 meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch create mode 100644
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patchdiff --git
a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patchb/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patchdeleted file mode 100644
index da60ba0..0000000
---a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch+++/dev/nullmeta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch deleted +0
-21@@ -1,32 +0,0 @@ -Subject: [PATCH] aarch64: fix page size not properly computed - -There's 2 issues fixed: -* typo on MB variable (MB -> $MB) -* some linker variants are missing (linux and big endian) - - aarch64elfb - - aarch64linux - - aarch64linuxb - -Signed-off-by: Fathi Boudra <[email protected]> - -Upstream-Status: Submitted ---- - ld.hugetlbfs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ld.hugetlbfs b/ld.hugetlbfs -index df446dd..6553547 100755 ---- a/ld.hugetlbfs -+++ b/ld.hugetlbfs -@@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB))SLICE_SIZE=$((256*$MB)) ;;
- elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; - elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; - elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;--armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;; -+armelf_linux_eabi|aarch64elf*|aarch64linux*) HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
- esacmeta-oe/recipes-benchmark/libhugetlbfs/files/0001-aarch64-fix-page-size-not-properly-computed.patch deleted +0
-5- - if [ "$HTLB_ALIGN" == "slice" ]; then --- -1.9.2 -diff --git
a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patchb/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patchnew file mode 100644
index 0000000..68cd71b
---/dev/null
+++b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patchmeta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch new file +4
-0@@ -0,0 +1,57 @@ +From 1ab6f7f9b34fc745451140fc21db6763dffc5785 Mon Sep 17 00:00:00 2001 +From: "Gary S. Robertson" <[email protected]> +Date: Thu, 25 Sep 2014 14:57:06 -0500 +Subject: [libhugetlbfs][PATCH] ld.hugetlbfs: arm arches - fix page sizeand text offset
+ setupmeta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch new file +28
-0+ +There's 3 issues fixed: +* typo on MB variable (MB -> $MB) +* some linker variants are missing (linux and big endian) + - armelfb_linux_eabi + - aarch64elfb + - aarch64linux + - aarch64linuxb +* text segment offset was not specified for armv7 BE + +NOTE: This patch replaces and makes obsolete the following previously + submitted patch: + + aarch64: fix page size not properly computed + by: Fathi Boudra <[email protected]> + +Upstream Status: Submitted + +Signed-off-by: Gary S. Robertson <[email protected]> +--- + ld.hugetlbfs | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/ld.hugetlbfs b/ld.hugetlbfs +index df446dd..4417442 100755 +--- a/ld.hugetlbfs ++++ b/ld.hugetlbfs +@@ -87,7 +87,7 @@ elf32ppclinux|elf64ppc) HPAGE_SIZE=$((16*$MB))SLICE_SIZE=$((256*$MB)) ;;
+ elf64lppc) HPAGE_SIZE=$((16*$MB)) SLICE_SIZE=$((256*$MB)) ;; + elf_i386|elf_x86_64) HPAGE_SIZE=$((4*$MB)) SLICE_SIZE=$HPAGE_SIZE ;; + elf_s390|elf64_s390) HPAGE_SIZE=$((1*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;+-armelf_linux_eabi|aarch64elf) HPAGE_SIZE=$((2*MB)) SLICE_SIZE=$HPAGE_SIZE ;; ++armelf*_linux_eabi|aarch64elf*|aarch64linux*) HPAGE_SIZE=$((2*$MB)) SLICE_SIZE=$HPAGE_SIZE ;;
+ esacmeta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch new file +5
-0+ + if [ "$HTLB_ALIGN" == "slice" ]; then +@@ -96,9 +96,9 @@ if [ "$HTLB_ALIGN" == "slice" ]; then + + # targeting the ARM platform one needs to explicitly set the textsegment offset
meta-oe/recipes-benchmark/libhugetlbfs/files/0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch new file +13
-1+ # otherwise it will be NULL. +- if [ "$EMU" == "armelf_linux_eabi" ]; then +- HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" +- fi ++ case "$EMU" in ++ armelf*_linux_eabi) HTLBOPTS="$HTLBOPTS -Ttext-segment=$SLICE_SIZE" ;; ++ esac + fi + + ${LD} "${args[@]}" ${HTLBOPTS} +-- +1.7.9.5 +meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +1
-0@@ -20,6 +20,7 @@ SRC_URI = "git://git.code.sf.net/p/libhugetlbfs/code \ file://0001-replace-lib-lib64-hardcoded-values-by-LIBDIR32-LIBDI.patch \ file://0001-Extend-arm32-support-to-include-BE-variants.patch \ file://0001-libhugetlbfs-Recognize-all-ix86-arches.patch \ + file://0001-ld.hugetlbfs-arm-arches-fix-page-size-and-text-offse.patch \ "S = "${WORKDIR}/git"
--
1.7.9.5