Signed-off-by: Alexander Stein <[email protected]>
---
This update is needed for newer kernels, e.g. v3.10

 ...ernel-header-installed-by-headers_install.patch | 60 ----------------------
 ...d-support-for-detection-of-vfat-and-jffs2.patch | 58 ---------------------
 .../0003-define-__socklen_t_defined.patch          | 17 ------
 ...-include-signal.h-47-5-warning-SIGRTMAX-i.patch | 31 -----------
 patches/klibc-1.5.25/series                        |  4 --
 ...ernel-header-installed-by-headers_install.patch | 60 ++++++++++++++++++++++
 ...d-support-for-detection-of-vfat-and-jffs2.patch | 58 +++++++++++++++++++++
 .../0003-define-__socklen_t_defined.patch          | 17 ++++++
 ...-include-signal.h-47-5-warning-SIGRTMAX-i.patch | 31 +++++++++++
 patches/klibc-2.0.3/series                         |  4 ++
 rules/klibc.make                                   |  6 +--
 11 files changed, 173 insertions(+), 173 deletions(-)
 delete mode 100644 
patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch
 delete mode 100644 
patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
 delete mode 100644 patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch
 delete mode 100644 
patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
 delete mode 100644 patches/klibc-1.5.25/series
 create mode 100644 
patches/klibc-2.0.3/0001-klibc-use-kernel-header-installed-by-headers_install.patch
 create mode 100644 
patches/klibc-2.0.3/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
 create mode 100644 patches/klibc-2.0.3/0003-define-__socklen_t_defined.patch
 create mode 100644 
patches/klibc-2.0.3/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
 create mode 100644 patches/klibc-2.0.3/series

diff --git 
a/patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch
 
b/patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch
deleted file mode 100644
index e9795b3..0000000
--- 
a/patches/klibc-1.5.25/0001-klibc-use-kernel-header-installed-by-headers_install.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From: Marc Kleine-Budde <[email protected]>
-Date: Mon, 5 Jan 2009 17:46:47 +0100
-Subject: [PATCH 17/21] [klibc] use kernel header installed by "headers_install"
-
-Originally klibc directly sets the compiler header search path
-directly into the kernel tree. This causes compilation to fail on modern
-kernel with a changed include dir layout.
-
-This patch uses the "headers_install" to extract the includes from the
-kernel. Against these headers klibc is build.
-
-Ported from 1.5.15
-
-Index: klibc-1.5.25/Makefile
-===================================================================
---- klibc-1.5.25.orig/Makefile
-+++ klibc-1.5.25/Makefile
-@@ -6,6 +6,7 @@ SRCROOT = .
- # kbuild compatibility
- export srctree  := $(shell pwd)
- export objtree  := $(shell pwd)
-+export LINUX_HEADERS := $(objtree)/linux-headers
- export KLIBCSRC := usr/klibc
- export VERSION := $(shell cat $(srctree)/$(KLIBCSRC)/version)
- export KLIBCINC := usr/include
-@@ -102,16 +103,19 @@ $(KLIBCKERNELSRC):
-       @echo "KLIBCKERNELSRC=<path> to the build."
-       @false
- 
-+$(LINUX_HEADERS): linux
-+      $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) 
INSTALL_HDR_PATH="$@" headers_install
-+
- rpmbuild = $(shell which rpmbuild 2>/dev/null || which rpm)
- 
- klibc.spec: klibc.spec.in $(KLIBCSRC)/version
-       sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
- 
- # Build klcc - it is the first target
--klcc: $(objtree)/.config
-+klcc: $(objtree)/.config  $(LINUX_HEADERS)
-       $(Q)$(MAKE) $(klibc)=klcc
- 
--klibc: $(objtree)/.config
-+klibc: $(objtree)/.config  $(LINUX_HEADERS)
-       $(Q)$(MAKE) $(klibc)=.
- 
- test: klibc
-Index: klibc-1.5.25/scripts/Kbuild.klibc
-===================================================================
---- klibc-1.5.25.orig/scripts/Kbuild.klibc
-+++ klibc-1.5.25/scripts/Kbuild.klibc
-@@ -113,7 +113,7 @@ KLIBCCPPFLAGS    := -nostdinc -iwithpref
- # kernel include paths
- KLIBCKERNELSRC         ?= $(srctree)
- KLIBCKERNELOBJ         ?= $(objtree)
--KLIBCCPPFLAGS    += -I$(KLIBCKERNELSRC)/include                               
    \
-+KLIBCCPPFLAGS    += -I$(LINUX_HEADERS)/include                                
    \
-                      $(if $(KBUILD_SRC),-I$(KLIBCKERNELOBJ)/include2      \
-                      -I$(KLIBCKERNELOBJ)/include -I$(srctree)/include)    \
-                    $(KLIBCARCHINCFLAGS)
diff --git 
a/patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
 
b/patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
deleted file mode 100644
index 60f1d8f..0000000
--- 
a/patches/klibc-1.5.25/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 6b24aece3e313aece16ce60255e918963b0905b3 Mon Sep 17 00:00:00 2001
-From: Jon Ringle <[email protected]>
-Date: Thu, 29 Oct 2009 16:27:11 +0100
-Subject: [PATCH 18/21] Patch to add support for detection of vfat and jffs2 
images.
-
-Obtained from openembedded:
-http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/klibc/klibc-1.5.15/fstype-sane-vfat-and-jffs2-for-1.5.patch
-
-Signed-off-by: Jon Ringle <[email protected]>
-[mkl: fixed compiler warnings]
-Signed-off-by: Marc Kleine-Budde <[email protected]>
----
- usr/kinit/fstype/fstype.c |   22 ++++++++++++++++++++++
- 1 files changed, 22 insertions(+), 0 deletions(-)
-
-diff --git a/usr/kinit/fstype/fstype.c b/usr/kinit/fstype/fstype.c
-index 69e0e30..d06bcd1 100644
---- a/usr/kinit/fstype/fstype.c
-+++ b/usr/kinit/fstype/fstype.c
-@@ -59,6 +59,26 @@
- /* Swap needs the definition of block size */
- #include "swap_fs.h"
- 
-+static int jffs2_image(const void *buf, unsigned long long *bytes)
-+{
-+      const unsigned char *cbuf = buf;
-+
-+      if (cbuf[0] == 0x85 && cbuf[1] == 0x19)
-+              return 1;
-+
-+      return 0;
-+}
-+
-+static int vfat_image(const void *buf, unsigned long long *bytes)
-+{
-+      if (!strncmp(buf + 54, "FAT12   ", 8)
-+          || !strncmp(buf + 54, "FAT16   ", 8)
-+          || !strncmp(buf + 82, "FAT32   ", 8))
-+              return 1;
-+
-+      return 0;
-+}
-+
- static int gzip_image(const void *buf, unsigned long long *bytes)
- {
-       const unsigned char *p = buf;
-@@ -492,6 +512,8 @@ static struct imagetype images[] = {
-       {1, "minix", minix_image},
-       {1, "nilfs2", nilfs2_image},
-       {2, "ocfs2", ocfs2_image},
-+      {0, "jffs2", jffs2_image},
-+      {0, "vfat", vfat_image},
-       {8, "reiserfs", reiserfs_image},
-       {64, "reiserfs", reiserfs_image},
-       {64, "reiser4", reiser4_image},
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch 
b/patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch
deleted file mode 100644
index cf7814b..0000000
--- a/patches/klibc-1.5.25/0003-define-__socklen_t_defined.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-From: Jon Ringle <[email protected]>
-Subject: define "__socklen_t_defined"
-
-Port from 1.5.15
-
-Index: klibc-1.5.25/usr/include/sys/socket.h
-===================================================================
---- klibc-1.5.25.orig/usr/include/sys/socket.h
-+++ klibc-1.5.25/usr/include/sys/socket.h
-@@ -152,6 +152,7 @@ struct sockaddr {
-       char            sa_data[14];    /* 14 bytes of protocol address */
- };
- typedef int socklen_t;
-+#define __socklen_t_defined 1
- struct msghdr {
-       void *msg_name;
-       int msg_namelen;
diff --git 
a/patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
 
b/patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
deleted file mode 100644
index 09cbd2d..0000000
--- 
a/patches/klibc-1.5.25/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From e3cbc39bf1a94056f4a4bbae0067109d0317e68b Mon Sep 17 00:00:00 2001
-From: Jon Ringle <[email protected]>
-Date: Thu, 29 Oct 2009 16:27:14 +0100
-Subject: [PATCH 20/21] fix warning include/signal.h:47:5: warning: "SIGRTMAX" 
is not defined
-
-Signed-off-by: Jon Ringle <[email protected]>
-Signed-off-by: Marc Kleine-Budde <[email protected]>
----
- usr/include/signal.h |    2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/usr/include/signal.h b/usr/include/signal.h
-index a513282..4ed65bc 100644
---- a/usr/include/signal.h
-+++ b/usr/include/signal.h
-@@ -44,10 +44,12 @@ typedef int sig_atomic_t;
- /* The kernel header files are inconsistent whether or not
-    SIGRTMAX is inclusive or exclusive.  POSIX seems to state that
-    it's inclusive, however. */
-+#ifdef SIGRTMAX
- #if SIGRTMAX >= _NSIG
- # undef  SIGRTMAX
- # define SIGRTMAX (_NSIG-1)
- #endif
-+#endif
- 
- __extern const char *const sys_siglist[_NSIG];
- __extern const char *const sys_sigabbrev[_NSIG];
--- 
-1.6.5
-
diff --git a/patches/klibc-1.5.25/series b/patches/klibc-1.5.25/series
deleted file mode 100644
index b4b9233..0000000
--- a/patches/klibc-1.5.25/series
+++ /dev/null
@@ -1,4 +0,0 @@
-0001-klibc-use-kernel-header-installed-by-headers_install.patch
-0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
-0003-define-__socklen_t_defined.patch
-0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
diff --git 
a/patches/klibc-2.0.3/0001-klibc-use-kernel-header-installed-by-headers_install.patch
 
b/patches/klibc-2.0.3/0001-klibc-use-kernel-header-installed-by-headers_install.patch
new file mode 100644
index 0000000..e9795b3
--- /dev/null
+++ 
b/patches/klibc-2.0.3/0001-klibc-use-kernel-header-installed-by-headers_install.patch
@@ -0,0 +1,60 @@
+From: Marc Kleine-Budde <[email protected]>
+Date: Mon, 5 Jan 2009 17:46:47 +0100
+Subject: [PATCH 17/21] [klibc] use kernel header installed by "headers_install"
+
+Originally klibc directly sets the compiler header search path
+directly into the kernel tree. This causes compilation to fail on modern
+kernel with a changed include dir layout.
+
+This patch uses the "headers_install" to extract the includes from the
+kernel. Against these headers klibc is build.
+
+Ported from 1.5.15
+
+Index: klibc-1.5.25/Makefile
+===================================================================
+--- klibc-1.5.25.orig/Makefile
++++ klibc-1.5.25/Makefile
+@@ -6,6 +6,7 @@ SRCROOT = .
+ # kbuild compatibility
+ export srctree  := $(shell pwd)
+ export objtree  := $(shell pwd)
++export LINUX_HEADERS := $(objtree)/linux-headers
+ export KLIBCSRC := usr/klibc
+ export VERSION := $(shell cat $(srctree)/$(KLIBCSRC)/version)
+ export KLIBCINC := usr/include
+@@ -102,16 +103,19 @@ $(KLIBCKERNELSRC):
+       @echo "KLIBCKERNELSRC=<path> to the build."
+       @false
+ 
++$(LINUX_HEADERS): linux
++      $(Q)$(MAKE) -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) 
INSTALL_HDR_PATH="$@" headers_install
++
+ rpmbuild = $(shell which rpmbuild 2>/dev/null || which rpm)
+ 
+ klibc.spec: klibc.spec.in $(KLIBCSRC)/version
+       sed -e 's/@@VERSION@@/$(VERSION)/g' < $< > $@
+ 
+ # Build klcc - it is the first target
+-klcc: $(objtree)/.config
++klcc: $(objtree)/.config  $(LINUX_HEADERS)
+       $(Q)$(MAKE) $(klibc)=klcc
+ 
+-klibc: $(objtree)/.config
++klibc: $(objtree)/.config  $(LINUX_HEADERS)
+       $(Q)$(MAKE) $(klibc)=.
+ 
+ test: klibc
+Index: klibc-1.5.25/scripts/Kbuild.klibc
+===================================================================
+--- klibc-1.5.25.orig/scripts/Kbuild.klibc
++++ klibc-1.5.25/scripts/Kbuild.klibc
+@@ -113,7 +113,7 @@ KLIBCCPPFLAGS    := -nostdinc -iwithpref
+ # kernel include paths
+ KLIBCKERNELSRC         ?= $(srctree)
+ KLIBCKERNELOBJ         ?= $(objtree)
+-KLIBCCPPFLAGS    += -I$(KLIBCKERNELSRC)/include                               
    \
++KLIBCCPPFLAGS    += -I$(LINUX_HEADERS)/include                                
    \
+                      $(if $(KBUILD_SRC),-I$(KLIBCKERNELOBJ)/include2      \
+                      -I$(KLIBCKERNELOBJ)/include -I$(srctree)/include)    \
+                    $(KLIBCARCHINCFLAGS)
diff --git 
a/patches/klibc-2.0.3/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
 
b/patches/klibc-2.0.3/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
new file mode 100644
index 0000000..60f1d8f
--- /dev/null
+++ 
b/patches/klibc-2.0.3/0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
@@ -0,0 +1,58 @@
+From 6b24aece3e313aece16ce60255e918963b0905b3 Mon Sep 17 00:00:00 2001
+From: Jon Ringle <[email protected]>
+Date: Thu, 29 Oct 2009 16:27:11 +0100
+Subject: [PATCH 18/21] Patch to add support for detection of vfat and jffs2 
images.
+
+Obtained from openembedded:
+http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/klibc/klibc-1.5.15/fstype-sane-vfat-and-jffs2-for-1.5.patch
+
+Signed-off-by: Jon Ringle <[email protected]>
+[mkl: fixed compiler warnings]
+Signed-off-by: Marc Kleine-Budde <[email protected]>
+---
+ usr/kinit/fstype/fstype.c |   22 ++++++++++++++++++++++
+ 1 files changed, 22 insertions(+), 0 deletions(-)
+
+diff --git a/usr/kinit/fstype/fstype.c b/usr/kinit/fstype/fstype.c
+index 69e0e30..d06bcd1 100644
+--- a/usr/kinit/fstype/fstype.c
++++ b/usr/kinit/fstype/fstype.c
+@@ -59,6 +59,26 @@
+ /* Swap needs the definition of block size */
+ #include "swap_fs.h"
+ 
++static int jffs2_image(const void *buf, unsigned long long *bytes)
++{
++      const unsigned char *cbuf = buf;
++
++      if (cbuf[0] == 0x85 && cbuf[1] == 0x19)
++              return 1;
++
++      return 0;
++}
++
++static int vfat_image(const void *buf, unsigned long long *bytes)
++{
++      if (!strncmp(buf + 54, "FAT12   ", 8)
++          || !strncmp(buf + 54, "FAT16   ", 8)
++          || !strncmp(buf + 82, "FAT32   ", 8))
++              return 1;
++
++      return 0;
++}
++
+ static int gzip_image(const void *buf, unsigned long long *bytes)
+ {
+       const unsigned char *p = buf;
+@@ -492,6 +512,8 @@ static struct imagetype images[] = {
+       {1, "minix", minix_image},
+       {1, "nilfs2", nilfs2_image},
+       {2, "ocfs2", ocfs2_image},
++      {0, "jffs2", jffs2_image},
++      {0, "vfat", vfat_image},
+       {8, "reiserfs", reiserfs_image},
+       {64, "reiserfs", reiserfs_image},
+       {64, "reiser4", reiser4_image},
+-- 
+1.6.5
+
diff --git a/patches/klibc-2.0.3/0003-define-__socklen_t_defined.patch 
b/patches/klibc-2.0.3/0003-define-__socklen_t_defined.patch
new file mode 100644
index 0000000..cf7814b
--- /dev/null
+++ b/patches/klibc-2.0.3/0003-define-__socklen_t_defined.patch
@@ -0,0 +1,17 @@
+From: Jon Ringle <[email protected]>
+Subject: define "__socklen_t_defined"
+
+Port from 1.5.15
+
+Index: klibc-1.5.25/usr/include/sys/socket.h
+===================================================================
+--- klibc-1.5.25.orig/usr/include/sys/socket.h
++++ klibc-1.5.25/usr/include/sys/socket.h
+@@ -152,6 +152,7 @@ struct sockaddr {
+       char            sa_data[14];    /* 14 bytes of protocol address */
+ };
+ typedef int socklen_t;
++#define __socklen_t_defined 1
+ struct msghdr {
+       void *msg_name;
+       int msg_namelen;
diff --git 
a/patches/klibc-2.0.3/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
 
b/patches/klibc-2.0.3/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
new file mode 100644
index 0000000..09cbd2d
--- /dev/null
+++ 
b/patches/klibc-2.0.3/0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
@@ -0,0 +1,31 @@
+From e3cbc39bf1a94056f4a4bbae0067109d0317e68b Mon Sep 17 00:00:00 2001
+From: Jon Ringle <[email protected]>
+Date: Thu, 29 Oct 2009 16:27:14 +0100
+Subject: [PATCH 20/21] fix warning include/signal.h:47:5: warning: "SIGRTMAX" 
is not defined
+
+Signed-off-by: Jon Ringle <[email protected]>
+Signed-off-by: Marc Kleine-Budde <[email protected]>
+---
+ usr/include/signal.h |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/usr/include/signal.h b/usr/include/signal.h
+index a513282..4ed65bc 100644
+--- a/usr/include/signal.h
++++ b/usr/include/signal.h
+@@ -44,10 +44,12 @@ typedef int sig_atomic_t;
+ /* The kernel header files are inconsistent whether or not
+    SIGRTMAX is inclusive or exclusive.  POSIX seems to state that
+    it's inclusive, however. */
++#ifdef SIGRTMAX
+ #if SIGRTMAX >= _NSIG
+ # undef  SIGRTMAX
+ # define SIGRTMAX (_NSIG-1)
+ #endif
++#endif
+ 
+ __extern const char *const sys_siglist[_NSIG];
+ __extern const char *const sys_sigabbrev[_NSIG];
+-- 
+1.6.5
+
diff --git a/patches/klibc-2.0.3/series b/patches/klibc-2.0.3/series
new file mode 100644
index 0000000..b4b9233
--- /dev/null
+++ b/patches/klibc-2.0.3/series
@@ -0,0 +1,4 @@
+0001-klibc-use-kernel-header-installed-by-headers_install.patch
+0002-Patch-to-add-support-for-detection-of-vfat-and-jffs2.patch
+0003-define-__socklen_t_defined.patch
+0004-fix-warning-include-signal.h-47-5-warning-SIGRTMAX-i.patch
diff --git a/rules/klibc.make b/rules/klibc.make
index 1a1c6b2..b5ee380 100644
--- a/rules/klibc.make
+++ b/rules/klibc.make
@@ -18,15 +18,15 @@ PACKAGES-$(PTXCONF_KLIBC) += klibc
 #
 # Paths and names
 #
-KLIBC_VERSION  := 1.5.25
-KLIBC_MD5      := 0c11c9c9d0c8b9e55c6689f43cee5a23
+KLIBC_VERSION  := 2.0.3
+KLIBC_MD5      := 5dc3fbee62c087048fd8338741474194
 KLIBC          := klibc-$(KLIBC_VERSION)
 KLIBC_SUFFIX   := tar.gz
 KLIBC_SOURCE   := $(SRCDIR)/$(KLIBC).$(KLIBC_SUFFIX)
 KLIBC_DIR      := $(BUILDDIR)/$(KLIBC)
 
 KLIBC_URL := \
-       $(call ptx/mirror, KERNEL, libs/klibc/1.5/$(KLIBC).$(KLIBC_SUFFIX))
+       $(call ptx/mirror, KERNEL, libs/klibc/2.0/$(KLIBC).$(KLIBC_SUFFIX))
 
 ifdef PTXCONF_KLIBC
 $(STATEDIR)/kernel.compile: $(STATEDIR)/klibc.targetinstall.post
-- 
1.8.3.2


-- 
ptxdist mailing list
[email protected]

Reply via email to