Patchwork [meta-oe,meta-initramfs,v2] klibc_2.0.2: apply FIX_V4BX patch for armv4 targets only

login
register
mail settings
Submitter Andrea Adami
Date Jan. 11, 2013, 5:26 p.m.
Message ID <1357925200-12243-1-git-send-email-andrea.adami@gmail.com>
Download mbox | patch
Permalink /patch/42499/
State Accepted, archived
Commit bdf8d1dc4a4440109f68f23fdbb0272904cd48e1
Headers show

Comments

Andrea Adami - Jan. 11, 2013, 5:26 p.m.
* linker fix is needed to avoid 'bx, lr' instruction on armv4
 * patch is applied only for armv4 for eabi builds
 * http://wiki.debian.org/ArmEabiPort#Choice_of_minimum_CPU

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
---
 .../klibc/klibc-2.0.2/armv4-fix-v4bx.patch         |   15 +++++++++++++++
 meta-initramfs/recipes-devtools/klibc/klibc.inc    |   12 +++++++++---
 2 files changed, 24 insertions(+), 3 deletions(-)
 create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/armv4-fix-v4bx.patch
Andrea Adami - Jan. 18, 2013, 9:14 a.m.
On Fri, Jan 11, 2013 at 6:26 PM, Andrea Adami <andrea.adami@gmail.com> wrote:
>  * linker fix is needed to avoid 'bx, lr' instruction on armv4
>  * patch is applied only for armv4 for eabi builds
>  * http://wiki.debian.org/ArmEabiPort#Choice_of_minimum_CPU
>
> Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
> ---
>  .../klibc/klibc-2.0.2/armv4-fix-v4bx.patch         |   15 +++++++++++++++
>  meta-initramfs/recipes-devtools/klibc/klibc.inc    |   12 +++++++++---
>  2 files changed, 24 insertions(+), 3 deletions(-)
>  create mode 100644 meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/armv4-fix-v4bx.patch
>
> diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/armv4-fix-v4bx.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/armv4-fix-v4bx.patch
> new file mode 100644
> index 0000000..6bb384b
> --- /dev/null
> +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/armv4-fix-v4bx.patch
> @@ -0,0 +1,15 @@
> +Status: not applicable upstream, in OE/Yocto we use $(FIX_V4BX)
> +which is "" in case of armv5 or thumbs.
> +
> +Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
> +
> +--- a/usr/klibc/arch/arm/MCONFIG       2013-01-09 01:12:02.000000000 +0100
> ++++ b/usr/klibc/arch/arm/MCONFIG       2013-01-08 23:45:59.000000000 +0100
> +@@ -29,6 +29,7 @@
> + KLIBCSHAREDFLAGS = -Ttext 0x01800200
> + ifeq ($(CONFIG_AEABI),y)
> + KLIBCREQFLAGS += -mabi=aapcs-linux -mno-thumb-interwork
> ++KLIBCLDFLAGS += $(FIX_ARMV4_EABI_BX)
> + else
> + KLIBCREQFLAGS += -mabi=apcs-gnu -mno-thumb-interwork
> + endif
> diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
> index a95706e..fa31f73 100644
> --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
> +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
> @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://usr/klibc/LICENSE;md5=d75181f10e998c21eb147f6d2e43ce8
>  # debugsources.list: No such file or directory:
>  INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
>
> -INC_PR = "r0"
> +INC_PR = "r1"
>
>  KLIBC_ARCH = '${TARGET_ARCH}'
>  KLIBC_ARCH_armeb = 'arm'
> @@ -21,11 +21,17 @@ KLIBC_ARCH_i586 = 'i386'
>  KLIBC_ARCH_i686 = 'i386'
>  KLIBC_ARCH_pentium = 'i386'
>
> +export FIX_ARMV4_EABI_BX = "${FIX_V4BX}"
> +
>  SRCREV = "f05ff116bb9edbbb81d82fa47b78e630ce878470"
>  SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git;protocol=git"
>
> -SRC_URI_append_linux-gnueabi = " file://klibc-config-eabi.patch"
> -SRC_URI_append_linux-uclibceabi = " file://klibc-config-eabi.patch"
> +SRC_URI_append_linux-gnueabi = " file://klibc-config-eabi.patch \
> +                                 file://armv4-fix-v4bx.patch \
> +                               "
> +SRC_URI_append_linux-uclibceabi = " file://klibc-config-eabi.patch \
> +                                    file://armv4-fix-v4bx.patch \
> +                                  "
>
>  SRC_URI += "file://klibc-linux-libc-dev.patch \
>              file://prefix.patch \
> --
> 1.7.8.6
>

ping

Patch

diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/armv4-fix-v4bx.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/armv4-fix-v4bx.patch
new file mode 100644
index 0000000..6bb384b
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.2/armv4-fix-v4bx.patch
@@ -0,0 +1,15 @@ 
+Status: not applicable upstream, in OE/Yocto we use $(FIX_V4BX)
+which is "" in case of armv5 or thumbs.
+
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+
+--- a/usr/klibc/arch/arm/MCONFIG	2013-01-09 01:12:02.000000000 +0100
++++ b/usr/klibc/arch/arm/MCONFIG	2013-01-08 23:45:59.000000000 +0100
+@@ -29,6 +29,7 @@
+ KLIBCSHAREDFLAGS = -Ttext 0x01800200
+ ifeq ($(CONFIG_AEABI),y)
+ KLIBCREQFLAGS += -mabi=aapcs-linux -mno-thumb-interwork
++KLIBCLDFLAGS += $(FIX_ARMV4_EABI_BX)
+ else
+ KLIBCREQFLAGS += -mabi=apcs-gnu -mno-thumb-interwork
+ endif
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
index a95706e..fa31f73 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
+++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
@@ -10,7 +10,7 @@  LIC_FILES_CHKSUM = "file://usr/klibc/LICENSE;md5=d75181f10e998c21eb147f6d2e43ce8
 # debugsources.list: No such file or directory:
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
-INC_PR = "r0"
+INC_PR = "r1"
 
 KLIBC_ARCH = '${TARGET_ARCH}'
 KLIBC_ARCH_armeb = 'arm'
@@ -21,11 +21,17 @@  KLIBC_ARCH_i586 = 'i386'
 KLIBC_ARCH_i686 = 'i386'
 KLIBC_ARCH_pentium = 'i386'
 
+export FIX_ARMV4_EABI_BX = "${FIX_V4BX}"
+
 SRCREV = "f05ff116bb9edbbb81d82fa47b78e630ce878470"
 SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git;protocol=git"
 
-SRC_URI_append_linux-gnueabi = " file://klibc-config-eabi.patch"
-SRC_URI_append_linux-uclibceabi = " file://klibc-config-eabi.patch"
+SRC_URI_append_linux-gnueabi = " file://klibc-config-eabi.patch \
+                                 file://armv4-fix-v4bx.patch \
+                               "
+SRC_URI_append_linux-uclibceabi = " file://klibc-config-eabi.patch \
+                                    file://armv4-fix-v4bx.patch \
+                                  "
 
 SRC_URI += "file://klibc-linux-libc-dev.patch \
             file://prefix.patch \