Skip to contentSkip to conversation

package/pkg-kconfig: fixes for per-package-directory

PATCH In review Brandon Maier via buildroot 2 participants 8 messages Jul 29, 2024 – Sep 2, 2024

lore
Share & tools
lore
#0 lore raw

cover package/pkg-kconfig: fixes for per-package-directory

---
Brandon Maier (3):
package/pkg-kconfig: fix *-savedefconfig under ppd package/pkg-kconfig: fix *-diff-config under ppd package/pkg-kconfig: cleanup savedefconfig MAKE

 package/pkg-kconfig.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

---
base-commit: 520ca083dfec4ad5ce7977bed478e2285ce93b07
change-id: 20240729-pkg-kconfig-ppd-5fc44df6ddf1

Best regards,

Signature · 6 lines
Brandon Maier <[email protected]>

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH 1/3 package/pkg-kconfig: fix *-savedefconfig under ppd

The 'linux-savedefconfig' target fails with the below error when PER_PACKAGE_DIRECTORIES is enabled and the 'host-finalize' target hasn't run yet.

scripts/Kconfig.include:39: C compiler '.../buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-gcc' not found

The 'PPD' variable isn't defined for this target, so 'BR_PATH' falls back to the final host directory.

---
 package/pkg-kconfig.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-kconfig.mk +1 -0
index f4f35bf96a..6bf3d6b4be 100644
@@ -270,6 +270,7 @@ $(1)-check-configuration-done:
 
 ifeq ($$($(2)_KCONFIG_SUPPORTS_DEFCONFIG),YES)
 .PHONY: $(1)-savedefconfig
+$(1)-savedefconfig: PKG=$(2)
 $(1)-savedefconfig: $(1)-check-configuration-done
 	$$(call kconfig-package-savedefconfig,$(2))
 endif
Signature · 6 lines
2.45.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH 1/3] package/pkg-kconfig: fix *-savedefconfig under ppd

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Brandon" == Brandon Maier via buildroot <[email protected]> writes:

The 'linux-savedefconfig' target fails with the below error when PER_PACKAGE_DIRECTORIES is enabled and the 'host-finalize' target hasn't run yet.

Quoted 7 lines

scripts/Kconfig.include:39: C compiler '.../buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-gcc' not found

The 'PPD' variable isn't defined for this target, so 'BR_PATH' falls back to the final host directory.

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#3 lore raw

PATCH 2/3 package/pkg-kconfig: fix *-diff-config under ppd

In reply to Brandon Maier via buildroot

The 'linux-diff-config' target fails with the below error when PER_PACKAGE_DIRECTORIES is enabled and the 'host-finalize' target hasn't run yet.

scripts/Kconfig.include:39: C compiler '.../buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-gcc' not found

The 'PPD' variable isn't defined for this target, so 'BR_PATH' falls back to the final host directory.

---
 package/pkg-kconfig.mk | 1 +
 1 file changed, 1 insertion(+)
package/pkg-kconfig.mk +1 -0
index 6bf3d6b4be..684342bcef 100644
@@ -301,6 +301,7 @@ endif
 # defconfig + fragments (if any) and the current configuration.
 # Note: it preserves the timestamp of the current configuration when moving it
 # around.
+$(1)-diff-config: PKG=$(2)
 $(1)-diff-config: $(1)-check-configuration-done
 	$$(Q)cp -a $$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG) $$($(2)_DIR)/.config.dc.bak
 	$$(call kconfig-package-merge-config,$(2),$$($(2)_DIR)/$$($(2)_KCONFIG_DOTCONFIG),\
Signature · 6 lines
2.45.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

Re: [Buildroot] [PATCH 2/3] package/pkg-kconfig: fix *-diff-config under ppd

Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Brandon" == Brandon Maier via buildroot <[email protected]> writes:

The 'linux-diff-config' target fails with the below error when PER_PACKAGE_DIRECTORIES is enabled and the 'host-finalize' target hasn't run yet.

Quoted 6 lines

scripts/Kconfig.include:39: C compiler '.../buildroot/output/host/bin/arm-buildroot-linux-gnueabihf-gcc' not found

The 'PPD' variable isn't defined for this target, so 'BR_PATH' falls back to the final host directory.

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw

PATCH 3/3 package/pkg-kconfig: cleanup savedefconfig MAKE

In reply to Brandon Maier via buildroot

The kconfig infra defines a 'PKG_KCONFIG_MAKE' var that wraps all the standard kconfig options. Switch to this so we aren't duplicating the logic.

---
 package/pkg-kconfig.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
package/pkg-kconfig.mk +1 -2
index 684342bcef..8000de16c4 100644
@@ -33,8 +33,7 @@ PKG_KCONFIG_COMMON_OPTS = \
 # Macro to save the defconfig file
 # $(1): the name of the package in upper-case letters
 define kconfig-package-savedefconfig
-	$($(1)_MAKE_ENV) $($(1)_MAKE) -C $($(1)_DIR) \
-		$(PKG_KCONFIG_COMMON_OPTS) $($(1)_KCONFIG_OPTS) savedefconfig
+	$($(1)_KCONFIG_MAKE) savedefconfig
 endef
 
 # The correct way to regenerate a .config file is to use 'make olddefconfig'.
Signature · 6 lines
2.45.2

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#6 lore raw

Re: [Buildroot] [PATCH 3/3] package/pkg-kconfig: cleanup savedefconfig MAKE

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Brandon" == Brandon Maier via buildroot <[email protected]> writes:

The kconfig infra defines a 'PKG_KCONFIG_MAKE' var that wraps all the standard kconfig options. Switch to this so we aren't duplicating the logic.

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#7 lore raw
In reply to Brandon Maier via buildroot
Quoted 4 lines · On Mon, 29 Jul 2024 16:19:07 +0000 Brandon Maier via buildroot…

Brandon Maier (3):
package/pkg-kconfig: fix *-savedefconfig under ppd package/pkg-kconfig: fix *-diff-config under ppd package/pkg-kconfig: cleanup savedefconfig MAKE

Thanks a lot, series applied!

I'm wondering how many other custom make targets like that we have that would be missing the definition of PKG :-/

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot