summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2010-12-05 21:53:26 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2010-12-17 17:00:18 +0100
commit84c4a10a75fda9e00b551789d77fdb2791924aad (patch)
tree694aefe7cea7c80dbcef4cc96197f3d8d77c9ef7 /linux
parente8d0f4121605dcd3c621addb6ef7e77cc6865647 (diff)
downloadbuildroot-novena-84c4a10a75fda9e00b551789d77fdb2791924aad.tar.gz
buildroot-novena-84c4a10a75fda9e00b551789d77fdb2791924aad.zip
linux: add KERNEL_ARCH_PATH to fix x86-specific issue
Both i386 and x86_64 architectures are supported by the arch/x86 directory in the kernel. So, when we copy the kernel configuration file to arch/$(KERNEL_ARCH)/configs/, it does not work because arch/i386 and arch/x86_64 do not exist. So, we introduce KERNEL_ARCH_PATH, which is the path to the architecture specific directory in the kernel source tree. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'linux')
-rw-r--r--linux/linux.mk20
1 files changed, 16 insertions, 4 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index 86d7e260f..23b89cf97 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -43,13 +43,25 @@ else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
LINUX26_IMAGE_NAME=vmlinux
endif
+# Compute the arch path, since i386 and x86_64 are in arch/x86 and not
+# in arch/$(KERNEL_ARCH). Even if the kernel creates symbolic links
+# for bzImage, arch/i386 and arch/x86_64 do not exist when copying the
+# defconfig file.
+ifeq ($(KERNEL_ARCH),i386)
+KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86
+else ifeq ($(KERNEL_ARCH),x86_64)
+KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/x86
+else
+KERNEL_ARCH_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)
+endif
+
ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y)
LINUX26_IMAGE_PATH=$(LINUX26_DIR)/$(LINUX26_IMAGE_NAME)
else
ifeq ($(KERNEL_ARCH),avr32)
-LINUX26_IMAGE_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)/boot/images/$(LINUX26_IMAGE_NAME)
+LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/images/$(LINUX26_IMAGE_NAME)
else
-LINUX26_IMAGE_PATH=$(LINUX26_DIR)/arch/$(KERNEL_ARCH)/boot/$(LINUX26_IMAGE_NAME)
+LINUX26_IMAGE_PATH=$(KERNEL_ARCH_PATH)/boot/$(LINUX26_IMAGE_NAME)
endif
endif # BR2_LINUX_KERNEL_VMLINUX
@@ -91,9 +103,9 @@ $(LINUX26_DIR)/.stamp_configured: $(LINUX26_DIR)/.stamp_patched
ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
- cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(@D)/arch/$(KERNEL_ARCH)/configs/buildroot_defconfig
+ cp $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE) $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
$(TARGET_MAKE_ENV) $(MAKE1) $(LINUX26_MAKE_FLAGS) -C $(@D) buildroot_defconfig
- rm $(@D)/arch/$(KERNEL_ARCH)/configs/buildroot_defconfig
+ rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
endif
ifeq ($(BR2_ARM_EABI),y)
$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config)