summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2015-07-13 12:32:00 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-14 10:27:52 +0200
commita4b08844697dc763af0c980d2a88923466e2d10d (patch)
treea6d360589619c0ee9804befadaa46c885b7cab57 /linux
parentce2b7face01acab42e67c5ddf9f075445fe77693 (diff)
package/linux: check for config file before calling kconfig-package
If we check that the user provides a config file after we call to the kconfig-package infra, the error message we get is the one for the kconfig-package infra, not the custom error message we want to show to the user. So, only call kconfig-package after we do the check. Move the check with the existing checks for the DTS, for consistency. [Thomas: put the checks together, but right before the kconfig-package call, rather than in the middle of the code, were the DTS related tests were located.] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/linux.mk61
1 files changed, 29 insertions, 32 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index cd32652b6..8c535f3d2 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -88,22 +88,6 @@ else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y)
KERNEL_DTS_NAME = $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))
endif
-ifeq ($(BR_BUILDING),y)
-
-ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y)
-$(error No kernel device tree source specified, check your \
-BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings)
-endif
-
-ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y)
-ifneq ($(words $(KERNEL_DTS_NAME)),1)
-$(error Kernel with appended device tree needs exactly one DTS source. \
- Check BR2_LINUX_KERNEL_INTREE_DTS_NAME or BR2_LINUX_KERNEL_CUSTOM_DTS_PATH.)
-endif
-endif
-
-endif # BR_BUILDING
-
KERNEL_DTBS = $(addsuffix .dtb,$(KERNEL_DTS_NAME))
ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
@@ -346,6 +330,35 @@ LINUX_PRE_PATCH_HOOKS += $(foreach ext,$(LINUX_EXTENSIONS),\
$(if $(BR2_LINUX_KERNEL_EXT_$(call UPPERCASE,$(ext))),\
$(call UPPERCASE,$(ext))_PREPARE_KERNEL))
+# Checks to give errors that the user can understand
+ifeq ($(BR_BUILDING),y)
+
+ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
+ifeq ($(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG)),)
+$(error No kernel defconfig name specified, check your BR2_LINUX_KERNEL_DEFCONFIG setting)
+endif
+endif
+
+ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
+ifeq ($(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)),)
+$(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE setting)
+endif
+endif
+
+ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y)
+$(error No kernel device tree source specified, check your \
+BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings)
+endif
+
+ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y)
+ifneq ($(words $(KERNEL_DTS_NAME)),1)
+$(error Kernel with appended device tree needs exactly one DTS source. \
+ Check BR2_LINUX_KERNEL_INTREE_DTS_NAME or BR2_LINUX_KERNEL_CUSTOM_DTS_PATH.)
+endif
+endif
+
+endif # BR_BUILDING
+
$(eval $(kconfig-package))
# Support for rebuilding the kernel after the cpio archive has
@@ -364,19 +377,3 @@ $(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LI
# The initramfs building code must make sure this target gets called
# after it generated the initramfs list of files.
linux-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt
-
-# Checks to give errors that the user can understand
-ifeq ($(BR_BUILDING),y)
-ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
-ifeq ($(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG)),)
-$(error No kernel defconfig name specified, check your BR2_LINUX_KERNEL_DEFCONFIG setting)
-endif
-endif
-
-ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
-ifeq ($(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)),)
-$(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE setting)
-endif
-endif
-
-endif