Skip to contentSkip to conversation

oe-layertool-setup.sh: Remove all control over number of threads

PATCH New Ryan Eatmon 1 participant 1 message Sep 29, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oe-layertool-setup.sh: Remove all control over number of threads

It was pointed out that bitbake now picks good defaults for the BB_NUMBER_THREADS and PARALLEL_MAKE variables, so we should remove all control over those variables from the script level. Also comment out the default settings in the sample conf files so that bitbake can be in control, but if the user needs to override them they have the example of what to change.

---
 oe-layertool-setup.sh                              | 5 -----
 sample-files/denzil/local-arago-linaro.conf.sample | 9 +++++++--
 sample-files/local-amsdk.conf.sample               | 9 +++++++--
 sample-files/local-arago.conf.sample               | 9 +++++++--
 sample-files/local-arago64-v2.conf.sample          | 9 +++++++--
 sample-files/local-arago64.conf.sample             | 9 +++++++--
 sample-files/local-glsdk.conf.sample               | 9 +++++++--
 sample-files/local-poky-v2.conf.sample             | 9 +++++++--
 sample-files/local-poky.conf.sample                | 9 +++++++--
 sample-files/local-processor-sdk-64.conf.sample    | 9 +++++++--
 sample-files/local-processor-sdk.conf.sample       | 9 +++++++--
 sample-files/local-v2.conf.sample                  | 9 +++++++--
 sample-files/local.conf.sample                     | 9 +++++++--
 13 files changed, 84 insertions(+), 29 deletions(-)
oe-layertool-setup.sh +0 -5
index 1ea31c3..df1b675 100755
@@ -768,11 +768,6 @@ EOM
     # First copy the template file
     cp -f $OECORELOCALCONFPATH $confdir/local.conf
 
-    # set the number of threads
-    threads=`cat /proc/cpuinfo | grep -c processor`
-    sed -i "s/^PARALLEL_MAKE.*/PARALLEL_MAKE ?= \"-j ${threads}\"/" $confdir/local.conf
-    sed -i "s/^BB_NUMBER_THREADS.*/BB_NUMBER_THREADS ?= \"${threads}\"/" $confdir/local.conf
-
     # Find if old DL_DIR was set
     if [ -e $confdir/local.conf.bak ]
     then
sample-files/denzil/local-arago-linaro.conf.sample +7 -2
index 24d14dc..0bfcc03 100644
@@ -135,15 +135,20 @@ ENABLE_BINARY_LOCALE_GENERATION = "0"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS = "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE = "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "arago"
 TOOLCHAIN_BRAND = "linaro"
sample-files/local-amsdk.conf.sample +7 -2
index ac39788..f856fb3 100644
@@ -135,15 +135,20 @@ ENABLE_BINARY_LOCALE_GENERATION = "0"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "arago"
 
sample-files/local-arago.conf.sample +7 -2
index 62f0f92..9a9fe51 100644
@@ -138,15 +138,20 @@ ENABLE_BINARY_LOCALE_GENERATION = "0"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "arago"
 
sample-files/local-arago64-v2.conf.sample +7 -2
index 13585cb..c6b4ca4 100644
@@ -135,15 +135,20 @@ ENABLE_BINARY_LOCALE_GENERATION = "0"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "arago"
 
sample-files/local-arago64.conf.sample +7 -2
index 68f0bff..6d7af90 100644
@@ -138,15 +138,20 @@ ENABLE_BINARY_LOCALE_GENERATION = "0"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "arago"
 
sample-files/local-glsdk.conf.sample +7 -2
index 189730a..3ed4150 100644
@@ -135,15 +135,20 @@ ENABLE_BINARY_LOCALE_GENERATION = "0"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "arago"
 
sample-files/local-poky-v2.conf.sample +7 -2
index 4bd0563..5a0cecc 100644
@@ -132,15 +132,20 @@ PATCHRESOLVE = "noop"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "poky"
 
sample-files/local-poky.conf.sample +7 -2
index ba5d4c1..1703f83 100644
@@ -135,15 +135,20 @@ PATCHRESOLVE = "noop"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "poky"
 
sample-files/local-processor-sdk-64.conf.sample +7 -2
index 9087be9..2bef530 100644
@@ -135,15 +135,20 @@ ENABLE_BINARY_LOCALE_GENERATION = "0"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "arago"
 
sample-files/local-processor-sdk.conf.sample +7 -2
index 59b11e6..18e992c 100644
@@ -135,15 +135,20 @@ ENABLE_BINARY_LOCALE_GENERATION = "0"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 DISTRO   = "arago"
 
sample-files/local-v2.conf.sample +7 -2
index e0df8f5..659cced 100644
@@ -134,15 +134,20 @@ PATCHRESOLVE = "noop"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 # Select a distribution from supported "arago", "angstrom-2010.x" or "poky"
 # By default, go with the "distroless" configuration, when not set
sample-files/local.conf.sample +7 -2
index e60bedc..067c057 100644
@@ -135,15 +135,20 @@ PATCHRESOLVE = "noop"
 # These two options control how much parallelism BitBake should use. The first 
 # option determines how many tasks bitbake should run in parallel:
 #
-BB_NUMBER_THREADS ?= "1"
+# BB_NUMBER_THREADS ?= "1"
 # 
 # The second option controls how many processes make should run in parallel when
 # running compile tasks:
 #
-PARALLEL_MAKE ?= "-j 1"
+# PARALLEL_MAKE ?= "-j 1"
 #
 # For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
 # be appropriate for example
+#
+# NOTE: By default, bitbake will choose the number of processeors on your host
+# so you should not need to set this unless you are wanting to lower the number
+# allowed.
+#
 
 # Select a distribution from supported "arago", "angstrom-2010.x" or "poky"
 # By default, go with the "distroless" configuration, when not set
Signature · 1 line
2.17.1