summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Eatmon2022-07-26 16:35:32 -0500
committerRyan Eatmon2022-07-27 13:31:39 -0500
commit50aa3d8fe75c879ee5b6b46b83be7700a4f55b78 (patch)
tree7031dbcaf6def6290bc953a82aa53916b423ed34
parent49a319dc110fd820ca0d927d5b5c343a722feeba (diff)
downloadoe-layersetup-50aa3d8fe75c879ee5b6b46b83be7700a4f55b78.tar.gz
oe-layersetup-50aa3d8fe75c879ee5b6b46b83be7700a4f55b78.tar.xz
oe-layersetup-50aa3d8fe75c879ee5b6b46b83be7700a4f55b78.zip
oe-layersetup: Add config option for inclusive vars
Part of the transition to kirkstone was to rename some variables to align with community standards. Since oe-layersetup needs to work with both dunfell and kirkstone, we need a way to control which branch we are pointing to so that we can put the correct variables in the conf/setenv file. Signed-off-by: Ryan Eatmon <reatmon@ti.com> Reviewed-by: Denys Dmytriyenko <denys@konsulko.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
-rw-r--r--configs/arago-dunfell-config.txt1
-rw-r--r--configs/arago-dunfell-next-config.txt1
-rw-r--r--configs/arago-dunfell-wip-config.txt1
-rw-r--r--configs/arago-kirkstone-config.txt1
-rw-r--r--configs/arago-master-config.txt1
-rw-r--r--configs/distroless-dunfell-config.txt1
-rw-r--r--configs/distroless-kirkstone-config.txt1
-rw-r--r--configs/distroless-master-config.txt1
-rw-r--r--configs/poky-dunfell-config.txt1
-rw-r--r--configs/poky-kirkstone-config.txt1
-rw-r--r--configs/poky-master-config.txt1
-rwxr-xr-xoe-layertool-setup.sh25
12 files changed, 35 insertions, 1 deletions
diff --git a/configs/arago-dunfell-config.txt b/configs/arago-dunfell-config.txt
index 60cc72a..c5084a0 100644
--- a/configs/arago-dunfell-config.txt
+++ b/configs/arago-dunfell-config.txt
@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample
16# use below for OECORELAYERCONF to mark it compatible with dunfell 16# use below for OECORELAYERCONF to mark it compatible with dunfell
17#OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample 17#OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample
18OECORELOCALCONF=./sample-files/local-arago64.conf.sample 18OECORELOCALCONF=./sample-files/local-arago64.conf.sample
19BITBAKE_INCLUSIVE_VARS=no
diff --git a/configs/arago-dunfell-next-config.txt b/configs/arago-dunfell-next-config.txt
index e2eb202..7ad9f92 100644
--- a/configs/arago-dunfell-next-config.txt
+++ b/configs/arago-dunfell-next-config.txt
@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample
16# use below for OECORELAYERCONF to mark it compatible with dunfell 16# use below for OECORELAYERCONF to mark it compatible with dunfell
17#OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample 17#OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample
18OECORELOCALCONF=./sample-files/local-arago64.conf.sample 18OECORELOCALCONF=./sample-files/local-arago64.conf.sample
19BITBAKE_INCLUSIVE_VARS=no
diff --git a/configs/arago-dunfell-wip-config.txt b/configs/arago-dunfell-wip-config.txt
index 60f9f0d..b8c9cce 100644
--- a/configs/arago-dunfell-wip-config.txt
+++ b/configs/arago-dunfell-wip-config.txt
@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample
16# use below for OECORELAYERCONF to mark it compatible with dunfell 16# use below for OECORELAYERCONF to mark it compatible with dunfell
17#OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample 17#OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample
18OECORELOCALCONF=./sample-files/local-arago64.conf.sample 18OECORELOCALCONF=./sample-files/local-arago64.conf.sample
19BITBAKE_INCLUSIVE_VARS=no
diff --git a/configs/arago-kirkstone-config.txt b/configs/arago-kirkstone-config.txt
index 0f3c001..ebe130a 100644
--- a/configs/arago-kirkstone-config.txt
+++ b/configs/arago-kirkstone-config.txt
@@ -12,3 +12,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta
12oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta 12oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta
13OECORELAYERCONF=./sample-files/bblayers.conf.sample 13OECORELAYERCONF=./sample-files/bblayers.conf.sample
14OECORELOCALCONF=./sample-files/local-arago64-v2.conf.sample 14OECORELOCALCONF=./sample-files/local-arago64-v2.conf.sample
15BITBAKE_INCLUSIVE_VARS=yes
diff --git a/configs/arago-master-config.txt b/configs/arago-master-config.txt
index 532a145..93d93b5 100644
--- a/configs/arago-master-config.txt
+++ b/configs/arago-master-config.txt
@@ -12,3 +12,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar
12oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta 12oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta
13OECORELAYERCONF=./sample-files/bblayers.conf.sample 13OECORELAYERCONF=./sample-files/bblayers.conf.sample
14OECORELOCALCONF=./sample-files/local-arago64-v2.conf.sample 14OECORELOCALCONF=./sample-files/local-arago64-v2.conf.sample
15BITBAKE_INCLUSIVE_VARS=yes
diff --git a/configs/distroless-dunfell-config.txt b/configs/distroless-dunfell-config.txt
index 0d2ab28..bb03ac7 100644
--- a/configs/distroless-dunfell-config.txt
+++ b/configs/distroless-dunfell-config.txt
@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,dunfell,HEAD,layers=meta-arm:meta-a
6oe-core,git://git.openembedded.org/openembedded-core,dunfell,HEAD,layers=meta 6oe-core,git://git.openembedded.org/openembedded-core,dunfell,HEAD,layers=meta
7OECORELAYERCONF=./sample-files/bblayers.conf.sample 7OECORELAYERCONF=./sample-files/bblayers.conf.sample
8OECORELOCALCONF=./sample-files/local.conf.sample 8OECORELOCALCONF=./sample-files/local.conf.sample
9BITBAKE_INCLUSIVE_VARS=no
diff --git a/configs/distroless-kirkstone-config.txt b/configs/distroless-kirkstone-config.txt
index 3b33992..4cafca7 100644
--- a/configs/distroless-kirkstone-config.txt
+++ b/configs/distroless-kirkstone-config.txt
@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta
6oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta 6oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta
7OECORELAYERCONF=./sample-files/bblayers.conf.sample 7OECORELAYERCONF=./sample-files/bblayers.conf.sample
8OECORELOCALCONF=./sample-files/local-v2.conf.sample 8OECORELOCALCONF=./sample-files/local-v2.conf.sample
9BITBAKE_INCLUSIVE_VARS=yes
diff --git a/configs/distroless-master-config.txt b/configs/distroless-master-config.txt
index 5c55459..e67f916 100644
--- a/configs/distroless-master-config.txt
+++ b/configs/distroless-master-config.txt
@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar
6oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta 6oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta
7OECORELAYERCONF=./sample-files/bblayers.conf.sample 7OECORELAYERCONF=./sample-files/bblayers.conf.sample
8OECORELOCALCONF=./sample-files/local-v2.conf.sample 8OECORELOCALCONF=./sample-files/local-v2.conf.sample
9BITBAKE_INCLUSIVE_VARS=yes
diff --git a/configs/poky-dunfell-config.txt b/configs/poky-dunfell-config.txt
index 6c768e7..5f6c45b 100644
--- a/configs/poky-dunfell-config.txt
+++ b/configs/poky-dunfell-config.txt
@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,dunfell,HEAD,layers=meta-arm:meta-a
6meta-ti,git://git.yoctoproject.org/meta-ti,dunfell,HEAD,layers= 6meta-ti,git://git.yoctoproject.org/meta-ti,dunfell,HEAD,layers=
7OECORELAYERCONF=./sample-files/bblayers.conf.sample 7OECORELAYERCONF=./sample-files/bblayers.conf.sample
8OECORELOCALCONF=./sample-files/local-poky.conf.sample 8OECORELOCALCONF=./sample-files/local-poky.conf.sample
9BITBAKE_INCLUSIVE_VARS=no
diff --git a/configs/poky-kirkstone-config.txt b/configs/poky-kirkstone-config.txt
index 0e57c64..815cabf 100644
--- a/configs/poky-kirkstone-config.txt
+++ b/configs/poky-kirkstone-config.txt
@@ -8,3 +8,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta
8oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta 8oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta
9OECORELAYERCONF=./sample-files/bblayers.conf.sample 9OECORELAYERCONF=./sample-files/bblayers.conf.sample
10OECORELOCALCONF=./sample-files/local-poky-v2.conf.sample 10OECORELOCALCONF=./sample-files/local-poky-v2.conf.sample
11BITBAKE_INCLUSIVE_VARS=yes
diff --git a/configs/poky-master-config.txt b/configs/poky-master-config.txt
index a541501..272a14b 100644
--- a/configs/poky-master-config.txt
+++ b/configs/poky-master-config.txt
@@ -8,3 +8,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar
8oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta 8oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta
9OECORELAYERCONF=./sample-files/bblayers.conf.sample 9OECORELAYERCONF=./sample-files/bblayers.conf.sample
10OECORELOCALCONF=./sample-files/local-poky-v2.conf.sample 10OECORELOCALCONF=./sample-files/local-poky-v2.conf.sample
11BITBAKE_INCLUSIVE_VARS=yes
diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
index e05737b..e404290 100755
--- a/oe-layertool-setup.sh
+++ b/oe-layertool-setup.sh
@@ -38,6 +38,7 @@ OECORELAYERCONF="" # sample configuration file used for bblayers.conf
38OECORELAYERCONFPATH="" # stores the path of the OECORELAYERCONFPATH variable 38OECORELAYERCONFPATH="" # stores the path of the OECORELAYERCONFPATH variable
39OECORELOCALCONF="" # sample configuration file used for local.conf 39OECORELOCALCONF="" # sample configuration file used for local.conf
40OECORELOCALCONFPATH="" # stores the path of the OECORELOCALCONFPATH variable 40OECORELOCALCONFPATH="" # stores the path of the OECORELOCALCONFPATH variable
41BITBAKE_INCLUSIVE_VARS="no"
41outputfile="" # file to save output to if -o is used 42outputfile="" # file to save output to if -o is used
42inputfile="" # file containing initial layers if -f is used 43inputfile="" # file containing initial layers if -f is used
43interactive="n" # flag for interactive mode. Default is n 44interactive="n" # flag for interactive mode. Default is n
@@ -158,6 +159,14 @@ parse_oecore_line() {
158 eval $var=$val 159 eval $var=$val
159} 160}
160 161
162# Input is a line of the form BITBAKE.*=value
163parse_bitbake_line() {
164 var=`echo $1 | cut -d= -f1`
165 val=`echo $1 | cut -d= -f2`
166 eval $var=$val
167}
168
169
161 170
162# Input is a repository description line as detailed in the usage section 171# Input is a repository description line as detailed in the usage section
163# There is a second optional input that can be passed to prefix the variable 172# There is a second optional input that can be passed to prefix the variable
@@ -243,6 +252,15 @@ parse_input_file() {
243 continue 252 continue
244 fi 253 fi
245 254
255 # If the line starts with OECORE then parse the OECORE setting
256 echo $line | grep -e "^BITBAKE.*=" > /dev/null
257 if [ "$?" = "0" ]
258 then
259 parse_bitbake_line $line
260 output="$output""$line\n"
261 continue
262 fi
263
246 # Since the line is not a comment or an OECORE setting let's assume 264 # Since the line is not a comment or an OECORE setting let's assume
247 # it is a repository information line and parse it 265 # it is a repository information line and parse it
248 parse_repo_line $line 266 parse_repo_line $line
@@ -853,8 +871,13 @@ unset BITBAKEDIR
853unset SCRIPTS 871unset SCRIPTS
854export PATH 872export PATH
855export BUILDDIR=${builddir} 873export BUILDDIR=${builddir}
856export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER OEBASE META_SDK_PATH TOOLCHAIN_TYPE TOOLCHAIN_BRAND TOOLCHAIN_BASE TOOLCHAIN_PATH TOOLCHAIN_PATH_ARMV5 TOOLCHAIN_PATH_ARMV7 TOOLCHAIN_PATH_ARMV8 EXTRA_TISDK_FILES TISDK_VERSION ARAGO_BRAND ARAGO_RT_ENABLE ARAGO_SYSTEST_ENABLE ARAGO_KERNEL_SUFFIX TI_SECURE_DEV_PKG_CAT TI_SECURE_DEV_PKG_AUTO TI_SECURE_DEV_PKG_K3 ARAGO_SYSVINIT SYSFW_FILE"
857EOM 874EOM
875
876 if [ "$BITBAKE_INCLUSIVE_VARS" == "no" ]; then
877 echo "export BB_ENV_EXTRAWHITE=\"MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER OEBASE META_SDK_PATH TOOLCHAIN_TYPE TOOLCHAIN_BRAND TOOLCHAIN_BASE TOOLCHAIN_PATH TOOLCHAIN_PATH_ARMV5 TOOLCHAIN_PATH_ARMV7 TOOLCHAIN_PATH_ARMV8 EXTRA_TISDK_FILES TISDK_VERSION ARAGO_BRAND ARAGO_RT_ENABLE ARAGO_SYSTEST_ENABLE ARAGO_KERNEL_SUFFIX TI_SECURE_DEV_PKG_CAT TI_SECURE_DEV_PKG_AUTO TI_SECURE_DEV_PKG_K3 ARAGO_SYSVINIT SYSFW_FILE\"" >> $confdir/setenv
878 else
879 echo "export BB_ENV_PASSTHROUGH_ADDITIONS=\"MACHINE DISTRO TCMODE TCLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS PARALLEL_MAKE GIT_PROXY_COMMAND GIT_PROXY_IGNORE SOCKS5_PASSWD SOCKS5_USER OEBASE META_SDK_PATH TOOLCHAIN_TYPE TOOLCHAIN_BRAND TOOLCHAIN_BASE TOOLCHAIN_PATH TOOLCHAIN_PATH_ARMV5 TOOLCHAIN_PATH_ARMV7 TOOLCHAIN_PATH_ARMV8 EXTRA_TISDK_FILES TISDK_VERSION ARAGO_BRAND ARAGO_RT_ENABLE ARAGO_SYSTEST_ENABLE ARAGO_KERNEL_SUFFIX TI_SECURE_DEV_PKG_CAT TI_SECURE_DEV_PKG_AUTO TI_SECURE_DEV_PKG_K3 ARAGO_SYSVINIT SYSFW_FILE\"" >> $confdir/setenv
880 fi
858} 881}
859 882
860 883