Le 21/08/2013 17:36, leroy christophe a ?crit :> > Le 21/08/2013 17:15, maximilian attems a ?crit : >> On Wed, Aug 21, 2013 at 01:39:50PM +0200, leroy christophe wrote: >>> Le 21/08/2013 12:20, maximilian attems a ?crit : >>>> On Tue, Aug 20, 2013 at 07:44:39AM +0200, leroy christophe wrote: >>>>> Find attached two patches I have in order to build klibc 2.0.2 >>>>> against kernel 3.8.13 >>>>> We had to introduce those patches when going from kernel 3.6 to >>>>> kernel 3.7 >>>>> Hope it helps. >>>>> >>>> those patches are wrong and again very brittle. >>>> >>>> just use the way it is described in `make help': >>>> >>>> A) cd ~/src/linux >>>> make defconfig >>>> make headers_install >>>> >>>> B) cd ~/src/klibc >>>> make KLIBCKERNELSRC=`pwd`/../linux/usr/ >>>> >>>> >>> Sorry, but without my patchs, 'make install' fails with the >>> following message (complete messages file attached) >>> >>> # make install V=1 KLIBCARCH=ppc CROSS_COMPILE=ppc-linux- >>> KLIBCKERNELSRC=/root/gen/trunk/knl/linux/usr/ >>> prefix=/tmp/klibc-install >> have you done step A previously? >> It seems you are not compiling against the preconfigured linux headers >> otherwise the headers_install wouldn't fail. >> > Yes, step A is done. > But the Makefile in src/linux/usr doesn't contain any target > `headers_install' so the below command with -C to src/linux/usr fails: > > make -C /root/gen/trunk/knl/linux/usr/ ARCH=ppc > INSTALL_HDR_PATH=/tmp/klibc-install/lib/klibc/ headers_install > make[2]: *** No rule to make target `headers_install'. Stop. > make[1]: *** [header] Error 2 >Note that step B is working well. It is step C, the 'make install', which fails.
On Wed, Aug 21, 2013 at 06:03:41PM +0200, leroy christophe wrote: <snipp stuff>> >>>> > >>>>A) cd ~/src/linux > >>>> make defconfig > >>>> make headers_install > >>>> > >>>>B) cd ~/src/klibc > >>>> make KLIBCKERNELSRC=`pwd`/../linux/usr/ > >>>> > >>>> > >>>Sorry, but without my patchs, 'make install' fails with the > >>>following message (complete messages file attached) > >>> > >>># make install V=1 KLIBCARCH=ppc CROSS_COMPILE=ppc-linux- > >>>KLIBCKERNELSRC=/root/gen/trunk/knl/linux/usr/ > >>>prefix=/tmp/klibc-install > >>have you done step A previously? > >>It seems you are not compiling against the preconfigured linux headers > >>otherwise the headers_install wouldn't fail. > >> > >Yes, step A is done. > >But the Makefile in src/linux/usr doesn't contain any target > >`headers_install' so the below command with -C to src/linux/usr > >fails: > > > >make -C /root/gen/trunk/knl/linux/usr/ ARCH=ppc > >INSTALL_HDR_PATH=/tmp/klibc-install/lib/klibc/ headers_install > >make[2]: *** No rule to make target `headers_install'. Stop. > >make[1]: *** [header] Error 2 > > > Note that step B is working well. > It is step C, the 'make install', which fails.right, it is the toplevel Makefile one needs to poke for the target. how about belows diff, and changing step a) too make KLIBCKERNELSRC=`pwd`/../linux/ now, the right Makefile should be called on the install step c. -- maks diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc index f500d53..dcfa7d7 100644 --- a/scripts/Kbuild.klibc +++ b/scripts/Kbuild.klibc @@ -113,7 +113,7 @@ KLIBCCPPFLAGS := -nostdinc -iwithprefix include \ # kernel include paths KLIBCKERNELSRC ?= $(srctree) KLIBCKERNELOBJ ?= $(objtree) -KLIBCCPPFLAGS += -I$(KLIBCKERNELSRC)/include \ +KLIBCCPPFLAGS += -I$(KLIBCKERNELSRC)/usr/include \ $(if $(KBUILD_SRC),-I$(KLIBCKERNELOBJ)/include2 \ -I$(KLIBCKERNELOBJ)/include -I$(srctree)/include) \ $(KLIBCARCHINCFLAGS)
On Wed, Aug 21, 2013 at 06:48:08PM +0200, maximilian attems wrote:> On Wed, Aug 21, 2013 at 06:03:41PM +0200, leroy christophe wrote: > > > > Note that step B is working well. > > It is step C, the 'make install', which fails. > > right, it is the toplevel Makefile one needs to poke for the target. >see belows proper patch:>From 20dddc47f1e92d2daeb0780e558a88279381d1ef Mon Sep 17 00:00:00 2001From: maximilian attems <max at stro.at> Date: Wed, 21 Aug 2013 22:17:47 +0200 Subject: [PATCH] Kbuild: Use topdir kernel directory path * Add usr directory to the include path for the linux kernel headers. * Adapt documentation This fixes 'make install', which fails due to headers_install target target beeing in the toplevel Linux Makefile. Reported-by: leroy christophe <christophe.leroy at c-s.fr> Signed-off-by: maximilian attems <max at stro.at> --- Makefile | 2 +- scripts/Kbuild.klibc | 2 +- usr/klibc/README.klibc | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0a3ee69..8870bd6 100644 --- a/Makefile +++ b/Makefile @@ -136,7 +136,7 @@ help: @echo 'make V=2 [targets] 2 => give reason for rebuild of target' @echo @echo 'Sample invocation:' - @echo 'make KLIBCKERNELSRC=`pwd`/../linux/usr/' + @echo 'make KLIBCKERNELSRC=`pwd`/../linux/' ### # allow one to say make dir/file.o diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc index f500d53..dcfa7d7 100644 --- a/scripts/Kbuild.klibc +++ b/scripts/Kbuild.klibc @@ -113,7 +113,7 @@ KLIBCCPPFLAGS := -nostdinc -iwithprefix include \ # kernel include paths KLIBCKERNELSRC ?= $(srctree) KLIBCKERNELOBJ ?= $(objtree) -KLIBCCPPFLAGS += -I$(KLIBCKERNELSRC)/include \ +KLIBCCPPFLAGS += -I$(KLIBCKERNELSRC)/usr/include \ $(if $(KBUILD_SRC),-I$(KLIBCKERNELOBJ)/include2 \ -I$(KLIBCKERNELOBJ)/include -I$(srctree)/include) \ $(KLIBCARCHINCFLAGS) diff --git a/usr/klibc/README.klibc b/usr/klibc/README.klibc index 7de5fea..3575ec9 100644 --- a/usr/klibc/README.klibc +++ b/usr/klibc/README.klibc @@ -9,9 +9,8 @@ this: a) Extract a recent Linux kernel into a directory and run "make headers_install". - Now enter the klibc dir and point KLIBCKERNELSRC to the - path of the configured linux tree - "make KLIBCKERNELSRC=`pwd`/../linux/usr/". + Now enter the klibc dir and point KLIBCKERNELSRC to the path of the + configured linux tree: "make KLIBCKERNELSRC=`pwd`/../linux/". b) If you're cross-compiling, you need to set KLIBCARCH to the @@ -65,7 +64,7 @@ b) If you're cross-compiling, you need to set KLIBCARCH to the Note that even the "working" ones likely have bugs. Please report them if you run into them. -c) Try the test programs in the tests/ directory. They should run... +d) Try the test programs in the tests/ directory. They should run... Contact the klibc mailing list: -- 1.8.4.rc3
Le 21/08/2013 18:48, maximilian attems a ?crit :> On Wed, Aug 21, 2013 at 06:03:41PM +0200, leroy christophe wrote: > <snipp stuff> >>>>>> A) cd ~/src/linux >>>>>> make defconfig >>>>>> make headers_install >>>>>> >>>>>> B) cd ~/src/klibc >>>>>> make KLIBCKERNELSRC=`pwd`/../linux/usr/ >>>>>> >>>>>> >>>>> Sorry, but without my patchs, 'make install' fails with the >>>>> following message (complete messages file attached) >>>>> >>>>> # make install V=1 KLIBCARCH=ppc CROSS_COMPILE=ppc-linux- >>>>> KLIBCKERNELSRC=/root/gen/trunk/knl/linux/usr/ >>>>> prefix=/tmp/klibc-install >>>> have you done step A previously? >>>> It seems you are not compiling against the preconfigured linux headers >>>> otherwise the headers_install wouldn't fail. >>>> >>> Yes, step A is done. >>> But the Makefile in src/linux/usr doesn't contain any target >>> `headers_install' so the below command with -C to src/linux/usr >>> fails: >>> >>> make -C /root/gen/trunk/knl/linux/usr/ ARCH=ppc >>> INSTALL_HDR_PATH=/tmp/klibc-install/lib/klibc/ headers_install >>> make[2]: *** No rule to make target `headers_install'. Stop. >>> make[1]: *** [header] Error 2 >>> >> Note that step B is working well. >> It is step C, the 'make install', which fails. > right, it is the toplevel Makefile one needs to poke for the target. > > how about belows diff, and changing step a) too > make KLIBCKERNELSRC=`pwd`/../linux/ > > now, the right Makefile should be called on the install step c. >Yes it works Thanks.