diff mbox series

[2/7] backport: resurrect integrations

Message ID 20211124055505.1267128-3-thomas@adapt-ip.com (mailing list archive)
State New, archived
Headers show
Series Resurrect backports Integration Mode | expand

Commit Message

Thomas Pedersen Nov. 24, 2021, 5:55 a.m. UTC
Couple fixes to fix the kernel build when using a built in
backports ("integration mode"):

- newer kernel kconfig doesn't seem to like evaluating
  variables with just '$'. Use '$()'.
- define BACKPORT_DIR in the integration Kconfig so we
  don't have to supply it in an environment variable
  (where it can probably only ever be "backports/"
  anyway).

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
---
 backport/Kconfig.integrate | 11 +++++------
 backport/Kconfig.package   | 10 +++++-----
 backport/Kconfig.sources   | 18 +++++++++---------
 gentree.py                 |  4 ++--
 4 files changed, 21 insertions(+), 22 deletions(-)
diff mbox series

Patch

diff --git a/backport/Kconfig.integrate b/backport/Kconfig.integrate
index 45ab3ecd4d57..10e9f2cb8ac5 100644
--- a/backport/Kconfig.integrate
+++ b/backport/Kconfig.integrate
@@ -1,3 +1,4 @@ 
+BACKPORT_DIR:=%%BACKPORT_DIR%%
 config BACKPORT_INTEGRATE
 	bool
 	def_bool y
@@ -29,9 +30,7 @@  menuconfig BACKPORT_LINUX
 	  this should we run into any issues.
 
 if BACKPORT_LINUX
-
-source "$BACKPORT_DIR/Kconfig.versions"
-source "$BACKPORT_DIR/Kconfig.sources"
-source "$BACKPORT_DIR/Kconfig.local"
-
-endif # BACKPORT_LINUX
+source "$(BACKPORT_DIR)/Kconfig.versions"
+source "$(BACKPORT_DIR)/Kconfig.sources"
+source "$(BACKPORT_DIR)/Kconfig.local"
+endif	# BACKPORT_LINUX
diff --git a/backport/Kconfig.package b/backport/Kconfig.package
index 250cdf3e4278..ce2f1cdb5893 100644
--- a/backport/Kconfig.package
+++ b/backport/Kconfig.package
@@ -14,12 +14,12 @@  config BACKPORTED_KERNEL_NAME
 	option env="BACKPORTED_KERNEL_NAME"
 
 # Packaging hacks
-source "$BACKPORT_DIR/Kconfig.package.hacks"
+source "$(BACKPORT_DIR)/Kconfig.package.hacks"
 
 # Code we backport
-source "$BACKPORT_DIR/Kconfig.sources"
+source "$(BACKPORT_DIR)/Kconfig.sources"
 
 # these will be generated
-source "$BACKPORT_DIR/Kconfig.kernel"
-source "$BACKPORT_DIR/Kconfig.versions"
-source "$BACKPORT_DIR/Kconfig.local"
+source "$(BACKPORT_DIR)/Kconfig.kernel"
+source "$(BACKPORT_DIR)/Kconfig.versions"
+source "$(BACKPORT_DIR)/Kconfig.local"
diff --git a/backport/Kconfig.sources b/backport/Kconfig.sources
index 5fb44780d842..8344a9aaa378 100644
--- a/backport/Kconfig.sources
+++ b/backport/Kconfig.sources
@@ -1,15 +1,15 @@ 
 # this has the configuration for the backport code
-source "$BACKPORT_DIR/compat/Kconfig"
+source "$(BACKPORT_DIR)/compat/Kconfig"
 
 # these are copied from the kernel
-source "$BACKPORT_DIR/net/wireless/Kconfig"
-source "$BACKPORT_DIR/net/mac80211/Kconfig"
-source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
-source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
+source "$(BACKPORT_DIR)/net/wireless/Kconfig"
+source "$(BACKPORT_DIR)/net/mac80211/Kconfig"
+source "$(BACKPORT_DIR)/drivers/net/wireless/Kconfig"
+source "$(BACKPORT_DIR)/drivers/net/usb/Kconfig"
 
-source "$BACKPORT_DIR/drivers/ssb/Kconfig"
-source "$BACKPORT_DIR/drivers/bcma/Kconfig"
+source "$(BACKPORT_DIR)/drivers/ssb/Kconfig"
+source "$(BACKPORT_DIR)/drivers/bcma/Kconfig"
 
-source "$BACKPORT_DIR/drivers/usb/class/Kconfig"
+source "$(BACKPORT_DIR)/drivers/usb/class/Kconfig"
 
-source "$BACKPORT_DIR/drivers/staging/Kconfig"
+source "$(BACKPORT_DIR)/drivers/staging/Kconfig"
diff --git a/gentree.py b/gentree.py
index 05bb91b39291..4705ffa08fc4 100755
--- a/gentree.py
+++ b/gentree.py
@@ -701,7 +701,7 @@  def _main():
                            project_dir = args.outdir,
                            target_dir = os.path.join(args.outdir, 'backports/'),
                            target_dir_name = 'backports/',
-                           kconfig_source_var = '$BACKPORT_DIR',
+                           kconfig_source_var = '$(BACKPORT_DIR)',
                            )
     else:
         bpid = Bp_Identity(integrate = args.integrate,
@@ -710,7 +710,7 @@  def _main():
                            project_dir = args.outdir,
                            target_dir = args.outdir,
                            target_dir_name = '',
-                           kconfig_source_var = '$BACKPORT_DIR',
+                           kconfig_source_var = '$(BACKPORT_DIR)',
                            )
 
     def logwrite(msg):