diff options
author | Thomas Kunze <thommycheck@gmx.de> | 2008-02-22 20:46:27 +0000 |
---|---|---|
committer | Thomas Kunze <thommycheck@gmx.de> | 2008-02-22 20:46:27 +0000 |
commit | 1dec00a7e52008400bdfc8034f6298f2578cb637 (patch) | |
tree | 50ffaf0d546503e1991ebaa118243ed7310e68eb /packages | |
parent | f491dfaa97dbcbfdd0f14c6372f5941055167b3b (diff) | |
parent | 9e8d9da364854e9921769c33b0eb57dac923d002 (diff) |
merge of '808beacef20f045331c5d32c4a877b9010fe989a'
and 'f51d223df158f1cff524858100f483e0d4918266'
Diffstat (limited to 'packages')
-rw-r--r-- | packages/kexec/files/kexec-klibc.patch | 140 | ||||
-rw-r--r-- | packages/kexec/kexec-tools-static_1.101.bb | 21 | ||||
-rw-r--r-- | packages/kexec/kexec-tools.inc | 2 | ||||
-rw-r--r-- | packages/kexec/kexec-tools_1.101.bb | 4 | ||||
-rw-r--r-- | packages/klibc/files/install.patch | 42 | ||||
-rw-r--r-- | packages/klibc/files/klibc_kexecsyscall.patch | 11 | ||||
-rw-r--r-- | packages/klibc/files/staging.patch | 130 | ||||
-rw-r--r-- | packages/klibc/klibc-common.inc | 43 | ||||
-rw-r--r-- | packages/klibc/klibc-utils-static_1.5.bb | 51 | ||||
-rw-r--r-- | packages/klibc/klibc.inc | 147 | ||||
-rw-r--r-- | packages/klibc/klibc_0.190.bb | 1 | ||||
-rw-r--r-- | packages/klibc/klibc_1.5.bb (renamed from packages/klibc/klibc_1.1.1.bb) | 1 |
12 files changed, 476 insertions, 117 deletions
diff --git a/packages/kexec/files/kexec-klibc.patch b/packages/kexec/files/kexec-klibc.patch new file mode 100644 index 0000000000..b8e2c81689 --- /dev/null +++ b/packages/kexec/files/kexec-klibc.patch @@ -0,0 +1,140 @@ +Index: kexec-tools-1.101/kexec/arch/arm/kexec-elf-rel-arm.c +=================================================================== +--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-elf-rel-arm.c 2008-02-22 20:45:15.907610333 +0100 ++++ kexec-tools-1.101/kexec/arch/arm/kexec-elf-rel-arm.c 2008-02-22 20:45:27.508612989 +0100 +@@ -1,5 +1,5 @@ + #include <stdio.h> +-#include <elf.h> ++#include "../../../include/elf.h" + #include "../../kexec.h" + #include "../../kexec-elf.h" + +Index: kexec-tools-1.101/kexec/arch/arm/kexec-zImage-arm.c +=================================================================== +--- kexec-tools-1.101.orig/kexec/arch/arm/kexec-zImage-arm.c 2008-02-22 20:45:15.959611260 +0100 ++++ kexec-tools-1.101/kexec/arch/arm/kexec-zImage-arm.c 2008-02-22 20:45:27.508612989 +0100 +@@ -110,13 +110,13 @@ + } + + fread(buf, sizeof(buf[1]), BOOT_PARAMS_SIZE, fp); +- if (ferror(fp)) { ++/* if (ferror(fp)) { + fprintf(stderr, "Cannot read %s: %s\n", + fn, strerror(errno)); + fclose(fp); + return NULL; + } +- ++*/ + fclose(fp); + return (struct tag *) buf; + } +Index: kexec-tools-1.101/kexec/ifdown.c +=================================================================== +--- kexec-tools-1.101.orig/kexec/ifdown.c 2004-06-09 20:55:31.000000000 +0200 ++++ kexec-tools-1.101/kexec/ifdown.c 2008-02-22 20:45:27.508612989 +0100 +@@ -14,7 +14,7 @@ + #include <sys/ioctl.h> + #include <sys/socket.h> + #include <sys/time.h> +-#include <sys/errno.h> ++#include <errno.h> + + #include <net/if.h> + #include <netinet/in.h> +Index: kexec-tools-1.101/purgatory/Makefile +=================================================================== +--- kexec-tools-1.101.orig/purgatory/Makefile 2005-01-08 23:36:32.000000000 +0100 ++++ kexec-tools-1.101/purgatory/Makefile 2008-02-22 20:45:27.516611391 +0100 +@@ -13,7 +13,7 @@ + + PCFLAGS += $(call cc-option, -ffreestanding) + PCFLAGS += $(call cc-option, -fnobuiltin) +-PCFLAGS += $(call cc-option, -fnostdinc) ++PCFLAGS += $(call cc-option, -nostdinc) + PCFLAGS += $(call cc-option, -fno-zero-initialized-in-bss) + + PURGATORY_C_SRCS:= +Index: kexec-tools-1.101/kexec/kexec-elf-rel.c +=================================================================== +--- kexec-tools-1.101.orig/kexec/kexec-elf-rel.c 2005-01-13 14:04:21.000000000 +0100 ++++ kexec-tools-1.101/kexec/kexec-elf-rel.c 2008-02-22 20:45:27.524612027 +0100 +@@ -4,7 +4,7 @@ + #include <stdio.h> + #include <errno.h> + #include <stdlib.h> +-#include "elf.h" ++#include "../include/elf.h" + #include <boot/elf_boot.h> + #include "kexec.h" + #include "kexec-elf.h" +Index: kexec-tools-1.101/kexec/kexec-syscall.h +=================================================================== +--- kexec-tools-1.101.orig/kexec/kexec-syscall.h 2008-02-22 20:45:15.923611048 +0100 ++++ kexec-tools-1.101/kexec/kexec-syscall.h 2008-02-22 20:45:27.524612027 +0100 +@@ -2,7 +2,7 @@ + #define KEXEC_SYSCALL_H + + #define __LIBRARY__ +-#include <syscall.h> ++/*#include <syscall.h>*/ + #include <sys/syscall.h> + #include <unistd.h> + +@@ -21,7 +21,7 @@ + #define LINUX_REBOOT_CMD_KEXEC_OLD 0x81726354 + #define LINUX_REBOOT_CMD_KEXEC_OLD2 0x18263645 + #define LINUX_REBOOT_CMD_KEXEC 0x45584543 +- ++/* + #ifdef __i386__ + #define __NR_kexec_load 283 + #endif +@@ -43,18 +43,19 @@ + #ifndef __NR_kexec_load + #error Unknown processor architecture. Needs a kexec_load syscall number. + #endif +- ++*/ + struct kexec_segment; +- ++/* + static inline long kexec_load(void *entry, unsigned long nr_segments, + struct kexec_segment *segments, unsigned long flags) + { + return (long) syscall(__NR_kexec_load, entry, nr_segments, segments, flags); + } +- ++*/ + static inline long kexec_reboot(void) + { +- return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); ++ //return (long) syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); ++ return __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_KEXEC, 0); + } + + +Index: kexec-tools-1.101/kexec/kexec.c +=================================================================== +--- kexec-tools-1.101.orig/kexec/kexec.c 2008-02-22 20:45:15.923611048 +0100 ++++ kexec-tools-1.101/kexec/kexec.c 2008-02-22 20:45:38.847612035 +0100 +@@ -29,9 +29,7 @@ + #include <unistd.h> + #include <fcntl.h> + #include <getopt.h> +-#ifdef HAVE_ZLIB_H +-#include <zlib.h> +-#endif ++#include "zlib.h" + #include <sha256.h> + #include "kexec.h" + #include "kexec-syscall.h" +@@ -383,7 +381,7 @@ + return buf; + } + +-#if HAVE_ZLIB_H ++#if 1 + char *slurp_decompress_file(const char *filename, off_t *r_size) + { + gzFile fp; diff --git a/packages/kexec/kexec-tools-static_1.101.bb b/packages/kexec/kexec-tools-static_1.101.bb index ca23917a11..5031b5f923 100644 --- a/packages/kexec/kexec-tools-static_1.101.bb +++ b/packages/kexec/kexec-tools-static_1.101.bb @@ -1,12 +1,23 @@ +# the binaries are statical linked against klibc require kexec-tools.inc -PR = "r0" +PR = "r1" +DEPENDS = "klibc" -SRC_URI += "file://kexec-static.patch;patch=1" +SRC_URI += "file://kexec-klibc.patch;patch=1" S = "${WORKDIR}/kexec-tools-${PV}" -PACKAGES =+ "kexec-static kdump-static" +EXTRA_OECONF = " --without-zlib" -FILES_kexec-static = "${sbindir}/kexec" -FILES_kdump-static = "${sbindir}/kdump" +export CC=${TARGET_PREFIX}klcc + +# standart oe cflags don't work with klcc +export CFLAGS="" +export CPPFLAGS="" +export LDFLAGS="" + +PACKAGES =+ "kexec-klibc kdump-klibc" + +FILES_kexec-klibc = "${sbindir}/kexec" +FILES_kdump-klibc = "${sbindir}/kdump" diff --git a/packages/kexec/kexec-tools.inc b/packages/kexec/kexec-tools.inc index 5649934a5b..f806e71480 100644 --- a/packages/kexec/kexec-tools.inc +++ b/packages/kexec/kexec-tools.inc @@ -7,8 +7,6 @@ DEPENDS = "virtual/kernel zlib" inherit autotools -export LDFLAGS = "-L${STAGING_LIBDIR}" -EXTRA_OECONF = " --with-zlib=yes" SRC_URI = "http://www.xmission.com/~ebiederm/files/kexec/kexec-tools-${PV}.tar.gz \ file://kexec-tools-arm.patch;patch=1 \ diff --git a/packages/kexec/kexec-tools_1.101.bb b/packages/kexec/kexec-tools_1.101.bb index 366fad4978..f74c7bcd83 100644 --- a/packages/kexec/kexec-tools_1.101.bb +++ b/packages/kexec/kexec-tools_1.101.bb @@ -1,3 +1,5 @@ require kexec-tools.inc +export LDFLAGS = "-L${STAGING_LIBDIR}" +EXTRA_OECONF = " --with-zlib=yes" -PR = "r4" +PR = "r5" diff --git a/packages/klibc/files/install.patch b/packages/klibc/files/install.patch deleted file mode 100644 index b165e8b177..0000000000 --- a/packages/klibc/files/install.patch +++ /dev/null @@ -1,42 +0,0 @@ -# These are OE specific patches which make the install stuff work -# in the OE build environment and fix the problem that the gzip -# stuff should be all links to one executable but end up being -# copies ---- klibc-1.1.1/Makefile.orig 2005-12-29 14:20:09.080981353 -0800 -+++ klibc-1.1.1/Makefile 2005-12-29 14:20:25.634022970 -0800 -@@ -61,7 +61,7 @@ local-install: $(CROSS)klcc - mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)include/$$d ; \ - for r in $(KRNLSRC)/include $(KRNLOBJ)/include $(KRNLOBJ)/include2 ; do \ - [ ! -d $$r/$$d ] || \ -- cp -rfL $$r/$$d/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ; \ -+ cp -rf $$r/$$d/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ; \ - done ; \ - done - cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(ARCH) asm ---- klibc-1.1.1/gzip/Makefile.orig 2005-12-29 18:10:00.787869930 -0800 -+++ klibc-1.1.1/gzip/Makefile 2005-12-29 18:11:21.084922705 -0800 -@@ -70,9 +70,12 @@ clean: - spotless: clean - rm -f *~ - --# These should presumably be shared... - install: all -- $(INSTALL_EXEC) gzip gunzip zcat $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin -+ $(INSTALL_EXEC) gzip $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin -+ rm -f $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin/gunzip -+ ln $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin/gzip $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin/gunzip -+ rm -f $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin/zcat -+ ln $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin/gzip $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin/zcat - - ifneq ($(wildcard .*.d),) - include $(wildcard .*.d) ---- klibc-1.1.1/klibc/Makefile.orig 2005-12-30 10:39:04.504930675 -0800 -+++ klibc-1.1.1/klibc/Makefile 2005-12-30 10:39:52.755966921 -0800 -@@ -184,6 +184,7 @@ install: all - $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)lib - $(INSTALL_EXEC) klibc-`cat $(SOLIB).hash`.so \ - $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)lib -+ test -z "$(INSTALLROOT)" || \ - $(INSTALL_EXEC) klibc-`cat $(SOLIB).hash`.so \ - $(INSTALLROOT)/$(SHLIBDIR) - diff --git a/packages/klibc/files/klibc_kexecsyscall.patch b/packages/klibc/files/klibc_kexecsyscall.patch new file mode 100644 index 0000000000..9b2dca4738 --- /dev/null +++ b/packages/klibc/files/klibc_kexecsyscall.patch @@ -0,0 +1,11 @@ +--- klibc-1.5/usr/klibc/SYSCALLS.def 2007-03-04 02:52:10.000000000 +0100 ++++ klibc.clean/usr/klibc/SYSCALLS.def 2008-02-22 17:12:23.663612084 +0100 +@@ -13,6 +13,8 @@ + #include <asm/unistd.h> + #include <klibc/sysconfig.h> + #include <bitsize.h> ++#include <asm/kexec.h> ++long kexec_load(void *, unsigned long , struct kexec_segment *, unsigned long ); + + /* + * Process-related syscalls diff --git a/packages/klibc/files/staging.patch b/packages/klibc/files/staging.patch new file mode 100644 index 0000000000..f5ce23af9f --- /dev/null +++ b/packages/klibc/files/staging.patch @@ -0,0 +1,130 @@ +diff -ru klibc.clean/Makefile klibc-1.5/Makefile +--- klibc.clean/Makefile 2008-02-08 22:37:36.000000000 +0100 ++++ klibc-1.5/Makefile 2008-02-15 12:46:48.000000000 +0100 +@@ -33,7 +33,7 @@ + export PERL := perl + + # Location for installation +-export prefix = /usr ++export prefix = $(INST) + export bindir = $(prefix)/bin + export libdir = $(prefix)/lib + export mandir = $(prefix)/man +diff -ru klibc.clean/scripts/Kbuild.install klibc-1.5/scripts/Kbuild.install +--- klibc.clean/scripts/Kbuild.install 2008-02-08 22:37:36.000000000 +0100 ++++ klibc-1.5/scripts/Kbuild.install 2008-02-18 22:36:35.434193918 +0100 +@@ -88,14 +88,11 @@ + header: + $(Q)echo " INSTALL headers + man pages to $(INSTALLROOT)$(INSTALLDIR)" + $(Q)mkdir -p $(INSTALLROOT)$(bindir) +- $(Q)mkdir -p $(INSTALLROOT)$(mandir)/man1 +- $(Q)mkdir -p $(INSTALLROOT)$(SHLIBDIR) + $(Q)mkdir -p $(INSTALLROOT)$(INSTALLDIR) + $(Q)-rm -rf $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include + $(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 scsi asm-$(KLIBCARCH) asm-generic $(ASMKLIBCARCH); do \ ++ $(Q)-set -e ; for d in linux scsi asm-$(KLIBCARCH) asm-generic $(ASMKLIBCARCH); do \ + mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)include/$$d ; \ + for r in $(KLIBCKERNELSRC)/include $(KLIBCKERNELOBJ)/include \ + $(KLIBCKERNELOBJ)/include2 ; do \ +@@ -106,7 +103,6 @@ + done + $(Q)cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(KLIBCARCH) asm + $(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) + + footer: header +diff -ru klibc.clean/usr/dash/Kbuild klibc-1.5/usr/dash/Kbuild +--- klibc.clean/usr/dash/Kbuild 2008-02-08 22:37:41.000000000 +0100 ++++ klibc-1.5/usr/dash/Kbuild 2008-02-15 12:18:08.000000000 +0100 +@@ -107,5 +107,3 @@ + $(obj)/arith.c: $(obj)/arith.h + $(Q): + +-# Targets to install +-install-y := sh.shared +diff -ru klibc.clean/usr/gzip/Kbuild klibc-1.5/usr/gzip/Kbuild +--- klibc.clean/usr/gzip/Kbuild 2008-02-08 22:37:42.000000000 +0100 ++++ klibc-1.5/usr/gzip/Kbuild 2008-02-15 12:18:24.000000000 +0100 +@@ -21,5 +21,3 @@ + # Cleaning + targets := gzip gzip.g gunzip zcat + +-# Targets to install +-install-y := gzip gunzip zcat +diff -ru klibc.clean/usr/kinit/fstype/Kbuild klibc-1.5/usr/kinit/fstype/Kbuild +--- klibc.clean/usr/kinit/fstype/Kbuild 2008-02-08 22:37:40.000000000 +0100 ++++ klibc-1.5/usr/kinit/fstype/Kbuild 2008-02-15 12:26:20.000000000 +0100 +@@ -21,5 +21,3 @@ + # Cleaning + clean-dirs := static shared + +-# install binary +-install-y := $(shared-y) +diff -ru klibc.clean/usr/kinit/ipconfig/Kbuild klibc-1.5/usr/kinit/ipconfig/Kbuild +--- klibc.clean/usr/kinit/ipconfig/Kbuild 2008-02-08 22:37:40.000000000 +0100 ++++ klibc-1.5/usr/kinit/ipconfig/Kbuild 2008-02-15 12:26:33.000000000 +0100 +@@ -27,5 +27,3 @@ + # Cleaning + clean-dirs := static shared + +-# install binary +-install-y := $(shared-y) +diff -ru klibc.clean/usr/kinit/Kbuild klibc-1.5/usr/kinit/Kbuild +--- klibc.clean/usr/kinit/Kbuild 2008-02-08 22:37:40.000000000 +0100 ++++ klibc-1.5/usr/kinit/Kbuild 2008-02-15 12:18:43.000000000 +0100 +@@ -33,5 +33,3 @@ + subdir- := fstype ipconfig nfsmount resume run-init + + +-# install binary +-install-y := kinit kinit.shared +diff -ru klibc.clean/usr/kinit/nfsmount/Kbuild klibc-1.5/usr/kinit/nfsmount/Kbuild +--- klibc.clean/usr/kinit/nfsmount/Kbuild 2008-02-08 22:37:40.000000000 +0100 ++++ klibc-1.5/usr/kinit/nfsmount/Kbuild 2008-02-15 12:26:46.000000000 +0100 +@@ -23,5 +23,3 @@ + + clean-dirs := static shared + +-# Install binary +-install-y := $(shared-y) +diff -ru klibc.clean/usr/kinit/resume/Kbuild klibc-1.5/usr/kinit/resume/Kbuild +--- klibc.clean/usr/kinit/resume/Kbuild 2008-02-08 22:37:39.000000000 +0100 ++++ klibc-1.5/usr/kinit/resume/Kbuild 2008-02-15 12:27:01.000000000 +0100 +@@ -26,5 +26,3 @@ + # Cleaning + clean-dirs := static shared + +-# install binary +-install-y := $(shared-y) +diff -ru klibc.clean/usr/kinit/run-init/Kbuild klibc-1.5/usr/kinit/run-init/Kbuild +--- klibc.clean/usr/kinit/run-init/Kbuild 2008-02-08 22:37:39.000000000 +0100 ++++ klibc-1.5/usr/kinit/run-init/Kbuild 2008-02-15 12:27:12.000000000 +0100 +@@ -21,5 +21,3 @@ + # Cleaning + clean-dirs := static shared + +-# install binary +-install-y := $(shared-y) +Only in klibc-1.5/usr/klibc/arch/arm: klib.list +diff -ru klibc.clean/usr/klibc/Kbuild klibc-1.5/usr/klibc/Kbuild +--- klibc.clean/usr/klibc/Kbuild 2008-02-08 22:37:49.000000000 +0100 ++++ klibc-1.5/usr/klibc/Kbuild 2008-02-15 12:17:24.000000000 +0100 +@@ -175,5 +175,3 @@ + $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib)) + $(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \ + $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)lib +- $(Q)$(install-lib) $(obj)/klibc-$(SOLIBHASH).so \ +- $(INSTALLROOT)$(SHLIBDIR) +diff -ru klibc.clean/usr/utils/Kbuild klibc-1.5/usr/utils/Kbuild +--- klibc.clean/usr/utils/Kbuild 2008-02-08 22:37:37.000000000 +0100 ++++ klibc-1.5/usr/utils/Kbuild 2008-02-15 12:17:51.000000000 +0100 +@@ -64,5 +64,3 @@ + # Clean deletes the static and shared dir + clean-dirs := static shared + +-# install only install the shared binaries +-install-y := $(shared-y) shared/reboot shared/poweroff diff --git a/packages/klibc/klibc-common.inc b/packages/klibc/klibc-common.inc index 146968eaf0..87f806dfe2 100644 --- a/packages/klibc/klibc-common.inc +++ b/packages/klibc/klibc-common.inc @@ -5,31 +5,9 @@ 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/Stable/klibc-${PV}.tar.bz2" -SRC_URI += "file://install.patch;patch=1" S = "${WORKDIR}/klibc-${PV}" PACKAGE_ARCH = "${MACHINE_ARCH}" -# for the correct kernel staging path -# inherit module-base - -EXTRA_OEMAKE = "'ARCH=${KLIBC_ARCH}' \ - 'CROSS=${TARGET_PREFIX}' \ - 'CC=${HOST_PREFIX}gcc' \ - 'LD=${HOST_PREFIX}ld' \ - 'AR=${AR}' \ - 'RANLIB=${RANLIB}' \ - 'NM=${TARGET_PREFIX}nm' \ - 'STRIP=echo' \ - 'SHLIBDIR=/lib' \ - 'HOST_CC=${BUILD_CC}' \ - 'HOST_CFLAGS=${BUILD_CFLAGS}' \ - 'HOST_LDFLAGS=${BUILD_LDFLAGS}' \ - 'HOST_LIBS=' \ - 'LDFLAGS=' \ - 'ARCHREQFLAGS=${HOST_CC_ARCH}' \ - 'OPTFLAGS=${TARGET_CFLAGS}' \ - 'mandir=${mandir}'" - KLIBC_ARCH = '${TARGET_ARCH}' KLIBC_ARCH_armeb = 'arm' KLIBC_ARCH_mipsel = 'mips' @@ -38,25 +16,14 @@ KLIBC_ARCH_mipsel = 'mips' # could be fixed, but for the moment: ARM_INSTRUCTION_SET = "arm" -TARGET_CFLAGS := "${@oe_filter_out('-I\S+', '${TARGET_CFLAGS}', d)} -I${STAGING_KERNEL_DIR}/include" - -INSTALLDIR = "/usr/lib/klibc" -INSTALLPREFIX = "${INSTALLDIR}/${TARGET_PREFIX}" -INSTALLBINDIR = "${INSTALLPREFIX}bin" -INSTALLLIBDIR = "${INSTALLPREFIX}lib" -INSTALLINCDIR = "${INSTALLPREFIX}include" +SRC_URI_append_linux-gnueabi = "\ + file://klibc-config-eabi.patch;patch=1" -PACKAGES = "${PN}-dbg ${PN} ${PN}-dev ${PN}-doc" - -FILES_${PN} = "/lib/*.so* ${INSTALLBINDIR}" -FILES_${PN}-dev = "/usr/bin ${INSTALLINCDIR} ${INSTALLLIBDIR}" +EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ + 'CROSS_COMPILE=${TARGET_PREFIX}' \ + " do_configure () { ln -sf ${STAGING_KERNEL_DIR} linux } -do_install() { - # The installed -dev won't work because it has the cross compiler - # path compiled in. - oe_runmake 'INSTALLROOT=${D}' install -} diff --git a/packages/klibc/klibc-utils-static_1.5.bb b/packages/klibc/klibc-utils-static_1.5.bb index bbb3248158..7248576c9f 100644 --- a/packages/klibc/klibc-utils-static_1.5.bb +++ b/packages/klibc/klibc-utils-static_1.5.bb @@ -1,22 +1,21 @@ require klibc-common.inc -PR = "r3" - -SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/Stable/klibc-${PV}.tar.bz2" +PR = "r4" SRC_URI_append_linux-gnueabi = "\ file://klibc-config-eabi.patch;patch=1" -EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ - 'CROSS_COMPILE=${TARGET_PREFIX}' \ - " - +# We only want the static utils. klibc build both. So we install only what we want. do_install() { install -d ${D}${base_bindir} install -m 755 usr/dash/sh ${D}${base_bindir} install -m 755 usr/gzip/gzip ${D}${base_bindir} - ln -s ${D}${base_bindir}/gzip ${D}${base_bindir}/gunzip - ln -s ${D}${base_bindir}/gzip ${D}${base_bindir}/zcat + 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} @@ -28,31 +27,50 @@ do_install() { install -m 755 usr/utils/static/ln ${D}${base_bindir} install -m 755 usr/utils/static/minips ${D}${base_bindir} install -m 755 usr/utils/static/mkdir ${D}${base_bindir} + install -m 755 usr/utils/static/mkfifo ${D}${base_bindir} install -m 755 usr/utils/static/mknod ${D}${base_bindir} install -m 755 usr/utils/static/mount ${D}${base_bindir} install -m 755 usr/utils/static/nuke ${D}${base_bindir} install -m 755 usr/utils/static/pivot_root ${D}${base_bindir} + install -m 755 usr/utils/static/poweroff ${D}${base_bindir} install -m 755 usr/utils/static/readlink ${D}${base_bindir} + install -m 755 usr/utils/static/reboot ${D}${base_bindir} install -m 755 usr/utils/static/sleep ${D}${base_bindir} 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} + cd ${D}${base_bindir} + ln -s gzip gunzip + ln -s gzip zcat + cd - } PACKAGES = "klibc-utils-static-sh klibc-utils-static-gzip \ - klibc-utils-static-cat klibc-utils-static-chroot \ + 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-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-mknod \ - klibc-utils-static-mount klibc-utils-static-nuke \ - klibc-utils-static-pivot-root klibc-utils-static-readlink \ - klibc-utils-static-sleep klibc-utils-static-true \ - klibc-utils-static-umount klibc-utils-static-uname " + 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 \ + " 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-cat = "${base_bindir}/cat" FILES_klibc-utils-static-chroot = "${base_bindir}/chroot" FILES_klibc-utils-static-cpio = "${base_bindir}/cpio" @@ -64,11 +82,14 @@ FILES_klibc-utils-static-kill = "${base_bindir}/kill" FILES_klibc-utils-static-ln = "${base_bindir}/ln" FILES_klibc-utils-static-minips = "${base_bindir}/minips" FILES_klibc-utils-static-mkdir = "${base_bindir}/mkdir" +FILES_klibc-utils-static-mkfifo = "${base_bindir}/mkfifo" FILES_klibc-utils-static-mknod = "${base_bindir}/mknod" FILES_klibc-utils-static-mount = "${base_bindir}/mount" FILES_klibc-utils-static-nuke = "${base_bindir}/nuke" FILES_klibc-utils-static-pivot-root = "${base_bindir}/pivot_root" +FILES_klibc-utils-static-poweroff = "${base_bindir}/poweroff" FILES_klibc-utils-static-readlink = "${base_bindir}/readlink" +FILES_klibc-utils-static-reboot = "${base_bindir}/reboot" FILES_klibc-utils-static-sleep = "${base_bindir}/sleep" FILES_klibc-utils-static-true = "${base_bindir}/true" FILES_klibc-utils-static-umount = "${base_bindir}/umount" diff --git a/packages/klibc/klibc.inc b/packages/klibc/klibc.inc index efaf298e36..d7065f1e67 100644 --- a/packages/klibc/klibc.inc +++ b/packages/klibc/klibc.inc @@ -1,17 +1,140 @@ require klibc-common.inc -STAGING_KLIBC_DIR = "${STAGING_DIR_HOST}/klibc" +SRC_URI += "file://staging.patch;patch=1 \ + file://klibc_kexecsyscall.patch;patch=1 \ + " +SRC_URI_append_linux-gnueabi = "file://klibc-config-eabi.patch;patch=1" +# we want only the shared programms and the lib so we chose them manually +do_install() { + install -d ${D}${base_bindir} + install -m 755 usr/dash/sh.shared ${D}${base_bindir}/sh + install -m 755 usr/gzip/gzip ${D}${base_bindir} + install -m 755 usr/kinit/kinit.shared ${D}${base_bindir}/kinit + install -m 755 usr/kinit/fstype/shared/fstype ${D}${base_bindir} + install -m 755 usr/kinit/ipconfig/shared/ipconfig ${D}${base_bindir} + 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/chroot ${D}${base_bindir} + install -m 755 usr/utils/shared/cpio ${D}${base_bindir} + install -m 755 usr/utils/shared/dd ${D}${base_bindir} + install -m 755 usr/utils/shared/false ${D}${base_bindir} + install -m 755 usr/utils/shared/halt ${D}${base_bindir} + install -m 755 usr/utils/shared/insmod ${D}${base_bindir} + install -m 755 usr/utils/shared/kill ${D}${base_bindir} + install -m 755 usr/utils/shared/ln ${D}${base_bindir} + install -m 755 usr/utils/shared/minips ${D}${base_bindir} + install -m 755 usr/utils/shared/mkdir ${D}${base_bindir} + install -m 755 usr/utils/shared/mkfifo ${D}${base_bindir} + install -m 755 usr/utils/shared/mknod ${D}${base_bindir} + install -m 755 usr/utils/shared/mount ${D}${base_bindir} + install -m 755 usr/utils/shared/nuke ${D}${base_bindir} + install -m 755 usr/utils/shared/pivot_root ${D}${base_bindir} + install -m 755 usr/utils/shared/poweroff ${D}${base_bindir} + install -m 755 usr/utils/shared/readlink ${D}${base_bindir} + install -m 755 usr/utils/shared/reboot ${D}${base_bindir} + install -m 755 usr/utils/shared/sleep ${D}${base_bindir} + 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 -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 zcat + cd - +} + +export INST=${STAGING_DIR_TARGET} do_stage() { - rm -rf "${STAGING_KLIBC_DIR}" - oe_runmake 'prefix=${STAGING_KLIBC_DIR}' \ - 'bindir=${STAGING_BINDIR}' \ - 'mandir=${STAGING_DIR_HOST}${layout_mandir}' \ - install - # The following is sufficient, at least in klibc 1.1.1 to make klcc - # use the staged libraries and include files. - sed -i -e 's@^\$prefix = .*$@\$prefix = "${STAGING_KLIBC_DIR}/lib/klibc";@' \ - '${STAGING_BINDIR}/${TARGET_PREFIX}klcc' - # Perhaps other binaries need to be moved to cross? - mv '${STAGING_BINDIR}/${TARGET_PREFIX}klcc' '${STAGING_BINDIR_CROSS}' + oe_runmake install + cp '${STAGING_DIR_TARGET}/bin/klcc' '${CROSS_DIR}/bin/${TARGET_PREFIX}klcc' } + +PACKAGES = "${PN} 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-mount klibc-utils-nuke \ + klibc-utils-pivot-root klibc-utils-poweroff \ + klibc-utils-readlink klibc-utils-reboot \ + klibc-utils-sleep klibc-utils-true \ + klibc-utils-umount klibc-utils-uname \ + klibc-utils-gzip" + +FILES_${PN} = "${base_libdir}/klibc*.so" +FILES_klibc-utils-sh = "${base_bindir}/sh" +FILES_klibc-utils-static-gzip = "${base_bindir}/gzip ${base_bindir}/gunzip ${base_bindir}/zcat" +FILES_klibc-utils-kinit = "${base_bindir}/kinit" +FILES_klibc-utils-fstype = "${base_bindir}/fstype" +FILES_klibc-utils-ipconfig = "${base_bindir}/ipconfig" +FILES_klibc-utils-nfsmount = "${base_bindir}/nfsmount" +FILES_klibc-utils-resume = "${base_bindir}/resume" +FILES_klibc-utils-run-init = "${base_bindir}/run-init" +FILES_klibc-utils-cat = "${base_bindir}/cat" +FILES_klibc-utils-chroot = "${base_bindir}/chroot" +FILES_klibc-utils-cpio = "${base_bindir}/cpio" +FILES_klibc-utils-dd = "${base_bindir}/dd" +FILES_klibc-utils-false = "${base_bindir}/false" +FILES_klibc-utils-halt = "${base_bindir}/halt" +FILES_klibc-utils-insmod = "${base_bindir}/insmod" +FILES_klibc-utils-kill = "${base_bindir}/kill" +FILES_klibc-utils-ln = "${base_bindir}/ln" +FILES_klibc-utils-minips = "${base_bindir}/minips" +FILES_klibc-utils-mkdir = "${base_bindir}/mkdir" +FILES_klibc-utils-mkfifo = "${base_bindir}/mkfifo" +FILES_klibc-utils-mknod = "${base_bindir}/mknod" +FILES_klibc-utils-mount = "${base_bindir}/mount" +FILES_klibc-utils-nuke = "${base_bindir}/nuke" +FILES_klibc-utils-pivot-root = "${base_bindir}/pivot_root" +FILES_klibc-utils-poweroff = "${base_bindir}/poweroff" +FILES_klibc-utils-readlink = "${base_bindir}/readlink" +FILES_klibc-utils-reboot = "${base_bindir}/reboot" +FILES_klibc-utils-sleep = "${base_bindir}/sleep" +FILES_klibc-utils-true = "${base_bindir}/true" +FILES_klibc-utils-umount = "${base_bindir}/umount" +FILES_klibc-utils-uname = "${base_bindir}/uname" + +# Yes we want exactly the klibc that was compiled with the utils +RDEPENDS_klibc-utils-sh = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-kinit = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-fstype = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-ipconfig = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-nfsmount = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-resume = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-run-init = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-cat = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-chroot = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-cpio = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-dd = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-false = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-halt = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-insmod = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-kill = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-ln = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-minips = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-mkdir = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-mkfifo = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-mknod = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-mount = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-nuke = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-pivot-root = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-poweroff = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-readlink = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-reboot = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-sleep = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-true = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-umount = "${PN} (=${PV}-${PR})" +RDEPENDS_klibc-utils-uname = "${PN} (=${PV}-${PR})" diff --git a/packages/klibc/klibc_0.190.bb b/packages/klibc/klibc_0.190.bb deleted file mode 100644 index cd1ba9d56e..0000000000 --- a/packages/klibc/klibc_0.190.bb +++ /dev/null @@ -1 +0,0 @@ -require klibc.inc diff --git a/packages/klibc/klibc_1.1.1.bb b/packages/klibc/klibc_1.5.bb index ff715765d5..a8f054cd23 100644 --- a/packages/klibc/klibc_1.1.1.bb +++ b/packages/klibc/klibc_1.5.bb @@ -1,3 +1,2 @@ require klibc.inc - PR = "r1" |