All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [meta-arago] [oe-layersetup][master][RFC] oe-layersetup: Add config option for dunfell/kirkstone
       [not found] <16FF8DBB7909D3F6.549@lists.yoctoproject.org>
@ 2022-07-07 13:05 ` Ryan Eatmon
  2022-07-07 16:19   ` Andrew Davis
  0 siblings, 1 reply; 5+ messages in thread
From: Ryan Eatmon @ 2022-07-07 13:05 UTC (permalink / raw)
  To: Praneeth Bajjuri, Denys Dmytriyenko, meta-arago

Andrew, Denys,

What are your thoughts on this approach to fixing the variable name 
change issue?



On 7/7/2022 8:03, Ryan Eatmon via lists.yoctoproject.org wrote:
> 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>
> ---
>   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                   | 29 +++++++++++++++++++++++--
>   12 files changed, 38 insertions(+), 2 deletions(-)
> 
> diff --git a/configs/arago-dunfell-config.txt b/configs/arago-dunfell-config.txt
> index 60cc72a..71aaa0b 100644
> --- a/configs/arago-dunfell-config.txt
> +++ b/configs/arago-dunfell-config.txt
> @@ -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_BRANCH=dunfell
> diff --git a/configs/arago-dunfell-next-config.txt b/configs/arago-dunfell-next-config.txt
> index e2eb202..18984cd 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
>   # 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_BRANCH=dunfell
> diff --git a/configs/arago-dunfell-wip-config.txt b/configs/arago-dunfell-wip-config.txt
> index 60f9f0d..55a3b73 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
>   # 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_BRANCH=dunfell
> diff --git a/configs/arago-kirkstone-config.txt b/configs/arago-kirkstone-config.txt
> index 0f3c001..1666a18 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
>   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_BRANCH=kirkstone
> diff --git a/configs/arago-master-config.txt b/configs/arago-master-config.txt
> index 532a145..986ca6e 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
>   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_BRANCH=master
> diff --git a/configs/distroless-dunfell-config.txt b/configs/distroless-dunfell-config.txt
> index 0d2ab28..923858f 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
>   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_BRANCH=dunfell
> diff --git a/configs/distroless-kirkstone-config.txt b/configs/distroless-kirkstone-config.txt
> index 3b33992..288ab3b 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
>   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_BRANCH=kirkstone
> diff --git a/configs/distroless-master-config.txt b/configs/distroless-master-config.txt
> index 5c55459..a355d0d 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
>   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_BRANCH=master
> diff --git a/configs/poky-dunfell-config.txt b/configs/poky-dunfell-config.txt
> index 6c768e7..60fa653 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
>   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_BRANCH=dunfell
> diff --git a/configs/poky-kirkstone-config.txt b/configs/poky-kirkstone-config.txt
> index 0e57c64..658e189 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
>   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_BRANCH=kirkstone
> diff --git a/configs/poky-master-config.txt b/configs/poky-master-config.txt
> index a541501..fe6b731 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
>   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_BRANCH=master
> diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
> index e05737b..50c6f1e 100755
> --- a/oe-layertool-setup.sh
> +++ b/oe-layertool-setup.sh
> @@ -1,4 +1,4 @@
> -#!/bin/sh
> +#!/bin/bash
>   
>   # OE Build Enviroment Setup Script
>   #
> @@ -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_BRANCH="dunfell"
>   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,15 @@ 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_BRANCH" == "dunfell" ]; 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
> +    fi
> +
> +    if [[ "$BITBAKE_BRANCH" == "kirkstone" || "$BITBAKE_BRANCH" == "master" ]]; then
> +        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
>   }
>   
>   

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-arago] [oe-layersetup][master][RFC] oe-layersetup: Add config option for dunfell/kirkstone
  2022-07-07 13:05 ` [meta-arago] [oe-layersetup][master][RFC] oe-layersetup: Add config option for dunfell/kirkstone Ryan Eatmon
@ 2022-07-07 16:19   ` Andrew Davis
  2022-07-07 17:07     ` Ryan Eatmon
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Davis @ 2022-07-07 16:19 UTC (permalink / raw)
  To: reatmon, Praneeth Bajjuri, Denys Dmytriyenko, meta-arago

On 7/7/22 8:05 AM, Ryan Eatmon via lists.yoctoproject.org wrote:
> Andrew, Denys,
> 
> What are your thoughts on this approach to fixing the variable name change issue?
> 
> 

How do we feel about just using BB_PRESERVE_ENV?

Andrew

> 
> On 7/7/2022 8:03, Ryan Eatmon via lists.yoctoproject.org wrote:
>> 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>
>> ---
>>   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                   | 29 +++++++++++++++++++++++--
>>   12 files changed, 38 insertions(+), 2 deletions(-)
>>
>> diff --git a/configs/arago-dunfell-config.txt b/configs/arago-dunfell-config.txt
>> index 60cc72a..71aaa0b 100644
>> --- a/configs/arago-dunfell-config.txt
>> +++ b/configs/arago-dunfell-config.txt
>> @@ -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_BRANCH=dunfell
>> diff --git a/configs/arago-dunfell-next-config.txt b/configs/arago-dunfell-next-config.txt
>> index e2eb202..18984cd 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
>>   # 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_BRANCH=dunfell
>> diff --git a/configs/arago-dunfell-wip-config.txt b/configs/arago-dunfell-wip-config.txt
>> index 60f9f0d..55a3b73 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
>>   # 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_BRANCH=dunfell
>> diff --git a/configs/arago-kirkstone-config.txt b/configs/arago-kirkstone-config.txt
>> index 0f3c001..1666a18 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
>>   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_BRANCH=kirkstone
>> diff --git a/configs/arago-master-config.txt b/configs/arago-master-config.txt
>> index 532a145..986ca6e 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
>>   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_BRANCH=master
>> diff --git a/configs/distroless-dunfell-config.txt b/configs/distroless-dunfell-config.txt
>> index 0d2ab28..923858f 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
>>   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_BRANCH=dunfell
>> diff --git a/configs/distroless-kirkstone-config.txt b/configs/distroless-kirkstone-config.txt
>> index 3b33992..288ab3b 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
>>   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_BRANCH=kirkstone
>> diff --git a/configs/distroless-master-config.txt b/configs/distroless-master-config.txt
>> index 5c55459..a355d0d 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
>>   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_BRANCH=master
>> diff --git a/configs/poky-dunfell-config.txt b/configs/poky-dunfell-config.txt
>> index 6c768e7..60fa653 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
>>   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_BRANCH=dunfell
>> diff --git a/configs/poky-kirkstone-config.txt b/configs/poky-kirkstone-config.txt
>> index 0e57c64..658e189 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
>>   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_BRANCH=kirkstone
>> diff --git a/configs/poky-master-config.txt b/configs/poky-master-config.txt
>> index a541501..fe6b731 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
>>   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_BRANCH=master
>> diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
>> index e05737b..50c6f1e 100755
>> --- a/oe-layertool-setup.sh
>> +++ b/oe-layertool-setup.sh
>> @@ -1,4 +1,4 @@
>> -#!/bin/sh
>> +#!/bin/bash
>>   # OE Build Enviroment Setup Script
>>   #
>> @@ -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_BRANCH="dunfell"
>>   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,15 @@ 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_BRANCH" == "dunfell" ]; 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
>> +    fi
>> +
>> +    if [[ "$BITBAKE_BRANCH" == "kirkstone" || "$BITBAKE_BRANCH" == "master" ]]; then
>> +        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
>>   }
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-arago] [oe-layersetup][master][RFC] oe-layersetup: Add config option for dunfell/kirkstone
  2022-07-07 16:19   ` Andrew Davis
@ 2022-07-07 17:07     ` Ryan Eatmon
  2022-07-14 16:53       ` Denys Dmytriyenko
  0 siblings, 1 reply; 5+ messages in thread
From: Ryan Eatmon @ 2022-07-07 17:07 UTC (permalink / raw)
  To: Andrew Davis, Praneeth Bajjuri, Denys Dmytriyenko, meta-arago



On 7/7/2022 11:19, Andrew Davis wrote:
> On 7/7/22 8:05 AM, Ryan Eatmon via lists.yoctoproject.org wrote:
>> Andrew, Denys,
>>
>> What are your thoughts on this approach to fixing the variable name 
>> change issue?
>>
>>
> 
> How do we feel about just using BB_PRESERVE_ENV?
> 
> Andrew

That has some potential issues with someone's environment having 
something set that impacts the recipes and builds.  It could make it 
harder to debug issues.  Right now the environment is tightly 
controlled, with only variables in the list getting though, but this 
just throws open the flood gates...


>>
>> On 7/7/2022 8:03, Ryan Eatmon via lists.yoctoproject.org wrote:
>>> 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>
>>> ---
>>>   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                   | 29 +++++++++++++++++++++++--
>>>   12 files changed, 38 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/configs/arago-dunfell-config.txt 
>>> b/configs/arago-dunfell-config.txt
>>> index 60cc72a..71aaa0b 100644
>>> --- a/configs/arago-dunfell-config.txt
>>> +++ b/configs/arago-dunfell-config.txt
>>> @@ -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_BRANCH=dunfell
>>> diff --git a/configs/arago-dunfell-next-config.txt 
>>> b/configs/arago-dunfell-next-config.txt
>>> index e2eb202..18984cd 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
>>>   # 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_BRANCH=dunfell
>>> diff --git a/configs/arago-dunfell-wip-config.txt 
>>> b/configs/arago-dunfell-wip-config.txt
>>> index 60f9f0d..55a3b73 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
>>>   # 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_BRANCH=dunfell
>>> diff --git a/configs/arago-kirkstone-config.txt 
>>> b/configs/arago-kirkstone-config.txt
>>> index 0f3c001..1666a18 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 
>>>
>>>   
>>> 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_BRANCH=kirkstone
>>> diff --git a/configs/arago-master-config.txt 
>>> b/configs/arago-master-config.txt
>>> index 532a145..986ca6e 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 
>>>
>>>   
>>> 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_BRANCH=master
>>> diff --git a/configs/distroless-dunfell-config.txt 
>>> b/configs/distroless-dunfell-config.txt
>>> index 0d2ab28..923858f 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 
>>>
>>>   
>>> 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_BRANCH=dunfell
>>> diff --git a/configs/distroless-kirkstone-config.txt 
>>> b/configs/distroless-kirkstone-config.txt
>>> index 3b33992..288ab3b 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 
>>>
>>>   
>>> 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_BRANCH=kirkstone
>>> diff --git a/configs/distroless-master-config.txt 
>>> b/configs/distroless-master-config.txt
>>> index 5c55459..a355d0d 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 
>>>
>>>   
>>> 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_BRANCH=master
>>> diff --git a/configs/poky-dunfell-config.txt 
>>> b/configs/poky-dunfell-config.txt
>>> index 6c768e7..60fa653 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 
>>>
>>>   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_BRANCH=dunfell
>>> diff --git a/configs/poky-kirkstone-config.txt 
>>> b/configs/poky-kirkstone-config.txt
>>> index 0e57c64..658e189 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 
>>>
>>>   
>>> 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_BRANCH=kirkstone
>>> diff --git a/configs/poky-master-config.txt 
>>> b/configs/poky-master-config.txt
>>> index a541501..fe6b731 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 
>>>
>>>   
>>> 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_BRANCH=master
>>> diff --git a/oe-layertool-setup.sh b/oe-layertool-setup.sh
>>> index e05737b..50c6f1e 100755
>>> --- a/oe-layertool-setup.sh
>>> +++ b/oe-layertool-setup.sh
>>> @@ -1,4 +1,4 @@
>>> -#!/bin/sh
>>> +#!/bin/bash
>>>   # OE Build Enviroment Setup Script
>>>   #
>>> @@ -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_BRANCH="dunfell"
>>>   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,15 @@ 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_BRANCH" == "dunfell" ]; 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
>>> +    fi
>>> +
>>> +    if [[ "$BITBAKE_BRANCH" == "kirkstone" || "$BITBAKE_BRANCH" == 
>>> "master" ]]; then
>>> +        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
>>>   }
>>

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-arago] [oe-layersetup][master][RFC] oe-layersetup: Add config option for dunfell/kirkstone
  2022-07-07 17:07     ` Ryan Eatmon
@ 2022-07-14 16:53       ` Denys Dmytriyenko
  0 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2022-07-14 16:53 UTC (permalink / raw)
  To: reatmon; +Cc: Andrew Davis, Praneeth Bajjuri, meta-arago

On Thu, Jul 07, 2022 at 12:07:19PM -0500, Ryan Eatmon via lists.yoctoproject.org wrote:
> 
> 
> On 7/7/2022 11:19, Andrew Davis wrote:
> >On 7/7/22 8:05 AM, Ryan Eatmon via lists.yoctoproject.org wrote:
> >>Andrew, Denys,
> >>
> >>What are your thoughts on this approach to fixing the variable
> >>name change issue?
> >>
> >>
> >
> >How do we feel about just using BB_PRESERVE_ENV?
> >
> >Andrew
> 
> That has some potential issues with someone's environment having
> something set that impacts the recipes and builds.  It could make it
> harder to debug issues.  Right now the environment is tightly
> controlled, with only variables in the list getting though, but this
> just throws open the flood gates...

Ryan is correct - instructing bitbake to pass the entire environment to the 
build "as is" and unsanitized is quite dangerous and is not recommended. The 
whole point of sanitized environment is to have controlled and reproducible 
builds.

-- 
Denys


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [meta-arago] [oe-layersetup][master][RFC] oe-layersetup: Add config option for dunfell/kirkstone
  2022-07-07 13:03 Ryan Eatmon
@ 2022-07-14 17:05 ` Denys Dmytriyenko
  0 siblings, 0 replies; 5+ messages in thread
From: Denys Dmytriyenko @ 2022-07-14 17:05 UTC (permalink / raw)
  To: reatmon; +Cc: Praneeth Bajjuri, meta-arago

On Thu, Jul 07, 2022 at 08:03:41AM -0500, Ryan Eatmon via lists.yoctoproject.org wrote:
> 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>
> ---

<cut>

> @@ -853,8 +871,15 @@ 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_BRANCH" == "dunfell" ]; 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
> +    fi
> +
> +    if [[ "$BITBAKE_BRANCH" == "kirkstone" || "$BITBAKE_BRANCH" == "master" ]]; then
> +        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
>  }

The only comment I have is this is less scalable - with every new release 
you'd have to extend the second condition: kirkstone, langdale, master, etc.

Alternatively, this variable rename is ONLY due to the "inclusive language" 
change, otherwise OpenEmbedded is very conservative about breaking backward 
compatibility in such manner. So, might be better to code it as such - prior 
to "inclusive language" change, and post it. How do you call it is up to you. 
VARCHANGE=yes/no, INCLUSIVEVARS=yes/no, INCLUSIVELANG, etc.

-- 
Denys


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-07-14 17:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <16FF8DBB7909D3F6.549@lists.yoctoproject.org>
2022-07-07 13:05 ` [meta-arago] [oe-layersetup][master][RFC] oe-layersetup: Add config option for dunfell/kirkstone Ryan Eatmon
2022-07-07 16:19   ` Andrew Davis
2022-07-07 17:07     ` Ryan Eatmon
2022-07-14 16:53       ` Denys Dmytriyenko
2022-07-07 13:03 Ryan Eatmon
2022-07-14 17:05 ` [meta-arago] " Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.