Skip to contentSkip to conversation

core/kconfig: fix display of custom error messages (branch yem/misc)

PATCH New Yann E. MORIN 2 participants 9 messages Jul 13, 2015 – Jul 14, 2015 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

v2 cover core/kconfig: fix display of custom error messages (branch yem/misc)

Hello All!

This series fixes the display of our custom error messages when defconfig/.config files do not exist, and also adds such messages to busybox and uClibc.

Changes v1 -> v2:
- check BR_BUILDING in its own ifeq() in new tests
- fix commit logs

Regards,
Yann E. MORIN.

The following changes since commit 5284dcf7de769e8612da3d4f1c4d12b4582870d5:

Document the 72 char limit on package description. (2015-07-13 12:16:45 +0200)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/misc

for you to fetch changes up to a3dfb23b0341c6a442dfe5f06aef393d2a0f4ecc:

package/uclibc: check for config file (2015-07-13 12:22:59 +0200)

----------------------------------------------------------------
Yann E. MORIN (7):
core/pkg-kconfig: don't enforce check for config file when not building package/linux: don't enforce check for DTS when not building package/linux: check for config file before calling kconfig-package boot/at91boostrap3: check for config file before calling kconfig-package boot/barebox: check for config file before calling kconfig-package package/busybox: check for config file
package/uclibc: check for config file

 boot/at91bootstrap3/at91bootstrap3.mk |  7 +++++--
 boot/barebox/barebox.mk               |  6 ++++--
 linux/linux.mk                        | 32 ++++++++++++++++----------------
 package/busybox/busybox.mk            |  8 ++++++++
 package/pkg-kconfig.mk                |  2 ++
 package/uclibc/uclibc.mk              |  8 ++++++++
 6 files changed, 43 insertions(+), 20 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH v2 1/7 core/pkg-kconfig: don't enforce check for config file when not building

Currently, this is triggering the error message:
make randconfig
make source

Only limit the check to enforce a config file being set to when we are actually building, like is done in the various kconfig-using packages.

---
Changes v1 -> v2:
- use BR_BUILDING in its own ifeq, do not coalesce with the existing ifeq (Thomas)
- use $$ instead of $ to evaluate BR_BUILDING

---
 package/pkg-kconfig.mk | 2 ++
 1 file changed, 2 insertions(+)
package/pkg-kconfig.mk +2 -0
index c86c340..f708875 100644
@@ -90,9 +90,11 @@ $$($(2)_TARGET_CONFIGURE): $$($(2)_DIR)/.stamp_kconfig_fixup_done
 ifeq ($$($$($(2)_KCONFIG_VAR)),y)
 
 # FOO_KCONFIG_FILE is required
+ifeq ($$(BR_BUILDING),y)
 ifeq ($$($(2)_KCONFIG_FILE),)
 $$(error Internal error: no value specified for $(2)_KCONFIG_FILE)
 endif
+endif
 
 # Configuration editors (menuconfig, ...)
 #
Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/7 package/linux: don't enforce check for DTS when not building

In reply to Yann E. MORIN

Currently, this is triggering the error message:
make randconfig
make source

Limit the checks that enforce a DTS is set and at most one DTB is appended to when we are actually building, like is done for the configuration-file variables.

---
Changes v1 -> v2:
- use BR_BUILDING in its own ifeq, do not coalesce with the existing ifeq (Thomas)

---
 linux/linux.mk | 4 ++++
 1 file changed, 4 insertions(+)
linux/linux.mk +4 -0
index eca1450..24bca7d 100644
@@ -88,6 +88,8 @@ 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)
@@ -100,6 +102,8 @@ $(error Kernel with appended device tree needs exactly one DTS source. \
 endif
 endif
 
+endif # BR_BUILDING
+
 KERNEL_DTBS = $(addsuffix .dtb,$(KERNEL_DTS_NAME))
 
 ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
Signature · 1 line
1.9.1
#3 lore raw

PATCH v2 3/7 package/linux: check for config file before calling kconfig-package

In reply to Yann E. MORIN

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.

---
Changes v1 -> v2:
- move the check together with the DTS checks

---
 linux/linux.mk | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)
linux/linux.mk +12 -16
index 24bca7d..96573ad 100644
@@ -90,6 +90,18 @@ endif
 
 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)
@@ -364,19 +376,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
Signature · 1 line
1.9.1
#4 lore raw

PATCH v2 4/7 boot/at91boostrap3: check for config file before calling kconfig-package

In reply to Yann E. MORIN

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.

---
 boot/at91bootstrap3/at91bootstrap3.mk | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
boot/at91bootstrap3/at91bootstrap3.mk +5 -2
index 1c68094..fa67ea6 100644
@@ -49,10 +49,11 @@ endif
 AT91BOOTSTRAP3_KCONFIG_FILE = $(AT91BOOTSTRAP3_SOURCE_CONFIG)
 AT91BOOTSTRAP3_KCONFIG_EDITORS = menuconfig xconfig gconfig
 AT91BOOTSTRAP3_KCONFIG_OPTS = $(AT91BOOTSTRAP3_MAKE_OPTS)
-$(eval $(kconfig-package))
 
 # Checks to give errors that the user can understand
+# Must be before we call to kconfig-package
 ifeq ($(BR_BUILDING),y)
+
 ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
 ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)),)
 $(error No at91bootstrap3 defconfig name specified, check your BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG setting)
@@ -74,4 +75,6 @@ $(error No custom at91bootstrap3 repository version specified. Check your BR2_TA
 endif
 endif
 
-endif
+endif # BR_BUILDING
+
+$(eval $(kconfig-package))
Signature · 1 line
1.9.1
#5 lore raw

PATCH v2 5/7 boot/barebox: check for config file before calling kconfig-package

In reply to Yann E. MORIN

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.

---
 boot/barebox/barebox.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
boot/barebox/barebox.mk +4 -2
index 7e53037..e45976d 100644
@@ -109,10 +109,12 @@ define BAREBOX_INSTALL_TARGET_CMDS
 endef
 endif
 
-$(eval $(kconfig-package))
-
+# Checks to give errors that the user can understand
+# Must be before we call to kconfig-package
 ifeq ($(BR2_TARGET_BAREBOX)$(BR_BUILDING),yy)
 ifeq ($(BAREBOX_SOURCE_CONFIG),)
 $(error No Barebox config file. Check your BR2_TARGET_BAREBOX_BOARD_DEFCONFIG or BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE settings)
 endif
 endif
+
+$(eval $(kconfig-package))
Signature · 1 line
1.9.1
#6 lore raw

PATCH v2 6/7 package/busybox: check for config file

In reply to Yann E. MORIN

Add a check (before we call kconfig-package) that ensures the user has set a kconfig-file.

---
Changes v1 -> v2:
- use BR_BUILDING in its own ifeq, do not coalesce with the existing ifeq
- fix commit log

---
 package/busybox/busybox.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/busybox/busybox.mk +8 -0
index 92874cd..1b20429 100644
@@ -207,4 +207,12 @@ define BUSYBOX_INSTALL_INIT_SYSV
 	$(BUSYBOX_INSTALL_WATCHDOG_SCRIPT)
 endef
 
+# Checks to give errors that the user can understand
+# Must be before we call to kconfig-package
+ifeq ($(BR_BUILDING),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG)),)
+$(error No BusyBox configuration file specified, check your BR2_PACKAGE_BUSYBOX_CONFIG setting)
+endif
+endif
+
 $(eval $(kconfig-package))
Signature · 1 line
1.9.1
#7 lore raw

PATCH v2 7/7 package/uclibc: check for config file

In reply to Yann E. MORIN

Add a check (before we call kconfig-package) that ensures the user has set a kconfig-file.

---
Changes v1 -> v2:
- use BR_BUILDING in its own ifeq, do not coalesce with the existing ifeq
- fix commit log (Baruch)

---
 package/uclibc/uclibc.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/uclibc/uclibc.mk +8 -0
index ecbfa11..3aceae3 100644
@@ -474,4 +474,12 @@ define UCLIBC_INSTALL_STAGING_CMDS
 	$(UCLIBC_INSTALL_UTILS_STAGING)
 endef
 
+# Checks to give errors that the user can understand
+# Must be before we call to kconfig-package
+ifeq ($(BR_BUILDING),y)
+ifeq ($(call qstrip,$(BR2_UCLIBC_CONFIG)),)
+$(error No uClibc configuration file specified, check your BR2_UCLIBC_CONFIG setting)
+endif
+endif
+
 $(eval $(kconfig-package))
Signature · 1 line
1.9.1
#8 lore raw

v2 cover core/kconfig: fix display of custom error messages (branch yem/misc)

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

Yann E. MORIN (7):
core/pkg-kconfig: don't enforce check for config file when not building package/linux: don't enforce check for DTS when not building package/linux: check for config file before calling kconfig-package boot/at91boostrap3: check for config file before calling kconfig-package boot/barebox: check for config file before calling kconfig-package package/busybox: check for config file
package/uclibc: check for config file

All applied, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com