diff options
Diffstat (limited to 'arch/xtensa/Makefile')
| -rw-r--r-- | arch/xtensa/Makefile | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index f973754ddf90..bb5ba61723f7 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile | |||
| @@ -21,6 +21,18 @@ variant-$(CONFIG_XTENSA_VARIANT_LINUX_CUSTOM) := custom | |||
| 21 | VARIANT = $(variant-y) | 21 | VARIANT = $(variant-y) |
| 22 | export VARIANT | 22 | export VARIANT |
| 23 | 23 | ||
| 24 | # Test for cross compiling | ||
| 25 | |||
| 26 | ifneq ($(VARIANT),) | ||
| 27 | COMPILE_ARCH = $(shell uname -m) | ||
| 28 | |||
| 29 | ifneq ($(COMPILE_ARCH), xtensa) | ||
| 30 | ifndef CROSS_COMPILE | ||
| 31 | CROSS_COMPILE = xtensa_$(VARIANT)- | ||
| 32 | endif | ||
| 33 | endif | ||
| 34 | endif | ||
| 35 | |||
| 24 | # Platform configuration | 36 | # Platform configuration |
| 25 | 37 | ||
| 26 | platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 | 38 | platform-$(CONFIG_XTENSA_PLATFORM_XT2000) := xt2000 |
| @@ -31,7 +43,7 @@ PLATFORM = $(platform-y) | |||
| 31 | export PLATFORM | 43 | export PLATFORM |
| 32 | 44 | ||
| 33 | # temporarily until string.h is fixed | 45 | # temporarily until string.h is fixed |
| 34 | KBUILD_CFLAGS += -ffreestanding | 46 | KBUILD_CFLAGS += -ffreestanding -D__linux__ |
| 35 | 47 | ||
| 36 | KBUILD_CFLAGS += -pipe -mlongcalls | 48 | KBUILD_CFLAGS += -pipe -mlongcalls |
| 37 | 49 | ||
| @@ -48,24 +60,6 @@ endif | |||
| 48 | 60 | ||
| 49 | KBUILD_DEFCONFIG := iss_defconfig | 61 | KBUILD_DEFCONFIG := iss_defconfig |
| 50 | 62 | ||
| 51 | # ramdisk/initrd support | ||
| 52 | # You need a compressed ramdisk image, named ramdisk.gz in | ||
| 53 | # arch/xtensa/boot/ramdisk | ||
| 54 | |||
| 55 | core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/ | ||
| 56 | |||
| 57 | # Test for cross compiling | ||
| 58 | |||
| 59 | ifneq ($(VARIANT),) | ||
| 60 | COMPILE_ARCH = $(shell uname -m) | ||
| 61 | |||
| 62 | ifneq ($(COMPILE_ARCH), xtensa) | ||
| 63 | ifndef CROSS_COMPILE | ||
| 64 | CROSS_COMPILE = xtensa_$(VARIANT)- | ||
| 65 | endif | ||
| 66 | endif | ||
| 67 | endif | ||
| 68 | |||
| 69 | # Only build variant and/or platform if it includes a Makefile | 63 | # Only build variant and/or platform if it includes a Makefile |
| 70 | 64 | ||
| 71 | buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/) | 65 | buildvar := $(shell test -e $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/) |
| @@ -87,7 +81,7 @@ all: zImage | |||
| 87 | 81 | ||
| 88 | bzImage : zImage | 82 | bzImage : zImage |
| 89 | 83 | ||
| 90 | zImage zImage.initrd: vmlinux | 84 | zImage: vmlinux |
| 91 | $(Q)$(MAKE) $(build)=$(boot) $@ | 85 | $(Q)$(MAKE) $(build)=$(boot) $@ |
| 92 | 86 | ||
| 93 | define archhelp | 87 | define archhelp |
