svn commit: trunk/buildroot/toolchain/kernel-headers
Author: aldot
Date: 2006-10-09 09:13:12 -0700 (Mon, 09 Oct 2006) New Revision: 16347
Log:
- we need to pass ARCH to the kernel; The kernel does not have a table to
normalize the passed in ARCH, from the looks, so we have to normalize it manually. XXX: FIXME upstream via a simple shell script like the cc-checks!
FIXME: flesh this out..
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 +4 -1
@@ -128,12 +128,15 @@ ifeq ($(LINUX_HEADERS_IS_KERNEL),y) # full kernel tarball >= 2.6.18 + +KERNEL_ARCH:=$(shell $(SHELL) -c 'if test "$(ARCH)" = "i486" -o "$(ARCH)" = "i586"; then echo i386; else echo $(ARCH); fi') + $(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) + $(MAKE) ARCH=$(KERNEL_ARCH) INSTALL_HDR_PATH=$(LINUX_HEADERS_DIR) headers_install) touch $(LINUX_HEADERS_DIR)/.configured else # the sanitized kernel-headers
buildroot/toolchain/kernel-headers/kernel-headers.mk line 133
Quoted 9 lines · aldot at uclibc.org
buildroot/toolchain/kernel-headers/kernel-headers.mk +3
-0@@ -128,12 +128,15 @@ ifeq ($(LINUX_HEADERS_IS_KERNEL),y) # full kernel tarball >= 2.6.18 + +KERNEL_ARCH:=$(shell $(SHELL) -c 'if test "$(ARCH)" = "i486" -o "$(ARCH)" = "i586"; then echo i386; else echo $(ARCH); fi') +
How about something like this:
KERNEL_ARCH := $(shell $(CC) -dumpmachine | sed -e s'/-.*//' \ -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/)
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
Quoted 13 lines · Erik Andersen
buildroot/toolchain/kernel-headers/kernel-headers.mk line 133
Quoted 9 lines · aldot at uclibc.org
buildroot/toolchain/kernel-headers/kernel-headers.mk +3
-0@@ -128,12 +128,15 @@ ifeq ($(LINUX_HEADERS_IS_KERNEL),y) # full kernel tarball >= 2.6.18 + +KERNEL_ARCH:=$(shell $(SHELL) -c 'if test "$(ARCH)" = "i486" -o "$(ARCH)" = "i586"; then echo i386; else echo $(ARCH); fi') +How about something like this:
Quoted 5 lines
KERNEL_ARCH := $(shell $(CC) -dumpmachine | sed -e s'/-.*//' \ -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/)
In principle i agree, but then only GCC has -dumpmachine. We know the TARGET_ARCH beforehand, so shouldn't need to rely on -dumpmachine and a specific compiler to resolve the correct ARCH to be used for the kernel (only!), agree?
Quoted 11 lines · Bernhard Fischer
Quoted 10 lines
buildroot/toolchain/kernel-headers/kernel-headers.mk line 133
Quoted 2 lines
buildroot/toolchain/kernel-headers/kernel-headers.mk +2
-0+KERNEL_ARCH:=$(shell $(SHELL) -c 'if test "$(ARCH)" = "i486" -o "$(ARCH)" = "i586"; then echo i386; else echo $(ARCH); fi') +How about something like this:
KERNEL_ARCH := $(shell $(CC) -dumpmachine | sed -e s'/-.*//' \ -e s/i.86/i386/ -e s/sun4u/sparc64/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ -e s/parisc64/parisc/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/)
Quoted 4 lines
In principle i agree, but then only GCC has -dumpmachine. We know the
TARGET_ARCHbeforehand, so shouldn't need to rely on -dumpmachine and a specific compiler to resolve the correct ARCH to be used for the kernel (only!), agree?
sure, using ARCH is fine. Still should be adjusted to use the kernel arch names with a pass through sed...
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
Quoted 2 lines · Erik Andersen
sure, using ARCH is fine. Still should be adjusted to use the kernel arch names with a pass through sed...
Done.
thanks,