* [PATCH 2.4.25] enable cross-compilation from Mac OS X
@ 2004-02-24 15:03 Martin Schaffner
2004-02-24 15:33 ` Mikael Pettersson
0 siblings, 1 reply; 2+ messages in thread
From: Martin Schaffner @ 2004-02-24 15:03 UTC (permalink / raw)
To: linux-kernel
Hi,
After setting up a cross-compile toolchain (using
http://vserver.13thfloor.at/Stuff/Cross/) on Mac OS X 10.3.2, and
applying the following patch, I was able to compile a bootable linux
kernel with the command:
make CROSS_COMPILE=/usr/local/bin/powerpc-linux-gnu-
Please consider applying the patch to the main 2.4 tree.
I was also able to compile 2.6.1 with basically the same patch, but it
required some additional fiddling with the makefiles in
not-entirely-clean ways.
--- Makefile.old Wed Feb 18 13:36:32 2004
+++ Makefile Tue Feb 24 11:36:13 2004
@@ -5,7 +5,7 @@
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e
s/arm.*/arm/ -e s/sa110/arm/)
+ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e
s/arm.*/arm/ -e s/sa110/arm/ -e s/Power\ Macintosh/ppc/)
KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -353,7 +353,7 @@
@rm -f .ver1
include/linux/version.h: ./Makefile
- @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
+ @expr "$(KERNELRELEASE)" : '.*' \<= $(uts_len) > /dev/null || \
(echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len)
characters >&2; false)
@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 +
$(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.4.25] enable cross-compilation from Mac OS X
2004-02-24 15:03 [PATCH 2.4.25] enable cross-compilation from Mac OS X Martin Schaffner
@ 2004-02-24 15:33 ` Mikael Pettersson
0 siblings, 0 replies; 2+ messages in thread
From: Mikael Pettersson @ 2004-02-24 15:33 UTC (permalink / raw)
To: Martin Schaffner; +Cc: linux-kernel
Martin Schaffner writes:
> Hi,
>
> After setting up a cross-compile toolchain (using
> http://vserver.13thfloor.at/Stuff/Cross/) on Mac OS X 10.3.2, and
> applying the following patch, I was able to compile a bootable linux
> kernel with the command:
> make CROSS_COMPILE=/usr/local/bin/powerpc-linux-gnu-
>
> Please consider applying the patch to the main 2.4 tree.
>
> I was also able to compile 2.6.1 with basically the same patch, but it
> required some additional fiddling with the makefiles in
> not-entirely-clean ways.
>
> --- Makefile.old Wed Feb 18 13:36:32 2004
> +++ Makefile Tue Feb 24 11:36:13 2004
> @@ -5,7 +5,7 @@
>
> KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
>
> -ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e
> s/arm.*/arm/ -e s/sa110/arm/)
> +ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e
> s/arm.*/arm/ -e s/sa110/arm/ -e s/Power\ Macintosh/ppc/)
> KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
>
> CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
Just do
make ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE
like we've always done when cross-compiling.
This patch is not needed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-24 15:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-24 15:03 [PATCH 2.4.25] enable cross-compilation from Mac OS X Martin Schaffner
2004-02-24 15:33 ` Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).