parent
3df5921afe
commit
66b646d7e7
|
@ -1,11 +1,13 @@
|
|||
source $stdenv/setup
|
||||
|
||||
preBuild=preBuild
|
||||
preBuild() {
|
||||
kernelhash=$(ls $kernel/lib/modules)
|
||||
echo $kernelhash
|
||||
ln -s $kernel/lib/modules/$kernelhash/build linux
|
||||
mkdir -p linux/include
|
||||
ln -s $kernelHeaders/include/* linux/include/
|
||||
}
|
||||
|
||||
preBuild=preBuild
|
||||
makeFlagsArray=(V=1 prefix=$out SHLIBDIR=$out/lib)
|
||||
|
||||
installFlagsArray=("${makeFlagsArray[@]}")
|
||||
|
||||
genericBuild
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{stdenv, fetchurl, kernel, perl, bison, flexWrapper}:
|
||||
{stdenv, fetchurl, perl, bison, mktemp}:
|
||||
|
||||
assert stdenv.isLinux;
|
||||
|
||||
|
@ -9,7 +9,7 @@ stdenv.mkDerivation {
|
|||
url = http://www.kernel.org/pub/linux/libs/klibc/klibc-1.4.tar.bz2;
|
||||
md5 = "f4e0e17fc660e59c39e448fe1d827d36";
|
||||
};
|
||||
inherit kernel;
|
||||
# buildInputs = [perl bison flexWrapper];
|
||||
# patches = [./klibc-installpath.patch];
|
||||
inherit (stdenv.glibc) kernelHeaders;
|
||||
buildInputs = [perl bison mktemp];
|
||||
patches = [./install.patch];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
diff -rc klibc-1.4-orig/scripts/Kbuild.install klibc-1.4/scripts/Kbuild.install
|
||||
*** klibc-1.4-orig/scripts/Kbuild.install 2006-06-19 03:17:15.000000000 +0200
|
||||
--- klibc-1.4/scripts/Kbuild.install 2006-11-25 22:41:09.000000000 +0100
|
||||
***************
|
||||
*** 96,107 ****
|
||||
$(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 \
|
||||
! mkdir -p $(INSTALLROOT)$(INSTALLDIR)/$(KLIBCCROSS)include/$$d ; \
|
||||
! for r in $(KLIBCKERNELSRC)/include $(KLIBCKERNELOBJ)/include \
|
||||
! $(KLIBCKERNELOBJ)/include2 ; do \
|
||||
[ ! -d $$r/$$d ] || \
|
||||
! cp -rfL $$r/$$d/. \
|
||||
! $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ; \
|
||||
done ; \
|
||||
done
|
||||
$(Q)cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(KLIBCARCH) asm
|
||||
--- 96,105 ----
|
||||
$(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 \
|
||||
! for r in $(KLIBCKERNELSRC)/include ; do \
|
||||
[ ! -d $$r/$$d ] || \
|
||||
! cp -rd $$r/$$d \
|
||||
! $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d ; \
|
||||
done ; \
|
||||
done
|
||||
$(Q)cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(KLIBCARCH) asm
|
|
@ -1,34 +0,0 @@
|
|||
diff -ruN klibc-1.0/Makefile klibc-1.0.new/Makefile
|
||||
--- klibc-1.0/Makefile 2005-03-07 19:17:15.000000000 +0100
|
||||
+++ klibc-1.0.new/Makefile 2005-08-27 22:40:12.000000000 +0200
|
||||
@@ -61,7 +61,8 @@
|
||||
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/. ; \
|
||||
+ (chmod -R +w $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/.; \
|
||||
+ cp -rfL $$r/$$d/. $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include/$$d/. ); \
|
||||
done ; \
|
||||
done
|
||||
cd $(INSTALLROOT)$(INSTALLDIR)/$(KCROSS)include && ln -sf asm-$(ARCH) asm
|
||||
diff -ruN klibc-1.0/MCONFIG klibc-1.0.new/MCONFIG
|
||||
--- klibc-1.0/MCONFIG 2005-03-06 20:35:22.000000000 +0100
|
||||
+++ klibc-1.0.new/MCONFIG 2005-08-27 22:43:06.000000000 +0200
|
||||
@@ -12,7 +12,7 @@
|
||||
KCROSS ?= $(CROSS)
|
||||
|
||||
# Location for installation
|
||||
-prefix = /usr
|
||||
+prefix = $(out)
|
||||
bindir = $(prefix)/bin
|
||||
libdir = $(prefix)/lib
|
||||
mandir = $(prefix)/man
|
||||
@@ -70,7 +70,7 @@
|
||||
# THIS MUST BE AN ABSOLUTE PATH WITH NO FINAL SLASH.
|
||||
# Leave this empty to make it the root.
|
||||
#
|
||||
-SHLIBDIR = /lib
|
||||
+SHLIBDIR = $(out)/lib
|
||||
|
||||
# Enable this to make perror/strerror return real error messages
|
||||
# This makes klibc.so and any static binary which uses these functions
|
|
@ -2140,9 +2140,9 @@ rec {
|
|||
inherit stdenv MAKEDEV;
|
||||
};
|
||||
|
||||
#klibc = import ../os-specific/linux/klibc {
|
||||
# inherit fetchurl stdenv kernel perl bison flexWrapper;
|
||||
#};
|
||||
klibc = import ../os-specific/linux/klibc {
|
||||
inherit fetchurl stdenv perl bison mktemp;
|
||||
};
|
||||
|
||||
mingetty = import ../os-specific/linux/mingetty {
|
||||
inherit fetchurl stdenv;
|
||||
|
|
Loading…
Reference in New Issue