oe-layersetup: Add config option for inclusive vars
PATCH v2 1/1 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.
---
v2: Removed change to /bin/bash that made it into v1.
configs/arago-dunfell-config.txt | 1 + configs/arago-dunfell-next-config.txt | 1 + configs/arago-dunfell-wip-config.txt | 1 + configs/arago-kirkstone-config.txt | 1 + configs/arago-master-config.txt | 1 + configs/distroless-dunfell-config.txt | 1 + configs/distroless-kirkstone-config.txt | 1 + configs/distroless-master-config.txt | 1 + configs/poky-dunfell-config.txt | 1 + configs/poky-kirkstone-config.txt | 1 + configs/poky-master-config.txt | 1 + oe-layertool-setup.sh | 25 ++++++++++++++++++++++++- 12 files changed, 35 insertions(+), 1 deletion(-)
configs/arago-dunfell-config.txt +1 -0
@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample # use below for OECORELAYERCONF to mark it compatible with dunfell #OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample OECORELOCALCONF=./sample-files/local-arago64.conf.sample +BITBAKE_INCLUSIVE_VARS=no
configs/arago-dunfell-next-config.txt +1 -0
@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample # use below for OECORELAYERCONF to mark it compatible with dunfell #OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample OECORELOCALCONF=./sample-files/local-arago64.conf.sample +BITBAKE_INCLUSIVE_VARS=no
configs/arago-dunfell-wip-config.txt +1 -0
@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample # use below for OECORELAYERCONF to mark it compatible with dunfell #OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample OECORELOCALCONF=./sample-files/local-arago64.conf.sample +BITBAKE_INCLUSIVE_VARS=no
configs/arago-kirkstone-config.txt +1 -0
@@ -12,3 +12,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-arago64-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yes
configs/arago-master-config.txt +1 -0
@@ -12,3 +12,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-arago64-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yes
configs/distroless-dunfell-config.txt +1 -0
@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,dunfell,HEAD,layers=meta-arm:meta-a oe-core,git://git.openembedded.org/openembedded-core,dunfell,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local.conf.sample +BITBAKE_INCLUSIVE_VARS=no
configs/distroless-kirkstone-config.txt +1 -0
@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yes
configs/distroless-master-config.txt +1 -0
@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yes
configs/poky-dunfell-config.txt +1 -0
@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,dunfell,HEAD,layers=meta-arm:meta-a meta-ti,git://git.yoctoproject.org/meta-ti,dunfell,HEAD,layers= OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-poky.conf.sample +BITBAKE_INCLUSIVE_VARS=no
configs/poky-kirkstone-config.txt +1 -0
@@ -8,3 +8,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-poky-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yes
configs/poky-master-config.txt +1 -0
@@ -8,3 +8,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-poky-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yes
oe-layertool-setup.sh +24 -1
@@ -38,6 +38,7 @@ OECORELAYERCONF="" # sample configuration file used for bblayers.conf OECORELAYERCONFPATH="" # stores the path of the OECORELAYERCONFPATH variable OECORELOCALCONF="" # sample configuration file used for local.conf OECORELOCALCONFPATH="" # stores the path of the OECORELOCALCONFPATH variable +BITBAKE_INCLUSIVE_VARS="no" outputfile="" # file to save output to if -o is used inputfile="" # file containing initial layers if -f is used interactive="n" # flag for interactive mode. Default is n
@@ -158,6 +159,14 @@ parse_oecore_line() { eval $var=$val } +# Input is a line of the form BITBAKE.*=value +parse_bitbake_line() { + var=`echo $1 | cut -d= -f1` + val=`echo $1 | cut -d= -f2` + eval $var=$val +} + + # Input is a repository description line as detailed in the usage section # There is a second optional input that can be passed to prefix the variable
@@ -243,6 +252,15 @@ parse_input_file() { continue fi + # If the line starts with OECORE then parse the OECORE setting + echo $line | grep -e "^BITBAKE.*=" > /dev/null + if [ "$?" = "0" ] + then + parse_bitbake_line $line + output="$output""$line\n" + continue + fi + # Since the line is not a comment or an OECORE setting let's assume # it is a repository information line and parse it parse_repo_line $line
@@ -853,8 +871,13 @@ unset BITBAKEDIR unset SCRIPTS export PATH export BUILDDIR=${builddir} -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" EOM + + if [ "$BITBAKE_INCLUSIVE_VARS" == "no" ]; then + 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 + else + 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 + fi }
Signature · 1 line
2.17.1
Quoted 5 lines · Ryan Eatmon via lists.yoctoproject.org
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.
Looks good to me.
Quoted 1 line
Signed-off-by Ryan Eatmon <[email protected]>
Quoted 188 lines
---
v2: Removed change to/bin/bashthat made it into v1.configs/arago-dunfell-config.txt | 1 + configs/arago-dunfell-next-config.txt | 1 + configs/arago-dunfell-wip-config.txt | 1 + configs/arago-kirkstone-config.txt | 1 + configs/arago-master-config.txt | 1 + configs/distroless-dunfell-config.txt | 1 + configs/distroless-kirkstone-config.txt | 1 + configs/distroless-master-config.txt | 1 + configs/poky-dunfell-config.txt | 1 + configs/poky-kirkstone-config.txt | 1 + configs/poky-master-config.txt | 1 + oe-layertool-setup.sh | 25 ++++++++++++++++++++++++- 12 files changed, 35 insertions(+), 1 deletion(-)configs/arago-dunfell-config.txt +1
-0@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample # use below for OECORELAYERCONF to mark it compatible with dunfell #OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample OECORELOCALCONF=./sample-files/local-arago64.conf.sample +BITBAKE_INCLUSIVE_VARS=noconfigs/arago-dunfell-next-config.txt +1
-0@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample # use below for OECORELAYERCONF to mark it compatible with dunfell #OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample OECORELOCALCONF=./sample-files/local-arago64.conf.sample +BITBAKE_INCLUSIVE_VARS=noconfigs/arago-dunfell-wip-config.txt +1
-0@@ -16,3 +16,4 @@ OECORELAYERCONF=./sample-files/bblayers.conf.sample # use below for OECORELAYERCONF to mark it compatible with dunfell #OECORELAYERCONF=./sample-files/bblayers-dunfell-browser.conf.sample OECORELOCALCONF=./sample-files/local-arago64.conf.sample +BITBAKE_INCLUSIVE_VARS=noconfigs/arago-kirkstone-config.txt +1
-0@@ -12,3 +12,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-arago64-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yesconfigs/arago-master-config.txt +1
-0@@ -12,3 +12,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-arago64-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yesconfigs/distroless-dunfell-config.txt +1
-0@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,dunfell,HEAD,layers=meta-arm:meta-a oe-core,git://git.openembedded.org/openembedded-core,dunfell,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local.conf.sample +BITBAKE_INCLUSIVE_VARS=noconfigs/distroless-kirkstone-config.txt +1
-0@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yesconfigs/distroless-master-config.txt +1
-0@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yesconfigs/poky-dunfell-config.txt +1
-0@@ -6,3 +6,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,dunfell,HEAD,layers=meta-arm:meta-a meta-ti,git://git.yoctoproject.org/meta-ti,dunfell,HEAD,layers= OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-poky.conf.sample +BITBAKE_INCLUSIVE_VARS=noconfigs/poky-kirkstone-config.txt +1
-0@@ -8,3 +8,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,kirkstone,HEAD,layers=meta-arm:meta oe-core,git://git.openembedded.org/openembedded-core,kirkstone,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-poky-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yesconfigs/poky-master-config.txt +1
-0@@ -8,3 +8,4 @@ meta-arm,git://git.yoctoproject.org/meta-arm,master,HEAD,layers=meta-arm:meta-ar oe-core,git://git.openembedded.org/openembedded-core,master,HEAD,layers=meta OECORELAYERCONF=./sample-files/bblayers.conf.sample OECORELOCALCONF=./sample-files/local-poky-v2.conf.sample +BITBAKE_INCLUSIVE_VARS=yesoe-layertool-setup.sh +24
-1@@ -38,6 +38,7 @@ OECORELAYERCONF="" # sample configuration file used for bblayers.conf OECORELAYERCONFPATH="" # stores the path of the OECORELAYERCONFPATH variable OECORELOCALCONF="" # sample configuration file used for local.conf OECORELOCALCONFPATH="" # stores the path of the OECORELOCALCONFPATH variable +BITBAKE_INCLUSIVE_VARS="no" outputfile="" # file to save output to if -o is used inputfile="" # file containing initial layers if -f is used interactive="n" # flag for interactive mode. Default is n@@ -158,6 +159,14 @@ parse_oecore_line() { eval $var=$val } +# Input is a line of the form BITBAKE.*=value +parse_bitbake_line() { + var=`echo $1 | cut -d= -f1` + val=`echo $1 | cut -d= -f2` + eval $var=$val +} + + # Input is a repository description line as detailed in the usage section # There is a second optional input that can be passed to prefix the variable@@ -243,6 +252,15 @@ parse_input_file() { continue fi + # If the line starts with OECORE then parse the OECORE setting + echo $line | grep -e "^BITBAKE.*=" > /dev/null + if [ "$?" = "0" ] + then + parse_bitbake_line $line + output="$output""$line\n" + continue + fi + # Since the line is not a comment or an OECORE setting let's assume # it is a repository information line and parse it parse_repo_line $line@@ -853,8 +871,13 @@ unset BITBAKEDIR unset SCRIPTS export PATH export BUILDDIR=${builddir} -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" EOM + + if [ "$BITBAKE_INCLUSIVE_VARS" == "no" ]; then + 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 + else + 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 + fi }Signature · 11 lines
2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13967): https://lists.yoctoproject.org/g/meta-arago/message/13967 Mute This Topic: https://lists.yoctoproject.org/mt/92637754/3617104 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
Signature · 4 lines
Regards, Denys Dmytriyenko <[email protected]> PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964 Fingerprint: 25FC E4A5 8A72 2F69 1186 6D76 4209 0272 9A92 C964