Browse Source

package: add support for <pkg>_BUSYBOX_CONFIG_FIXUPS

This will allow individual packages to define extra Busybox options
that they need.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Francois Perrad 7 months ago
parent
commit
3ef139386d
3 changed files with 10 additions and 0 deletions
  1. 6 0
      docs/manual/adding-packages-generic.adoc
  2. 1 0
      package/busybox/busybox.mk
  3. 3 0
      package/pkg-generic.mk

+ 6 - 0
docs/manual/adding-packages-generic.adoc

@@ -631,6 +631,12 @@ different steps of the build process.
   This is seldom used, as package usually have no strict requirements on
   This is seldom used, as package usually have no strict requirements on
   the kernel options.
   the kernel options.
 
 
+* +LIBFOO_BUSYBOX_CONFIG_FIXUPS+ lists the Busybox configuration
+  options that are needed to use this package especially in some scripts,
+  or at contrario the useless options. This shall be a set of
+  calls to one of the kconfig tweaking option: `KCONFIG_ENABLE_OPT`,
+  `KCONFIG_DISABLE_OPT`, or `KCONFIG_SET_OPT`.
+
 The preferred way to define these variables is:
 The preferred way to define these variables is:
 
 
 ----
 ----

+ 1 - 0
package/busybox/busybox.mk

@@ -422,6 +422,7 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
 	$(BUSYBOX_SET_SELINUX)
 	$(BUSYBOX_SET_SELINUX)
 	$(BUSYBOX_SET_LESS_FLAGS)
 	$(BUSYBOX_SET_LESS_FLAGS)
 	$(BUSYBOX_SET_INDIVIDUAL_BINARIES)
 	$(BUSYBOX_SET_INDIVIDUAL_BINARIES)
+	$(PACKAGES_BUSYBOX_CONFIG_FIXUPS)
 endef
 endef
 
 
 define BUSYBOX_BUILD_CMDS
 define BUSYBOX_BUILD_CMDS

+ 3 - 0
package/pkg-generic.mk

@@ -1242,6 +1242,9 @@ endif
 ifneq ($$($(2)_USERS),)
 ifneq ($$($(2)_USERS),)
 PACKAGES_USERS += $$($(2)_USERS)$$(sep)
 PACKAGES_USERS += $$($(2)_USERS)$$(sep)
 endif
 endif
+ifneq ($$($(2)_BUSYBOX_CONFIG_FIXUPS),)
+PACKAGES_BUSYBOX_CONFIG_FIXUPS += $$($(2)_BUSYBOX_CONFIG_FIXUPS)$$(sep)
+endif
 ifneq ($$($(2)_LINUX_CONFIG_FIXUPS),)
 ifneq ($$($(2)_LINUX_CONFIG_FIXUPS),)
 PACKAGES_LINUX_CONFIG_FIXUPS += $$($(2)_LINUX_CONFIG_FIXUPS)$$(sep)
 PACKAGES_LINUX_CONFIG_FIXUPS += $$($(2)_LINUX_CONFIG_FIXUPS)$$(sep)
 endif
 endif