* [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file
@ 2014-07-15 18:43 Thomas De Schampheleire
2014-07-15 18:43 ` [Buildroot] [PATCH 1 of 3 v2] uclibc: rename SETUP_DOT_CONFIG to FIXUP_DOT_CONFIG Thomas De Schampheleire
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Thomas De Schampheleire @ 2014-07-15 18:43 UTC (permalink / raw)
To: buildroot
This patch series (part of it poster earlier as RFC) has as main goal to
fix the uclibc kconfig handling with following requirements in mind:
- neither foo-menuconfig nor foo-update-config should have a dependency
on the toolchain (which means we cannot depend on foo-configure)
- 'clean foo-menuconfig' should start from the specified (custom) config
file
- 'foo-menuconfig foo-update-config' should preserve the changes made in
the menuconfig step (this problem is reported for uclibc with bug #7154
(https://bugs.busybox.net/show_bug.cgi?id=7154).
- 'make foo-menuconfig; make foo-menuconfig' should preserve the changes
made in the menuconfig step.
- 'make clean foo-update-config' should copy the initial file, do any
fixups, and then save the config
Once this series is accepted, the plan is:
- to extract the kconfig-related bits to a kconfig-package infrastructure.
- to convert busybox, linux and barebox to this kconfig-package infra too.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
package/uclibc/uclibc.mk | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1 of 3 v2] uclibc: rename SETUP_DOT_CONFIG to FIXUP_DOT_CONFIG
2014-07-15 18:43 [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file Thomas De Schampheleire
@ 2014-07-15 18:43 ` Thomas De Schampheleire
2014-07-17 23:23 ` Arnout Vandecappelle
2014-07-15 18:43 ` [Buildroot] [PATCH 2 of 3 v2] uclibc: menuconfig: take into account initial settings from config file Thomas De Schampheleire
` (2 subsequent siblings)
3 siblings, 1 reply; 6+ messages in thread
From: Thomas De Schampheleire @ 2014-07-15 18:43 UTC (permalink / raw)
To: buildroot
In a subsequent patch, the behavior of UCLIBC_SETUP_DOT_CONFIG will change
so that it only applies fixups to the (already copied) configuration file.
This patch renames this function to UCLIBC_FIXUP_DOT_CONFIG to better match
the future behavior.
Suggested-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v2: update commit message (ThomasP)
package/uclibc/uclibc.mk | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -r c7afd4612342 -r 9634175cf29d package/uclibc/uclibc.mk
--- a/package/uclibc/uclibc.mk Tue Jul 01 19:39:16 2014 +0200
+++ b/package/uclibc/uclibc.mk Wed Jul 02 21:31:07 2014 +0200
@@ -393,7 +393,7 @@
UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS) $(TARGET_ABI)" \
HOSTCC="$(HOSTCC)"
-define UCLIBC_SETUP_DOT_CONFIG
+define UCLIBC_FIXUP_DOT_CONFIG
$(INSTALL) -m 0644 $(UCLIBC_CONFIG_FILE) $(@D)/.config
$(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH),$(@D)/.config)
@@ -433,7 +433,7 @@
endef
define UCLIBC_CONFIGURE_CMDS
- $(UCLIBC_SETUP_DOT_CONFIG)
+ $(UCLIBC_FIXUP_DOT_CONFIG)
$(MAKE1) -C $(UCLIBC_DIR) \
$(UCLIBC_MAKE_FLAGS) \
PREFIX=$(STAGING_DIR) \
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 2 of 3 v2] uclibc: menuconfig: take into account initial settings from config file
2014-07-15 18:43 [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file Thomas De Schampheleire
2014-07-15 18:43 ` [Buildroot] [PATCH 1 of 3 v2] uclibc: rename SETUP_DOT_CONFIG to FIXUP_DOT_CONFIG Thomas De Schampheleire
@ 2014-07-15 18:43 ` Thomas De Schampheleire
2014-07-15 18:43 ` [Buildroot] [PATCH 3 of 3 v2] uclibc: update-config: preserve freshly configured settings Thomas De Schampheleire
2014-07-17 17:57 ` [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file Thomas De Schampheleire
3 siblings, 0 replies; 6+ messages in thread
From: Thomas De Schampheleire @ 2014-07-15 18:43 UTC (permalink / raw)
To: buildroot
When executing the sequence 'make clean uclibc-menuconfig', the configured
config file is not taken into account and one starts from the default
settings.
This patch adds an explicit target for the config file and lets the
configure and menuconfig steps depend on it, fixing the problem.
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v2:
- use UCLIBC_TARGET_CONFIGURE instead of specifying the stamp path in full
(Arnout)
rfc->patch:
- add target for .config to avoid menuconfig copying the config file
every time (ThomasP, Arnout)
- move dependency on patch step from menuconfig to the .config target
package/uclibc/uclibc.mk | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff -r 9634175cf29d -r a22b18c9a90d package/uclibc/uclibc.mk
--- a/package/uclibc/uclibc.mk Wed Jul 02 21:31:07 2014 +0200
+++ b/package/uclibc/uclibc.mk Sun Jun 22 10:37:22 2014 +0200
@@ -394,7 +394,6 @@
HOSTCC="$(HOSTCC)"
define UCLIBC_FIXUP_DOT_CONFIG
- $(INSTALL) -m 0644 $(UCLIBC_CONFIG_FILE) $(@D)/.config
$(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D)/.config)
$(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH),$(@D)/.config)
$(call KCONFIG_SET_OPT,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)",$(@D)/.config)
@@ -533,7 +532,14 @@
$(UCLIBC_INSTALL_UTILS_STAGING)
endef
-uclibc-menuconfig: uclibc-patch
+$(eval $(generic-package))
+
+$(UCLIBC_DIR)/.config: $(UCLIBC_CONFIG_FILE) | uclibc-patch
+ $(INSTALL) -m 0644 $(UCLIBC_CONFIG_FILE) $(UCLIBC_DIR)/.config
+
+$(UCLIBC_TARGET_CONFIGURE): $(UCLIBC_DIR)/.config
+
+uclibc-menuconfig: $(UCLIBC_DIR)/.config
$(MAKE1) -C $(UCLIBC_DIR) \
$(UCLIBC_MAKE_FLAGS) \
PREFIX=$(STAGING_DIR) \
@@ -542,8 +548,6 @@
menuconfig
rm -f $(UCLIBC_DIR)/.stamp_{configured,built,target_installed,staging_installed}
-$(eval $(generic-package))
-
uclibc-update-config: $(UCLIBC_DIR)/.stamp_configured
cp -f $(UCLIBC_DIR)/.config $(UCLIBC_CONFIG_FILE)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 3 of 3 v2] uclibc: update-config: preserve freshly configured settings
2014-07-15 18:43 [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file Thomas De Schampheleire
2014-07-15 18:43 ` [Buildroot] [PATCH 1 of 3 v2] uclibc: rename SETUP_DOT_CONFIG to FIXUP_DOT_CONFIG Thomas De Schampheleire
2014-07-15 18:43 ` [Buildroot] [PATCH 2 of 3 v2] uclibc: menuconfig: take into account initial settings from config file Thomas De Schampheleire
@ 2014-07-15 18:43 ` Thomas De Schampheleire
2014-07-17 17:57 ` [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file Thomas De Schampheleire
3 siblings, 0 replies; 6+ messages in thread
From: Thomas De Schampheleire @ 2014-07-15 18:43 UTC (permalink / raw)
To: buildroot
In the sequence:
make uclibc-menuconfig
make uclibc-update-config
the freshly configured settings from the menuconfig are lost during the
update-config step. This is because update-config depends on the configure
step, which starts by copying the config file to the build directory.
Instead, stop depending on the configure step from update-config, and
introduce a new stamp file .stamp_config_fixup_done, which applies any
fixups on the .config file.
An alternative solution would be to add a call to UCLIBC_FIXUP_DOT_CONFIG to
the relevant targets instead of depending on a new stamp file, but this
would unnecessarily repeat the fixups on subsequent invocations of
update-config, for example.
No longer depending on the configure step has the added bonus that
'uclibc-update-config' no longer needs the toolchain to be available, which
makes:
make clean uclibc-menuconfig uclibc-update-config
much faster and user-friendly.
Additionally, make sure that 'make clean uclibc-update-config' works
properly, by depending on .stamp_config_fixup_done so that the config file
is present and fixed.
Fixes bug #7154 https://bugs.busybox.net/show_bug.cgi?id=7154
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
---
v2:
- use $(Q)touch iso touch (Arnout)
- update commit message to clarify stamp file choice (Arnout)
rfc->patch:
- rebase
- rename .stamp_config_file_fixed into .stamp_config_fixup_done
- add dependency on .config from .stamp_config_file_fixed (Arnout)
- remove explicit call to UCLIBC_FIXUP_DOT_CONFIG from configure commands,
and instead depend on .stamp_config_fixup_done.
package/uclibc/uclibc.mk | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff -r a22b18c9a90d -r f2da132c93ad package/uclibc/uclibc.mk
--- a/package/uclibc/uclibc.mk Sun Jun 22 10:37:22 2014 +0200
+++ b/package/uclibc/uclibc.mk Mon Jun 16 20:18:23 2014 +0200
@@ -432,7 +432,6 @@
endef
define UCLIBC_CONFIGURE_CMDS
- $(UCLIBC_FIXUP_DOT_CONFIG)
$(MAKE1) -C $(UCLIBC_DIR) \
$(UCLIBC_MAKE_FLAGS) \
PREFIX=$(STAGING_DIR) \
@@ -537,7 +536,11 @@
$(UCLIBC_DIR)/.config: $(UCLIBC_CONFIG_FILE) | uclibc-patch
$(INSTALL) -m 0644 $(UCLIBC_CONFIG_FILE) $(UCLIBC_DIR)/.config
-$(UCLIBC_TARGET_CONFIGURE): $(UCLIBC_DIR)/.config
+$(UCLIBC_DIR)/.stamp_config_fixup_done: $(UCLIBC_DIR)/.config
+ $(UCLIBC_FIXUP_DOT_CONFIG)
+ $(Q)touch $@
+
+$(UCLIBC_TARGET_CONFIGURE): $(UCLIBC_DIR)/.stamp_config_fixup_done
uclibc-menuconfig: $(UCLIBC_DIR)/.config
$(MAKE1) -C $(UCLIBC_DIR) \
@@ -546,9 +549,10 @@
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=$(STAGING_DIR)/ \
menuconfig
- rm -f $(UCLIBC_DIR)/.stamp_{configured,built,target_installed,staging_installed}
+ rm -f $(UCLIBC_DIR)/.stamp_{config_fixup_done,configured,built}
+ rm -f $(UCLIBC_DIR)/.stamp_{target,staging}_installed
-uclibc-update-config: $(UCLIBC_DIR)/.stamp_configured
+uclibc-update-config: $(UCLIBC_DIR)/.stamp_config_fixup_done
cp -f $(UCLIBC_DIR)/.config $(UCLIBC_CONFIG_FILE)
# Before uClibc is built, we must have the second stage cross-compiler
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file
2014-07-15 18:43 [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file Thomas De Schampheleire
` (2 preceding siblings ...)
2014-07-15 18:43 ` [Buildroot] [PATCH 3 of 3 v2] uclibc: update-config: preserve freshly configured settings Thomas De Schampheleire
@ 2014-07-17 17:57 ` Thomas De Schampheleire
3 siblings, 0 replies; 6+ messages in thread
From: Thomas De Schampheleire @ 2014-07-17 17:57 UTC (permalink / raw)
To: buildroot
All,
On Tue, Jul 15, 2014 at 8:43 PM, Thomas De Schampheleire
<patrickdepinguin@gmail.com> wrote:
> This patch series (part of it poster earlier as RFC) has as main goal to
> fix the uclibc kconfig handling with following requirements in mind:
>
> - neither foo-menuconfig nor foo-update-config should have a dependency
> on the toolchain (which means we cannot depend on foo-configure)
>
> - 'clean foo-menuconfig' should start from the specified (custom) config
> file
>
> - 'foo-menuconfig foo-update-config' should preserve the changes made in
> the menuconfig step (this problem is reported for uclibc with bug #7154
> (https://bugs.busybox.net/show_bug.cgi?id=7154).
>
> - 'make foo-menuconfig; make foo-menuconfig' should preserve the changes
> made in the menuconfig step.
>
> - 'make clean foo-update-config' should copy the initial file, do any
> fixups, and then save the config
>
>
> Once this series is accepted, the plan is:
> - to extract the kconfig-related bits to a kconfig-package infrastructure.
> - to convert busybox, linux and barebox to this kconfig-package infra too.
>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> ---
> package/uclibc/uclibc.mk | 24 ++++++++++++++++--------
> 1 files changed, 16 insertions(+), 8 deletions(-)
Any further comments on v2 of this patch?
Thanks,
Thomas
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH 1 of 3 v2] uclibc: rename SETUP_DOT_CONFIG to FIXUP_DOT_CONFIG
2014-07-15 18:43 ` [Buildroot] [PATCH 1 of 3 v2] uclibc: rename SETUP_DOT_CONFIG to FIXUP_DOT_CONFIG Thomas De Schampheleire
@ 2014-07-17 23:23 ` Arnout Vandecappelle
0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2014-07-17 23:23 UTC (permalink / raw)
To: buildroot
On 15/07/14 20:43, Thomas De Schampheleire wrote:
> In a subsequent patch, the behavior of UCLIBC_SETUP_DOT_CONFIG will change
> so that it only applies fixups to the (already copied) configuration file.
> This patch renames this function to UCLIBC_FIXUP_DOT_CONFIG to better match
> the future behavior.
>
> Suggested-by: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Regards,
Arnout
>
> ---
> v2: update commit message (ThomasP)
>
> package/uclibc/uclibc.mk | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff -r c7afd4612342 -r 9634175cf29d package/uclibc/uclibc.mk
> --- a/package/uclibc/uclibc.mk Tue Jul 01 19:39:16 2014 +0200
> +++ b/package/uclibc/uclibc.mk Wed Jul 02 21:31:07 2014 +0200
> @@ -393,7 +393,7 @@
> UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS) $(TARGET_ABI)" \
> HOSTCC="$(HOSTCC)"
>
> -define UCLIBC_SETUP_DOT_CONFIG
> +define UCLIBC_FIXUP_DOT_CONFIG
> $(INSTALL) -m 0644 $(UCLIBC_CONFIG_FILE) $(@D)/.config
> $(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D)/.config)
> $(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH),$(@D)/.config)
> @@ -433,7 +433,7 @@
> endef
>
> define UCLIBC_CONFIGURE_CMDS
> - $(UCLIBC_SETUP_DOT_CONFIG)
> + $(UCLIBC_FIXUP_DOT_CONFIG)
> $(MAKE1) -C $(UCLIBC_DIR) \
> $(UCLIBC_MAKE_FLAGS) \
> PREFIX=$(STAGING_DIR) \
>
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-17 23:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 18:43 [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file Thomas De Schampheleire
2014-07-15 18:43 ` [Buildroot] [PATCH 1 of 3 v2] uclibc: rename SETUP_DOT_CONFIG to FIXUP_DOT_CONFIG Thomas De Schampheleire
2014-07-17 23:23 ` Arnout Vandecappelle
2014-07-15 18:43 ` [Buildroot] [PATCH 2 of 3 v2] uclibc: menuconfig: take into account initial settings from config file Thomas De Schampheleire
2014-07-15 18:43 ` [Buildroot] [PATCH 3 of 3 v2] uclibc: update-config: preserve freshly configured settings Thomas De Schampheleire
2014-07-17 17:57 ` [Buildroot] [PATCH 0 of 3 v2] uclibc: fix handling of configuration file Thomas De Schampheleire
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.