summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2010-02-21 16:37:51 +0100
committerAndrea Adami <andrea.adami@gmail.com>2010-02-21 16:43:19 +0100
commit072d533f58242702565e6b4af16d5e4dbc883c76 (patch)
treeb42e694474378d5c186f7834f185bf6ce4943c66
parent9a0b80fa466e76e8d0a0fe0065186a3076b029ba (diff)
downloadopenembedded-072d533f58242702565e6b4af16d5e4dbc883c76.tar.gz
klibc: major patch split and reordering, recipe cleaning.
* update order of patches to include upstream changes * bump PR for all three recipes * fix typo in klibc_1.5 about 'sh' * clean tabs Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
-rw-r--r--recipes/klibc/files/fstype-sane-vfat-and-jffs2-for-1.5.patch (renamed from recipes/klibc/klibc-1.5.15+1.5.16/fstype-sane-vfat-and-jffs2-for-1.5.patch)16
-rw-r--r--recipes/klibc/files/isystem.patch (renamed from recipes/klibc/klibc-1.5.15+1.5.16/isystem.patch)10
-rw-r--r--recipes/klibc/files/mntproc-definitions.patch (renamed from recipes/klibc/klibc-1.5.15+1.5.16/mntproc-definitions.patch)6
-rw-r--r--recipes/klibc/files/signal-cleanup.patch (renamed from recipes/klibc/klibc-1.5.15/signal-cleanup.patch)8
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/1.5.15+1.5.16.patch721
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/fix-must_inline-macro-for-gcc4.3.patch36
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-omit-zero-lenght-DHCP-vendor-class-id.patch88
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-send-req-hostname-in-DHCP.patch114
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch43
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/klibc-utils-add-simple-ls.patch249
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/modprobe.patch4
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/signal-cleanup.patch38
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/use-headers_install-to-install-headers.patch41
-rw-r--r--recipes/klibc/klibc-1.5.15+1.5.16/wc.patch4
-rw-r--r--recipes/klibc/klibc-1.5.15/fstype-sane-vfat-and-jffs2-for-1.5.patch63
-rw-r--r--recipes/klibc/klibc-1.5.15/isystem.patch13
-rw-r--r--recipes/klibc/klibc-1.5.15/mntproc-definitions.patch20
-rw-r--r--recipes/klibc/klibc-common.inc17
-rw-r--r--recipes/klibc/klibc-utils-static_1.5.15+1.5.16.bb45
-rw-r--r--recipes/klibc/klibc-utils-static_1.5.15.bb60
-rw-r--r--recipes/klibc/klibc-utils-static_1.5.bb69
-rw-r--r--recipes/klibc/klibc_1.5.15+1.5.16.bb31
-rw-r--r--recipes/klibc/klibc_1.5.15+1.5.16.inc23
-rw-r--r--recipes/klibc/klibc_1.5.15.bb2
-rw-r--r--recipes/klibc/klibc_1.5.15.inc63
-rw-r--r--recipes/klibc/klibc_1.5.bb2
-rw-r--r--recipes/klibc/klibc_1.5.inc59
27 files changed, 938 insertions, 907 deletions
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/fstype-sane-vfat-and-jffs2-for-1.5.patch b/recipes/klibc/files/fstype-sane-vfat-and-jffs2-for-1.5.patch
index 6eb604e45c..041f67988c 100644
--- a/recipes/klibc/klibc-1.5.15+1.5.16/fstype-sane-vfat-and-jffs2-for-1.5.patch
+++ b/recipes/klibc/files/fstype-sane-vfat-and-jffs2-for-1.5.patch
@@ -9,12 +9,12 @@ Index: klibc-1.5/usr/kinit/fstype/fstype.c
-
+#include <linux/types.h>
#define cpu_to_be32(x) __cpu_to_be32(x) /* Needed by romfs_fs.h */
-
+
#include "romfs_fs.h"
@@ -37,6 +37,12 @@
#include "ocfs2_fs.h"
#include "nilfs_fs.h"
-
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#include <linux/byteorder/big_endian.h>
+#else
@@ -27,7 +27,7 @@ Index: klibc-1.5/usr/kinit/fstype/fstype.c
@@ -59,6 +65,27 @@
/* Swap needs the definition of block size */
#include "swap_fs.h"
-
+
+static int jffs2_image(const unsigned char *buf, unsigned long *blocks)
+{
+ // Very sloppy! ;-E
@@ -51,13 +51,13 @@ Index: klibc-1.5/usr/kinit/fstype/fstype.c
+
static int gzip_image(const void *buf, unsigned long long *bytes)
{277 304
- const unsigned char *p = buf;
+ const unsigned char *p = buf;
@@ -490,6 +517,8 @@
- {1, "ext3", ext3_image},
- {1, "ext2", ext2_image},
- {1, "minix", minix_image},
+ {1, "ext3", ext3_image},
+ {1, "ext2", ext2_image},
+ {1, "minix", minix_image},
+ {0, "jffs2", jffs2_image},
+ {0, "vfat", vfat_image},
{1, "nilfs2", nilfs2_image},
{2, "ocfs2", ocfs2_image},
- {8, "reiserfs", reiserfs_image},
+ {8, "reiserfs", reiserfs_image},
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/isystem.patch b/recipes/klibc/files/isystem.patch
index 2ec40c16c2..ccdf9ed92d 100644
--- a/recipes/klibc/klibc-1.5.15+1.5.16/isystem.patch
+++ b/recipes/klibc/files/isystem.patch
@@ -4,10 +4,10 @@ Index: klibc-1.5.15/klcc/klcc.in
+++ klibc-1.5.15/klcc/klcc.in 2009-12-14 00:34:20.855735356 +0100
@@ -147,7 +147,7 @@
} elsif ( $a =~ /^-([fmwWQdO]|std=|ansi|pedantic|M[GPD]|MMD)/ ) {
- # Options to gcc
- push(@ccopt, $a);
+ # Options to gcc
+ push(@ccopt, $a);
- } elsif ( $a =~ /^-([DUI]|M[FQT])(.*)$/ ) {
+ } elsif ( $a =~ /^-([DUI]|M[FQT]|isystem)(.*)$/ ) {
- # Options to gcc, which can take either a conjoined argument
- # (-DFOO) or a disjoint argument (-D FOO)
- push(@ccopt, $a);
+ # Options to gcc, which can take either a conjoined argument
+ # (-DFOO) or a disjoint argument (-D FOO)
+ push(@ccopt, $a);
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/mntproc-definitions.patch b/recipes/klibc/files/mntproc-definitions.patch
index eea606be2b..5db24cd3aa 100644
--- a/recipes/klibc/klibc-1.5.15+1.5.16/mntproc-definitions.patch
+++ b/recipes/klibc/files/mntproc-definitions.patch
@@ -7,9 +7,9 @@ diff -Nur -x '*.orig' -x '*~' klibc-1.5.15/usr/kinit/nfsmount/mount.c klibc-1.5.
--- klibc-1.5.15/usr/kinit/nfsmount/mount.c 2009-01-04 19:28:03.000000000 +0000
+++ klibc-1.5.15.new/usr/kinit/nfsmount/mount.c 2009-10-04 22:52:44.000000000 +0100
@@ -44,6 +44,11 @@
-
+
#define MNT_REPLY_MINSIZE (sizeof(struct rpc_reply) + sizeof(uint32_t))
-
+
+#ifndef MNTPROC_MNT
+# define MNTPROC_MNT 1
+# define MNTPROC_UMNT 3
@@ -17,4 +17,4 @@ diff -Nur -x '*.orig' -x '*~' klibc-1.5.15/usr/kinit/nfsmount/mount.c klibc-1.5.
+
static int get_ports(uint32_t server, const struct nfs_mount_data *data)
{
- uint32_t nfs_ver, mount_ver;
+ uint32_t nfs_ver, mount_ver;
diff --git a/recipes/klibc/klibc-1.5.15/signal-cleanup.patch b/recipes/klibc/files/signal-cleanup.patch
index c64cd5bbb6..ce7f5ebf72 100644
--- a/recipes/klibc/klibc-1.5.15/signal-cleanup.patch
+++ b/recipes/klibc/files/signal-cleanup.patch
@@ -8,14 +8,14 @@ Index: klibc-1.5.15/usr/include/arch/i386/klibc/archsignal.h
@@ -96,7 +96,12 @@ typedef struct {
#define MINSIGSTKSZ 2048
#define SIGSTKSZ 8192
-
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+#include <asm-generic/signal-defs.h>
+#else
#include <asm-generic/signal.h>
+#endif
-
+
/* This uses gcc anonymous union support... */
struct siginfo;
Index: klibc-1.5.15/usr/include/arch/sparc/klibc/archsignal.h
@@ -25,7 +25,7 @@ Index: klibc-1.5.15/usr/include/arch/sparc/klibc/archsignal.h
@@ -11,13 +11,6 @@
#define __WANT_POSIX1B_SIGNALS__
#include <asm/signal.h>
-
+
-struct sigaction {
- __sighandler_t sa_handler;
- unsigned long sa_flags;
@@ -35,4 +35,4 @@ Index: klibc-1.5.15/usr/include/arch/sparc/klibc/archsignal.h
-
/* Not actually used by the kernel... */
#define SA_RESTORER 0x80000000
-
+
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/1.5.15+1.5.16.patch b/recipes/klibc/klibc-1.5.15+1.5.16/1.5.15+1.5.16.patch
new file mode 100644
index 0000000000..3d2c14b65f
--- /dev/null
+++ b/recipes/klibc/klibc-1.5.15+1.5.16/1.5.15+1.5.16.patch
@@ -0,0 +1,721 @@
+diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
+index 44c8f76..de918f0 100644
+--- a/scripts/Kbuild.install
++++ b/scripts/Kbuild.install
+@@ -95,16 +95,7 @@ header:
+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
+ $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
+- $(Q)set -e ; for d in linux asm asm-$(KLIBCARCH) asm-generic $(ASMKLIBCARCH); do \
+- for r in $(KLIBCKERNELSRC)/include $(KLIBCKERNELOBJ)/include \
+- $(KLIBCKERNELOBJ)/include2 ; do \
+- [ ! -d $$r/$$d ] && continue; \
+- mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)include/$$d ; \
+- cp -rfL $$r/$$d/. \
+- $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ; \
+- done ; \
+- done
+- $(Q)cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(KLIBCARCH) asm
++ $(Q)make -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
+ $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
+ $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
+ $(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir)
+diff --git a/usr/include/klibc/compiler.h b/usr/include/klibc/compiler.h
+index 816a4ee..9dee742 100644
+--- a/usr/include/klibc/compiler.h
++++ b/usr/include/klibc/compiler.h
+@@ -24,7 +24,12 @@
+ /* Use "extern inline" even in the gcc3+ case to avoid warnings in ctype.h */
+ #ifdef __GNUC__
+ # if __GNUC__ >= 3
+-# define __must_inline extern __inline__ __attribute__((always_inline))
++# ifdef __GNUC_STDC_INLINE__
++# define __must_inline extern __inline__ \
++ __attribute__((__gnu_inline__,__always_inline__))
++# else
++# define __must_inline extern __inline__ __attribute__((__always_inline__))
++# endif
+ # else
+ # define __must_inline extern __inline__
+ # endif
+diff --git a/usr/include/mntent.h b/usr/include/mntent.h
+new file mode 100644
+index 0000000..210610c
+--- /dev/null
++++ b/usr/include/mntent.h
+@@ -0,0 +1,19 @@
++#ifndef _MNTENT_H
++#define _MNTENT_H 1
++
++struct mntent {
++ char *mnt_fsname; /* name of mounted file system */
++ char *mnt_dir; /* file system path prefix */
++ char *mnt_type; /* mount type (see mntent.h) */
++ char *mnt_opts; /* mount options (see mntent.h) */
++ int mnt_freq; /* dump frequency in days */
++ int mnt_passno; /* pass number on parallel fsck */
++};
++
++extern FILE *setmntent(const char *, const char *);
++
++extern struct mntent *getmntent(FILE *);
++
++extern int endmntent(FILE *fp);
++
++#endif /* mntent.h */
+diff --git a/usr/include/string.h b/usr/include/string.h
+index ae8270e..0c8c046 100644
+--- a/usr/include/string.h
++++ b/usr/include/string.h
+@@ -44,5 +44,6 @@ __extern char *strsep(char **, const char *);
+ __extern size_t strspn(const char *, const char *);
+ __extern char *strstr(const char *, const char *);
+ __extern char *strtok(char *, const char *);
++__extern char *strtok_r(char *, const char *, char **);
+
+ #endif /* _STRING_H */
+diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c
+index d4f2c09..f3cfd52 100644
+--- a/usr/kinit/ipconfig/dhcp_proto.c
++++ b/usr/kinit/ipconfig/dhcp_proto.c
+@@ -49,24 +49,26 @@ static uint8_t dhcp_end[] = {
+
+ /* Both iovecs below have to have the same structure, since dhcp_send()
+ pokes at the internals */
+-#define DHCP_IOV_LEN 6
++#define DHCP_IOV_LEN 7
+
+-static struct iovec dhcp_discover_iov[] = {
++static struct iovec dhcp_discover_iov[DHCP_IOV_LEN] = {
+ /* [0] = ip + udp header */
+ /* [1] = bootp header */
+ [2] = {dhcp_discover_hdr, sizeof(dhcp_discover_hdr)},
+ [3] = {dhcp_params, sizeof(dhcp_params)},
+- /* [4] = DHCP vendor class */
+- [5] = {dhcp_end, sizeof(dhcp_end)}
++ /* [4] = optional vendor class */
++ /* [5] = optional hostname */
++ /* [6] = {dhcp_end, sizeof(dhcp_end)} */
+ };
+
+-static struct iovec dhcp_request_iov[] = {
++static struct iovec dhcp_request_iov[DHCP_IOV_LEN] = {
+ /* [0] = ip + udp header */
+ /* [1] = bootp header */
+ [2] = {dhcp_request_hdr, sizeof(dhcp_request_hdr)},
+ [3] = {dhcp_params, sizeof(dhcp_params)},
+- /* [4] = DHCP vendor class */
+- [5] = {dhcp_end, sizeof(dhcp_end)}
++ /* [4] = optional vendor class */
++ /* [5] = optional hostname */
++ /* [6] = {dhcp_end, sizeof(dhcp_end)} */
+ };
+
+ /*
+@@ -164,6 +166,8 @@ static int dhcp_recv(struct netdev *dev)
+ static int dhcp_send(struct netdev *dev, struct iovec *vec)
+ {
+ struct bootp_hdr bootp;
++ char dhcp_hostname[SYS_NMLN+2];
++ int i = 4;
+
+ memset(&bootp, 0, sizeof(struct bootp_hdr));
+
+@@ -171,7 +175,8 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
+ bootp.htype = dev->hwtype;
+ bootp.hlen = dev->hwlen;
+ bootp.xid = dev->bootp.xid;
+- bootp.ciaddr = dev->ip_addr;
++ bootp.ciaddr = INADDR_NONE;
++ bootp.yiaddr = dev->ip_addr;
+ bootp.giaddr = INADDR_ANY;
+ bootp.secs = htons(time(NULL) - dev->open_time);
+ memcpy(bootp.chaddr, dev->hwaddr, 16);
+@@ -179,12 +184,35 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
+ vec[1].iov_base = &bootp;
+ vec[1].iov_len = sizeof(struct bootp_hdr);
+
+- vec[4].iov_base = vendor_class_identifier;
+- vec[4].iov_len = vendor_class_identifier_len;
+-
+ DEBUG(("xid %08x secs %d ", bootp.xid, ntohs(bootp.secs)));
+
+- return packet_send(dev, vec, DHCP_IOV_LEN);
++ if (vendor_class_identifier_len > 2) {
++ vec[i].iov_base = vendor_class_identifier;
++ vec[i].iov_len = vendor_class_identifier_len;
++ i++;
++
++ DEBUG(("vendor_class_identifier \"%.*s\" ",
++ vendor_class_identifier_len-2,
++ vendor_class_identifier+2));
++ }
++
++ if (dev->reqhostname[0] != '\0') {
++ int len = strlen(dev->reqhostname);
++ dhcp_hostname[0] = 12;
++ dhcp_hostname[1] = len;
++ memcpy(dhcp_hostname+2, dev->reqhostname, len);
++
++ vec[i].iov_base = dhcp_hostname;
++ vec[i].iov_len = len+2;
++ i++;
++
++ DEBUG(("hostname %.*s ", len, dhcp_hostname+2));
++ }
++
++ vec[i].iov_base = dhcp_end;
++ vec[i].iov_len = sizeof(dhcp_end);
++
++ return packet_send(dev, vec, i);
+ }
+
+ /*
+diff --git a/usr/kinit/ipconfig/main.c b/usr/kinit/ipconfig/main.c
+index 2ded0f3..619edf7 100644
+--- a/usr/kinit/ipconfig/main.c
++++ b/usr/kinit/ipconfig/main.c
+@@ -522,6 +522,8 @@ static int parse_device(struct netdev *dev, const char *ip)
+ case 4:
+ strncpy(dev->hostname, ip, SYS_NMLN - 1);
+ dev->hostname[SYS_NMLN - 1] = '\0';
++ memcpy(dev->reqhostname, dev->hostname,
++ SYS_NMLN);
+ break;
+ case 5:
+ dev->name = ip;
+@@ -569,6 +571,8 @@ static void bringup_one_dev(struct netdev *template, struct netdev *dev)
+ dev->ip_nameserver[1] = template->ip_nameserver[1];
+ if (template->hostname[0] != '\0')
+ strcpy(dev->hostname, template->hostname);
++ if (template->reqhostname[0] != '\0')
++ strcpy(dev->reqhostname, template->reqhostname);
+ dev->caps &= template->caps;
+
+ bringup_device(dev);
+diff --git a/usr/kinit/ipconfig/netdev.h b/usr/kinit/ipconfig/netdev.h
+index fb6640a..26d076a 100644
+--- a/usr/kinit/ipconfig/netdev.h
++++ b/usr/kinit/ipconfig/netdev.h
+@@ -4,7 +4,7 @@
+ #include <sys/utsname.h>
+ #include <net/if.h>
+
+-#define BPLEN 40
++#define BPLEN 256
+ #define FNLEN 128 /* from DHCP RFC 2131 */
+
+ struct netdev {
+@@ -35,6 +35,7 @@ struct netdev {
+ uint32_t ip_gateway; /* my gateway */
+ uint32_t ip_nameserver[2]; /* two nameservers */
+ uint32_t serverid; /* dhcp serverid */
++ char reqhostname[SYS_NMLN]; /* requested hostname */
+ char hostname[SYS_NMLN]; /* hostname */
+ char dnsdomainname[SYS_NMLN]; /* dns domain name */
+ char nisdomainname[SYS_NMLN]; /* nis domain name */
+diff --git a/usr/klibc/Kbuild b/usr/klibc/Kbuild
+index 20890c5..ab5212b 100644
+--- a/usr/klibc/Kbuild
++++ b/usr/klibc/Kbuild
+@@ -36,6 +36,7 @@ klib-y := vsnprintf.o snprintf.o vsprintf.o sprintf.o \
+ strncat.o strlcpy.o strlcat.o \
+ strstr.o strncmp.o strncpy.o strrchr.o \
+ strxspn.o strspn.o strcspn.o strpbrk.o strsep.o strtok.o \
++ strtok_r.o \
+ fnmatch.o \
+ gethostname.o getdomainname.o getcwd.o \
+ seteuid.o setegid.o \
+@@ -55,7 +56,8 @@ klib-y := vsnprintf.o snprintf.o vsprintf.o sprintf.o \
+ ctype/ispunct.o ctype/isspace.o ctype/isupper.o \
+ ctype/isxdigit.o ctype/tolower.o ctype/toupper.o \
+ userdb/getgrgid.o userdb/getgrnam.o userdb/getpwnam.o \
+- userdb/getpwuid.o userdb/root_group.o userdb/root_user.o
++ userdb/getpwuid.o userdb/root_group.o userdb/root_user.o \
++ setmntent.o endmntent.o getmntent.o
+
+ klib-$(CONFIG_KLIBC_ERRLIST) += errlist.o
+
+diff --git a/usr/klibc/endmntent.c b/usr/klibc/endmntent.c
+new file mode 100644
+index 0000000..419c317
+--- /dev/null
++++ b/usr/klibc/endmntent.c
+@@ -0,0 +1,9 @@
++#include <stdio.h>
++#include <mntent.h>
++
++int endmntent(FILE *fp)
++{
++ if (fp)
++ fclose(fp);
++ return 1;
++}
+diff --git a/usr/klibc/getmntent.c b/usr/klibc/getmntent.c
+new file mode 100644
+index 0000000..8af27f3
+--- /dev/null
++++ b/usr/klibc/getmntent.c
+@@ -0,0 +1,61 @@
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <mntent.h>
++
++#define BUFLEN 1024
++
++struct mntent *getmntent_r(FILE *fp, struct mntent *mntbuf, char *buf,
++ int buflen)
++{
++ char *line = NULL, *saveptr = NULL;
++ const char *sep = " \t\n";
++
++ if (!fp || !mntbuf || !buf)
++ return NULL;
++
++ while ((line = fgets(buf, buflen, fp)) != NULL) {
++ if (buf[0] == '#' || buf[0] == '\n')
++ continue;
++ break;
++ }
++
++ if (!line)
++ return NULL;
++
++ mntbuf->mnt_fsname = strtok_r(buf, sep, &saveptr);
++ if (!mntbuf->mnt_fsname)
++ return NULL;
++
++ mntbuf->mnt_dir = strtok_r(NULL, sep, &saveptr);
++ if (!mntbuf->mnt_fsname)
++ return NULL;
++
++ mntbuf->mnt_type = strtok_r(NULL, sep, &saveptr);
++ if (!mntbuf->mnt_type)
++ return NULL;
++
++ mntbuf->mnt_opts = strtok_r(NULL, sep, &saveptr);
++ if (!mntbuf->mnt_opts)
++ mntbuf->mnt_opts = "";
++
++ line = strtok_r(NULL, sep, &saveptr);
++ mntbuf->mnt_freq = !line ? 0 : atoi(line);
++
++ line = strtok_r(NULL, sep, &saveptr);
++ mntbuf->mnt_passno = !line ? 0 : atoi(line);
++
++ return mntbuf;
++}
++
++struct mntent *getmntent(FILE *fp)
++{
++ static char *buf = NULL;
++ static struct mntent mntbuf;
++
++ buf = malloc(BUFLEN);
++ if (!buf)
++ perror("malloc");
++
++ return getmntent_r(fp, &mntbuf, buf, BUFLEN);
++}
+diff --git a/usr/klibc/setmntent.c b/usr/klibc/setmntent.c
+new file mode 100644
+index 0000000..d23e141
+--- /dev/null
++++ b/usr/klibc/setmntent.c
+@@ -0,0 +1,7 @@
++#include <stdio.h>
++#include <mntent.h>
++
++FILE *setmntent(const char *filename, const char *type)
++{
++ return fopen(filename, type);
++}
+diff --git a/usr/klibc/strtok.c b/usr/klibc/strtok.c
+index c2671af..6b169a1 100644
+--- a/usr/klibc/strtok.c
++++ b/usr/klibc/strtok.c
+@@ -8,12 +8,5 @@ char *strtok(char *s, const char *delim)
+ {
+ static char *holder;
+
+- if (s)
+- holder = s;
+-
+- do {
+- s = strsep(&holder, delim);
+- } while (s && !*s);
+-
+- return s;
++ return strtok_r(s, delim, &holder);
+ }
+diff --git a/usr/klibc/strtok_r.c b/usr/klibc/strtok_r.c
+new file mode 100644
+index 0000000..695d516
+--- /dev/null
++++ b/usr/klibc/strtok_r.c
+@@ -0,0 +1,13 @@
++#include <string.h>
++
++char *strtok_r(char *s, const char *delim, char **holder)
++{
++ if (s)
++ *holder = s;
++
++ do {
++ s = strsep(holder, delim);
++ } while (s && !*s);
++
++ return s;
++}
+diff --git a/usr/klibc/version b/usr/klibc/version
+index f6ed435..0ed0610 100644
+--- a/usr/klibc/version
++++ b/usr/klibc/version
+@@ -1 +1 @@
+-1.5.15
++1.5.16
+diff --git a/usr/utils/Kbuild b/usr/utils/Kbuild
+index 5b6dc28..354a364 100644
+--- a/usr/utils/Kbuild
++++ b/usr/utils/Kbuild
+@@ -3,7 +3,7 @@
+ #
+
+ progs := chroot dd mkdir mkfifo mknod mount pivot_root umount
+-progs += true false sleep ln nuke minips cat
++progs += true false sleep ln nuke minips cat ls
+ progs += uname halt kill readlink cpio sync dmesg
+
+ static-y := $(addprefix static/, $(progs))
+@@ -36,6 +36,8 @@ static/sleep-y := sleep.o
+ shared/sleep-y := sleep.o
+ static/ln-y := ln.o
+ shared/ln-y := ln.o
++static/ls-y := ls.o
++shared/ls-y := ls.o
+ static/nuke-y := nuke.o
+ shared/nuke-y := nuke.o
+ static/minips-y := minips.o
+diff --git a/usr/utils/ls.c b/usr/utils/ls.c
+new file mode 100644
+index 0000000..859142a
+--- /dev/null
++++ b/usr/utils/ls.c
+@@ -0,0 +1,202 @@
++#include <stdio.h>
++#include <stdlib.h>
++#include <dirent.h>
++#include <unistd.h>
++#include <sys/stat.h>
++#include <sys/types.h>
++#include <sys/sysmacros.h>
++
++#define STAT_ISSET(mode, mask) (((mode) & mask) == mask)
++
++static size_t max_linksiz = 128;
++static int max_nlinks = 1;
++static int max_size = 1;
++static int max_uid = 1;
++static int max_gid = 1;
++static int max_min = 1;
++static int max_maj = 1;
++
++static void do_preformat(const struct stat *st)
++{
++ int bytes;
++
++ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_nlink)) > max_nlinks)
++ max_nlinks = bytes;
++
++ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_uid)) > max_uid)
++ max_uid = bytes;
++
++ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_gid)) > max_gid)
++ max_gid = bytes;
++
++ if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
++ if ((bytes = snprintf(NULL, 0, "%u", major(st->st_rdev))) > max_maj)
++ max_maj = bytes;
++
++ if ((bytes = snprintf(NULL, 0, "%u", minor(st->st_rdev))) > max_min)
++ max_min = bytes;
++
++ max_size = max_maj + max_min + 1;
++ }
++ else {
++ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_size)) > max_size)
++ max_size = bytes;
++ }
++ return;
++}
++
++static void do_stat(const struct stat *st, const char *path)
++{
++ char *fmt, *link_name;
++ int rc;
++
++ switch (st->st_mode & S_IFMT) {
++ case S_IFBLK: putchar('b'); break;
++ case S_IFCHR: putchar('c'); break;
++ case S_IFDIR: putchar('d'); break;
++ case S_IFIFO: putchar('p'); break;
++ case S_IFLNK: putchar('l'); break;
++ case S_IFSOCK: putchar('s'); break;
++ case S_IFREG: putchar('-'); break;
++ default: putchar('?'); break;
++ }
++ putchar(STAT_ISSET(st->st_mode, S_IRUSR) ? 'r' : '-');
++ putchar(STAT_ISSET(st->st_mode, S_IWUSR) ? 'w' : '-');
++
++ !STAT_ISSET(st->st_mode, S_ISUID) ?
++ putchar(STAT_ISSET(st->st_mode, S_IXUSR) ? 'x' : '-') :
++ putchar('S');
++
++ putchar(STAT_ISSET(st->st_mode, S_IRGRP) ? 'r' : '-');
++ putchar(STAT_ISSET(st->st_mode, S_IWGRP) ? 'w' : '-');
++
++ !STAT_ISSET(st->st_mode, S_ISGID) ?
++ putchar(STAT_ISSET(st->st_mode, S_IXGRP) ? 'x' : '-') :
++ putchar('S');
++
++ putchar(STAT_ISSET(st->st_mode, S_IROTH) ? 'r' : '-');
++ putchar(STAT_ISSET(st->st_mode, S_IWOTH) ? 'w' : '-');
++
++ !STAT_ISSET(st->st_mode, S_ISVTX) ?
++ putchar(STAT_ISSET(st->st_mode, S_IXOTH) ? 'x' : '-') :
++ putchar(S_ISDIR(st->st_mode) ? 't' : 'T');
++
++ if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
++ rc = asprintf(&fmt," %%%dju %%%dju %%%dju %%%du,%%%du %%s",
++ max_nlinks, max_uid, max_gid, max_maj, max_min);
++ if (rc == -1) {
++ perror("asprintf");
++ exit(1);
++ }
++ fprintf(stdout, fmt,
++ (uintmax_t) st->st_nlink,
++ (uintmax_t) st->st_uid,
++ (uintmax_t) st->st_gid,
++ major(st->st_rdev),
++ minor(st->st_rdev),
++ path);
++ }
++ else {
++ rc = asprintf(&fmt," %%%dju %%%dju %%%dju %%%dju %%s",
++ max_nlinks, max_uid, max_gid, max_size);
++ if (rc == -1) {
++ perror("asprintf");
++ exit(1);
++ }
++ fprintf(stdout, fmt,
++ (uintmax_t) st->st_nlink,
++ (uintmax_t) st->st_uid,
++ (uintmax_t) st->st_gid,
++ (uintmax_t) st->st_size,
++ path);
++ }
++ free(fmt);
++
++ if (S_ISLNK(st->st_mode)) {
++ if ((link_name = malloc(max_linksiz)) == NULL) {
++ perror("malloc");
++ exit(1);
++ }
++ if ((rc = readlink(path, link_name, max_linksiz)) == -1) {
++ free(link_name);
++ perror("readlink");
++ exit(1);
++ }
++ link_name[rc] = '\0';
++ fprintf(stdout, " -> %s", link_name);
++ free(link_name);
++ }
++
++ putchar('\n');
++ return;
++}
++
++static void do_dir(const char *path, int preformat)
++{
++ DIR *dir;
++ struct dirent *dent;
++ struct stat st;
++
++ if (chdir(path) == -1) {
++ perror(path);
++ exit(1);
++ }
++
++ if ((dir = opendir(path)) == NULL) {
++ perror(path);
++ exit(1);
++ }
++
++ while ((dent = readdir(dir)) != NULL) {
++ if (lstat(dent->d_name, &st)) {
++ perror(dent->d_name);
++ exit(1);
++ }
++ (preformat) ?
++ do_preformat(&st) :
++ do_stat(&st, dent->d_name);
++ }
++
++ closedir(dir);
++}
++
++int main(int argc, char *argv[])
++{
++ int i;
++ struct stat st;
++
++ if (argc == 1) {
++ do_dir(".", 1);
++ do_dir(".", 0);
++ return 0;
++ }
++
++ for (i = 1; i < argc; i++) {
++ if (argv[i][0] == '-' && argv[i][1] == 'h') {
++ fprintf(stdout, "Usage: ls [-h] [FILE ...]\n");
++ return 0;
++ }
++
++ if (lstat(argv[i], &st)) {
++ perror(argv[i]);
++ exit(1);
++ }
++
++ S_ISDIR(st.st_mode) ?
++ do_dir(argv[i], 1) :
++ do_preformat(&st);
++ }
++
++ for (i = 1; i < argc; i++) {
++ if (lstat(argv[i], &st)) {
++ perror(argv[i]);
++ exit(1);
++ }
++
++ S_ISDIR(st.st_mode) ?
++ do_dir(argv[i], 0) :
++ do_stat(&st, argv[i]);
++ }
++
++ return 0;
++}
+diff --git a/usr/utils/mount_main.c b/usr/utils/mount_main.c
+index b5993cc..ee08720 100644
+--- a/usr/utils/mount_main.c
++++ b/usr/utils/mount_main.c
+@@ -7,14 +7,52 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <mntent.h>
+
+ #include "mount_opts.h"
+
++#define _PATH_MOUNTED "/etc/mtab"
++#define _PATH_PROC_MOUNTS "/proc/mounts"
++
+ char *progname;
+
+ static struct extra_opts extra;
+ static unsigned long rwflag;
+
++static __noreturn usage(void)
++{
++ fprintf(stderr, "Usage: %s [-r] [-w] [-o options] [-t type] [-f] [-i] "
++ "[-n] device directory\n", progname);
++ exit(1);
++}
++
++static __noreturn print_mount(char *type)
++{
++ FILE *mfp;
++ struct mntent *mnt;
++
++ mfp = setmntent(_PATH_PROC_MOUNTS, "r");
++ if (!mfp)
++ mfp = setmntent(_PATH_MOUNTED, "r");
++ if (!mfp)
++ perror("setmntent");
++
++ while ((mnt = getmntent(mfp)) != NULL) {
++ if (mnt->mnt_fsname && !strncmp(mnt->mnt_fsname, "no", 2))
++ continue;
++ if (type && mnt->mnt_type && strcmp(type, mnt->mnt_type))
++ continue;
++ printf("%s on %s", mnt->mnt_fsname, mnt->mnt_dir);
++ if (mnt->mnt_type != NULL && mnt->mnt_type != '\0')
++ printf (" type %s", mnt->mnt_type);
++ if (mnt->mnt_opts != NULL && mnt->mnt_opts != '\0')
++ printf (" (%s)", mnt->mnt_opts);
++ printf("\n");
++ }
++ endmntent(mfp);
++ exit(0);
++}
++
+ static int
+ do_mount(char *dev, char *dir, char *type, unsigned long rwflag, void *data)
+ {
+@@ -66,10 +104,18 @@ int main(int argc, char *argv[])
+ rwflag = MS_VERBOSE;
+
+ do {
+- c = getopt(argc, argv, "no:rt:wfi");
++ c = getopt(argc, argv, "fhino:rt:w");
+ if (c == EOF)
+ break;
+ switch (c) {
++ case 'f':
++ /* we can't edit /etc/mtab yet anyway; exit */
++ exit(0);
++ case 'i':
++ /* ignore for now; no support for mount helpers */
++ break;
++ case 'h':
++ usage();
+ case 'n':
+ /* no mtab writing */
+ break;
+@@ -85,12 +131,6 @@ int main(int argc, char *argv[])
+ case 'w':
+ rwflag &= ~MS_RDONLY;
+ break;
+- case 'f':
+- /* we can't edit /etc/mtab yet anyway; exit */
+- exit(0);
+- case 'i':
+- /* ignore for now; no support for mount helpers */
+- break;
+ case '?':
+ fprintf(stderr, "%s: invalid option -%c\n",
+ progname, optopt);
+@@ -98,6 +138,9 @@ int main(int argc, char *argv[])
+ }
+ } while (1);
+
++ if (optind == argc)
++ print_mount(type);
++
+ /*
+ * If remount, bind or move was specified, then we don't
+ * have a "type" as such. Use the dummy "none" type.
+@@ -105,11 +148,8 @@ int main(int argc, char *argv[])
+ if (rwflag & MS_TYPE)
+ type = "none";
+
+- if (optind + 2 != argc || type == NULL) {
+- fprintf(stderr, "Usage: %s [-r] [-w] [-o options] [-t type] [-f] [-i] "
+- "[-n] device directory\n", progname);
+- exit(1);
+- }
++ if (optind + 2 != argc || type == NULL)
++ usage();
+
+ return do_mount(argv[optind], argv[optind + 1], type, rwflag,
+ extra.str);
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/fix-must_inline-macro-for-gcc4.3.patch b/recipes/klibc/klibc-1.5.15+1.5.16/fix-must_inline-macro-for-gcc4.3.patch
deleted file mode 100644
index 0ab93fa138..0000000000
--- a/recipes/klibc/klibc-1.5.15+1.5.16/fix-must_inline-macro-for-gcc4.3.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 63237c6e7037a6058deadc92ddcbcb41c5d4c2f8 Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Wed, 22 Jul 2009 03:09:29 -0400
-Subject: [PATCH] [klibc] fix must_inline macro in klibc/compiler.h for gcc-4.3
-
-Add __gnu_inline__ if we find __GNUC_STDC_INLINE__.
-
-See http://gcc.gnu.org/gcc-4.3/porting_to.html for details.
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- usr/include/klibc/compiler.h | 7 ++++++-
- 1 files changed, 6 insertions(+), 1 deletions(-)
-
-diff --git a/usr/include/klibc/compiler.h b/usr/include/klibc/compiler.h
-index 816a4ee..9dee742 100644
---- a/usr/include/klibc/compiler.h
-+++ b/usr/include/klibc/compiler.h
-@@ -24,7 +24,12 @@
- /* Use "extern inline" even in the gcc3+ case to avoid warnings in ctype.h */
- #ifdef __GNUC__
- # if __GNUC__ >= 3
--# define __must_inline extern __inline__ __attribute__((always_inline))
-+# ifdef __GNUC_STDC_INLINE__
-+# define __must_inline extern __inline__ \
-+ __attribute__((__gnu_inline__,__always_inline__))
-+# else
-+# define __must_inline extern __inline__ __attribute__((__always_inline__))
-+# endif
- # else
- # define __must_inline extern __inline__
- # endif
---
-1.7.0
-
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-omit-zero-lenght-DHCP-vendor-class-id.patch b/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-omit-zero-lenght-DHCP-vendor-class-id.patch
deleted file mode 100644
index 21166d47f0..0000000000
--- a/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-omit-zero-lenght-DHCP-vendor-class-id.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From b4bad5be5fa41416bf67fa1fba0624a0c541ea39 Mon Sep 17 00:00:00 2001
-From: Aron Griffis <agriffis@n01se.net>
-Date: Sun, 21 Jun 2009 22:40:17 -0400
-Subject: [PATCH] ipconfig: omit zero-length DHCP vendor_class_identifier
-
-If ipconfig is executed with -i "", omit the vendor class
-identifier from the DHCP discover/request rather than
-sending it empty. This patch paves the way for more
-flexibility in the DHCP packet, particularly hostname
-request.
-
-Signed-off-by: Aron Griffis <agriffis@n01se.net>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- usr/kinit/ipconfig/dhcp_proto.c | 31 +++++++++++++++++++++----------
- 1 files changed, 21 insertions(+), 10 deletions(-)
-
-diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c
-index d4f2c09..c127d39 100644
---- a/usr/kinit/ipconfig/dhcp_proto.c
-+++ b/usr/kinit/ipconfig/dhcp_proto.c
-@@ -51,22 +51,22 @@ static uint8_t dhcp_end[] = {
- pokes at the internals */
- #define DHCP_IOV_LEN 6
-
--static struct iovec dhcp_discover_iov[] = {
-+static struct iovec dhcp_discover_iov[DHCP_IOV_LEN] = {
- /* [0] = ip + udp header */
- /* [1] = bootp header */
- [2] = {dhcp_discover_hdr, sizeof(dhcp_discover_hdr)},
- [3] = {dhcp_params, sizeof(dhcp_params)},
-- /* [4] = DHCP vendor class */
-- [5] = {dhcp_end, sizeof(dhcp_end)}
-+ /* [4] = optional vendor class */
-+ /* [5] = {dhcp_end, sizeof(dhcp_end)} */
- };
-
--static struct iovec dhcp_request_iov[] = {
-+static struct iovec dhcp_request_iov[DHCP_IOV_LEN] = {
- /* [0] = ip + udp header */
- /* [1] = bootp header */
- [2] = {dhcp_request_hdr, sizeof(dhcp_request_hdr)},
- [3] = {dhcp_params, sizeof(dhcp_params)},
-- /* [4] = DHCP vendor class */
-- [5] = {dhcp_end, sizeof(dhcp_end)}
-+ /* [4] = optional vendor class */
-+ /* [5] = {dhcp_end, sizeof(dhcp_end)} */
- };
-
- /*
-@@ -164,6 +164,7 @@ static int dhcp_recv(struct netdev *dev)
- static int dhcp_send(struct netdev *dev, struct iovec *vec)
- {
- struct bootp_hdr bootp;
-+ int i = 4;
-
- memset(&bootp, 0, sizeof(struct bootp_hdr));
-
-@@ -179,12 +180,22 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
- vec[1].iov_base = &bootp;
- vec[1].iov_len = sizeof(struct bootp_hdr);
-
-- vec[4].iov_base = vendor_class_identifier;
-- vec[4].iov_len = vendor_class_identifier_len;
--
- DEBUG(("xid %08x secs %d ", bootp.xid, ntohs(bootp.secs)));
-
-- return packet_send(dev, vec, DHCP_IOV_LEN);
-+ if (vendor_class_identifier_len > 2) {
-+ vec[i].iov_base = vendor_class_identifier;
-+ vec[i].iov_len = vendor_class_identifier_len;
-+ i++;
-+
-+ DEBUG(("vendor_class_identifier \"%.*s\" ",
-+ vendor_class_identifier_len-2,
-+ vendor_class_identifier+2));
-+ }
-+
-+ vec[i].iov_base = dhcp_end;
-+ vec[i].iov_len = sizeof(dhcp_end);
-+
-+ return packet_send(dev, vec, i);
- }
-
- /*
---
-1.7.0
-
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-send-req-hostname-in-DHCP.patch b/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-send-req-hostname-in-DHCP.patch
deleted file mode 100644
index be4fd71fde..0000000000
--- a/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-send-req-hostname-in-DHCP.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 1f2b4e044a6a0fde32bc976e5ad6436035c84cec Mon Sep 17 00:00:00 2001
-From: Aron Griffis <agriffis@n01se.net>
-Date: Sun, 21 Jun 2009 22:40:17 -0400
-Subject: [PATCH] ipconfig: send requested hostname in DHCP discover/request
-
-If a hostname is requested, for example -d ::::foo::dhcp,
-then include the hostname in the DHCP discover/request.
-
-Signed-off-by: Aron Griffis <agriffis@n01se.net>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- usr/kinit/ipconfig/dhcp_proto.c | 22 +++++++++++++++++++---
- usr/kinit/ipconfig/main.c | 4 ++++
- usr/kinit/ipconfig/netdev.h | 1 +
- 3 files changed, 24 insertions(+), 3 deletions(-)
-
-diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c
-index c127d39..775a5ca 100644
---- a/usr/kinit/ipconfig/dhcp_proto.c
-+++ b/usr/kinit/ipconfig/dhcp_proto.c
-@@ -49,7 +49,7 @@ static uint8_t dhcp_end[] = {
-
- /* Both iovecs below have to have the same structure, since dhcp_send()
- pokes at the internals */
--#define DHCP_IOV_LEN 6
-+#define DHCP_IOV_LEN 7
-
- static struct iovec dhcp_discover_iov[DHCP_IOV_LEN] = {
- /* [0] = ip + udp header */
-@@ -57,7 +57,8 @@ static struct iovec dhcp_discover_iov[DHCP_IOV_LEN] = {
- [2] = {dhcp_discover_hdr, sizeof(dhcp_discover_hdr)},
- [3] = {dhcp_params, sizeof(dhcp_params)},
- /* [4] = optional vendor class */
-- /* [5] = {dhcp_end, sizeof(dhcp_end)} */
-+ /* [5] = optional hostname */
-+ /* [6] = {dhcp_end, sizeof(dhcp_end)} */
- };
-
- static struct iovec dhcp_request_iov[DHCP_IOV_LEN] = {
-@@ -66,7 +67,8 @@ static struct iovec dhcp_request_iov[DHCP_IOV_LEN] = {
- [2] = {dhcp_request_hdr, sizeof(dhcp_request_hdr)},
- [3] = {dhcp_params, sizeof(dhcp_params)},
- /* [4] = optional vendor class */
-- /* [5] = {dhcp_end, sizeof(dhcp_end)} */
-+ /* [5] = optional hostname */
-+ /* [6] = {dhcp_end, sizeof(dhcp_end)} */
- };
-
- /*
-@@ -164,6 +166,7 @@ static int dhcp_recv(struct netdev *dev)
- static int dhcp_send(struct netdev *dev, struct iovec *vec)
- {
- struct bootp_hdr bootp;
-+ char dhcp_hostname[SYS_NMLN+2];
- int i = 4;
-
- memset(&bootp, 0, sizeof(struct bootp_hdr));
-@@ -192,6 +195,19 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
- vendor_class_identifier+2));
- }
-
-+ if (dev->reqhostname[0] != '\0') {
-+ int len = strlen(dev->reqhostname);
-+ dhcp_hostname[0] = 12;
-+ dhcp_hostname[1] = len;
-+ memcpy(dhcp_hostname+2, dev->reqhostname, len);
-+
-+ vec[i].iov_base = dhcp_hostname;
-+ vec[i].iov_len = len+2;
-+ i++;
-+
-+ DEBUG(("hostname %.*s ", len, dhcp_hostname+2));
-+ }
-+
- vec[i].iov_base = dhcp_end;
- vec[i].iov_len = sizeof(dhcp_end);
-
-diff --git a/usr/kinit/ipconfig/main.c b/usr/kinit/ipconfig/main.c
-index 2ded0f3..619edf7 100644
---- a/usr/kinit/ipconfig/main.c
-+++ b/usr/kinit/ipconfig/main.c
-@@ -522,6 +522,8 @@ static int parse_device(struct netdev *dev, const char *ip)
- case 4:
- strncpy(dev->hostname, ip, SYS_NMLN - 1);
- dev->hostname[SYS_NMLN - 1] = '\0';
-+ memcpy(dev->reqhostname, dev->hostname,
-+ SYS_NMLN);
- break;
- case 5:
- dev->name = ip;
-@@ -569,6 +571,8 @@ static void bringup_one_dev(struct netdev *template, struct netdev *dev)
- dev->ip_nameserver[1] = template->ip_nameserver[1];
- if (template->hostname[0] != '\0')
- strcpy(dev->hostname, template->hostname);
-+ if (template->reqhostname[0] != '\0')
-+ strcpy(dev->reqhostname, template->reqhostname);
- dev->caps &= template->caps;
-
- bringup_device(dev);
-diff --git a/usr/kinit/ipconfig/netdev.h b/usr/kinit/ipconfig/netdev.h
-index fb6640a..a25a544 100644
---- a/usr/kinit/ipconfig/netdev.h
-+++ b/usr/kinit/ipconfig/netdev.h
-@@ -35,6 +35,7 @@ struct netdev {
- uint32_t ip_gateway; /* my gateway */
- uint32_t ip_nameserver[2]; /* two nameservers */
- uint32_t serverid; /* dhcp serverid */
-+ char reqhostname[SYS_NMLN]; /* requested hostname */
- char hostname[SYS_NMLN]; /* hostname */
- char dnsdomainname[SYS_NMLN]; /* dns domain name */
- char nisdomainname[SYS_NMLN]; /* nis domain name */
---
-1.7.0
-
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch b/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch
deleted file mode 100644
index 7a82335599..0000000000
--- a/recipes/klibc/klibc-1.5.15+1.5.16/ipconfig-set-null-ciaddr-on-dhcprequest.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From cfc8d649a959f845983aae4c0fc33a0a0c995c92 Mon Sep 17 00:00:00 2001
-From: maximilian attems <max@stro.at>
-Date: Fri, 5 Sep 2008 22:48:27 +0200
-Subject: [PATCH] [klibc] ipconfig: set null ciaddr on DHCPREQUEST during SELECTING state
-
-RFC 2131, Section 4.3.2 states:
-
- Clients send DHCPREQUEST messages as follows:
-
- o DHCPREQUEST generated during SELECTING state:
-
- Client inserts the address of the selected server in 'server
- identifier', 'ciaddr' MUST be zero, 'requested IP address' MUST be
- filled in with the yiaddr value from the chosen DHCPOFFER.
-
-fixes: http://bugs.debian.org/497879
-
-my test dhcpd seem all not that picky, ipconfig worked before
-and after this RFC 2131 conformal change.
-
-Reported-by: Craig Bernstein <cbernstein@stanford.edu>
-Signed-off-by: maximilian attems <max@stro.at>
----
- usr/kinit/ipconfig/dhcp_proto.c | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/usr/kinit/ipconfig/dhcp_proto.c b/usr/kinit/ipconfig/dhcp_proto.c
-index d4f2c09..21448f7 100644
---- a/usr/kinit/ipconfig/dhcp_proto.c
-+++ b/usr/kinit/ipconfig/dhcp_proto.c
-@@ -171,7 +171,8 @@ static int dhcp_send(struct netdev *dev, struct iovec *vec)
- bootp.htype = dev->hwtype;
- bootp.hlen = dev->hwlen;
- bootp.xid = dev->bootp.xid;
-- bootp.ciaddr = dev->ip_addr;
-+ bootp.ciaddr = INADDR_NONE;
-+ bootp.yiaddr = dev->ip_addr;
- bootp.giaddr = INADDR_ANY;
- bootp.secs = htons(time(NULL) - dev->open_time);
- memcpy(bootp.chaddr, dev->hwaddr, 16);
---
-1.7.0
-
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/klibc-utils-add-simple-ls.patch b/recipes/klibc/klibc-1.5.15+1.5.16/klibc-utils-add-simple-ls.patch
deleted file mode 100644
index 6d7a66eb52..0000000000
--- a/recipes/klibc/klibc-1.5.15+1.5.16/klibc-utils-add-simple-ls.patch
+++ /dev/null
@@ -1,249 +0,0 @@
-From f9f820a9fadbd8c6ff3e2dcba6b82ed5abc204ba Mon Sep 17 00:00:00 2001
-From: Alexey Gladkov <gladkov.alexey@gmail.com>
-Date: Sat, 30 May 2009 01:24:05 +0400
-Subject: [PATCH] [klibc] utils: add simple ls
-
-Simple utility to list information about a files. The utility which
-does the same thing as "ls -la". This is a useful test program.
-
-Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- usr/utils/Kbuild | 4 +-
- usr/utils/ls.c | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 205 insertions(+), 1 deletions(-)
- create mode 100644 usr/utils/ls.c
-
-diff --git a/usr/utils/Kbuild b/usr/utils/Kbuild
-index 5b6dc28..354a364 100644
---- a/usr/utils/Kbuild
-+++ b/usr/utils/Kbuild
-@@ -3,7 +3,7 @@
- #
-
- progs := chroot dd mkdir mkfifo mknod mount pivot_root umount
--progs += true false sleep ln nuke minips cat losetup wc
-+progs += true false sleep ln nuke minips cat losetup wc ls
- progs += uname halt kill readlink cpio sync dmesg modprobe
-
- static-y := $(addprefix static/, $(progs))
-@@ -36,6 +36,8 @@ static/sleep-y := sleep.o
- shared/sleep-y := sleep.o
- static/ln-y := ln.o
- shared/ln-y := ln.o
-+static/ls-y := ls.o
-+shared/ls-y := ls.o
- static/nuke-y := nuke.o
- shared/nuke-y := nuke.o
- static/minips-y := minips.o
-diff --git a/usr/utils/ls.c b/usr/utils/ls.c
-new file mode 100644
-index 0000000..859142a
---- /dev/null
-+++ b/usr/utils/ls.c
-@@ -0,0 +1,202 @@
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <dirent.h>
-+#include <unistd.h>
-+#include <sys/stat.h>
-+#include <sys/types.h>
-+#include <sys/sysmacros.h>
-+
-+#define STAT_ISSET(mode, mask) (((mode) & mask) == mask)
-+
-+static size_t max_linksiz = 128;
-+static int max_nlinks = 1;
-+static int max_size = 1;
-+static int max_uid = 1;
-+static int max_gid = 1;
-+static int max_min = 1;
-+static int max_maj = 1;
-+
-+static void do_preformat(const struct stat *st)
-+{
-+ int bytes;
-+
-+ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_nlink)) > max_nlinks)
-+ max_nlinks = bytes;
-+
-+ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_uid)) > max_uid)
-+ max_uid = bytes;
-+
-+ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_gid)) > max_gid)
-+ max_gid = bytes;
-+
-+ if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
-+ if ((bytes = snprintf(NULL, 0, "%u", major(st->st_rdev))) > max_maj)
-+ max_maj = bytes;
-+
-+ if ((bytes = snprintf(NULL, 0, "%u", minor(st->st_rdev))) > max_min)
-+ max_min = bytes;
-+
-+ max_size = max_maj + max_min + 1;
-+ }
-+ else {
-+ if ((bytes = snprintf(NULL, 0, "%ju", (uintmax_t) st->st_size)) > max_size)
-+ max_size = bytes;
-+ }
-+ return;
-+}
-+
-+static void do_stat(const struct stat *st, const char *path)
-+{
-+ char *fmt, *link_name;
-+ int rc;
-+
-+ switch (st->st_mode & S_IFMT) {
-+ case S_IFBLK: putchar('b'); break;
-+ case S_IFCHR: putchar('c'); break;
-+ case S_IFDIR: putchar('d'); break;
-+ case S_IFIFO: putchar('p'); break;
-+ case S_IFLNK: putchar('l'); break;
-+ case S_IFSOCK: putchar('s'); break;
-+ case S_IFREG: putchar('-'); break;
-+ default: putchar('?'); break;
-+ }
-+ putchar(STAT_ISSET(st->st_mode, S_IRUSR) ? 'r' : '-');
-+ putchar(STAT_ISSET(st->st_mode, S_IWUSR) ? 'w' : '-');
-+
-+ !STAT_ISSET(st->st_mode, S_ISUID) ?
-+ putchar(STAT_ISSET(st->st_mode, S_IXUSR) ? 'x' : '-') :
-+ putchar('S');
-+
-+ putchar(STAT_ISSET(st->st_mode, S_IRGRP) ? 'r' : '-');
-+ putchar(STAT_ISSET(st->st_mode, S_IWGRP) ? 'w' : '-');
-+
-+ !STAT_ISSET(st->st_mode, S_ISGID) ?
-+ putchar(STAT_ISSET(st->st_mode, S_IXGRP) ? 'x' : '-') :
-+ putchar('S');
-+
-+ putchar(STAT_ISSET(st->st_mode, S_IROTH) ? 'r' : '-');
-+ putchar(STAT_ISSET(st->st_mode, S_IWOTH) ? 'w' : '-');
-+
-+ !STAT_ISSET(st->st_mode, S_ISVTX) ?
-+ putchar(STAT_ISSET(st->st_mode, S_IXOTH) ? 'x' : '-') :
-+ putchar(S_ISDIR(st->st_mode) ? 't' : 'T');
-+
-+ if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) {
-+ rc = asprintf(&fmt," %%%dju %%%dju %%%dju %%%du,%%%du %%s",
-+ max_nlinks, max_uid, max_gid, max_maj, max_min);
-+ if (rc == -1) {
-+ perror("asprintf");
-+ exit(1);
-+ }
-+ fprintf(stdout, fmt,
-+ (uintmax_t) st->st_nlink,
-+ (uintmax_t) st->st_uid,
-+ (uintmax_t) st->st_gid,
-+ major(st->st_rdev),
-+ minor(st->st_rdev),
-+ path);
-+ }
-+ else {
-+ rc = asprintf(&fmt," %%%dju %%%dju %%%dju %%%dju %%s",
-+ max_nlinks, max_uid, max_gid, max_size);
-+ if (rc == -1) {
-+ perror("asprintf");
-+ exit(1);
-+ }
-+ fprintf(stdout, fmt,
-+ (uintmax_t) st->st_nlink,
-+ (uintmax_t) st->st_uid,
-+ (uintmax_t) st->st_gid,
-+ (uintmax_t) st->st_size,
-+ path);
-+ }
-+ free(fmt);
-+
-+ if (S_ISLNK(st->st_mode)) {
-+ if ((link_name = malloc(max_linksiz)) == NULL) {
-+ perror("malloc");
-+ exit(1);
-+ }
-+ if ((rc = readlink(path, link_name, max_linksiz)) == -1) {
-+ free(link_name);
-+ perror("readlink");
-+ exit(1);
-+ }
-+ link_name[rc] = '\0';
-+ fprintf(stdout, " -> %s", link_name);
-+ free(link_name);
-+ }
-+
-+ putchar('\n');
-+ return;
-+}
-+
-+static void do_dir(const char *path, int preformat)
-+{
-+ DIR *dir;
-+ struct dirent *dent;
-+ struct stat st;
-+
-+ if (chdir(path) == -1) {
-+ perror(path);
-+ exit(1);
-+ }
-+
-+ if ((dir = opendir(path)) == NULL) {
-+ perror(path);
-+ exit(1);
-+ }
-+
-+ while ((dent = readdir(dir)) != NULL) {
-+ if (lstat(dent->d_name, &st)) {
-+ perror(dent->d_name);
-+ exit(1);
-+ }
-+ (preformat) ?
-+ do_preformat(&st) :
-+ do_stat(&st, dent->d_name);
-+ }
-+
-+ closedir(dir);
-+}
-+
-+int main(int argc, char *argv[])
-+{
-+ int i;
-+ struct stat st;
-+
-+ if (argc == 1) {
-+ do_dir(".", 1);
-+ do_dir(".", 0);
-+ return 0;
-+ }
-+
-+ for (i = 1; i < argc; i++) {
-+ if (argv[i][0] == '-' && argv[i][1] == 'h') {
-+ fprintf(stdout, "Usage: ls [-h] [FILE ...]\n");
-+ return 0;
-+ }
-+
-+ if (lstat(argv[i], &st)) {
-+ perror(argv[i]);
-+ exit(1);
-+ }
-+
-+ S_ISDIR(st.st_mode) ?
-+ do_dir(argv[i], 1) :
-+ do_preformat(&st);
-+ }
-+
-+ for (i = 1; i < argc; i++) {
-+ if (lstat(argv[i], &st)) {
-+ perror(argv[i]);
-+ exit(1);
-+ }
-+
-+ S_ISDIR(st.st_mode) ?
-+ do_dir(argv[i], 0) :
-+ do_stat(&st, argv[i]);
-+ }
-+
-+ return 0;
-+}
---
-1.7.0
-
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/modprobe.patch b/recipes/klibc/klibc-1.5.15+1.5.16/modprobe.patch
index 61ee340ff9..5a120722cc 100644
--- a/recipes/klibc/klibc-1.5.15+1.5.16/modprobe.patch
+++ b/recipes/klibc/klibc-1.5.15+1.5.16/modprobe.patch
@@ -6,9 +6,9 @@ Index: klibc-1.5/usr/utils/Kbuild
#
progs := chroot dd mkdir mkfifo mknod mount pivot_root umount
--progs += true false sleep ln nuke minips cat
+-progs += true false sleep ln nuke minips cat ls
-progs += uname halt kill readlink cpio sync dmesg
-+progs += true false sleep ln nuke minips cat losetup
++progs += true false sleep ln nuke minips cat ls losetup
+progs += uname halt kill readlink cpio sync dmesg modprobe
static-y := $(addprefix static/, $(progs))
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/signal-cleanup.patch b/recipes/klibc/klibc-1.5.15+1.5.16/signal-cleanup.patch
deleted file mode 100644
index c64cd5bbb6..0000000000
--- a/recipes/klibc/klibc-1.5.15+1.5.16/signal-cleanup.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Description: Cope with header changes in kernel commit
- 63b852a6b67d0820d388b0ecd0da83ccb4048b8d.
-
-Index: klibc-1.5.15/usr/include/arch/i386/klibc/archsignal.h
-===================================================================
---- klibc-1.5.15.orig/usr/include/arch/i386/klibc/archsignal.h 2009-01-04 11:28:03.000000000 -0800
-+++ klibc-1.5.15/usr/include/arch/i386/klibc/archsignal.h 2009-11-11 14:21:10.000000000 -0800
-@@ -96,7 +96,12 @@ typedef struct {
- #define MINSIGSTKSZ 2048
- #define SIGSTKSZ 8192
-
-+#include <linux/version.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
-+#include <asm-generic/signal-defs.h>
-+#else
- #include <asm-generic/signal.h>
-+#endif
-
- /* This uses gcc anonymous union support... */
- struct siginfo;
-Index: klibc-1.5.15/usr/include/arch/sparc/klibc/archsignal.h
-===================================================================
---- klibc-1.5.15.orig/usr/include/arch/sparc/klibc/archsignal.h 2009-01-04 11:28:03.000000000 -0800
-+++ klibc-1.5.15/usr/include/arch/sparc/klibc/archsignal.h 2009-11-09 15:06:29.000000000 -0800
-@@ -11,13 +11,6 @@
- #define __WANT_POSIX1B_SIGNALS__
- #include <asm/signal.h>
-
--struct sigaction {
-- __sighandler_t sa_handler;
-- unsigned long sa_flags;
-- void (*sa_restorer)(void); /* Not used by Linux/SPARC */
-- sigset_t sa_mask;
--};
--
- /* Not actually used by the kernel... */
- #define SA_RESTORER 0x80000000
-
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/use-headers_install-to-install-headers.patch b/recipes/klibc/klibc-1.5.15+1.5.16/use-headers_install-to-install-headers.patch
deleted file mode 100644
index eb4ca387cd..0000000000
--- a/recipes/klibc/klibc-1.5.15+1.5.16/use-headers_install-to-install-headers.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From dc5aff1731bc4708d3391311074f026690212f8d Mon Sep 17 00:00:00 2001
-From: Jon Ringle <jon@ringle.org>
-Date: Thu, 16 Jul 2009 21:33:37 -0400
-Subject: [PATCH] [klibc] use headers_install to install headers
-
-Use headers_install to install headers.
-arch include directory has moved and it's better
-to ask the kernel Makefile to install the headers
-for us.
-
-Signed-off-by: Jon Ringle <jon@ringle.org>
-Signed-off-by: H. Peter Anvin <hpa@zytor.com>
----
- scripts/Kbuild.install | 11 +----------
- 1 files changed, 1 insertions(+), 10 deletions(-)
-
-diff --git a/scripts/Kbuild.install b/scripts/Kbuild.install
-index 44c8f76..de918f0 100644
---- a/scripts/Kbuild.install
-+++ b/scripts/Kbuild.install
-@@ -95,16 +95,7 @@ header:
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)lib
- $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)bin
-- $(Q)set -e ; for d in linux asm asm-$(KLIBCARCH) asm-generic $(ASMKLIBCARCH); do \
-- for r in $(KLIBCKERNELSRC)/include $(KLIBCKERNELOBJ)/include \
-- $(KLIBCKERNELOBJ)/include2 ; do \
-- [ ! -d $$r/$$d ] && continue; \
-- mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)include/$$d ; \
-- cp -rfL $$r/$$d/. \
-- $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ; \
-- done ; \
-- done
-- $(Q)cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(KLIBCARCH) asm
-+ $(Q)make -C $(KLIBCKERNELSRC) ARCH=$(KLIBCARCH) INSTALL_HDR_PATH=$(INSTALLROOT)$(INSTALLDIR)/$(KCROSS) headers_install
- $(Q)cp -rf usr/include/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/.
- $(Q)$(install-data) $(srctree)/klcc/klcc.1 $(INSTALLROOT)$(mandir)/man1/$(KCROSS)klcc.1
- $(Q)$(install-bin) $(objtree)/klcc/$(KCROSS)klcc $(INSTALLROOT)$(bindir)
---
-1.7.0
-
diff --git a/recipes/klibc/klibc-1.5.15+1.5.16/wc.patch b/recipes/klibc/klibc-1.5.15+1.5.16/wc.patch
index f54c49d3ab..362030e69e 100644
--- a/recipes/klibc/klibc-1.5.15+1.5.16/wc.patch
+++ b/recipes/klibc/klibc-1.5.15+1.5.16/wc.patch
@@ -6,8 +6,8 @@ Index: klibc-1.5/usr/utils/Kbuild
#
progs := chroot dd mkdir mkfifo mknod mount pivot_root umount
--progs += true false sleep ln nuke minips cat losetup
-+progs += true false sleep ln nuke minips cat losetup wc
+-progs += true false sleep ln nuke minips cat ls losetup
++progs += true false sleep ln nuke minips cat ls losetup wc
progs += uname halt kill readlink cpio sync dmesg modprobe
static-y := $(addprefix static/, $(progs))
diff --git a/recipes/klibc/klibc-1.5.15/fstype-sane-vfat-and-jffs2-for-1.5.patch b/recipes/klibc/klibc-1.5.15/fstype-sane-vfat-and-jffs2-for-1.5.patch
deleted file mode 100644
index 6eb604e45c..0000000000
--- a/recipes/klibc/klibc-1.5.15/fstype-sane-vfat-and-jffs2-for-1.5.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Index: klibc-1.5/usr/kinit/fstype/fstype.c
-===================================================================
---- klibc-1.5.orig/usr/kinit/fstype/fstype.c 2008-02-28 00:48:35.319254938 +0100
-+++ klibc-1.5/usr/kinit/fstype/fstype.c 2008-02-28 00:52:20.583257793 +0100
-@@ -20,7 +20,7 @@
- #include <netinet/in.h>
- #include <sys/utsname.h>
- #include <sys/vfs.h>
--
-+#include <linux/types.h>
- #define cpu_to_be32(x) __cpu_to_be32(x) /* Needed by romfs_fs.h */
-
- #include "romfs_fs.h"
-@@ -37,6 +37,12 @@
- #include "ocfs2_fs.h"
- #include "nilfs_fs.h"
-
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+#include <linux/byteorder/big_endian.h>
-+#else
-+#include <linux/byteorder/little_endian.h>
-+#endif
-+
- /*
- * Slightly cleaned up version of jfs_superblock to
- * avoid pulling in other kernel header files.
-@@ -59,6 +65,27 @@
- /* Swap needs the definition of block size */
- #include "swap_fs.h"
-
-+static int jffs2_image(const unsigned char *buf, unsigned long *blocks)
-+{
-+ // Very sloppy! ;-E
-+ if (*buf == 0x85 && buf[1] == 0x19)
-+ return 1;
-+
-+ return 0;
-+}
-+
-+static int vfat_image(const unsigned char *buf, unsigned long *blocks)
-+{
-+ const struct romfs_super_block *sb =
-+ (const struct romfs_super_block *)buf;
-+ 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)
- {277 304
- const unsigned char *p = buf;
-@@ -490,6 +517,8 @@
- {1, "ext3", ext3_image},
- {1, "ext2", ext2_image},
- {1, "minix", minix_image},
-+ {0, "jffs2", jffs2_image},
-+ {0, "vfat", vfat_image},
- {1, "nilfs2", nilfs2_image},
- {2, "ocfs2", ocfs2_image},
- {8, "reiserfs", reiserfs_image},
diff --git a/recipes/klibc/klibc-1.5.15/isystem.patch b/recipes/klibc/klibc-1.5.15/isystem.patch
deleted file mode 100644
index 2ec40c16c2..0000000000
--- a/recipes/klibc/klibc-1.5.15/isystem.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: klibc-1.5.15/klcc/klcc.in
-===================================================================
---- klibc-1.5.15.orig/klcc/klcc.in 2009-12-14 00:32:41.373661102 +0100
-+++ klibc-1.5.15/klcc/klcc.in 2009-12-14 00:34:20.855735356 +0100
-@@ -147,7 +147,7 @@
- } elsif ( $a =~ /^-([fmwWQdO]|std=|ansi|pedantic|M[GPD]|MMD)/ ) {
- # Options to gcc
- push(@ccopt, $a);
-- } elsif ( $a =~ /^-([DUI]|M[FQT])(.*)$/ ) {
-+ } elsif ( $a =~ /^-([DUI]|M[FQT]|isystem)(.*)$/ ) {
- # Options to gcc, which can take either a conjoined argument
- # (-DFOO) or a disjoint argument (-D FOO)
- push(@ccopt, $a);
diff --git a/recipes/klibc/klibc-1.5.15/mntproc-definitions.patch b/recipes/klibc/klibc-1.5.15/mntproc-definitions.patch
deleted file mode 100644
index eea606be2b..0000000000
--- a/recipes/klibc/klibc-1.5.15/mntproc-definitions.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Description: MNTPROC_MNT and MNTPROC_UMNT are no longer defined by the
- kernel. Hack around this by restoring the old definitions.
-Upstream: http://thread.gmane.org/gmane.linux.nfs/28059 suggests a better
- fix is in progress.
-
-diff -Nur -x '*.orig' -x '*~' klibc-1.5.15/usr/kinit/nfsmount/mount.c klibc-1.5.15.new/usr/kinit/nfsmount/mount.c
---- klibc-1.5.15/usr/kinit/nfsmount/mount.c 2009-01-04 19:28:03.000000000 +0000
-+++ klibc-1.5.15.new/usr/kinit/nfsmount/mount.c 2009-10-04 22:52:44.000000000 +0100
-@@ -44,6 +44,11 @@
-
- #define MNT_REPLY_MINSIZE (sizeof(struct rpc_reply) + sizeof(uint32_t))
-
-+#ifndef MNTPROC_MNT
-+# define MNTPROC_MNT 1
-+# define MNTPROC_UMNT 3
-+#endif /* MNTPROC_MNT */
-+
- static int get_ports(uint32_t server, const struct nfs_mount_data *data)
- {
- uint32_t nfs_ver, mount_ver;
diff --git a/recipes/klibc/klibc-common.inc b/recipes/klibc/klibc-common.inc
index 3b0eb1c45b..20154ccb92 100644
--- a/recipes/klibc/klibc-common.inc
+++ b/recipes/klibc/klibc-common.inc
@@ -5,13 +5,7 @@ use with initramfs. It is deliberately written for small size, \
minimal entaglement, and portability, not speed."
LICENSE = "BSD-ADV"
-SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/${KLIBC_FETCHDIR}/klibc-${PV}.tar.bz2 \
- file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
- file://modprobe.patch;patch=1 \
- file://losetup.patch;patch=1 \
- file://dash_readopt.patch;patch=1 \
- file://wc.patch;patch=1 \
- "
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/${KLIBC_FETCHDIR}/klibc-${PV}.tar.bz2"
S = "${WORKDIR}/klibc-${PV}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -29,16 +23,13 @@ KLIBC_ARCH_pentium = 'i386'
# could be fixed, but for the moment:
ARM_INSTRUCTION_SET = "arm"
-SRC_URI_append_linux-gnueabi = "file://klibc-config-eabi.patch;patch=1 \
- "
-SRC_URI_append_linux-uclibceabi = "file://klibc-config-eabi.patch;patch=1 \
- "
+SRC_URI_append_linux-gnueabi = "file://klibc-config-eabi.patch;patch=1"
+SRC_URI_append_linux-uclibceabi = "file://klibc-config-eabi.patch;patch=1"
EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
'CROSS_COMPILE=${TARGET_PREFIX}' \
"
do_configure () {
- ln -sf ${STAGING_KERNEL_DIR} linux
+ ln -sf ${STAGING_KERNEL_DIR} linux
}
-
diff --git a/recipes/klibc/klibc-utils-static_1.5.15+1.5.16.bb b/recipes/klibc/klibc-utils-static_1.5.15+1.5.16.bb
index 23dfbf9da3..f7c69ba090 100644
--- a/recipes/klibc/klibc-utils-static_1.5.15+1.5.16.bb
+++ b/recipes/klibc/klibc-utils-static_1.5.15+1.5.16.bb
@@ -1,37 +1,34 @@
require klibc-common.inc
-
-PR = "r0"
-DEFAULT_PREFERENCE = "-1"
+PR = "r1"
KLIBC_FETCHDIR = "Testing"
+DEFAULT_PREFERENCE = "-1"
+
# temporary override here in the recipe
# until 1.5.16 is released
+
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/${KLIBC_FETCHDIR}/klibc-1.5.15.tar.bz2 \
- file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
- file://modprobe.patch;patch=1 \
- file://losetup.patch;patch=1 \
- file://dash_readopt.patch;patch=1 \
- file://wc.patch;patch=1 \
- "
-# temporary taken from the inc
-# until 1.5.16 is released
-SRC_URI += " \
- file://fix-must_inline-macro-for-gcc4.3.patch;patch=1 \
- file://ipconfig-omit-zero-lenght-DHCP-vendor-class-id.patch;patch=1 \
- file://ipconfig-send-req-hostname-in-DHCP.patch;patch=1 \
- file://ipconfig-set-null-ciaddr-on-dhcprequest.patch;patch=1 \
- file://use-headers_install-to-install-headers.patch;patch=1 \
- file://klibc-utils-add-simple-ls.patch;patch=1 \
- file://staging.patch;patch=1 \
- file://klibc_kexecsyscall.patch;patch=1 \
- file://mntproc-definitions.patch;patch=1 \
- file://signal-cleanup.patch;patch=1 \
- file://isystem.patch;patch=1 \
- "
+ file://1.5.15+1.5.16.patch;patch=1 \
+ "
S = "${WORKDIR}/klibc-1.5.15"
+#
+# end override
+
+SRC_URI += "file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
+ file://modprobe.patch;patch=1 \
+ file://losetup.patch;patch=1 \
+ file://dash_readopt.patch;patch=1 \
+ file://wc.patch;patch=1 \
+ file://staging.patch;patch=1 \
+ file://klibc_kexecsyscall.patch;patch=1 \
+ file://mntproc-definitions.patch;patch=1 \
+ file://signal-cleanup.patch;patch=1 \
+ file://isystem.patch;patch=1 \
+ "
+
FILESPATHPKG =. "klibc-${PV}:"
# We only want the static utils. klibc build both. So we install only what we want.
diff --git a/recipes/klibc/klibc-utils-static_1.5.15.bb b/recipes/klibc/klibc-utils-static_1.5.15.bb
index c1b3e6dd94..4d61967292 100644
--- a/recipes/klibc/klibc-utils-static_1.5.15.bb
+++ b/recipes/klibc/klibc-utils-static_1.5.15.bb
@@ -1,8 +1,20 @@
require klibc-common.inc
-
-PR = "r2"
+PR = "r3"
KLIBC_FETCHDIR = "Testing"
+
+SRC_URI += "file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
+ file://modprobe.patch;patch=1 \
+ file://losetup.patch;patch=1 \
+ file://dash_readopt.patch;patch=1 \
+ file://wc.patch;patch=1 \
+ file://staging.patch;patch=1 \
+ file://klibc_kexecsyscall.patch;patch=1 \
+ file://mntproc-definitions.patch;patch=1 \
+ file://signal-cleanup.patch;patch=1 \
+ file://isystem.patch;patch=1 \
+ "
+
FILESPATHPKG =. "klibc-${PV}:"
# We only want the static utils. klibc build both. So we install only what we want.
@@ -11,12 +23,12 @@ do_install() {
install -d ${D}${base_sbindir}
install -m 755 usr/dash/sh ${D}${base_bindir}
install -m 755 usr/gzip/gzip ${D}${base_bindir}
- install -m 755 usr/kinit/kinit ${D}${base_bindir}
- install -m 755 usr/kinit/fstype/static/fstype ${D}${base_bindir}
- install -m 755 usr/kinit/ipconfig/static/ipconfig ${D}${base_bindir}
- install -m 755 usr/kinit/nfsmount/static/nfsmount ${D}${base_bindir}
- install -m 755 usr/kinit/resume/static/resume ${D}${base_bindir}
- install -m 755 usr/kinit/run-init/static/run-init ${D}${base_bindir}
+ install -m 755 usr/kinit/kinit ${D}${base_bindir}
+ install -m 755 usr/kinit/fstype/static/fstype ${D}${base_bindir}
+ install -m 755 usr/kinit/ipconfig/static/ipconfig ${D}${base_bindir}
+ install -m 755 usr/kinit/nfsmount/static/nfsmount ${D}${base_bindir}
+ install -m 755 usr/kinit/resume/static/resume ${D}${base_bindir}
+ install -m 755 usr/kinit/run-init/static/run-init ${D}${base_bindir}
install -m 755 usr/utils/static/cat ${D}${base_bindir}
install -m 755 usr/utils/static/chroot ${D}${base_bindir}
install -m 755 usr/utils/static/cpio ${D}${base_bindir}
@@ -41,33 +53,33 @@ do_install() {
install -m 755 usr/utils/static/true ${D}${base_bindir}
install -m 755 usr/utils/static/umount ${D}${base_bindir}
install -m 755 usr/utils/static/uname ${D}${base_bindir}
- install -m 755 usr/utils/static/modprobe ${D}${base_sbindir}
- install -m 755 usr/utils/static/losetup ${D}${base_bindir}
- install -m 755 usr/utils/static/wc ${D}${base_bindir}
+ install -m 755 usr/utils/static/modprobe ${D}${base_sbindir}
+ install -m 755 usr/utils/static/losetup ${D}${base_bindir}
+ install -m 755 usr/utils/static/wc ${D}${base_bindir}
cd ${D}${base_bindir}
- ln -s gzip gunzip
+ ln -s gzip gunzip
ln -s gzip zcat
- cd -
+ cd -
}
PACKAGES = "klibc-utils-static-sh klibc-utils-static-gzip \
klibc-utils-static-kinit klibc-utils-static-fstype \
- klibc-utils-static-ipconfig klibc-utils-static-nfsmount \
- klibc-utils-static-resume klibc-utils-static-run-init \
- klibc-utils-static-cat klibc-utils-static-chroot \
+ klibc-utils-static-ipconfig klibc-utils-static-nfsmount \
+ klibc-utils-static-resume klibc-utils-static-run-init \
+ klibc-utils-static-cat klibc-utils-static-chroot \
klibc-utils-static-cpio klibc-utils-static-dd \
klibc-utils-static-dmesg klibc-utils-static-false \
klibc-utils-static-halt klibc-utils-static-kill \
klibc-utils-static-ln klibc-utils-static-minips \
klibc-utils-static-mkdir klibc-utils-static-mkfifo \
- klibc-utils-static-mknod klibc-utils-static-mount \
- klibc-utils-static-nuke klibc-utils-static-pivot-root \
- klibc-utils-static-poweroff klibc-utils-static-readlink \
- klibc-utils-static-reboot klibc-utils-static-sleep \
- klibc-utils-static-sync \
- klibc-utils-static-true klibc-utils-static-umount \
- klibc-utils-static-uname klibc-utils-static-modprobe \
- klibc-utils-static-losetup klibc-utils-static-wc"
+ klibc-utils-static-mknod klibc-utils-static-mount \
+ klibc-utils-static-nuke klibc-utils-static-pivot-root \
+ klibc-utils-static-poweroff klibc-utils-static-readlink \
+ klibc-utils-static-reboot klibc-utils-static-sleep \
+ klibc-utils-static-sync \
+ klibc-utils-static-true klibc-utils-static-umount \
+ klibc-utils-static-uname klibc-utils-static-modprobe \
+ klibc-utils-static-losetup klibc-utils-static-wc"
FILES_klibc-utils-static-sh = "${base_bindir}/sh"
FILES_klibc-utils-static-gzip = "${base_bindir}/gzip ${base_bindir}/gunzip ${base_bindir}/zcat"
diff --git a/recipes/klibc/klibc-utils-static_1.5.bb b/recipes/klibc/klibc-utils-static_1.5.bb
index a4e31de95c..78763ef95a 100644
--- a/recipes/klibc/klibc-utils-static_1.5.bb
+++ b/recipes/klibc/klibc-utils-static_1.5.bb
@@ -1,22 +1,31 @@
require klibc-common.inc
-
-PR = "r12"
+PR = "r13"
KLIBC_FETCHDIR = "Stable"
+
+SRC_URI += "file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
+ file://modprobe.patch;patch=1 \
+ file://losetup.patch;patch=1 \
+ file://dash_readopt.patch;patch=1 \
+ file://wc.patch;patch=1 \
+ file://staging.patch;patch=1 \
+ file://klibc_kexecsyscall.patch;patch=1 \
+ "
+
FILESPATHPKG =. "klibc-${PV}:"
-# We only want the static utils. klibc build both. So we install only what we want.
+# We only want the static utils. klibc build both. So we install only what we want.
do_install() {
install -d ${D}${base_bindir}
install -d ${D}${base_sbindir}
install -m 755 usr/dash/sh ${D}${base_bindir}
install -m 755 usr/gzip/gzip ${D}${base_bindir}
- install -m 755 usr/kinit/kinit ${D}${base_bindir}
- install -m 755 usr/kinit/fstype/static/fstype ${D}${base_bindir}
- install -m 755 usr/kinit/ipconfig/static/ipconfig ${D}${base_bindir}
- install -m 755 usr/kinit/nfsmount/static/nfsmount ${D}${base_bindir}
- install -m 755 usr/kinit/resume/static/resume ${D}${base_bindir}
- install -m 755 usr/kinit/run-init/static/run-init ${D}${base_bindir}
+ install -m 755 usr/kinit/kinit ${D}${base_bindir}
+ install -m 755 usr/kinit/fstype/static/fstype ${D}${base_bindir}
+ install -m 755 usr/kinit/ipconfig/static/ipconfig ${D}${base_bindir}
+ install -m 755 usr/kinit/nfsmount/static/nfsmount ${D}${base_bindir}
+ install -m 755 usr/kinit/resume/static/resume ${D}${base_bindir}
+ install -m 755 usr/kinit/run-init/static/run-init ${D}${base_bindir}
install -m 755 usr/utils/static/cat ${D}${base_bindir}
install -m 755 usr/utils/static/chroot ${D}${base_bindir}
install -m 755 usr/utils/static/cpio ${D}${base_bindir}
@@ -40,41 +49,41 @@ do_install() {
install -m 755 usr/utils/static/true ${D}${base_bindir}
install -m 755 usr/utils/static/umount ${D}${base_bindir}
install -m 755 usr/utils/static/uname ${D}${base_bindir}
- install -m 755 usr/utils/static/modprobe ${D}${base_sbindir}
- install -m 755 usr/utils/static/losetup ${D}${base_bindir}
- install -m 755 usr/utils/static/wc ${D}${base_bindir}
+ install -m 755 usr/utils/static/modprobe ${D}${base_sbindir}
+ install -m 755 usr/utils/static/losetup ${D}${base_bindir}
+ install -m 755 usr/utils/static/wc ${D}${base_bindir}
cd ${D}${base_bindir}
- ln -s gzip gunzip
+ ln -s gzip gunzip
ln -s gzip zcat
- cd -
+ cd -
}
PACKAGES = "klibc-utils-static-sh klibc-utils-static-gzip \
klibc-utils-static-kinit klibc-utils-static-fstype \
- klibc-utils-static-ipconfig klibc-utils-static-nfsmount \
- klibc-utils-static-resume klibc-utils-static-run-init \
- klibc-utils-static-cat klibc-utils-static-chroot \
+ klibc-utils-static-ipconfig klibc-utils-static-nfsmount \
+ klibc-utils-static-resume klibc-utils-static-run-init \
+ klibc-utils-static-cat klibc-utils-static-chroot \
klibc-utils-static-cpio klibc-utils-static-dd \
klibc-utils-static-false klibc-utils-static-halt \
klibc-utils-static-insmod klibc-utils-static-kill \
klibc-utils-static-ln klibc-utils-static-minips \
klibc-utils-static-mkdir klibc-utils-static-mkfifo \
- klibc-utils-static-mknod klibc-utils-static-mount \
- klibc-utils-static-nuke klibc-utils-static-pivot-root \
- klibc-utils-static-poweroff klibc-utils-static-readlink \
- klibc-utils-static-reboot klibc-utils-static-sleep \
- klibc-utils-static-true klibc-utils-static-umount \
- klibc-utils-static-uname klibc-utils-static-modprobe \
- klibc-utils-static-losetup klibc-utils-static-wc"
+ klibc-utils-static-mknod klibc-utils-static-mount \
+ klibc-utils-static-nuke klibc-utils-static-pivot-root \
+ klibc-utils-static-poweroff klibc-utils-static-readlink \
+ klibc-utils-static-reboot klibc-utils-static-sleep \
+ klibc-utils-static-true klibc-utils-static-umount \
+ klibc-utils-static-uname klibc-utils-static-modprobe \
+ klibc-utils-static-losetup klibc-utils-static-wc"
FILES_klibc-utils-static-sh = "${base_bindir}/sh"
FILES_klibc-utils-static-gzip = "${base_bindir}/gzip ${base_bindir}/gunzip ${base_bindir}/zcat"
-FILES_klibc-utils-static-kinit = "${base_bindir}/kinit"
-FILES_klibc-utils-static-fstype = "${base_bindir}/fstype"
-FILES_klibc-utils-static-ipconfig = "${base_bindir}/ipconfig"
-FILES_klibc-utils-static-nfsmount = "${base_bindir}/nfsmount"
-FILES_klibc-utils-static-resume = "${base_bindir}/resume"
-FILES_klibc-utils-static-run-init = "${base_bindir}/run-init"
+FILES_klibc-utils-static-kinit = "${base_bindir}/kinit"
+FILES_klibc-utils-static-fstype = "${base_bindir}/fstype"
+FILES_klibc-utils-static-ipconfig = "${base_bindir}/ipconfig"
+FILES_klibc-utils-static-nfsmount = "${base_bindir}/nfsmount"
+FILES_klibc-utils-static-resume = "${base_bindir}/resume"
+FILES_klibc-utils-static-run-init = "${base_bindir}/run-init"
FILES_klibc-utils-static-cat = "${base_bindir}/cat"
FILES_klibc-utils-static-chroot = "${base_bindir}/chroot"
FILES_klibc-utils-static-cpio = "${base_bindir}/cpio"
diff --git a/recipes/klibc/klibc_1.5.15+1.5.16.bb b/recipes/klibc/klibc_1.5.15+1.5.16.bb
index e0a9225883..a44922af6a 100644
--- a/recipes/klibc/klibc_1.5.15+1.5.16.bb
+++ b/recipes/klibc/klibc_1.5.15+1.5.16.bb
@@ -1,33 +1,6 @@
require klibc_1.5.15+1.5.16.inc
-PR = "r0"
-DEFAULT_PREFERENCE = "-1"
+PR = "r1"
KLIBC_FETCHDIR = "Testing"
-# temporary override here in the recipe
-# until 1.5.16 is released
-SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/${KLIBC_FETCHDIR}/klibc-1.5.15.tar.bz2 \
- file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
- file://modprobe.patch;patch=1 \
- file://losetup.patch;patch=1 \
- file://dash_readopt.patch;patch=1 \
- file://wc.patch;patch=1 \
- "
-
-# temporary taken from the inc
-# until 1.5.16 is released
-SRC_URI += " \
- file://fix-must_inline-macro-for-gcc4.3.patch;patch=1 \
- file://ipconfig-omit-zero-lenght-DHCP-vendor-class-id.patch;patch=1 \
- file://ipconfig-send-req-hostname-in-DHCP.patch;patch=1 \
- file://ipconfig-set-null-ciaddr-on-dhcprequest.patch;patch=1 \
- file://use-headers_install-to-install-headers.patch;patch=1 \
- file://klibc-utils-add-simple-ls.patch;patch=1 \
- file://staging.patch;patch=1 \
- file://klibc_kexecsyscall.patch;patch=1 \
- file://mntproc-definitions.patch;patch=1 \
- file://signal-cleanup.patch;patch=1 \
- file://isystem.patch;patch=1 \
- "
-
-S = "${WORKDIR}/klibc-1.5.15"
+DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/klibc/klibc_1.5.15+1.5.16.inc b/recipes/klibc/klibc_1.5.15+1.5.16.inc
index 47de1750c9..8d398520fc 100644
--- a/recipes/klibc/klibc_1.5.15+1.5.16.inc
+++ b/recipes/klibc/klibc_1.5.15+1.5.16.inc
@@ -1,5 +1,28 @@
require klibc-common.inc
+# temporary override here in the recipe
+# until 1.5.16 is released
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/${KLIBC_FETCHDIR}/klibc-1.5.15.tar.bz2 \
+ file://1.5.15+1.5.16.patch;patch=1 \
+ "
+
+SRC_URI += "file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
+ file://modprobe.patch;patch=1 \
+ file://losetup.patch;patch=1 \
+ file://dash_readopt.patch;patch=1 \
+ file://wc.patch;patch=1 \
+ file://staging.patch;patch=1 \
+ file://klibc_kexecsyscall.patch;patch=1 \
+ file://mntproc-definitions.patch;patch=1 \
+ file://signal-cleanup.patch;patch=1 \
+ file://isystem.patch;patch=1 \
+ "
+
+S = "${WORKDIR}/klibc-1.5.15"
+
+# end temporary overrides
+
# we want only the shared programms and the lib so we chose them manually
do_install() {
install -d ${D}${base_bindir}
diff --git a/recipes/klibc/klibc_1.5.15.bb b/recipes/klibc/klibc_1.5.15.bb
index 97898f2b8e..32f070d67f 100644
--- a/recipes/klibc/klibc_1.5.15.bb
+++ b/recipes/klibc/klibc_1.5.15.bb
@@ -1,4 +1,4 @@
require klibc_1.5.15.inc
-PR = "r5"
+PR = "r6"
KLIBC_FETCHDIR = "Testing"
diff --git a/recipes/klibc/klibc_1.5.15.inc b/recipes/klibc/klibc_1.5.15.inc
index 6615ac2899..fa4fae13f8 100644
--- a/recipes/klibc/klibc_1.5.15.inc
+++ b/recipes/klibc/klibc_1.5.15.inc
@@ -1,11 +1,16 @@
require klibc-common.inc
-SRC_URI += "file://staging.patch;patch=1 \
- file://klibc_kexecsyscall.patch;patch=1 \
- file://mntproc-definitions.patch;patch=1 \
- file://signal-cleanup.patch;patch=1 \
+SRC_URI += "file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
+ file://modprobe.patch;patch=1 \
+ file://losetup.patch;patch=1 \
+ file://dash_readopt.patch;patch=1 \
+ file://wc.patch;patch=1 \
+ file://staging.patch;patch=1 \
+ file://klibc_kexecsyscall.patch;patch=1 \
+ file://mntproc-definitions.patch;patch=1 \
+ file://signal-cleanup.patch;patch=1 \
file://isystem.patch;patch=1 \
- "
+ "
# we want only the shared programms and the lib so we chose them manually
do_install() {
@@ -18,7 +23,7 @@ do_install() {
install -m 755 usr/kinit/nfsmount/shared/nfsmount ${D}${base_bindir}
install -m 755 usr/kinit/resume/shared/resume ${D}${base_bindir}
install -m 755 usr/kinit/run-init/shared/run-init ${D}${base_bindir}
- install -m 755 usr/utils/shared/cat ${D}${base_bindir}
+ install -m 755 usr/utils/shared/cat ${D}${base_bindir}
install -m 755 usr/utils/shared/chroot ${D}${base_bindir}
install -m 755 usr/utils/shared/cpio ${D}${base_bindir}
install -m 755 usr/utils/shared/dd ${D}${base_bindir}
@@ -42,45 +47,45 @@ do_install() {
install -m 755 usr/utils/shared/true ${D}${base_bindir}
install -m 755 usr/utils/shared/umount ${D}${base_bindir}
install -m 755 usr/utils/shared/uname ${D}${base_bindir}
- install -m 755 usr/utils/shared/modprobe ${D}${base_bindir}
- install -m 755 usr/utils/shared/losetup ${D}${base_bindir}
- install -m 755 usr/utils/shared/wc ${D}${base_bindir}
+ install -m 755 usr/utils/shared/modprobe ${D}${base_bindir}
+ install -m 755 usr/utils/shared/losetup ${D}${base_bindir}
+ install -m 755 usr/utils/shared/wc ${D}${base_bindir}
- install -d ${D}${base_libdir}
- install -m 755 usr/klibc/klibc-*.so ${D}${base_libdir}
- cd ${D}${base_libdir}
- ln -s klibc-*.so klibc.so
- cd -
+ install -d ${D}${base_libdir}
+ install -m 755 usr/klibc/klibc-*.so ${D}${base_libdir}
+ cd ${D}${base_libdir}
+ ln -s klibc-*.so klibc.so
+ cd -
cd ${D}${base_bindir}
- ln -s gzip gunzip
+ ln -s gzip gunzip
ln -s gzip zcat
- cd -
+ cd -
}
export INST=${STAGING_DIR_TARGET}
do_stage() {
- oe_runmake install
+ oe_runmake install
cp '${STAGING_DIR_TARGET}/bin/klcc' '${CROSS_DIR}/bin/${TARGET_PREFIX}klcc'
}
PACKAGES = "${PN} ${PN}-dev klibc-utils-sh klibc-utils-kinit \
- klibc-utils-fstype klibc-utils-ipconfig \
- klibc-utils-nfsmount klibc-utils-resume \
- klibc-utils-run-init klibc-utils-cat \
- klibc-utils-chroot klibc-utils-cpio \
- klibc-utils-dd klibc-utils-dmesg \
- klibc-utils-false klibc-utils-halt \
- klibc-utils-kill klibc-utils-ln \
- klibc-utils-minips klibc-utils-mkdir \
- klibc-utils-mkfifo klibc-utils-mknod \
+ klibc-utils-fstype klibc-utils-ipconfig \
+ klibc-utils-nfsmount klibc-utils-resume \
+ klibc-utils-run-init klibc-utils-cat \
+ klibc-utils-chroot klibc-utils-cpio \
+ klibc-utils-dd klibc-utils-dmesg \
+ klibc-utils-false klibc-utils-halt \
+ klibc-utils-kill klibc-utils-ln \
+ klibc-utils-minips klibc-utils-mkdir \
+ klibc-utils-mkfifo klibc-utils-mknod \
klibc-utils-mount klibc-utils-nuke \
klibc-utils-pivot-root klibc-utils-poweroff \
- klibc-utils-readlink klibc-utils-reboot \
- klibc-utils-sleep \
+ klibc-utils-readlink klibc-utils-reboot \
+ klibc-utils-sleep \
klibc-utils-sync klibc-utils-true \
klibc-utils-umount klibc-utils-uname \
klibc-utils-gzip klibc-utils-modprobe \
- klibc-utils-losetup klibc-utils-wc"
+ klibc-utils-losetup klibc-utils-wc"
FILES_${PN} = "${base_libdir}/klibc-*.so"
FILES_${PN}-dev = "${base_libdir}/klibc.so"
diff --git a/recipes/klibc/klibc_1.5.bb b/recipes/klibc/klibc_1.5.bb
index 3dd4d645ec..bbdf7d001c 100644
--- a/recipes/klibc/klibc_1.5.bb
+++ b/recipes/klibc/klibc_1.5.bb
@@ -1,4 +1,4 @@
require klibc_1.5.inc
-PR = "r9"
+PR = "r10"
KLIBC_FETCHDIR = "Stable"
diff --git a/recipes/klibc/klibc_1.5.inc b/recipes/klibc/klibc_1.5.inc
index d4cc830314..5c10df76f4 100644
--- a/recipes/klibc/klibc_1.5.inc
+++ b/recipes/klibc/klibc_1.5.inc
@@ -1,8 +1,13 @@
require klibc-common.inc
-SRC_URI += "file://staging.patch;patch=1 \
- file://klibc_kexecsyscall.patch;patch=1 \
- "
+SRC_URI += "file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
+ file://modprobe.patch;patch=1 \
+ file://losetup.patch;patch=1 \
+ file://dash_readopt.patch;patch=1 \
+ file://wc.patch;patch=1 \
+ file://staging.patch;patch=1 \
+ file://klibc_kexecsyscall.patch;patch=1 \
+ "
# we want only the shared programms and the lib so we chose them manually
do_install() {
@@ -15,7 +20,7 @@ do_install() {
install -m 755 usr/kinit/nfsmount/shared/nfsmount ${D}${base_bindir}
install -m 755 usr/kinit/resume/shared/resume ${D}${base_bindir}
install -m 755 usr/kinit/run-init/shared/run-init ${D}${base_bindir}
- install -m 755 usr/utils/shared/cat ${D}${base_bindir}
+ install -m 755 usr/utils/shared/cat ${D}${base_bindir}
install -m 755 usr/utils/shared/chroot ${D}${base_bindir}
install -m 755 usr/utils/shared/cpio ${D}${base_bindir}
install -m 755 usr/utils/shared/dd ${D}${base_bindir}
@@ -38,48 +43,48 @@ do_install() {
install -m 755 usr/utils/shared/true ${D}${base_bindir}
install -m 755 usr/utils/shared/umount ${D}${base_bindir}
install -m 755 usr/utils/shared/uname ${D}${base_bindir}
- install -m 755 usr/utils/shared/modprobe ${D}${base_bindir}
- install -m 755 usr/utils/shared/losetup ${D}${base_bindir}
- install -m 755 usr/utils/shared/wc ${D}${base_bindir}
+ install -m 755 usr/utils/shared/modprobe ${D}${base_bindir}
+ install -m 755 usr/utils/shared/losetup ${D}${base_bindir}
+ install -m 755 usr/utils/shared/wc ${D}${base_bindir}
- install -d ${D}${base_libdir}
- install -m 755 usr/klibc/klibc-*.so ${D}${base_libdir}
- cd ${D}${base_libdir}
- ln -s klibc-*.so klibc.so
- cd -
+ install -d ${D}${base_libdir}
+ install -m 755 usr/klibc/klibc-*.so ${D}${base_libdir}
+ cd ${D}${base_libdir}
+ ln -s klibc-*.so klibc.so
+ cd -
cd ${D}${base_bindir}
- ln -s gzip gunzip
+ ln -s gzip gunzip
ln -s gzip zcat
- cd -
+ cd -
}
export INST=${STAGING_DIR_TARGET}
do_stage() {
- oe_runmake install
+ oe_runmake install
cp '${STAGING_DIR_TARGET}/bin/klcc' '${CROSS_DIR}/bin/${TARGET_PREFIX}klcc'
}
PACKAGES = "${PN} ${PN}-dev klibc-utils-sh klibc-utils-kinit \
- klibc-utils-fstype klibc-utils-ipconfig \
- klibc-utils-nfsmount klibc-utils-resume \
- klibc-utils-run-init klibc-utils-cat \
- klibc-utils-chroot klibc-utils-cpio \
- klibc-utils-dd klibc-utils-false \
- klibc-utils-halt klibc-utils-insmod \
- klibc-utils-kill klibc-utils-ln \
- klibc-utils-minips klibc-utils-mkdir \
- klibc-utils-mkfifo klibc-utils-mknod \
+ klibc-utils-fstype klibc-utils-ipconfig \
+ klibc-utils-nfsmount klibc-utils-resume \
+ klibc-utils-run-init klibc-utils-cat \
+ klibc-utils-chroot klibc-utils-cpio \
+ klibc-utils-dd klibc-utils-false \
+ klibc-utils-halt klibc-utils-insmod \
+ klibc-utils-kill klibc-utils-ln \
+ klibc-utils-minips klibc-utils-mkdir \
+ klibc-utils-mkfifo klibc-utils-mknod \
klibc-utils-mount klibc-utils-nuke \
klibc-utils-pivot-root klibc-utils-poweroff \
- klibc-utils-readlink klibc-utils-reboot \
+ klibc-utils-readlink klibc-utils-reboot \
klibc-utils-sleep klibc-utils-true \
klibc-utils-umount klibc-utils-uname \
klibc-utils-gzip klibc-utils-modprobe \
- klibc-utils-losetup klibc-utils-wc"
+ klibc-utils-losetup klibc-utils-wc"
FILES_${PN} = "${base_libdir}/klibc-*.so"
FILES_${PN}-dev = "${base_libdir}/klibc.so"
-FILES_klibc-utils-sh = "${base_bindir}/so"
+FILES_klibc-utils-sh = "${base_bindir}/sh"
FILES_klibc-utils-gzip = "${base_bindir}/gzip ${base_bindir}/gunzip ${base_bindir}/zcat"
FILES_klibc-utils-kinit = "${base_bindir}/kinit"
FILES_klibc-utils-fstype = "${base_bindir}/fstype"