svn commit: trunk/buildroot/toolchain/kernel-headers
Author: aldot
Date: 2006-10-09 04:41:34 -0700 (Mon, 09 Oct 2006) New Revision: 16345
Log:
- use headers_install for full kernel tarballs used as kernel-headers
Modified:
trunk/buildroot/toolchain/kernel-headers/kernel-headers.mk
Changeset:
Modified: trunk/buildroot/toolchain/kernel-headers/kernel-headers.mk
===================================================================
buildroot/toolchain/kernel-headers/kernel-headers.mk +30 -5
@@ -83,6 +83,7 @@ LINUX_HEADERS_SOURCE:=linux-libc-headers-2.6.12.0.tar.bz2 LINUX_HEADERS_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-libc-headers-2.6.12.0 endif +LINUX_HEADERS_IS_KERNEL=n ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.6.18") VERSION:=2
@@ -91,25 +92,51 @@ LINUX_HEADERS_SITE:=http://www.kernel.org/pub/linux/kernel/v2.6/ LINUX_HEADERS_SOURCE:=linux-2.6.18.tar.bz2 LINUX_HEADERS_UNPACK_DIR:=$(TOOL_BUILD_DIR)/linux-2.6.18 +LINUX_HEADERS_IS_KERNEL=y endif LINUX_HEADERS_VERSION:=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL) LINUX_HEADERS_DIR:=$(TOOL_BUILD_DIR)/linux +LINUX_HEADERS_DO_MOVE=n +ifneq ($(LINUX_HEADERS_UNPACK_DIR),$(LINUX_HEADERS_DIR)) +LINUX_HEADERS_DO_MOVE=y +endif +ifeq ($(LINUX_HEADERS_IS_KERNEL),y) +LINUX_HEADERS_DO_MOVE=n +endif + $(DL_DIR)/$(LINUX_HEADERS_SOURCE): mkdir -p $(DL_DIR) $(WGET) -P $(DL_DIR) $(LINUX_HEADERS_SITE)/$(LINUX_HEADERS_SOURCE) +ifeq ($(LINUX_HEADERS_DO_MOVE),y) $(LINUX_HEADERS_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) rm -rf $(LINUX_HEADERS_DIR) mkdir -p $(TOOL_BUILD_DIR) bzcat $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - -ifneq ($(LINUX_HEADERS_UNPACK_DIR),$(LINUX_HEADERS_DIR)) mv $(LINUX_HEADERS_UNPACK_DIR) $(LINUX_HEADERS_DIR) + touch $(LINUX_HEADERS_DIR)/.unpacked +else +$(LINUX_HEADERS_UNPACK_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) + rm -rf $(LINUX_HEADERS_DIR) + mkdir -p $(TOOL_BUILD_DIR) + bzcat $(DL_DIR)/$(LINUX_HEADERS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - + touch $(LINUX_HEADERS_UNPACK_DIR)/.unpacked endif - touch $(LINUX_HEADERS_DIR)/.unpacked +ifeq ($(LINUX_HEADERS_IS_KERNEL),y) +# full kernel tarball >= 2.6.18 +$(LINUX_HEADERS_UNPACK_DIR)/.patched: $(LINUX_HEADERS_UNPACK_DIR)/.unpacked + toolchain/patch-kernel.sh $(LINUX_HEADERS_UNPACK_DIR) toolchain/kernel-headers linux-$(LINUX_HEADERS_VERSION)\*.patch + +$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_UNPACK_DIR)/.patched + (cd $(LINUX_HEADERS_UNPACK_DIR) ; \ + $(MAKE) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install) + touch $(LINUX_HEADERS_DIR)/.configured +else +# the sanitized kernel-headers $(LINUX_HEADERS_DIR)/.patched: $(LINUX_HEADERS_DIR)/.unpacked toolchain/patch-kernel.sh $(LINUX_HEADERS_DIR) toolchain/kernel-headers linux-libc-headers-$(LINUX_HEADERS_VERSION)\*.patch ifeq ($(strip $(ARCH)),nios2)
@@ -171,10 +198,8 @@ (cd $(LINUX_HEADERS_DIR)/include; ln -fs asm-$(ARCH)$(NOMMU) asm;) \ fi touch $(LINUX_HEADERS_DIR)/include/linux/autoconf.h; -ifeq ("$(strip $(DEFAULT_KERNEL_HEADERS))","2.6.18") - (cd $(LINUX_HEADERS_DIR) ; $(MAKE) include/linux/version.h ; ) + touch $(LINUX_HEADERS_DIR)/.configured endif - touch $(LINUX_HEADERS_DIR)/.configured $(LINUX_KERNEL): $(LINUX_HEADERS_DIR)/.configured
buildroot/toolchain/kernel-headers/kernel-headers.mk line 136
Quoted 1 line · aldot at uclibc.org
buildroot/toolchain/kernel-headers/kernel-headers.mk +1
-0+ $(MAKE) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install)
Unless ARCH is set, the wrong asm header files will be used. The attached patch fixes that.
Cheers // Fredrik Roubert
Signature · 22 lines
Visserij 192 | +32 473 344527 / +46 708 776974 BE-9000 Gent | http://www.df.lth.se/~roubert/ -------------- next part -------------- diff -ur buildroot-20061006-16345/toolchain/kernel-headers/kernel-headers.mk buildroot/toolchain/kernel-headers/kernel-headers.mk --- buildroot-20061006-16345/toolchain/kernel-headers/kernel-headers.mk 2006-10-09 15:29:15.000000000 +0200 +++ buildroot/toolchain/kernel-headers/kernel-headers.mk 2006-10-09 15:28:06.000000000 +0200 @@ -133,7 +133,7 @@ $(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_UNPACK_DIR)/.patched (cd $(LINUX_HEADERS_UNPACK_DIR) ; \ - $(MAKE) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install) + $(MAKE) ARCH=$(ARCH) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install) touch $(LINUX_HEADERS_DIR)/.configured else # the sanitized kernel-headers -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 303 bytes Desc: not available Url : http://busybox.net/lists/buildroot/attachments/20061009/66e33e05/attachment.pgp
Quoted 6 lines · Fredrik Roubert
buildroot/toolchain/kernel-headers/kernel-headers.mk line 136
Quoted 1 line · aldot at uclibc.org
buildroot/toolchain/kernel-headers/kernel-headers.mk +1
-0+ $(MAKE) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install)Unless ARCH is set, the wrong asm header files will be used. The attached patch fixes that.
ARCH is always set, see package/Makefile.in
Whatis ARCH for you without your patch? Could be an ordering issue between {toolchain,package}/Makefile.in.
Quoted 27 lines
Cheers // Fredrik Roubert
Signature · 4 lines
Visserij 192 | +32 473 344527 / +46 708 776974 BE-9000 Gent | http://www.df.lth.se/~roubert/ diff -ur buildroot-20061006-16345/toolchain/kernel-headers/kernel-headers.mk buildroot/toolchain/kernel-headers/kernel-headers.mktoolchain/kernel-headers/kernel-headers.mk +0
-0@@ -133,7 +133,7 @@$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_UNPACK_DIR)/.patched
(cd $(LINUX_HEADERS_UNPACK_DIR) ; \toolchain/kernel-headers/kernel-headers.mk +1
-1- $(MAKE) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install) + $(MAKE) ARCH=$(ARCH) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install)touch $(LINUX_HEADERS_DIR)/.configured else # the sanitized kernel-headers_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
Quoted 11 lines · Bernhard Fischer
Quoted 6 lines · Fredrik Roubert
buildroot/toolchain/kernel-headers/kernel-headers.mk line 136
Quoted 1 line · aldot at uclibc.org
buildroot/toolchain/kernel-headers/kernel-headers.mk +1
-0+ $(MAKE) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install)Unless ARCH is set, the wrong asm header files will be used. The attached patch fixes that.
ARCH is always set, see package/Makefile.in
Whatis ARCH for you without your patch? Could be an ordering issue between {toolchain,package}/Makefile.in.
We cannot use ARCH there at any rate. We'd be better off to introduce a case statement to normalize e.g. i?86->i386 etc. The kernel doesn't grok an arch of let's say i586, which is embarrassing.
Quoted 33 lines
Quoted 24 lines
Cheers // Fredrik Roubert
Signature · 4 lines
Visserij 192 | +32 473 344527 / +46 708 776974 BE-9000 Gent | http://www.df.lth.se/~roubert/ diff -ur buildroot-20061006-16345/toolchain/kernel-headers/kernel-headers.mk buildroot/toolchain/kernel-headers/kernel-headers.mktoolchain/kernel-headers/kernel-headers.mk +0
-0@@ -133,7 +133,7 @@$(LINUX_HEADERS_DIR)/.configured: $(LINUX_HEADERS_UNPACK_DIR)/.patched
(cd $(LINUX_HEADERS_UNPACK_DIR) ; \toolchain/kernel-headers/kernel-headers.mk +1
-1- $(MAKE) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install) + $(MAKE) ARCH=$(ARCH) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install)touch $(LINUX_HEADERS_DIR)/.configured else # the sanitized kernel-headersQuoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot
Quoted 1 line · Bernhard Fischer
ARCH is always set, see package/Makefile.in
Oh, I didn't know that.
Quoted 1 line
Whatis ARCH for you without your patch?
Without my patch, ARCH is set to "i386" (instead of "powerpc") when the kernel Makefile is executed.
Cheers // Fredrik Roubert
Signature · 9 lines
Visserij 192 | +32 473 344527 / +46 708 776974 BE-9000 Gent | http://www.df.lth.se/~roubert/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 303 bytes Desc: not available Url : http://busybox.net/lists/buildroot/attachments/20061009/a3f78859/attachment.pgp
Quoted 6 lines · aldot at uclibc.org
Author: aldot
Date: 2006-10-09 04:41:34 -0700 (Mon, 09 Oct 2006) New Revision: 16345Log:
- useheaders_installfor full kernel tarballs used as kernel-headers
An alternative, is there are now some headers being produced for all architectures by dwmw2:
ftp://ftp.kernel.org/pub/linux/kernel/people/dwmw2/kernel-headers/
which looks to be usable for uClibc for all arches with minor tweeks.
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
Quoted 5 lines · Erik
An alternative, is there are now some headers being produced for all architectures by dwmw2:
ftp://ftp.kernel.org/pub/linux/kernel/people/dwmw2/kernel-headers/which looks to be usable for uClibc for all arches with minor tweeks.
Even better, it appears this is simply the result of running 'make headers_install_all' which is now present in 2.6.19-rc1. So once 2.6.19 final is out, it will make generating kernel headers _MUCH_ easier for us,
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
Quoted 11 lines · Erik Andersen
Quoted 5 lines · Erik
An alternative, is there are now some headers being produced for all architectures by dwmw2:
ftp://ftp.kernel.org/pub/linux/kernel/people/dwmw2/kernel-headers/which looks to be usable for uClibc for all arches with minor tweeks.
Even better, it appears this is simply the result of running 'make
headers_install_all' which is now present in 2.6.19-rc1. So once 2.6.19 final is out, it will make generating kernel headers _MUCH_ easier for us,
I've been exchanging email with dwmw2 about this for months now. Now that I've got some spare time I'm rebuilding Firmware Linux as a cross-compile setup using qemu. Results are a bit mixed, though. Building current uClibc cvs as of half an hour ago:
CC ldso/ldso/ldso.oS
In file included from ./libpthread/linuxthreads.old/sysdeps/x86_64/tls.h:25,
from ./include/bits/uClibc_errno.h:35,
from ./include/errno.h:62,
from ./include/bits/syscalls.h:19,
from ./include/sys/syscall.h:25,
from ./ldso/ldso/x86_64/dl-syscalls.h:3,
from ./ldso/include/dl-syscall.h:12,
from ./ldso/include/ldso.h:36,
from ldso/ldso/ldso.c:33:./libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h:27:24: error:asm/prctl.h: No such file or directory
Changed pt-machine.h to include sys/prctl.h and it made it much farther, then it died with:
CC libc/sysdeps/linux/common/prctl.oslibc/sysdeps/linux/common/prctl.c:13: error: conflicting types for 'prctl' ./include/sys/prctl.h:28: error: previous declaration of 'prctl' was here libc/sysdeps/linux/common/prctl.c:14: error: conflicting types for 'prctl' ./include/sys/prctl.h:28: error: previous declaration of 'prctl' was here
At which point I stopped for dinner. Just now getting back to it...
Rob
Signature · 1 line
Never bet against the cheap plastic solution.
Quoted 28 lines · Rob Landley
Quoted 11 lines · Erik Andersen
Quoted 5 lines · Erik
An alternative, is there are now some headers being produced for all architectures by dwmw2:
ftp://ftp.kernel.org/pub/linux/kernel/people/dwmw2/kernel-headers/which looks to be usable for uClibc for all arches with minor tweeks.
Even better, it appears this is simply the result of running 'make
headers_install_all' which is now present in 2.6.19-rc1. So once 2.6.19 final is out, it will make generating kernel headers _MUCH_ easier for us,I've been exchanging email with dwmw2 about this for months now. Now that I've got some spare time I'm rebuilding Firmware Linux as a cross-compile setup using qemu. Results are a bit mixed, though. Building current uClibc cvs as of half an hour ago:
CC ldso/ldso/ldso.oS
In file included from./libpthread/linuxthreads.old/sysdeps/x86_64/tls.h:25,from ./include/bits/uClibc_errno.h:35, from ./include/errno.h:62, from ./include/bits/syscalls.h:19, from ./include/sys/syscall.h:25, from ./ldso/ldso/x86_64/dl-syscalls.h:3, from ./ldso/include/dl-syscall.h:12, from ./ldso/include/ldso.h:36, from ldso/ldso/ldso.c:33:
Quoted 4 lines
./libpthread/linuxthreads.old/sysdeps/x86_64/pt-machine.h:27:24: error:asm/prctl.h: No such file or directoryChanged
pt-machine.hto includesys/prctl.hand it made it much farther,
then
Quoted 9 lines
it died with:
CC libc/sysdeps/linux/common/prctl.os
libc/sysdeps/linux/common/prctl.c:13: error: conflicting types for 'prctl'./include/sys/prctl.h:28: error: previous declaration of 'prctl' was herelibc/sysdeps/linux/common/prctl.c:14: error: conflicting types for 'prctl'./include/sys/prctl.h:28: error: previous declaration of 'prctl' was hereAt which point I stopped for dinner. Just now getting back to it...
Memo to self: When installing the kernel headers, specify the %*#(&%& architecture or you get the i386 headers, which is not right when cross-compiling for x86_64.
make headers_install ARCH=x86_64 INSTALL_HDR_PATH=/blah/blah/blah
The ARCH= part is _important_.
The clue was getting to:
./include/asm/posix_types.h:10: error: redefinition of typedef '__kernel_ino_t' ./include/bits/kernel_types.h:11: error: previous declaration of '__kernel_ino_t' was here
And noticing that asm/posix_types.h started with this:
#ifndef __ARCH_I386_POSIX_TYPES_H
#define __ARCH_I386_POSIX_TYPES_H
Right...
Rob
Signature · 1 line
Never bet against the cheap plastic solution.
Quoted 7 lines · Rob Landley
Quoted 6 lines · Rob Landley
Quoted 5 lines · Erik Andersen
Quoted 4 lines · Erik
An alternative, is there are now some headers being produced for all architectures by dwmw2:
ftp://ftp.kernel.org/pub/linux/kernel/people/dwmw2/kernel-headers/
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 1 line
which looks to be usable for uClibc for all arches with minor tweeks.
Even better, it appears this is simply the result of running 'make
headers_install_all' which is now present in 2.6.19-rc1. So once 2.6.19 final is out, it will make generating kernel headers _MUCH_ easier for us,
headers_install_all does install all arch/*/ arch's headers which we will most likely do not want to end up in the rootfs, no?
Let me point you to the log for belowmentioned ci.
Quoted 3 lines
Quoted 1 line
At which point I stopped for dinner. Just now getting back to it...
Memo to self: When installing the kernel headers, specify the %*#(&%&
As stated earlier ;)
http://uclibc.org/lists/buildroot/2006-October/000273.html
cheers,